summaryrefslogtreecommitdiffstats
path: root/tools/pharos-dashboard/templates/dashboard
diff options
context:
space:
mode:
Diffstat (limited to 'tools/pharos-dashboard/templates/dashboard')
-rw-r--r--tools/pharos-dashboard/templates/dashboard/base.html93
-rw-r--r--tools/pharos-dashboard/templates/dashboard/booking_calendar.html79
-rw-r--r--tools/pharos-dashboard/templates/dashboard/table.html50
3 files changed, 222 insertions, 0 deletions
diff --git a/tools/pharos-dashboard/templates/dashboard/base.html b/tools/pharos-dashboard/templates/dashboard/base.html
new file mode 100644
index 00000000..544bf0b3
--- /dev/null
+++ b/tools/pharos-dashboard/templates/dashboard/base.html
@@ -0,0 +1,93 @@
+{% extends "layout/base.html" %}
+{% load bootstrap3 %}
+
+{% block basecontent %}
+ <div id="wrapper">
+ <!-- Navigation -->
+ <nav class="navbar navbar-default navbar-static-top" role="navigation"
+ style="margin-bottom: 0">
+ <div class="navbar-header">
+ <button type="button" class="navbar-toggle" data-toggle="collapse"
+ data-target=".navbar-collapse">
+ <span class="sr-only">Toggle navigation</span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a href="https://www.opnfv.org/" class="navbar-left"><img
+ src="https://www.opnfv.org/sites/all/themes/opnfv/logo.png"></a>
+ <a class="navbar-brand" href={% url 'dashboard:' %}>Pharos Dashboard</a>
+ </div>
+ <!-- /.navbar-header -->
+
+ <ul class="nav navbar-top-links navbar-right">
+ <li class="dropdown">
+ <a class="dropdown-toggle" data-toggle="dropdown" href="#">
+ <i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
+ </a>
+ <ul class="dropdown-menu dropdown-user">
+ {% if user.is_authenticated %}
+ <li><a href="#"><i class="fa fa-user fa-fw"></i> User Profile</a>
+ </li>
+ <li><a href="#"><i class="fa fa-gear fa-fw"></i> Settings</a>
+ </li>
+ <li class="divider"></li>
+ <li><a href="{% url 'dashboard:logout' %}?next={{ request.path }}"><i
+ class="fa fa-sign-out fa-fw"></i>
+ Logout</a>
+ </li>
+ {% else %}
+ <li><a href="{% url 'dashboard:login' %}"><i
+ class="fa fa-sign-out fa-fw"></i>
+ Login</a>
+ {% endif %}
+ </ul>
+ <!-- /.dropdown-user -->
+ </li>
+ <!-- /.dropdown -->
+ </ul>
+ <!-- /.navbar-top-links -->
+
+ <div class="navbar-default sidebar" role="navigation">
+ <div class="sidebar-nav navbar-collapse">
+ <ul class="nav" id="side-menu">
+ <li>
+ <a href="{% url 'dashboard:ci_pods' %}"><i
+ class="fa fa-table fa-fw"></i>CI-Pods</a>
+ </li>
+ <li>
+ <a href="{% url 'dashboard:dev_pods' %}"><i
+ class="fa fa-table fa-fw"></i>Development
+ Pods</a>
+ </li>
+ <li>
+ <a href="{% url 'dashboard:jenkins_slaves' %}"><i
+ class="fa fa-table fa-fw"></i>Jenkins
+ Slaves</a>
+ </li>
+ </ul>
+ </div>
+ <!-- /.sidebar-collapse -->
+ </div>
+ <!-- /.navbar-static-side -->
+ </nav>
+
+ <!-- Page Content -->
+ <div id="page-wrapper">
+ <div class="row">
+ <div class="col-lg-12">
+ <h1 class="page-header">{{ title }}</h1>
+ </div>
+ <!-- /.col-lg-12 -->
+ </div>
+
+ {% bootstrap_messages %}
+
+ {% block content %}
+
+ {% endblock content %}
+ </div>
+ <!-- /#page-wrapper -->
+ </div>
+ <!-- /#wrapper -->
+{% endblock basecontent %} \ No newline at end of file
diff --git a/tools/pharos-dashboard/templates/dashboard/booking_calendar.html b/tools/pharos-dashboard/templates/dashboard/booking_calendar.html
new file mode 100644
index 00000000..0f6bece0
--- /dev/null
+++ b/tools/pharos-dashboard/templates/dashboard/booking_calendar.html
@@ -0,0 +1,79 @@
+{% extends "dashboard/base.html" %}
+{% load staticfiles %}
+{% load bootstrap3 %}
+
+{% block extrahead %}
+ <link href="{% static "bower_components/fullcalendar/dist/fullcalendar.css" %}"
+ rel='stylesheet'/>
+ <link href="{% static "bower_components/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css" %}"
+ rel='stylesheet'/>
+{% endblock extrahead %}
+
+{% block content %}
+ <div class="row">
+ <div class="col-lg-8">
+ <div class="container-fluid">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ Calendar
+ </div>
+ <div class="panel-body">
+ <div id='calendar'>
+ </div>
+ </div>
+ <!-- /.panel-body -->
+ </div>
+ <!-- /.panel -->
+ </div>
+ </div>
+
+ <div class="col-lg-4">
+ <div class="panel panel-default">
+ <div class="panel-heading">
+ Booking
+ </div>
+ <div class="panel-body">
+ {% bootstrap_form_errors form type='non_fields' %}
+
+ <form method="post" class="form" id="bookingform">
+ {% csrf_token %}
+ <div class='input-group' id='starttimepicker'>
+ {% bootstrap_field form.start_date_time addon_after='<span class="glyphicon glyphicon-calendar"></span>' %}
+ </div>
+ <div class='input-group' id='endtimepicker'>
+ {% bootstrap_field form.end_date_time addon_after='<span class="glyphicon glyphicon-calendar"></span>' %}
+ </div>
+ {% bootstrap_field form.purpose %}
+ {{ form.booking_id }}
+ {% buttons %}
+ <button type="submit" class="btn btn btn-success"
+ id="submitform">
+ Book Pod
+ </button>
+ <button type="button" class="btn btn btn-danger hidden"
+ id="deletebutton">
+ Delete Booking
+ </button>
+ {% endbuttons %}
+ </form>
+
+ </div>
+ </div>
+ </div>
+ </div>
+{% endblock content %}
+
+{% block extrajs %}
+ <script type="text/javascript">
+ var bookings_url = '/resource/' + {{ resource.resource_id }} +'/bookings/';
+ </script>
+
+ <script src={% static "bower_components/moment/moment.js" %}></script>
+ <script src={% static "bower_components/fullcalendar/dist/fullcalendar.js" %}></script>
+ <script type="text/javascript"
+ src={% static "bower_components/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js" %}></script>
+ <script src={% static "js/fullcalendar-options.js" %}></script>
+ <script src={% static "js/datetimepicker-options.js" %}></script>
+ <script src={% static "js/csrf.js" %}></script>
+ <script src={% static "js/booking-calendar.js" %}></script>
+{% endblock extrajs %} \ No newline at end of file
diff --git a/tools/pharos-dashboard/templates/dashboard/table.html b/tools/pharos-dashboard/templates/dashboard/table.html
new file mode 100644
index 00000000..2d0b82ee
--- /dev/null
+++ b/tools/pharos-dashboard/templates/dashboard/table.html
@@ -0,0 +1,50 @@
+{% extends "dashboard/base.html" %}
+{% load staticfiles %}
+
+{% block extrahead %}
+ <!-- DataTables CSS -->
+ <link href="{% static "bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css" %}"
+ rel="stylesheet">
+
+ <!-- DataTables Responsive CSS -->
+ <link href="{% static "bower_components/datatables-responsive/css/dataTables.responsive.css" %}" rel="stylesheet">
+{% endblock extrahead %}
+
+{% block content %}
+ <div class="row">
+ <div class="col-lg-12">
+ <div class="panel panel-default">
+ <div class="panel-body">
+ <div class="dataTables_wrapper">
+ <table class="table table-striped table-bordered table-hover" id="table" cellspacing="0"
+ width="100%">
+
+ {% block table %}
+ {% endblock table %}
+
+ </table>
+ </div>
+ <!-- /.table-responsive -->
+ </div>
+ <!-- /.panel-body -->
+ </div>
+ <!-- /.panel -->
+ </div>
+ <!-- /.col-lg-12 -->
+ </div>
+{% endblock content %}
+
+{% block extrajs %}
+ <!-- DataTables JavaScript -->
+ <link href="{% static "bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css" %}"
+ rel="stylesheet">
+
+
+ <script src={% static "bower_components/datatables/media/js/jquery.dataTables.min.js" %}></script>
+ <script src={% static "bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js" %}></script>
+
+ <script src={% static "js/dataTables-sort.js" %}></script>
+
+ {% block tablejs %}
+ {% endblock tablejs %}
+{% endblock extrajs %} \ No newline at end of file