{% extends 'virtualization/cluster/base.html' %}
{% load helpers %}
{% load plugins %}

{% block content %}
<div class="row">
  <div class="col col-md-6">
    <div class="card">
        <h5 class="card-header">
            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">Type</th>
                    <td><a href="{{ object.type.get_absolute_url }}">{{ object.type }}</a></td>
                </tr>
                <tr>
                    <th scope="row">Group</th>
                    <td>
                        {% if object.group %}
                            <a href="{{ object.group.get_absolute_url }}">{{ object.group }}</a>
                        {% else %}
                            <span class="text-muted">None</span>
                        {% endif %}
                    </td>
                </tr>
                <tr>
                    <th scope="row">Tenant</th>
                    <td>
                        {% if object.tenant %}
                            <a href="{{ object.tenant.get_absolute_url }}">{{ object.tenant }}</a>
                        {% else %}
                            <span class="text-muted">None</span>
                        {% endif %}
                    </td>
                </tr>
                <tr>
                    <th scope="row">Site</th>
                    <td>
                        {% if object.site %}
                            <a href="{{ object.site.get_absolute_url }}">{{ object.site }}</a>
                        {% else %}
                            <span class="text-muted">None</span>
                        {% endif %}
                    </td>
                </tr>
                <tr>
                    <th scope="row">Virtual Machines</th>
                    <td><a href="{% url 'virtualization:virtualmachine_list' %}?cluster_id={{ object.pk }}">{{ object.virtual_machines.count }}</a></td>
                </tr>
            </table>
        </div>
    </div>
    {% include 'inc/panels/comments.html' %}
    {% plugin_left_page object %}
  </div>
  <div class="col col-md-6">
    {% include 'inc/panels/custom_fields.html' %}
    {% include 'inc/panels/tags.html' %}
    {% include 'inc/panels/contacts.html' %}
    {% plugin_right_page object %}
  </div>
</div>
<div class="row">
  <div class="col col-md-12">
    {% plugin_full_width_page object %}
  </div>
</div>
{% endblock %}
