aboutsummaryrefslogtreecommitdiffstats
path: root/src/templates/base.html
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2019-07-02 17:33:09 -0400
committerSawyer Bergeron <sbergeron@iol.unh.edu>2019-07-08 14:32:53 +0000
commitbf45f8f4d05d9842b285013cfcb0a0235ce51c5d (patch)
tree528ceb8bf7627a65ed771ac3738031778e8750c8 /src/templates/base.html
parente0b8bb3ee3c218a65562acdc5e76f714aab92926 (diff)
Hacking on AJAX
This change incorporates the multiple changes we've made in the past few days in order to actually get AJAX working. Change-Id: Ia61a0395e7dbac26a143ca6e15049e6a4bdc8b0d Signed-off-by: Parker Berberian <pberberian@iol.unh.edu> Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu>
Diffstat (limited to 'src/templates/base.html')
-rw-r--r--src/templates/base.html35
1 files changed, 6 insertions, 29 deletions
diff --git a/src/templates/base.html b/src/templates/base.html
index 891e0fc..f59740d 100644
--- a/src/templates/base.html
+++ b/src/templates/base.html
@@ -6,30 +6,7 @@
<!-- Custom CSS -->
<link href="{% static "css/base.css" %}" rel="stylesheet">
-<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>
+<script src="/static/js/dashboard.js"></script>
{% endblock %}
{% block basecontent %}
@@ -107,19 +84,19 @@
<a href="/booking/quick/" class="list-group-item list-group-item-action list-group-item-secondary">
Express Booking
</a>
- <a href="#" onclick="cwf(0)" class="list-group-item list-group-item-action list-group-item-secondary">
+ <a href="#" onclick="create_workflow(0)" class="list-group-item list-group-item-action list-group-item-secondary">
Book a Pod
</a>
- <a href="#" onclick="cwf(1)" class="list-group-item list-group-item-action list-group-item-secondary">
+ <a href="#" onclick="create_workflow(1)" class="list-group-item list-group-item-action list-group-item-secondary">
Design a Pod
</a>
- <a href="#" onclick="cwf(2)" class="list-group-item list-group-item-action list-group-item-secondary">
+ <a href="#" onclick="create_workflow(2)" class="list-group-item list-group-item-action list-group-item-secondary">
Configure a Pod
</a>
- <a href="#" onclick="cwf(3)" class="list-group-item list-group-item-action list-group-item-secondary">
+ <a href="#" onclick="create_workflow(3)" class="list-group-item list-group-item-action list-group-item-secondary">
Create a Snapshot
</a>
- <a href="#" onclick="cwf(4)" class="list-group-item list-group-item-action list-group-item-secondary">
+ <a href="#" onclick="create_workflow(4)" class="list-group-item list-group-item-action list-group-item-secondary">
Configure OPNFV
</a>
</div>