{% extends 'base.html' %}
{% load render_table from django_tables2 %}
{% load nb_buttons %}
{% load static %}
{% load helpers %}
{% load custom_links %}
{% load plugins %}

{% block title %}{{ object }}{% endblock %}

{% block header %}
    <div class="row noprint">        
    </div>
    <div class="pull-right noprint">
        {% edit_button object %}
        {% delete_button object %}
    </div>
    <h1>{{ object }}</h1>
    <ul class="nav nav-tabs">
        <li role="presentation" class="active">
            <a href="{{ object.get_absolute_url }}">Application</a>
        </li>
        <li role="presentation">
            <a href="{% url 'plugins:nb_service:application_devices' pk=object.pk %}">Devices</a>
        </li>
        <li role="presentation">
            <a href="{% url 'plugins:nb_service:application_vms' pk=object.pk %}">Virtual Machines</a>
        </li>
    </ul>
{% endblock %}

{% block content %}
    <div class="row">
        <div class="col-md-12">
            <div class="tab-content">
                <div role="tabpanel" class="tab-pane active" id="details">
                    <div class="row">
                        <div class="col-md-6">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <strong>Application</strong>
                                </div>
                                <table class="table table-hover panel-body attr-table">
                                    <tr>
                                        <td>Name</td>
                                        <td>{{ object.name }}</td>
                                    </tr>
                                    <tr>
                                        <td>Version</td>
                                        <td>{{ object.version }}</td>
                                    </tr>
                                    <tr>
                                        <td>Ports</td>
                                        <td>{{ object.ports }}</td>
                                    </tr>
                                    
                                </table>
                            </div>
                        </div>                      
                    </div>             
                </div>
            </div>
        </div>
    </div>
{% endblock %}
