index-nodes.html 3.93 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
        <a href="#index-graph-view" data-index-box="node" class="btn btn-default btn-xs"><i class="icon-dashboard"></i></a>
        <a href="#index-list-view" data-index-box="node" class="btn btn-default btn-xs disabled"><i class="icon-list"></i></a>

9
      </div>
10
      <span class="btn btn-default btn-xs infobtn" title="{% trans "List of compute nodes, also called worker nodes or hypervisors, which run the virtual machines." %}"><i class="icon-info-sign"></i></span>
11 12
    </div>
    <h3 class="no-margin">
13
      <i class="icon-sitemap"></i> {% trans "Nodes" %}
14
    </h3>
15 16 17 18 19 20 21 22 23 24
  </div >
  <div class="list-group" id="node-list-view">
    {% for i in nodes %}
    <a href="{% url "dashboard.views.node-detail" pk=i.pk %}" class="list-group-item">
    <i class="icon-{% if i.enabled == True %}play-sign{% else %}pause{% endif %}"></i> {{ i.name }} <div class="pull-right"><i class="icon-star text-primary" title="Mark as favorite."></i></div>
      </a>
    {% endfor %}
    <div href="#" class="list-group-item list-group-footer">
      <div class="row">
        <div class="col-sm-6 col-xs-6 input-group input-group-sm">
25
          <input type="text" class="form-control" placeholder="{% trans "Search..." %}" />
26 27 28 29 30 31 32 33 34 35
          <div class="input-group-btn">
            <button type="submit" class="form-control btn btn-primary" title="search"><i class="icon-search"></i></button>
          </div>
        </div>
        <div class="col-sm-6 text-right">
          {% if more_nodes > 0 %}
          <a class="btn btn-primary btn-xs" href="{% url "dashboard.views.node-list" %}">
            <i class="icon-chevron-sign-right"></i> <strong>{{ more_nodes }}</strong>  more  
          </a>
          {% endif %}
Kálmán Viktor committed
36
          <a class="btn btn-success btn-xs node-create" href="{% url "dashboard.views.node-create" %}"><i class="icon-plus-sign"></i> {% trans "new" %}</a>
37 38 39
        </div>
      </div>
    </div>
40
  </div>
41 42 43 44 45
 
  <div class="panel-body" id="node-graph-view" style="display: none">
	  <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>
46
      <ul class="list-inline">
47 48 49 50 51 52
	      {% for i in nodes %}
      <a class="label {% if i.state == 'ONLINE' %}label-success
                        {% elif i.state == 'MISSING' %}label-danger
                        {% elif i.state == 'DISABLED' %}label-warning
                        {% elif i.state == 'OFFLINE' %}label-warning
                        {% endif %}" href="{% url "dashboard.views.node-detail" pk=i.pk %}"><i class="icon-{% if i.enabled == True %}play-sign{% else %}pause{% endif %}"></i> {{ i.name}}</a>
53 54
   {% endfor %}
   </ul>
55 56

    <div class="clearfix"></div>
57 58
 <div class="row">
	<div class="col-sm-6 col-xs-6 input-group input-group-sm">
59
          <input type="text" class="form-control" placeholder="{% trans "Search..." %}" />
60 61 62 63 64
            <div class="input-group-btn">
            	<button type="submit" class="form-control btn btn-primary" title="search"><i class="icon-search"></i></button>
	    </div>
        </div>
        <div class="col-sm-6 text-right">
65
		{% if more_nodes >= 0  %}
66
          <a class="btn btn-primary btn-xs" href="{% url "dashboard.views.node-list" %}">
67
            <i class="icon-chevron-sign-right"></i> {% blocktrans with count=more_nodes %}<strong>{{count}}</strong>  more{% endblocktrans %}
68 69
          </a>
         {% endif %}
Kálmán Viktor committed
70
         <a class="btn btn-success btn-xs node-create" href="{% url "dashboard.views.node-create" %}"><i class="icon-plus-sign"></i> {% trans "new" %}</a>
71 72 73
    	</div>
</div>
</div>
74
</div>