-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'add-multi-cluster' into develop
- Loading branch information
Showing
14 changed files
with
333 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import requests | ||
import base64 | ||
|
||
def get(**kwargs): | ||
branch = None | ||
|
||
owner = "netdevopsbr" | ||
repo = "netbox-proxbox" | ||
branch = "develop" | ||
|
||
# Get variable passed from function | ||
if kwargs.get("filename"): | ||
filename = kwargs.get("filename") | ||
|
||
# Construct the API endpoint URL | ||
url = f"https://api.github.com/repos/{owner}/{repo}/contents/{filename}" | ||
|
||
# Make the GET request | ||
response = requests.get(url) | ||
|
||
# Check if the request was successful (status code 200) | ||
if response.status_code == 200: | ||
# Retrieve the content from the response | ||
content_url = response.json()["download_url"] | ||
|
||
if content_url: | ||
markdown_content = requests.get(content_url) | ||
|
||
if markdown_content.status_code == 200: | ||
return markdown_content.text | ||
else: | ||
# Print the error message if the request was not successful | ||
print(f"Error: {response.status_code} - {response.json()['message']}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,46 @@ | ||
from extras.plugins import PluginMenuButton, PluginMenuItem | ||
from extras.plugins import PluginMenuButton, PluginMenuItem, PluginMenu | ||
from utilities.choices import ButtonColorChoices | ||
|
||
menu_items = ( | ||
PluginMenuItem( | ||
link="plugins:netbox_proxbox:home", | ||
link_text="Home", | ||
), | ||
fullupdate_item = PluginMenuItem( | ||
link='plugins:netbox_proxbox:home', | ||
link_text='Full Update', | ||
) | ||
|
||
contributing_item = PluginMenuItem( | ||
link='plugins:netbox_proxbox:contributing', | ||
link_text='Contributing!', | ||
) | ||
|
||
community_item = PluginMenuItem( | ||
link='plugins:netbox_proxbox:community', | ||
link_text='Community', | ||
buttons=[ | ||
PluginMenuButton( | ||
"plugins:netbox_proxbox:discussions", | ||
"GitHub Discussions", | ||
"mdi mdi-github", | ||
ButtonColorChoices.GRAY, | ||
), | ||
PluginMenuButton( | ||
"plugins:netbox_proxbox:discord", | ||
"Discord Community", | ||
"mdi mdi-forum", | ||
ButtonColorChoices.BLACK, | ||
), | ||
PluginMenuButton( | ||
"plugins:netbox_proxbox:telegram", | ||
"Telegram Community", | ||
"mdi mdi-send", | ||
ButtonColorChoices.BLUE, | ||
), | ||
] | ||
) | ||
|
||
''' | ||
buttons=( | ||
PluginMenuButton( | ||
# match the names of the path for create view defined in ./urls.py | ||
link="plugins:netbox_proxbox:proxmoxvm_add", | ||
# text that appears when hovering the ubtton | ||
title="Add", | ||
# font-awesome icon to use | ||
icon_class="mdi mdi-plus-thick", # 'fa fa-plus' didn't work | ||
# defines color button to green | ||
color=ButtonColorChoices.GREEN, | ||
permissions=["netbox_proxbox.add_proxmoxvm"], | ||
menu = PluginMenu( | ||
label='Proxbox', | ||
groups=( | ||
('Proxmox Plugin', (fullupdate_item,)), | ||
('Join our community', (contributing_item, community_item,)), | ||
), | ||
), | ||
''' | ||
icon_class='mdi mdi-dns' | ||
) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
{% extends 'base/layout.html' %} | ||
{% load static %} | ||
|
||
{% block content %} | ||
<head> | ||
<title>Font Awesome Icons</title> | ||
<!-- Add the Font Awesome CSS link in the head section --> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"> | ||
</head> | ||
<br> | ||
<h1 align="center"> | ||
{{ title }} | ||
</h1> | ||
<br> | ||
<div class="row"> | ||
<div class="col col-12 col-xl-6"> | ||
<div class="card"> | ||
<div align="center"> | ||
<br> | ||
<a target="_blank" href="https://discord.gg/9N3V4mpMXU"> | ||
<img src="{% static 'netbox_proxbox/discord.png' %}" alt="Discord Logo" width="50rem"> | ||
</a> | ||
</div> | ||
<div class="card-body"> | ||
<table class="table table-hover attr-table"> | ||
<tr> | ||
<th scope="row"><strong>English (en)</strong></th> | ||
<td>Join our Discord Community</td> | ||
</tr> | ||
<tr> | ||
<th scope="row"><strong>Português (pt-br)</strong></th> | ||
<td>Participe de nossa comunidade no Discord</td> | ||
</tr> | ||
</table> | ||
<div align="right"> | ||
<button class="btn btn-purple" type="button"> | ||
<a | ||
style="text-decoration: none; color: inherit" | ||
target="_blank" | ||
href="https://t.me/netboxbr" | ||
>Discord Community | ||
<i class="fa-brands fa-discord fa-shake" style="color: #ffffff;"></i> | ||
</a> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col col-12 col-xl-6"> | ||
<div class="card"> | ||
<div align="center"> | ||
<br> | ||
<a href="https://t.me/netboxbr" target="_blank"> | ||
<img src="{% static 'netbox_proxbox/telegram.png' %}" alt="Telegram Logo" width="50rem"> | ||
</a> | ||
</div> | ||
<div class="card-body"> | ||
<table class="table table-hover attr-table"> | ||
<tr> | ||
<th scope="row"><strong>English (en)</strong></th> | ||
<td>Join our Telegram Community</td> | ||
</tr> | ||
<tr> | ||
<th scope="row"><strong>Português (pt-br)</strong></th> | ||
<td>Participe de nossa comunidade no Telegram</td> | ||
</tr> | ||
</table> | ||
<div align="right"> | ||
<button class="btn btn-primary" type="button"> | ||
<a | ||
style="text-decoration: none; color: inherit" | ||
target="_blank" | ||
href="https://t.me/netboxbr" | ||
>Telegram Community | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
height="1em" | ||
viewBox="0 0 496 512"> | ||
<!--! Font Awesome Free 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><style>svg{fill:#ffffff}</style><path d="M248,8C111.033,8,0,119.033,0,256S111.033,504,248,504,496,392.967,496,256,384.967,8,248,8ZM362.952,176.66c-3.732,39.215-19.881,134.378-28.1,178.3-3.476,18.584-10.322,24.816-16.948,25.425-14.4,1.326-25.338-9.517-39.287-18.661-21.827-14.308-34.158-23.215-55.346-37.177-24.485-16.135-8.612-25,5.342-39.5,3.652-3.793,67.107-61.51,68.335-66.746.153-.655.3-3.1-1.154-4.384s-3.59-.849-5.135-.5q-3.283.746-104.608,69.142-14.845,10.194-26.894,9.934c-8.855-.191-25.888-5.006-38.551-9.123-15.531-5.048-27.875-7.717-26.8-16.291q.84-6.7,18.45-13.7,108.446-47.248,144.628-62.3c68.872-28.647,83.183-33.623,92.511-33.789,2.052-.034,6.639.474,9.61,2.885a10.452,10.452,0,0,1,3.53,6.716A43.765,43.765,0,0,1,362.952,176.66Z"/> | ||
</svg> | ||
</a> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col col-12 col-xl-6"> | ||
<div class="card"> | ||
<div align="center"> | ||
<br> | ||
<a target="_blank" href="https://github.com/netdevopsbr"> | ||
<img src="{% static 'netbox_proxbox/github.png' %}" alt="Discord Logo" width="50rem"> | ||
</a> | ||
</div> | ||
<div class="card-body"> | ||
<table class="table table-hover attr-table"> | ||
<tr> | ||
<th scope="row"><strong>English (en)</strong></th> | ||
<td>Know more about <strong>@netdevopsbr</strong> and other <strong>opensource projects</strong></td> | ||
</tr> | ||
<tr> | ||
<th scope="row"><strong>Português (pt-br)</strong></th> | ||
<td>Saiba mais sobre a <strong>@netdevopsbr</strong> e outros <strong>projetos opensource</strong></td> | ||
</tr> | ||
</table> | ||
<div> | ||
|
||
</div> | ||
<div align="right"> | ||
<button class="btn btn-black" type="button"> | ||
<a | ||
style="text-decoration: none; color: inherit" | ||
target="_blank" | ||
href="https://github.com/netdevopsbr" | ||
>@netdevopsbr | ||
<i class="fa-brands fa-github fa-shake" style="color: #ffffff;"></i> | ||
</a> | ||
</button> | ||
<button class="btn btn-black" type="button"> | ||
<a | ||
style="text-decoration: none; color: inherit" | ||
target="_blank" | ||
href="https://github.com/emersonfelipesp" | ||
>@emersonfelipesp | ||
<i class="fa-brands fa-github fa-shake" style="color: #ffffff;"></i> | ||
</a> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="col col-12 col-xl-6"> | ||
<div class="card"> | ||
<div align="center"> | ||
<br> | ||
<a href="https://www.linkedin.com/in/emersonfelipesp/" target="_blank"> | ||
<img src="{% static 'netbox_proxbox/linkedin.png' %}" alt="Telegram Logo" width="50rem"> | ||
</a> | ||
</div> | ||
<div class="card-body"> | ||
<table class="table table-hover attr-table"> | ||
<tr> | ||
<th scope="row"><strong>English (en)</strong></th> | ||
<td>Would you like to know more about my work? <strong>Follow or connect with me!</strong></td> | ||
</tr> | ||
<tr> | ||
<th scope="row"><strong>Português (pt-br)</strong></th> | ||
<td>Gostaria de saber mais sobre o meu trabalho? <strong>Me siga ou conecte-se comigo!</strong></td> | ||
</tr> | ||
</table> | ||
<div align="right"> | ||
<button class="btn btn-primary" type="button"> | ||
<a | ||
style="text-decoration: none; color: inherit" | ||
target="_blank" | ||
href="https://t.me/netboxbr" | ||
>Follow/Connect | ||
<i class="fa-brands fa-linkedin fa-shake" style="color: #ffffff;"></i> | ||
</a> | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% extends 'base/layout.html' %} | ||
{% block content %} | ||
<div class="row"> | ||
<div class="card"> | ||
<h1 class="card-header"> | ||
{{ title }} | ||
</h1> | ||
<div class="card-body"> | ||
{% if html %} | ||
{{ html|markdown }} | ||
{% else %} | ||
<span class="text-muted">None</span> | ||
{% endif %} | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.