summaryrefslogtreecommitdiff
path: root/tuskar_ui/infrastructure/templates/infrastructure/nodes/_nodes_formset_form.html
blob: c828125dbf7440d8190de3ac2186bf47d61d23d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{% load i18n %}
{% load form_helpers %}

<div class="container-fluid tab-pane{% if active %} active{% endif %}"
     id="tab-{{ form.prefix }}">
  <div class="form form-inline"><fieldset class="well">
    {% include 'horizon/common/_form_errors.html' with form=form %}
    <h4>{% trans "Node Detail" %}</h4>
    <div class="param-section">
      <h5>{% trans "Power Management" %}</h5>
      {% include 'infrastructure/nodes/_nodes_formset_field.html' with field=form.driver required=True %}
      {% include 'infrastructure/nodes/_nodes_formset_field.html' with field=form.ipmi_address required=True %}
      {% include 'infrastructure/nodes/_nodes_formset_field.html' with field=form.ipmi_username %}
      {% include 'infrastructure/nodes/_nodes_formset_field.html' with field=form.ipmi_password %}
      {% include 'infrastructure/nodes/_nodes_formset_field.html' with field=form.ssh_address required=True %}
      {% include 'infrastructure/nodes/_nodes_formset_field.html' with field=form.ssh_username required=True %}
      {% include 'infrastructure/nodes/_nodes_formset_field.html' with field=form.ssh_key_contents required=True %}
    </div>
    <div class="param-section">
      <h5>{% trans "Networking" %}</h5>
      {% include 'infrastructure/nodes/_nodes_formset_field.html' with field=form.mac_addresses required=True %}
    </div>
    <div class="param-section">
      <h5>{% trans "Hardware" %}</h5>
      {% include 'infrastructure/nodes/_nodes_formset_field.html' with field=form.cpu_arch %}
      {% include 'infrastructure/nodes/_nodes_formset_field.html' with field=form.cpus extra_text=_('units') %}
      {% include 'infrastructure/nodes/_nodes_formset_field.html' with field=form.memory_mb extra_text=_('MB') %}
      {% include 'infrastructure/nodes/_nodes_formset_field.html' with field=form.local_gb extra_text=_('GB') %}
    </div>
    <div class="param-section">
      <h5>{% trans "Deployment Images" %}</h5>
      {% include 'infrastructure/nodes/_nodes_formset_field.html' with field=form.deployment_kernel %}
      {% include 'infrastructure/nodes/_nodes_formset_field.html' with field=form.deployment_ramdisk %}
    </div>
  </fieldset></div>
</div>

<script type="text/javascript">
(window.$ || window.addHorizonLoadEvent)(function () {
  var form_prefix = '{{ form.prefix|escapejs }}';
  var $form = $('#tab-' + form_prefix);
  var undefined_name = '{{ form.get_name|escapejs }}';

  $form.find('input[name$="_address"]').change(function () {
    var $nav_link = $('a[href="#' + $form.attr('id') + '"]');
    $nav_link.html($(this).val() || undefined_name);
  });
});
</script>