home.html 1.54 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 33 34 35
    {% if graphite_enabled %}
    <img src="{% url "dashboard.views.node-graph" node.pk "cpu" "6h" %}" style="width:100%"/>
    <img src="{% url "dashboard.views.node-graph" node.pk "memory" "6h" %}" style="width:100%"/>
    <img src="{% url "dashboard.views.node-graph" node.pk "network" "6h" %}" style="width:100%"/>
Bach Dániel committed
36 37
    <img src="{% url "dashboard.views.node-graph" node.pk "vm" "6h" %}" style="width:100%"/>
    <img src="{% url "dashboard.views.node-graph" node.pk "alloc" "6h" %}" style="width:100%"/>
38
    {% endif %}
39
  </div>
40 41 42 43 44 45 46
  </div>
  <style>
  .form-group {
    margin: 0px;
  }

</style>