Lab as a Service 2.0
[laas.git] / src / templates / dashboard / landing.html
1 {% extends "base.html" %}
2 {% load staticfiles %}
3
4 {% block content %}
5     <div class="">
6         <p style="text-align:center;">Welcome to the Pharos Dashboard! To get started, select one of the options below:</p>
7     </div>
8 {% csrf_token %}
9
10 <style>
11     .wf_create{
12         display: inline-block;
13         text-align: center;
14     }
15     .wf_create_div{
16         text-align: center;
17     }
18     .hidden_form{
19         display: none;
20     }
21
22     .panel {
23         border: none;
24     }
25
26     .panels {
27         display: grid;
28         grid-template-columns: 33% 34% 33%;
29     }
30 </style>
31 <script type="text/javascript">
32     function cwf(wf_type){
33         document.getElementById('id_workflow').selectedIndex = wf_type;
34         document.getElementById('wf_selection_form').submit();
35     }
36 </script>
37 <div class='wf_create_div'>
38 <button class="wf_create btn" onclick="cwf(0)">Create a Booking</button>
39 <button class="wf_create btn" onclick="cwf(1)">Create a Pod</button>
40 <button class="wf_create btn" onclick="cwf(2)">Configure a Pod</button>
41 <button class="wf_create btn" onclick="cwf(3)">Create a Snapshot</button>
42 {% if manager == True %}
43 <button class="wf_continue btn" onclick="continue_wf()">Finish Unfinished Business</button>
44 {% endif %}
45 </div>
46
47 <script type="text/javascript">
48     function cwf(type)
49     {
50         $.ajax({
51             type: "POST",
52             url: "/",
53             data: {"create":type},
54             beforeSend: function(request) {
55                 request.setRequestHeader("X-CSRFToken",
56                 $('input[name="csrfmiddlewaretoken"]').val()
57                 );
58             }
59
60         }).done(function (data) {
61             window.location.replace("/wf/");
62         }).fail(function(jqxHR, textstatus) {
63             alert("Something went wrong...");});
64     }
65     function continue_wf()
66     {
67         window.location.replace("/wf/");
68     }
69
70     //success: window.location.replace("/wf/")
71
72 </script>
73
74 <div class="hidden_form" id="form_div">
75     <form method="post" action="" class="form" id="wf_selection_form">
76         {% csrf_token %}
77
78         <input type="hidden" id="landing_action">
79
80         <button type="submit" class="btn btn btn-success">
81             Confirm Edit
82         </button>
83     </form>
84 </div>
85
86 {% block vport_comm %}
87 {% endblock %}
88 {% endblock content %}