resources.html 2.62 KB
Newer Older
1
{% load i18n %}
2 3 4
{% load sizefieldtags %}
{% load crispy_forms_tags %} 

5 6
<form id="vm-details-resources-form" method="POST" action="">
  {% csrf_token %}
7 8
<p class="row">
    <div class="col-sm-3">
9
      <label for="vm-cpu-priority-slider"><i class="icon-trophy"></i> {% trans "CPU priority" %}</label>
10 11
    </div>
    <div class="col-sm-9">
12
      <input name="cpu-priority" type="text" id="vm-cpu-priority-slider" class="vm-slider" value="{{ instance.priority }}" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="{{ instance.priority }}" data-slider-orientation="horizontal" data-slider-handle="square" data-slider-tooltip="hide"/>         
13 14 15 16 17 18
    </div>
</p>


<p class="row">
    <div class="col-sm-3">
19
      <label for="cpu-count-slider"><i class="icon-cogs"></i> {% trans "CPU count" %}</label>
20 21
    </div>
    <div class="col-sm-9">
22
      <input name="cpu-count" type="text" id="vm-cpu-count-slider" class="vm-slider" value=" {{ instance.num_cores }}" data-slider-min="0" data-slider-max="8" data-slider-step="1" data-slider-value="{{ instance.num_cores }}" data-slider-orientation="horizontal" data-slider-handle="square" data-slider-tooltip="hide"/>         
23 24 25 26 27 28
    </div>
</p>


<p class="row">
    <div class="col-sm-3">
29
      <label for="ram-slider"><i class="icon-ticket"></i> {% trans "RAM amount" %}</label>
30
    </div>
31
    <div class="col-sm-9"> 
32
      <input name="ram-size" type="text" id="vm-ram-size-slider" class="vm-slider" value="{{ instance.ram_size }}" data-slider-min="128" data-slider-max="4096" data-slider-step="128" data-slider-value="{{ instance.ram_size }}" data-slider-orientation="horizontal" data-slider-handle="square" data-slider-tooltip="hide"/>         MiB  
33
  </div>
34 35
</p>

36 37 38 39 40 41
<p class="row">
  <div class="col-sm-12">
    <button type="submit" class="btn btn-success btn-sm" id="vm-details-resources-save"><i class="icon-save"></i> {% trans "Save resources" %}</button>
  </div>
</p>
</form>
42 43 44

<hr />

45
<div class="row" id="vm-details-resources-disk">
46 47 48 49 50 51 52
  <div class="col-sm-11">
    <h3>
      {% trans "Disks" %}
      <div class="pull-right">
      </div>
    </h3>

53 54 55 56 57
    <div class="row" id="vm-details-disk-add-for-form"></div>

    {% if not instance.disks.all %}
      {% trans "No disks are added!" %}
    {% endif %}
58 59
    {% for d in instance.disks.all %}
      <h4 class="list-group-item-heading dashboard-vm-details-network-h3">
60 61 62
        {% with long_remove=True %}
          {% include "dashboard/_disk-list-element.html" %}
        {% endwith %}
63 64 65 66 67 68
      </h4>
    {% endfor %}
  </div>
</div>


69 70 71
{% block extra_js %}
  <style>
    label {padding-top: 6px;}
72
    .form-group {margin-bottom: 8px;}
73 74
  </style>
{% endblock %}