{% extends 'base/layout.html' %} {% load static %} {% block head %} {# WebSocket Client object instantiation. Only if there are FastAPI Endpoints configured with WebSocket enabled. #} {% if fastapi_endpoint_list and fastapi_endpoint_list|length > 0 %} {% for object in fastapi_endpoint_list %} {% if object.use_websocket %} {% endif %} {% endfor %} {% endif %} {% endblock %} {% block content %}
{# Full Update Button#}
{% if fastapi_endpoint_list and fastapi_endpoint_list|length > 0 %} {% for object in fastapi_endpoint_list %}
{% if object.use_websocket %} {% if object.server_side_websocket %}

Using Polling (Server-Only)

{% else %}

Using WebSocket (Client-Server)

{% endif %} {% else %}

Using Simple HTTP Request (Server-Only)

{% endif %}
{# Sync Buttons #} {% if object.use_websocket %} {% if object.server_side_websocket %} {# Server-Only = Polling Connection between NetBox user (client) and Django (server) that then triggers FastAPI #}
{% else %} {# Client-Server = Direct WebSocket Connection between NetBox user (client) and FastAPI (server) #}
{% endif %} {% else %} {# Server-Only = Simple HTTP Request between NetBox user (client) and Django (server) that then triggers FastAPI #} {# TODO: Add htmx to this button to update the button style when the request is successful #} {% endif %}
{% endfor %} {% endif %}


{% if fastapi_endpoint_list and fastapi_endpoint_list|length > 0 %} {% for object in fastapi_endpoint_list %} {% if object.use_websocket %} {% include "netbox_proxbox/table/virtual_machines.html" %} {% include "netbox_proxbox/table/devices.html" %} {% endif %} {% endfor %} {% endif %}

Proxbox Configuration

{# Netbox Card #} {% if netbox_endpoint_list and netbox_endpoint_list|length > 0 %} {% for object in netbox_endpoint_list %} {% include "netbox_proxbox/home/netbox_card.html" %} {% endfor %} {% else %}

There is no NetBox Endpoint configured.


{% endif %} {% if fastapi_endpoint_list and fastapi_endpoint_list|length > 0 %} {# FastAPI Card #} {% for object in fastapi_endpoint_list %} {% include "netbox_proxbox/home/fastapi_card.html" %} {% endfor %} {% else %}

There is no FastAPI Endpoint configured.


{% endif %} {% if proxmox_endpoint_list and proxmox_endpoint_list|length > 0 %} {% for object in proxmox_endpoint_list %} {% if proxmox_endpoint_list|length == 1 %}
{% elif proxmox_endpoint_list|length == 2 %}
{% else %}
{% endif %} {# Proxmox Card #}
{% endfor %} {% else %}

There are no Proxmox Endpoints configured.


{% endif %}
{% include "netbox_proxbox/home/log_messages.html" %}
{% endblock %} {% block footer_links %} {{ block.super }} {% include "netbox_proxbox/footer.html" %} {% endblock %}