node-detail.html 4.03 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
      <a title="{% trans "Rename" %}" href="#" class="btn btn-default btn-xs node-details-rename-button"><i class="fa fa-pencil"></i></a>
11
      <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>
12
      <a title="{% trans "Help" %}" href="#" class="btn btn-default btn-xs node-details-help-button"><i class="fa fa-question"></i></a>
13
    </div>
14
   <h1>
15 16 17
      <div id="node-details-rename">
       <form action="" method="POST" id="node-details-rename-form">
         {% csrf_token %}
18
         <input id="node-details-rename-name" class="form-control" name="new_name" type="text" value="{{ node.name }}"/>
19 20
         <button type="submit" id="node-details-rename-submit" class="btn">{% trans "Rename" %}</button>
       </form>
21
      </div>
22 23
      <div id="node-details-h1-name">
      {{ node.name }}
24 25
      </div>
    </h1>
26 27 28 29 30 31 32 33
    <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>
34
          {% trans "Disable node and move all instances to other one." %}
35 36 37 38 39 40 41 42 43 44 45
        </li>
        <li>
          <strong>{% trans "Enable" %}:</strong>
          {% trans "Enables node." %}
        </li>
        <li>
          <strong>{% trans "Disable" %}:</strong>
          {% trans "Disables node." %}
        </li>
        <li>
          <strong>{% trans "Delete" %}:</strong>
46
          {% trans "Remove node and it's host." %}
47 48 49
        </li>
      </ul>
    </div>
50 51
  </div>
  <div class="row">
52
    <div class="col-md-2" id="node-info-pane">
53
      <div id="node-info-data" class="big">
54 55 56 57 58 59 60
        <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>
61 62
      </div>
    </div>
63
    <div class="col-md-10" id="node-detail-pane">
64
      <div class="panel panel-default" id="node-detail-panel">
65 66 67
        <ul class="nav nav-pills panel-heading">
          <li class="active">
            <a href="#home" data-toggle="pill" class="text-center">
68
              <i class="fa fa-compass fa-2x"></i><br>
69 70 71
              {% trans "Home" %}
            </a>
          </li>
72 73
          <li>
            <a href="#resources" data-toggle="pill" class="text-center">
74
              <i class="fa fa-tasks fa-2x"></i><br>
75 76 77
              {% trans "Resources" %}
            </a>
          </li>
78
	  <li>
79 80
            <a href="{% url "dashboard.views.vm-list" %}?s=node:{{ node.name }}" 
              target="blank" class="text-center">
81
              <i class="fa fa-desktop fa-2x"></i><br>
82 83 84
              {% trans "Virtual Machines" %}
            </a>
          </li>
85
 	  <li>
86
            <a href="#activity" data-toggle="pill" class="text-center">
87
              <i class="fa fa-clock-o fa-2x"></i><br>
88 89 90
              {% trans "Activity" %}
            </a>
          </li>
91
	</ul>
92

93
        <div id="panel-body"  class="tab-content panel-body">
94 95 96
          <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>
97
  	</div>
98 99 100 101 102
      </div>
    </div>
  </div>
</div>
{% endblock %}
103

104
{% block extra_js %}
105
  <script src="{{ STATIC_URL}}dashboard/node-details.js"></script>
106
{% endblock %}