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

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

6 7 8
{% block content %}
<div class="body-content">
  <div class="page-header">
9
     <div class="pull-right" style="padding-top: 15px;">
10 11 12
      <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 "Flush" %}" data-node-pk="{{ node.pk }}" class="btn btn-default btn-xs real-link node-flush" href="{% url "dashboard.views.flush-node" pk=node.pk %}"><i class="fa fa-cloud-upload"></i></a>
      <a title="{% trans "Enable" %}" style="display:{% if node.enabled %}none{% else %}inline-block{% endif %}" data-node-pk="{{ node.pk }}" class="btn btn-default btn-xs real-link node-enable" href="{% url "dashboard.views.status-node" pk=node.pk %}?next={{ request.path }}"><i class="fa fa-check"></i></a>
13 14
      <a title="{% trans "Disable" %}" style="display:{% if not node.enabled %}none{% else %}inline-block{% endif %}" data-node-pk="{{ node.pk }}" class="btn btn-default btn-xs real-link node-enable" href="{% url "dashboard.views.status-node" pk=node.pk %}?next={{ request.path }}"><i class="fa fa-ban"></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>
15
      <a title="{% trans "Help" %}" href="#" class="btn btn-default btn-xs node-details-help-button"><i class="fa fa-question"></i></a>
16
    </div>
17
   <h1>
18 19 20
      <div id="node-details-rename">
       <form action="" method="POST" id="node-details-rename-form">
         {% csrf_token %}
21
         <input id="node-details-rename-name" class="form-control" name="new_name" type="text" value="{{ node.name }}"/>
22 23
         <button type="submit" id="node-details-rename-submit" class="btn">{% trans "Rename" %}</button>
       </form>
24
      </div>
25 26
      <div id="node-details-h1-name">
      {{ node.name }}
27 28
      </div>
    </h1>
29 30 31 32 33 34 35 36
    <div class="node-details-help js-hidden">
      <ul style="list-style: none;">
        <li>
          <strong>{% trans "Rename" %}:</strong>
          {% trans "Change the name of the node." %}
        </li>
        <li>
          <strong>{% trans "Flush" %}:</strong>
37
          {% trans "Disable node and move all instances to other one." %}
38 39 40 41 42 43 44 45 46 47 48
        </li>
        <li>
          <strong>{% trans "Enable" %}:</strong>
          {% trans "Enables node." %}
        </li>
        <li>
          <strong>{% trans "Disable" %}:</strong>
          {% trans "Disables node." %}
        </li>
        <li>
          <strong>{% trans "Delete" %}:</strong>
49
          {% trans "Remove node and it's host." %}
50 51 52
        </li>
      </ul>
    </div>
53 54
  </div>
  <div class="row">
55
    <div class="col-md-2" id="node-info-pane">
56
      <div id="node-info-data" class="big">
57 58 59 60 61 62 63
        <span id="node-details-state" class="label
          {% if node.state == 'ONLINE' %}label-success
          {% elif node.state == 'MISSING' %}label-danger
          {% elif node.state == 'DISABLED' %}label-warning
          {% elif node.state == 'OFFLINE' %}label-warning{% endif %}">
          <i class="fa {{ node.get_status_icon }}"></i> {{ node.get_status_display|upper }}
        </span>
64 65
      </div>
    </div>
66
    <div class="col-md-10" id="node-detail-pane">
67
      <div class="panel panel-default" id="node-detail-panel">
68 69 70
        <ul class="nav nav-pills panel-heading">
          <li class="active">
            <a href="#home" data-toggle="pill" class="text-center">
71
              <i class="fa fa-compass fa-2x"></i><br>
72 73 74
              {% trans "Home" %}
            </a>
          </li>
75 76
          <li>
            <a href="#resources" data-toggle="pill" class="text-center">
77
              <i class="fa fa-tasks fa-2x"></i><br>
78 79 80
              {% trans "Resources" %}
            </a>
          </li>
81
	  <li>
82 83
            <a href="{% url "dashboard.views.vm-list" %}?s=node:{{ node.name }}" 
              target="blank" class="text-center">
84
              <i class="fa fa-desktop fa-2x"></i><br>
85 86 87
              {% trans "Virtual Machines" %}
            </a>
          </li>
88
 	  <li>
89
            <a href="#activity" data-toggle="pill" class="text-center">
90
              <i class="fa fa-clock-o fa-2x"></i><br>
91 92 93
              {% trans "Activity" %}
            </a>
          </li>
94
	</ul>
95

96
        <div id="panel-body"  class="tab-content panel-body">
97 98 99
          <div class="tab-pane active" id="home">{% include "dashboard/node-detail/home.html" %}</div>
	  <div class="tab-pane" id="resources">{% include "dashboard/node-detail/resources.html" %}</div>
          <div class="tab-pane" id="activity">{% include "dashboard/node-detail/activity.html" %}</div>
100
  	</div>
101 102 103 104 105
      </div>
    </div>
  </div>
</div>
{% endblock %}
106

107
{% block extra_js %}
108
  <script src="{{ STATIC_URL}}dashboard/node-details.js"></script>
109
{% endblock %}