aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/base/resource/steps
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates/base/resource/steps')
-rw-r--r--src/templates/base/resource/steps/define_hardware.html17
-rw-r--r--src/templates/base/resource/steps/host_info.html34
-rw-r--r--src/templates/base/resource/steps/meta_info.html14
-rw-r--r--src/templates/base/resource/steps/pod_definition.html81
4 files changed, 146 insertions, 0 deletions
diff --git a/src/templates/base/resource/steps/define_hardware.html b/src/templates/base/resource/steps/define_hardware.html
new file mode 100644
index 0000000..573b996
--- /dev/null
+++ b/src/templates/base/resource/steps/define_hardware.html
@@ -0,0 +1,17 @@
+{% extends "workflow/viewport-element.html" %}
+{% load staticfiles %}
+
+{% load bootstrap4 %}
+
+{% block content %}
+<p>Note that not all labs host every kind of machine.
+As you make your selections, labs and hosts that are not compatible
+with your current configuration will become unavailable.</p>
+<h4>NOTE: Only PTL's are able to create multi-node PODs. See
+ <a href="https://wiki.opnfv.org/display/INF/Lab-as-a-Service+at+the+UNH-IOL">here</a>
+ for more details</h4>
+<form id="step_form" method="post">
+ {% csrf_token %}
+ {{form.filter_field|default:"<p>No Form</p>"}}
+</form>
+{% endblock content %}
diff --git a/src/templates/base/resource/steps/host_info.html b/src/templates/base/resource/steps/host_info.html
new file mode 100644
index 0000000..3230d8f
--- /dev/null
+++ b/src/templates/base/resource/steps/host_info.html
@@ -0,0 +1,34 @@
+{% extends "workflow/viewport-element.html" %}
+{% load staticfiles %}
+
+{% load bootstrap4 %}
+
+{% block content %}
+
+{% if error %}
+<p>{{error}}</p>
+{% else %}
+
+
+<form id="step_form" method="post">
+ {% csrf_token %}
+ <table>
+ <thead>
+ <tr>
+ <th>Type</th>
+ <th>Name</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for form in formset %}
+ <tr>
+ {% for field in form %}
+ <td>{{field}}</td>
+ {% endfor %}
+ </tr>
+ {% endfor %}
+ </table>
+ {{formset.management_form}}
+</form>
+{% endif %}
+{% endblock content %}
diff --git a/src/templates/base/resource/steps/meta_info.html b/src/templates/base/resource/steps/meta_info.html
new file mode 100644
index 0000000..6fef065
--- /dev/null
+++ b/src/templates/base/resource/steps/meta_info.html
@@ -0,0 +1,14 @@
+{% extends "workflow/viewport-element.html" %}
+{% load staticfiles %}
+
+{% load bootstrap4 %}
+
+{% block content %}
+
+<form id="step_form" method="post">
+ {% csrf_token %}
+ <table class="px-4">
+ {% bootstrap_form form %}
+ </table>
+</form>
+{% endblock content %}
diff --git a/src/templates/base/resource/steps/pod_definition.html b/src/templates/base/resource/steps/pod_definition.html
new file mode 100644
index 0000000..a6810de
--- /dev/null
+++ b/src/templates/base/resource/steps/pod_definition.html
@@ -0,0 +1,81 @@
+{% extends "workflow/viewport-element.html" %}
+{% block extrahead %}
+<link href="/static/css/graph_common.css" rel="stylesheet">
+<title>Pod Definition Prototype</title>
+
+<!-- Loads and initializes the library -->
+<script>
+ var mxLoadStylesheets = false;
+</script>
+{% endblock extrahead %}
+
+<!-- Calls the main function after the page has loaded. Container is dynamically created. -->
+{% block content %}
+<div class="h-100 w-100 position-relative">
+ <div class="h-100 w-100 position-absolute overflow-hidden">
+ <div class="row h-100">
+ <div id="graphParent" class="col h-100">
+ <div class="d-flex bg-light border">
+ <div id="toolbarContainer"></div>
+ <div class="ml-4 text-info">Hold right click to drag</div>
+ </div>
+ <!-- Creates a container for the sidebar -->
+ <div id="graphContainer" class="border h-100"></div>
+ </div>
+
+ <div id="network_select" class="col-2">
+ <!-- Creates a container for the outline -->
+ <div id="outlineContainer" class="border mb-2"></div>
+ <button id="btn_add_network" type="button" class="btn btn-primary w-100 mb-2" onclick="network_step.newNetworkWindow();">Add Network</button>
+ <ul id="network_list" class="list-group">
+ </ul>
+ <button type="button" class="d-none" onclick="network_step.submitForm();">Submit</button>
+ </div>
+ </div>
+ </div>
+</div>
+<form id="step_form" method="post">
+ {% csrf_token %}
+ <input type="hidden" id="hidden_xml_input" name="xml">
+</form>
+<script>
+ //gather context data
+ let debug = false;
+ {% if debug %}
+ debug = true;
+ {% endif %}
+
+ let xml = '';
+ {% if xml %}
+ xml = '{{xml|safe}}';
+ {% endif %}
+
+ let hosts = [];
+ {% for host in hosts %}
+ hosts.push({{host|safe}});
+ {% endfor %}
+
+ let added_hosts = [];
+ {% for host in added_hosts %}
+ added_hosts.push({{host|safe}});
+ {% endfor %}
+
+ let removed_host_ids = {{removed_hosts|safe}};
+
+ network_step = new NetworkStep(
+ debug,
+ xml,
+ hosts,
+ added_hosts,
+ removed_host_ids,
+ document.getElementById('graphContainer'),
+ document.getElementById('outlineContainer'),
+ document.getElementById('toolbarContainer'),
+ document.getElementById('sidebarContainer')
+ );
+ form_submission_callbacks.push(() => network_step.prepareForm());
+</script>
+{% endblock content %}
+{% block onleave %}
+network_step.submitForm();
+{% endblock %}