{% extends 'generic/object.html' %}

{% block content %}
    <div class="row mb-3">
        <div class="col col-md-6">
            <div class="card">
                <h5 class="card-header">Proxmox Endpoint (Cluster)</h5>
                
                <div class="card-body">
    
                    <table class="table table-hover attr-table">
                        <tr>
                            <th scope="row">Name</th>
                            <td>{{ object.name }}</td>
                        </tr>
                        <tr>
                            <th scope="row">IP Address</th>
                            <td>
                                {% if object.ip_address %}
                                    <a href="{{ object.ip_address.get_absolute_url }}">{{ object.ip_address }}</a>
                                {% else %}
                                    &mdash;
                                {% endif %}
                            </td>
                        </tr>
                        <tr>
                            <th scope="row">Domain</th>
                            <td>{{ object.domain|default:"&mdash;" }}</td>
                        </tr>
                        <tr>
                            <th scope="row">Port</th>
                            <td>{{ object.port }}</td>
                        </tr>
                        <tr>
                            <th scope="row">Username</th>
                            <td>{{ object.username }}</td>
                        </tr>
                        <tr>
                            <th scope="row">Mode</th>
                            <td>{{ object.mode }}</td>
                        </tr>
                        <tr>
                            <th scope="row">Version</th>
                            <td>{{ object.version|default:"&mdash;" }}</td>
                        </tr>
                        <tr>
                            <th scope="row">Site</th>
                            <td>
                                {% if object.netbox_site %}
                                    <a href="{{ object.netbox_site.get_absolute_url }}">{{ object.netbox_site }}</a>
                                {% else %}
                                    <span class="text-muted">Default (auto)</span>
                                {% endif %}
                            </td>
                        </tr>
                        <tr>
                            <th scope="row">VRF</th>
                            <td>
                                {% if object.netbox_vrf %}
                                    <a href="{{ object.netbox_vrf.get_absolute_url }}">{{ object.netbox_vrf }}</a>
                                {% else %}
                                    <span class="text-muted">Global routing table</span>
                                {% endif %}
                            </td>
                        </tr>
                        <tr>
                            <th scope="row">Node Device Type</th>
                            <td>
                                {% if object.netbox_device_type %}
                                    <a href="{{ object.netbox_device_type.get_absolute_url }}">{{ object.netbox_device_type }}</a>
                                {% else %}
                                    <span class="text-muted">Generic (Proxmox Node)</span>
                                {% endif %}
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            {% include 'inc/panels/custom_fields.html' %}
        </div>
        <div class="col col-md-6">
            {% include 'inc/panels/tags.html' %}
            {% include 'inc/panels/comments.html' %}
        </div>
    </div>
{% endblock %}