summaryrefslogtreecommitdiffstats
path: root/dashboard/src/templates/base.html
diff options
context:
space:
mode:
authorParker Berberian <pberberian@iol.unh.edu>2018-10-10 16:06:47 -0400
committerParker Berberian <pberberian@iol.unh.edu>2018-10-15 13:16:11 -0400
commit25275685e9a735e51fae8b1a936ba5733f6fb770 (patch)
treec3af41d1986c0812ca7ed059c16c7c7c7bd354cf /dashboard/src/templates/base.html
parentf2e83b24260b018bb7cc30421eda6c9a8cebc309 (diff)
Lab as a Service 2.0
See changes here: https://wiki.opnfv.org/display/INF/Pharos+Laas Change-Id: I59ada5f98e70a28d7f8c14eab3239597e236ca26 Signed-off-by: Sawyer Bergeron <sbergeron@iol.unh.edu> Signed-off-by: Parker Berberian <pberberian@iol.unh.edu>
Diffstat (limited to 'dashboard/src/templates/base.html')
-rw-r--r--dashboard/src/templates/base.html118
1 files changed, 105 insertions, 13 deletions
diff --git a/dashboard/src/templates/base.html b/dashboard/src/templates/base.html
index c74db05..c63db8c 100644
--- a/dashboard/src/templates/base.html
+++ b/dashboard/src/templates/base.html
@@ -1,7 +1,73 @@
{% extends "layout.html" %}
{% load bootstrap3 %}
{% load staticfiles %}
+{% block extrahead %}
+
+ <!-- Custom CSS -->
+ <link href="{% static "bower_components/startbootstrap-sb-admin-2-blackrockdigital/dist/css/sb-admin-2.min.css" %}"
+ rel="stylesheet">
+ <link href="{% static "css/theme.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/");
+ }
+
+ function toggle_create_drop()
+ {
+ drop_div = document.getElementById("create_drop");
+
+ if (drop_div.style.display === "none")
+ {
+ drop_div.style.display = "inherit";
+ }
+ else
+ {
+ drop_div.style.display = "none";
+ }
+ }
+</script>
+<style>
+ .create_drop {
+ display: none;
+ width: 100%;
+ }
+
+ .create_drop button {
+ width: 100%;
+ }
+
+ .drop_btn {
+ border-radius: 0px;
+ background-color: CCCCCC
+ }
+
+ .drop_btn:hover {
+ color: #555;
+ border-top: 1px solid #E7E7E7;
+ border-bottom: 1px solid #E7E7E7;
+ }
+</style>
+
+{% endblock %}
{% block basecontent %}
<div id="wrapper">
<!-- Navigation -->
@@ -54,36 +120,61 @@
<div class="sidebar-nav navbar-collapse">
<ul class="nav" id="side-menu">
<li>
- <a href="{% url 'dashboard:ci_pods' %}"><i
- class="fa fa-fw"></i>CI-Pods</a>
+ <a href="/"><i class="fa fa-fw"></i>Home</a>
</li>
- <li>
- <a href="{% url 'dashboard:dev_pods' %}"><i
- class="fa fa-fw"></i>Development
- Pods</a>
+ <li style="width: 100%;">
+ <a href="javascript:toggle_create_drop();"><i class="fa fa-fw"></i>Create<i
+ class="fa fa-fw fa-caret-down"></i>
+ </a>
+ {% csrf_token %}
+ <div id="create_drop" class="create_drop" style="display:none">
+ <button class="btn drop_btn" onclick="cwf(0)">Create a Booking</button>
+ <button class="btn drop_btn" onclick="cwf(1)">Create a Pod</button>
+ <button class="btn drop_btn" onclick="cwf(2)">Configure a Pod</button>
+ <button class="btn drop_btn" onclick="cwf(3)">Create a Snapshot</button>
+ </div>
</li>
<li>
- <a href="{% url 'dashboard:jenkins_slaves' %}"><i
- class="fa fa-fw"></i>Jenkins
- Slaves</a>
+ <a href="{% url 'resource:hosts' %}"><i
+ class="fa fa-fw"></i>Hosts
+ </a>
</li>
+ {% if user.is_authenticated %}
<li>
- {% if user.is_authenticated %}
<a href="{% url 'account:users' %}"><i
class="fa fa-fw"></i>User List
</a>
- {% endif %}
</li>
+ {% endif %}
<li>
<a href="{% url 'booking:list' %}"><i
class="fa fa-fw"></i>Booking List
</a>
</li>
<li>
+ <a href="{% url 'booking:stats' %}"><i
+ class="fa fa-fw"></i>Booking Statistics</a>
+ </li>
+ <li>
<a href="{% url 'api-root' %}"><i
class="fa fa-fw"></i>API
</a>
</li>
+ <li>
+ <a href="{% url 'account:my-account' %}"><i
+ class="fa fa-fw"></i>Account
+ </a>
+ </li>
+ <li>
+ <a href="{% url 'dashboard:all_labs' %}"><i
+ class="fa fa-fw"></i>Lab Info
+ </a>
+ </li>
+ <li>
+ <a href="{% url 'notifier:messages' %}"><i
+ class="fa fa-fw"></i>Inbox
+ </a>
+ </li>
</ul>
</div>
<!-- /.sidebar-collapse -->
@@ -93,14 +184,15 @@
<!-- Page Content -->
<div id="page-wrapper">
+ {% if title %}
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">{{ title }}</h1>
</div>
<!-- /.col-lg-12 -->
</div>
-
- {% bootstrap_messages %}
+ {% endif %}
+ <div id="bsm">{% bootstrap_messages %}</div>
{% block content %}