node-detail.html 3.99 KB
Newer Older
1
{% extends "dashboard/base.html" %}
2
{% load staticfiles %}
3
{% load i18n %}
4 5 6

{% block title-page %}{{ node.name }} | {% trans "Node" %}{% endblock %}

7 8 9
{% block content %}
<div class="body-content">
  <div class="page-header">
Guba Sándor committed
10
    {% if request.user.is_superuser %}
11 12 13
    <div class="pull-right" id="ops">
      {% include "dashboard/vm-detail/_operations.html" %}
    </div>
Guba Sándor committed
14 15 16
    <div class="pull-right" style="padding-top: 15px;">
     <a title="{% trans "Rename" %}" href="#" class="btn btn-default btn-xs node-details-rename-button"><i class="fa fa-pencil"></i></a>
     <a title="{% trans "Delete" %}" data-node-pk="{{ node.pk }}" class="btn btn-default btn-xs real-link node-delete" href="{% url "dashboard.views.delete-node" pk=node.pk %}"><i class="fa fa-trash-o"></i></a>
17
    </div>
Guba Sándor committed
18 19
    {% endif  %}
    <h1>
20 21 22
      <div id="node-details-rename">
       <form action="" method="POST" id="node-details-rename-form">
         {% csrf_token %}
23
         <input id="node-details-rename-name" class="form-control" name="new_name" type="text" value="{{ node.name }}"/>
24 25
         <button type="submit" id="node-details-rename-submit" class="btn">{% trans "Rename" %}</button>
       </form>
26
      </div>
27 28
      <div id="node-details-h1-name">
      {{ node.name }}
29 30
      </div>
    </h1>
31 32
  </div>
  <div class="row">
33
    <div class="col-md-2" id="node-info-pane">
34
      <div id="node-info-data" class="big">
35
        <span id="node-details-state" class="label
36
          {% if node.state == 'ACTIVE' %}label-success
37 38
          {% elif node.state == 'PASSIVE' %}label-warning
          {% else %}label-danger{% endif %}">
39 40
          <i class="fa {{ node.get_status_icon }}"></i> {{ node.get_status_display|upper }}
        </span>
41
      </div>
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
      <div>
        {% if node.enabled %}
          <span class="label label-success">{% trans "Enabled" %}</span>
          {% if node.schedule_enabled %}
            <span class="label label-success">{% trans "Schedule enabled" %}</span>
          {% else %}
            <span class="label label-warning">{% trans "Schedule disabled" %}</span>
          {% endif %}
        {% else %}
          <span class="label label-warning">{% trans "Disabled" %}</span>
        {% endif %}
        {% if node.online %}
          <span class="label label-success">{% trans "Online" %}</span>
        {% else %}
          <span class="label label-warning">{% trans "Offline" %}</span>
        {% endif %}
      </div>
59
    </div>
60
    <div class="col-md-10" id="node-detail-pane">
61
      <div class="panel panel-default" id="node-detail-panel">
62 63 64
        <ul class="nav nav-pills panel-heading">
          <li class="active">
            <a href="#home" data-toggle="pill" class="text-center">
65
              <i class="fa fa-compass fa-2x"></i><br>
66 67 68
              {% trans "Home" %}
            </a>
          </li>
69 70
          <li>
            <a href="#resources" data-toggle="pill" class="text-center">
71
              <i class="fa fa-tasks fa-2x"></i><br>
72 73 74
              {% trans "Resources" %}
            </a>
          </li>
Bach Dániel committed
75
          <li>
76
            <a href="{% url "dashboard.views.vm-list" %}?s=node_exact:{{ node.name }}"
77
              target="blank" class="text-center">
78
              <i class="fa fa-desktop fa-2x"></i><br>
79 80 81
              {% trans "Virtual Machines" %}
            </a>
          </li>
Bach Dániel committed
82
          <li>
83 84
            <a href="#activity" data-toggle="pill" class="text-center"
               data-activity-url="{% url "dashboard.views.node-activity-list" node.pk %}">
85
              <i class="fa fa-clock-o fa-2x"></i><br>
86 87 88
              {% trans "Activity" %}
            </a>
          </li>
Bach Dániel committed
89
        </ul>
90

91
        <div id="panel-body"  class="tab-content panel-body">
92
          <div class="tab-pane active" id="home">{% include "dashboard/node-detail/home.html" %}</div>
Bach Dániel committed
93
          <div class="tab-pane" id="resources">{% include "dashboard/node-detail/resources.html" %}</div>
94
          <div class="tab-pane" id="activity">{% include "dashboard/node-detail/activity.html" %}</div>
Bach Dániel committed
95
        </div>
96 97 98 99 100
      </div>
    </div>
  </div>
</div>
{% endblock %}