home.html 1.66 KB
Newer Older
1
{% load i18n %}
2 3
<div class="row">
  <div class="col-md-4">
4
    <div style="font-weight: bold;">{% trans "Traits the node provides" %}</div>
5 6
    <div id="node-details-traits" style="margin-bottom: 20px;">
      <div id="node-details-traits-list">
7 8
        {% if node.traits.all %}
          {% for t in node.traits.all %}
9
            <div class="label label-success label-tag" style="display: inline-block">
10
              {{ t }}
11
	      <a data-trait-pk="{{ t.pk }}" href="#" class="node-details-remove-trait"><i class="fa fa-times"></i></a>
12 13 14
            </div>
          {% endfor %}
        {% else %}
15
	<small>{% trans "No trait added!" %}</small>
16 17
        {% endif %}
      </div>
18 19 20 21 22 23 24 25 26 27
 {% load crispy_forms_tags %}
<style>
  .row {
    margin-bottom: 15px;
  }
</style>

  <form action="{% url "dashboard.views.node-addtrait" node.pk %}" method="POST">
  {% csrf_token %}
  {% crispy trait_form %}
28
  </form>
29
    </div><!-- id:node-details-traits -->
30 31
  </div>
  <div class="col-md-8">
32
    {% if graphite_enabled %}
33 34 35
    <div class="text-center graph-buttons">
      {% include "dashboard/_graph-time-buttons.html" %}
    </div>
Kálmán Viktor committed
36
    <div class="graph-images text-center">
37 38 39 40 41 42
      <img src="{% url "dashboard.views.node-graph" node.pk "cpu" graph_time %}"/>
      <img src="{% url "dashboard.views.node-graph" node.pk "memory" graph_time %}"/>
      <img src="{% url "dashboard.views.node-graph" node.pk "network" graph_time %}"/>
      <img src="{% url "dashboard.views.node-graph" node.pk "vm" graph_time %}"/>
      <img src="{% url "dashboard.views.node-graph" node.pk "alloc" graph_time %}"/>
    </div>
43
    {% endif %}
44
  </div>
45
</div>
46

47 48 49 50 51
  <style>
    .form-group {
      margin: 0px;
    }
  </style>