index-nodes.html 3.62 KB
Newer Older
1
{% load i18n %}
2
<div class="panel panel-default">
3 4 5
  <div class="panel-heading">
    <div class="pull-right toolbar">
      <div class="btn-group">
6 7 8 9
        <a href="#index-graph-view" data-index-box="node" class="btn btn-default btn-xs"
          data-container="body"><i class="fa fa-dashboard"></i></a>
        <a href="#index-list-view" data-index-box="node" class="btn btn-default btn-xs disabled"
          data-container="body"><i class="fa fa-list"></i></a>
10
      </div>
11
      <span class="btn btn-default btn-xs infobtn" data-container="body" title="{% trans "List of compute nodes, also called worker nodes or hypervisors, which run the virtual machines." %}">
12 13
        <i class="fa fa-info-circle"></i>
      </span>
14 15
    </div>
    <h3 class="no-margin">
16
      <i class="fa fa-sitemap"></i> {% trans "Nodes" %}
17
    </h3>
18 19
  </div >
  <div class="list-group" id="node-list-view">
20 21
    <div id="dashboard-node-list">
      {% for i in nodes %}
Bach Dániel committed
22
      <a href="{{ i.get_absolute_url }}" class="list-group-item real-link
23
        {% if forloop.last and nodes|length < 5 %} list-group-item-last{% endif %}">
24
        <span class="index-node-list-name">
25
          <i class="fa {{ i.get_status_icon }}" title="{{ i.get_status_display }}"></i>
Bach Dániel committed
26
           {{ i.name }}
27
        </span>
Bach Dániel committed
28
        <div style="clear: both;"></div>
29
      </a>
30 31
      {% endfor %}
    </div>
32
  </div><!-- #node-list-view -->
33

34
  <div class="panel-body" id="node-graph-view" style="display: none; min-height: 204px;">
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
    <p class="pull-right">
      <input class="knob" data-fgColor="chartreuse"
      data-thickness=".4" data-width="60" data-height="60" data-readOnly="true"
      value="{% widthratio node_num.running sum_node_num 100 %}">
    </p>
    <p>
      <span class="big">
        <big>{{ node_num.running }}</big> running
      </span>
      + <big>{{ node_num.missing }}</big>
      missing + <br><big>{{ node_num.disabled }}</big> disabled + <big>{{ node_num.offline }}</big> offline
    </p>
    <ul class="list-inline" id="dashboard-node-taglist">
      {% for i in nodes %}
      <a href="{{ i.get_absolute_url }}" class="label {{i.get_status_label}}" >
      <i class="fa {{ i.get_status_icon }}" title="{{ i.get_status_display }}"></i> {{ i.name }}</a>
      {% endfor %}
    </ul>
53 54

    <div class="clearfix"></div>
55 56 57 58
  </div>

  <div href="#" class="list-group-item list-group-footer">
    <div class="row">
59 60 61 62 63 64 65 66 67 68 69 70 71
      <div class="col-xs-6">
        <form action="{% url "dashboard.views.node-list" %}" method="GET"
          id="dashboard-node-search-form">
          <div class="input-group input-group-sm">
            <input id="dashboard-node-search-input" type="text" class="form-control"
             placeholder="{% trans "Search..." %}" />
            <div class="input-group-btn">
              <button type="submit" class="btn btn-primary" title="{% trans "Search" %}" data-container="body">
                <i class="fa fa-search"></i>
              </button>
            </div>
          </div>
        </form>
72
      </div>
73
      <div class="col-xs-6 text-right">
74 75
        <a class="btn btn-primary btn-xs" href="{% url "dashboard.views.node-list" %}">
          <i class="fa fa-chevron-circle-right"></i>
76 77 78 79 80
          {% if more_nodes > 0 %}
              {% blocktrans with count=more_nodes %}<strong>{{count}}</strong>  more{% endblocktrans %}
          {% else %}
              {% trans "list" %}
          {% endif %}
81
        </a>
Bach Dániel committed
82
        {% if request.user.is_superuser %}
83 84 85
        <a class="btn btn-success btn-xs node-create" href="{% url "dashboard.views.node-create" %}">
          <i class="fa fa-plus-circle"></i> {% trans "new" %}
        </a>
Bach Dániel committed
86
        {% endif  %}
87 88 89
      </div>
    </div>
  </div>
90
</div>