aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/dashboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/templates/dashboard')
-rw-r--r--src/templates/dashboard/genericselect.html21
-rw-r--r--src/templates/dashboard/landing.html46
-rw-r--r--src/templates/dashboard/multiple_select_filter_widget.html30
-rw-r--r--src/templates/dashboard/searchable_select_multiple.html4
4 files changed, 27 insertions, 74 deletions
diff --git a/src/templates/dashboard/genericselect.html b/src/templates/dashboard/genericselect.html
index f54cd90..863d33f 100644
--- a/src/templates/dashboard/genericselect.html
+++ b/src/templates/dashboard/genericselect.html
@@ -1,27 +1,22 @@
{% extends "workflow/viewport-element.html" %}
-{% load staticfiles %}
{% load bootstrap4 %}
{% block content %}
-<div id="{{select_type}}_form_div" class="h-100 border d-flex flex-column p-4">
+<div id="select_form_div" class="h-100 border d-flex flex-column p-4">
<h3 id="create_section">Create a Resource
<button class="btn btn-primary {% if disabled %} disabled {% endif %}"
- {% if not disabled %}onclick="parent.add_wf({{addable_type_num}})"
+ {% if not disabled %}onclick="add_workflow({{addable_type_num}})"
{% endif %}>Here
</button>
</h3>
<div class="border-top"></div>
<h3 id="select_header_section">Or select from the list below:</h3>
<div id="select_section" class="d-flex flex-column">
- <form id="{{select_type}}_select_form" method="post" action=""
- class="form d-flex flex-column" id="{{select_type}}selectorform">
+ <form id="step_form" method="post" action="" class="form d-flex flex-column">
{% csrf_token %}
{{ form|default:"<p>no form loaded</p>" }}
- {% buttons %}
-
- {% endbuttons %}
</form>
</div>
</div>
@@ -33,13 +28,3 @@
</script>
{% endblock content %}
-{% block onleave %}
-var form = $("#{{select_type}}_select_form");
-var formData = form.serialize();
-var req = new XMLHttpRequest();
-req.open("POST", "/wf/workflow/", false);
-req.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
-req.onerror = function() { alert("problem with form submission"); }
-req.send(formData);
-{% endblock %}
-
diff --git a/src/templates/dashboard/landing.html b/src/templates/dashboard/landing.html
index d4776cc..72f9e6e 100644
--- a/src/templates/dashboard/landing.html
+++ b/src/templates/dashboard/landing.html
@@ -47,13 +47,13 @@
</p>
<div class="row">
<div class="col-12 col-xl-4">
- <button class="btn btn-primary w-100" onclick="cwf(0)">Book a Pod</button>
+ <button class="btn btn-primary w-100" onclick="create_workflow(0)">Book a Pod</button>
</div>
<div class="col-12 col-xl-4">
- <button class="btn btn-primary w-100" onclick="cwf(1)">Design a Pod</button>
+ <button class="btn btn-primary w-100" onclick="create_workflow(1)">Design a Pod</button>
</div>
<div class="col-12 col-xl-4">
- <button class="btn btn-primary w-100" onclick="cwf(2)">Configure a Pod</button>
+ <button class="btn btn-primary w-100" onclick="create_workflow(2)">Configure a Pod</button>
</div>
</div>
{% endif %}
@@ -65,7 +65,7 @@
<p>If you're a returning user, some of the following options may be of interest:</p>
<div class="row">
<div class="col-12 col-xl-4">
- <button class="btn btn-primary w-100" onclick="cwf(3)">Snapshot a Host</button>
+ <button class="btn btn-primary w-100" onclick="create_workflow(3)">Snapshot a Host</button>
</div>
<div class="col-12 col-xl-4">
<a class="btn btn-primary w-100" href="{% url 'account:my-bookings' %}">
@@ -74,7 +74,7 @@
</div>
{% if manager == True %}
<div class="col-12 col-xl-4">
- <button class="btn btn-primary w-100" onclick="continue_wf()">
+ <button class="btn btn-primary w-100" onclick="continue_workflow()">
Resume Workflow
</button>
</div>
@@ -85,44 +85,10 @@
</div>
</div>
-<script type="text/javascript">
- function cwf(type) {
- $.ajax({
- type: "POST",
- url: "/",
- data: {
- "create": type
- },
- beforeSend: function (request) {
- request.setRequestHeader("X-CSRFToken",
- $('input[name="csrfmiddlewaretoken"]').val()
- );
- }
-
- }).done(function (data) {
- window.location.replace("/wf/");
- }).fail(function (jqxHR, textstatus) {
- alert("Something went wrong...");
- });
- }
-
- function continue_wf() {
- window.location.replace("/wf/");
- }
-</script>
-
<div class="hidden_form d-none" id="form_div">
<form method="post" action="" class="form" id="wf_selection_form">
{% csrf_token %}
-
- <input type="hidden" id="landing_action">
-
- <button type="submit" class="btn btn btn-success">
- Confirm Edit
- </button>
</form>
</div>
-{% block vport_comm %}
-{% endblock %}
-{% endblock content %} \ No newline at end of file
+{% endblock content %}
diff --git a/src/templates/dashboard/multiple_select_filter_widget.html b/src/templates/dashboard/multiple_select_filter_widget.html
index 4a65bd9..ad58ccb 100644
--- a/src/templates/dashboard/multiple_select_filter_widget.html
+++ b/src/templates/dashboard/multiple_select_filter_widget.html
@@ -1,18 +1,15 @@
-<script src="/static/js/dashboard.js">
-</script>
-
<input name="filter_field" id="filter_field" type="hidden"/>
-<div id="grid_wrapper" class="container-fluid p-4">
- <div class="row">
- {% for object_class, object_list in display_objects %}
- <div class="col-12 col-lg d-flex flex-column pt-2 my-2">
+<div class="row">
+ {% for object_class, object_list in display_objects %}
+ <div class="col-12 col-lg-6 d-flex flex-column pt-2 mx-0 px-1">
+ <div class="col mx-0 border rounded py-2 flex-grow-1 d-flex flex-column">
<div class="w-100">
<h4 class="text-capitalize">{{object_class}}</h4>
</div>
- <div id="{{object_class}}" class="row h-100">
+ <div id="{{object_class}}" class="row flex-grow-1">
{% for obj in object_list %}
- <div class="col-12 col-md-6 col-xl-4 my-2">
- <div id="{{ obj.id|default:'not_provided' }}" class="card h-100" onclick="multi_filter_widget.processClick('{{obj.id}}');">
+ <div class="col-12 col-md-6 col-xl-4 my-2 d-flex flex-grow-1">
+ <div id="{{ obj.id|default:'not_provided' }}" class="card flex-grow-1">
<div class="card-header">
<p class="h5 font-weight-bold mt-2">{{obj.name}}</p>
</div>
@@ -20,15 +17,22 @@
<p class="grid-item-description">{{obj.description}}</p>
</div>
<div class="card-footer">
- <button type="button" class="btn btn-success grid-item-select-btn w-100">{% if obj.multiple %}Add{% else %}Select{% endif %}</button>
+ <button type="button" class="btn btn-success grid-item-select-btn w-100 stretched-link"
+ onclick="multi_filter_widget.processClick('{{obj.id}}');">
+ {% if obj.multiple %}
+ Add
+ {% else %}
+ Select
+ {% endif %}
+ </button>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
- {% endfor %}
- </div>
+ </div>
+ {% endfor %}
</div>
<div id="dropdown_wrapper" class="px-3 list-group-flush w-25 mt-2">
diff --git a/src/templates/dashboard/searchable_select_multiple.html b/src/templates/dashboard/searchable_select_multiple.html
index 8299a55..be51989 100644
--- a/src/templates/dashboard/searchable_select_multiple.html
+++ b/src/templates/dashboard/searchable_select_multiple.html
@@ -1,5 +1,3 @@
-<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
-<script src="/static/js/dashboard.js"></script>
<div id="search_select_outer" class="d-flex flex-column">
{% if incompatible == "true" %}
<div class="alert alert-danger" role="alert">
@@ -27,7 +25,7 @@
</input>
<div id="scroll_restrictor" class="d-flex pb-4 position-relative">
- <ul id="drop_results" class="list-group w-100 overflow-auto position-absolute"></ul>
+ <div id="drop_results" class="list-group w-100 z-2 overflow-auto position-absolute mh-30vh"></div>
</div>
</div>