node-detail.html 4.78 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 17
    </div>
   <h1>	  
18 19 20 21 22 23
      <div id="node-details-rename">
       <form action="" method="POST" id="node-details-rename-form">
         {% csrf_token %}
         <input id="node-details-rename-name" class="form-control" name="new_name" type="text" value="{{ node.name }}"/> 
         <button type="submit" id="node-details-rename-submit" class="btn">{% trans "Rename" %}</button>
       </form>
24 25
      </div>
      <div id="node-details-h1-name">    
26
      {{ 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
      <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
61
			{% endif %}">{{ node.get_status_display|upper }}</span>
62 63
      </div>
    </div>
64
    <div class="col-md-10" id="node-detail-pane">
65
      <div class="panel panel-default" id="node-detail-panel">
66 67 68
        <ul class="nav nav-pills panel-heading">
          <li class="active">
            <a href="#home" data-toggle="pill" class="text-center">
69
              <i class="fa fa-compass fa-2x"></i><br>
70 71 72
              {% trans "Home" %}</a></li>
          <li>
            <a href="#resources" data-toggle="pill" class="text-center">
73
              <i class="fa fa-tasks fa-2x"></i><br>
74 75
              {% trans "Resources" %}</a></li>
	  <li>
76
            <a href="#virtualmachines" data-toggle="pill" class="text-center">
77
              <i class="fa fa-desktop fa-2x"></i><br>
78 79
              {% trans "Virtual Machines" %}</a></li>
 	  <li>
80
            <a href="#activity" data-toggle="pill" class="text-center">
81
              <i class="fa fa-clock-o fa-2x"></i><br>
82
              {% trans "Activity" %}</a></li>
83
	</ul>
84

85
        <div id="panel-body"  class="tab-content panel-body">
86 87 88 89
          <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>
          <div class="tab-pane" id="virtualmachines">{% include "dashboard/node-detail/vm.html" %}</div>
90
  	</div>
91 92 93 94
      </div>
    </div>
  </div>
</div>
95 96 97 98 99
<style>
  .popover {
    max-width: 600px;
  }
</style>
100 101

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