index-vm.html 3.34 KB
Newer Older
1 2 3 4 5
{% load i18n %}
<div class="panel panel-default">
  <div class="panel-heading">
    <div class="pull-right toolbar">
      <div class="btn-group">
6 7
        <a href="#index-graph-view" data-index-box="vm" class="btn btn-default btn-xs"><i class="icon-dashboard"></i></a>
        <a href="#index-list-view" data-index-box="vm" class="btn btn-default btn-xs disabled"><i class="icon-list"></i></a>
8 9 10 11 12 13 14 15
      </div>
      <span class="btn btn-default btn-xs infobtn" title="Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui.  "><i class="icon-info-sign"></i></span>
    </div>
    <h3 class="no-margin">
      <i class="icon-desktop"></i> Virtual machines
    </h3>
  </div>
  <div class="list-group" id="vm-list-view">
16 17 18
    <div id="dashboard-vm-list">
      {% for i in instances %}
      <a href="{{ i.get_absolute_url }}" class="list-group-item">
19 20 21 22 23 24 25 26
        <i class="icon-{% if i.state == "RUNNING" %}play-sign{% else %}pause{% endif %}"></i> {{ i.name }} 
        <div class="pull-right dashboard-vm-favourite" data-vm="{{ i.pk }}">
          {% if i.fav %}
            <i class="icon-star text-primary title-favourite" title="Unfavourite"></i>
          {% else %}
            <i class="icon-star-empty text-primary title-favourite" title="Mark as favorite"></i>
          {% endif %}
        </div>
27
      </a>
28 29
      {% endfor %}
    </div>
30 31
    <div href="#" class="list-group-item list-group-footer">
      <div class="row">
32
        <div class="col-sm-6 col-xs-6 input-group input-group-sm">
33
          <input id="dashboard-vm-search-input" type="text" class="form-control" placeholder="Search..." />
34 35 36 37 38
          <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">
39 40 41 42 43
          {% if more_instances > 0 %}
          <a class="btn btn-primary btn-xs" href="{% url "dashboard.views.vm-list" %}">
            <i class="icon-chevron-sign-right"></i> <strong>{{ more_instances }}</strong>  more  
          </a>
          {% endif %}
44
          <a class="btn btn-success btn-xs vm-create" href="{% url "dashboard.views.vm-create" %}"><i class="icon-plus-sign"></i> new </a>
45 46 47 48 49
        </div>
      </div>
    </div>
  </div>
  <div class="panel-body" id="vm-graph-view" style="display: none">
50 51
    <p class="pull-right">  <input class="knob" data-fgColor="chartreuse" data-thickness=".4" data-max="10" data-width="100" data-height="100" data-readOnly="true" value="{{ instances|length|add:more_instances }}"></p>
    <p><span class="bigbig"><big>{{ running_vm_num }}</big> running </span>
52
      <ul class="list-inline">
53 54 55
        {% for vm in running_vms %}
          <li class="label label-success"><i class="icon-play-sign"></i> {{ vm.name}}</li>
        {% endfor %}
56 57
      </ul>
    </p>
58
    <p class="big text-warning"><big>{{ stopped_vm_num }}</big> stopped</p>
59 60 61 62
    <p>Total: $3000 </p>

    <div class="clearfix"></div>
    <div class="text-right">
63
      <a href="{% url "dashboard.views.vm-list" %}" class="btn btn-primary btn-xs"><i class="icon-chevron-sign-right"></i> <strong>{{ instances|length|add:more_instances }}</strong>  machines  total</a> 
64 65 66
    </div>
  </div>
</div>