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

{% block content %}
<div class="body-content">
  <div class="page-header">
7 8 9 10 11 12 13 14 15 16 17 18 19
    <h1>	  
      <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>
  </div>
  <div id="node-details-h1-name">    
      {{ node.name }} 
  </div>
</h1>
      <small>{{ node.get_connect_host }}</small>
20 21
  </div>
  <div class="row">
22
    <div class="col-md-4" id="node-info-pane">
23
      <div id="node-info-data" class="big">
24 25 26 27
      <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
28
			{% endif %}">{{ node.state }}</span>
29 30 31
<div class="btn-group">
  <button type="button" class="btn {{ btn_size }} btn-warning nojs-dropdown-toogle dropdown-toggle" data-toggle="dropdown">Action <i class="icon-caret-down"></i></button>
  <ul class="dropdown-menu nojs-dropdown-toogle" role="menu">
32
    <li><a href="#" class="node-details-rename-button"><i class="icon-pencil"></i> {% trans "Rename" %}</a></li>
33
    <li><a href="#"><i class="icon-cloud-upload"></i> Flush</a></li>
34 35 36 37 38
  {% if node.enabled %}
    <li><a style="display:none" data-status="enable" data-node-pk="{{ node.pk }}" class="real-link node-enable" href="{% url "dashboard.views.status-node" pk=node.pk %}?next={{ request.path }}&status=enable"><i class="icon-check"></i> Enable</a>
        <a style="display:block" data-status="disable" data-node-pk="{{ node.pk }}" class="real-link node-enable" href="{% url "dashboard.views.status-node" pk=node.pk %}?next={{ request.path }}&status=disable"><i class="icon-remove"></i> Disable</a></li>
  {% else %}
    <li><a style="display:block" data-status="enable" data-node-pk="{{ node.pk }}" class="real-link node-enable" href="{% url "dashboard.views.status-node" pk=node.pk %}?next={{ request.path }}&status=enable" >
39
	<i class="icon-check"></i> Enable</a>
40 41
      <a style="display:none" data-status="disable" data-node-pk="{{ node.pk }}" class="real-link node-enable" href="{% url "dashboard.views.status-node" pk=node.pk %}?next={{ request.path }}&status=disable" ><i class="icon-remove"></i> Disable</a></li>
  {% endif %}
42 43 44
    <li><a data-node-pk="{{ node.pk }}" class="real-link node-delete" href="{% url "dashboard.views.delete-node" pk=node.pk %}?next={{ request.path }}"><i class="icon-trash"></i> Delete</a></li>
  </ul>
</div>
45 46
      </div>
    </div>
47 48
    <div class="col-md-8" id="node-detail-pane">
      <div class="panel panel-default" id="node-detail-panel">
49 50 51 52 53 54 55 56 57 58
        <ul class="nav nav-pills panel-heading">
          <li class="active">
            <a href="#home" data-toggle="pill" class="text-center">
              <i class="icon-compass icon-2x"></i><br>
              {% trans "Home" %}</a></li>
          <li>
            <a href="#resources" data-toggle="pill" class="text-center">
              <i class="icon-tasks icon-2x"></i><br>
              {% trans "Resources" %}</a></li>
	  <li>
59 60 61 62
            <a href="#virtualmachines" data-toggle="pill" class="text-center">
              <i class="icon-desktop icon-2x"></i><br>
              {% trans "Virtual Machines" %}</a></li>
 	  <li>
63 64 65
            <a href="#activity" data-toggle="pill" class="text-center">
              <i class="icon-time icon-2x"></i><br>
              {% trans "Activity" %}</a></li>
66
	</ul>
67

68
        <div id="panel-body"  class="tab-content panel-body">
69 70 71 72
          <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>
73
  	</div>
74 75 76 77
      </div>
    </div>
  </div>
</div>
78 79 80 81 82
<style>
  .popover {
    max-width: 600px;
  }
</style>
83 84

{% endblock %}
85
{% block extra_js %}
86
<script src="{{ STATIC_URL}}dashboard/node-details.js"></script>
87 88
{% endblock %}