diff options
Diffstat (limited to 'src/templates/base/booking')
-rw-r--r-- | src/templates/base/booking/booking_list.html | 8 | ||||
-rw-r--r-- | src/templates/base/booking/quick_deploy.html | 6 | ||||
-rw-r--r-- | src/templates/base/booking/stats.html | 17 |
3 files changed, 21 insertions, 10 deletions
diff --git a/src/templates/base/booking/booking_list.html b/src/templates/base/booking/booking_list.html index 591ecc9..523c84b 100644 --- a/src/templates/base/booking/booking_list.html +++ b/src/templates/base/booking/booking_list.html @@ -5,11 +5,11 @@ {% block extrahead %} {{ block.super }} <!-- DataTables CSS --> - <link href="{% static "bower_components/datatables.net-bs4/css/dataTables.bootstrap4.min.css" %}" + <link href="{% static "node_modules/datatables.net-bs4/css/dataTables.bootstrap4.min.css" %}" rel="stylesheet"> <!-- DataTables Responsive CSS --> - <link href="{% static "bower_components/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css" %}" + <link href="{% static "node_modules/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css" %}" rel="stylesheet"> {% endblock extrahead %} @@ -31,8 +31,8 @@ {% block extrajs %} <!-- DataTables JavaScript --> - <script src={% static "bower_components/datatables.net/js/jquery.dataTables.min.js" %}></script> - <script src={% static "bower_components/datatables.net-bs4/js/dataTables.bootstrap4.min.js" %}></script> + <script src={% static "node_modules/datatables.net/js/jquery.dataTables.min.js" %}></script> + <script src={% static "node_modules/datatables.net-bs4/js/dataTables.bootstrap4.min.js" %}></script> <script type="text/javascript"> $(document).ready(function () { diff --git a/src/templates/base/booking/quick_deploy.html b/src/templates/base/booking/quick_deploy.html index d737b7d..ad9adf2 100644 --- a/src/templates/base/booking/quick_deploy.html +++ b/src/templates/base/booking/quick_deploy.html @@ -12,7 +12,7 @@ {% bootstrap_field form.filter_field show_label=False %} </div> </div> - <div class="row"> + <div class="row justify-content-center"> <div class="col-12 col-lg-3 my-2"> <div class="col border rounded py-2 h-100"> {% bootstrap_field form.purpose %} @@ -25,18 +25,21 @@ </script> </div> </div> + {% block collab %} <div class="col-12 col-lg-3 my-2"> <div class="col border rounded py-2 h-100"> <label>Collaborators</label> {{ form.users }} </div> </div> + {% endblock collab %} <div class="col-12 col-lg-3 my-2"> <div class="col border rounded py-2 h-100"> {% bootstrap_field form.hostname %} {% bootstrap_field form.image %} </div> </div> + {% block opnfv %} <div class="col-12 col-lg-3 my-2"> <div class="col border rounded py-2 h-100"> <strong>OPNFV: (Optional)</strong> @@ -44,6 +47,7 @@ {% bootstrap_field form.scenario %} </div> </div> + {% endblock opnfv %} <div class="col-12 d-flex mt-2 justify-content-end"> <button id="quick_booking_confirm" onclick="submit_form();" type="button" class="btn btn-success">Confirm</button> </div> diff --git a/src/templates/base/booking/stats.html b/src/templates/base/booking/stats.html index 94239f9..4c06b71 100644 --- a/src/templates/base/booking/stats.html +++ b/src/templates/base/booking/stats.html @@ -3,22 +3,28 @@ {% block extrahead %} {{ block.super }} -<script src="https://cdn.plot.ly/plotly-latest.min.js"></script> +<script src="{% static "node_modules/plotly.js-dist/plotly.js" %}"></script> <script> + function drawGraph(data, graph_id, graph_title){ var container = document.getElementById(graph_id); var plot_data = { x: data[0], y: data[1], - fill: "tonexty", + line: {shape: "hv"}, type: "scatter", - mode: "none", + mode: "lines+makers", }; var layout = { - title: graph_title + title: graph_title, + yaxis: { + rangemode: 'tozero', + autorange: true + } }; Plotly.newPlot(container, [plot_data], layout); } -function getData(){ + +function getData() { var req = new XMLHttpRequest(); var url = "/booking/stats/json"; var day_input = document.getElementById("number_days"); @@ -37,6 +43,7 @@ function getData(){ req.open("GET", url, true); req.send(); } + </script> {% endblock %} |