diff options
author | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-08-16 08:43:35 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-08-16 08:43:35 +0000 |
commit | fa7d89ee68d4b345530c6bc036d80ebbc0a1fc04 (patch) | |
tree | a408d01980a15e89e1b5efb7ceb743fae23d4052 | |
parent | d602404a17f1935a524e8fc46ed853d4c7717164 (diff) | |
parent | 2364c5886b6e4fa34355d0e300ebd9aae0ba8ffc (diff) |
Merge "Add basic ui"
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | qtip/web/bench/management/__init__.py | 0 | ||||
-rw-r--r-- | qtip/web/bench/management/commands/__init__.py | 0 | ||||
-rw-r--r-- | qtip/web/bench/management/commands/_private.py | 0 | ||||
-rw-r--r-- | qtip/web/bench/management/commands/importstatic.py | 10 | ||||
-rw-r--r-- | qtip/web/bench/urls.py | 1 | ||||
-rw-r--r-- | qtip/web/bench/views.py | 7 | ||||
-rw-r--r-- | qtip/web/templates/bench/base.html | 537 | ||||
-rw-r--r-- | qtip/web/templates/bench/index.html | 3 | ||||
-rw-r--r-- | qtip/web/templates/bench/repo_form.html | 50 | ||||
-rw-r--r-- | qtip/web/templates/bench/run.html | 21 | ||||
-rw-r--r-- | qtip/web/templates/bench/task_detail.html | 41 | ||||
-rw-r--r-- | qtip/web/templates/bench/task_list.html | 93 | ||||
-rw-r--r-- | qtip/web/templates/registration/login.html | 104 |
14 files changed, 789 insertions, 79 deletions
@@ -55,6 +55,7 @@ data/my_key.pem # Django stuff: *.log *.sqlite3 +static/ # Sphinx documentation docs/_build/ diff --git a/qtip/web/bench/management/__init__.py b/qtip/web/bench/management/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/qtip/web/bench/management/__init__.py diff --git a/qtip/web/bench/management/commands/__init__.py b/qtip/web/bench/management/commands/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/qtip/web/bench/management/commands/__init__.py diff --git a/qtip/web/bench/management/commands/_private.py b/qtip/web/bench/management/commands/_private.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/qtip/web/bench/management/commands/_private.py diff --git a/qtip/web/bench/management/commands/importstatic.py b/qtip/web/bench/management/commands/importstatic.py new file mode 100644 index 00000000..471faf8b --- /dev/null +++ b/qtip/web/bench/management/commands/importstatic.py @@ -0,0 +1,10 @@ +import os + +from django.core.management.base import BaseCommand + + +class Command(BaseCommand): + help = 'Import frontend dependencies for serving as static files' + + def handle(self, *args, **options): + os.system("git clone https://github.com/gurayyarar/AdminBSBMaterialDesign.git bench/static/") diff --git a/qtip/web/bench/urls.py b/qtip/web/bench/urls.py index ae9738b6..a6decbc5 100644 --- a/qtip/web/bench/urls.py +++ b/qtip/web/bench/urls.py @@ -16,6 +16,7 @@ import views urlpatterns = [ url('^', include('django.contrib.auth.urls')), + url('^dashboard/$', views.Dashboard.as_view(), name="index"), url('^repos/$', views.ReposView.as_view(), name='repos'), url('^repos/(?P<pk>\d+)$', views.RepoUpdate.as_view(), name='repo_update'), url('^run/$', views.Run.as_view(), name='run'), diff --git a/qtip/web/bench/views.py b/qtip/web/bench/views.py index 6de5e4cc..56f100cb 100644 --- a/qtip/web/bench/views.py +++ b/qtip/web/bench/views.py @@ -15,6 +15,7 @@ from django.contrib.auth.mixins import LoginRequiredMixin from django.views.generic.edit import CreateView, UpdateView from django.views.generic.list import ListView from django.views.generic.detail import DetailView +from django.views.generic import TemplateView from django.views import View from django.shortcuts import render, redirect from django.core.files.base import ContentFile @@ -25,6 +26,10 @@ import models import utils +class Dashboard(TemplateView): + template_name = "bench/index.html" + + class ReposView(LoginRequiredMixin, CreateView): model = models.Repo fields = '__all__' @@ -32,6 +37,7 @@ class ReposView(LoginRequiredMixin, CreateView): def get_context_data(self, **kwargs): context = super(ReposView, self).get_context_data(**kwargs) context["repos"] = self.model.objects.all() + context["template_role"] = "add" return context @@ -42,6 +48,7 @@ class RepoUpdate(LoginRequiredMixin, UpdateView): def get_context_data(self, **kwargs): context = super(RepoUpdate, self).get_context_data(**kwargs) context["repos"] = self.model.objects.all() + context["template_role"] = "edit" return context diff --git a/qtip/web/templates/bench/base.html b/qtip/web/templates/bench/base.html index f0d3610e..4eaf56f5 100644 --- a/qtip/web/templates/bench/base.html +++ b/qtip/web/templates/bench/base.html @@ -1,10 +1,527 @@ -<!DOCTYPE html> -<html lang="en"> - <head> - <title>QTIP Benchmarking Services</title> - </head> - <body> - {% block content %} - {% endblock %} - </body> -</html>
\ No newline at end of file +<html> +<head> + <meta charset="UTF-8"> + <meta http-equiv="X-UA-Compatible" content="IE=Edge"> + <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> + <title>QTIP Benchmarking Services</title> + <!-- Favicon--> + <!--<link rel="icon" href="favicon.ico" type="image/x-icon">--> + <!-- Google Fonts --> + <link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css"> + <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css"> + + <!-- Bootstrap Core Css --> + <link href="/static/plugins/bootstrap/css/bootstrap.css" rel="stylesheet"> + + <!-- Waves Effect Css --> + <link href="/static/plugins/node-waves/waves.css" rel="stylesheet" /> + + <!-- Animation Css --> + <link href="/static/plugins/animate-css/animate.css" rel="stylesheet" /> + + <!-- Morris Chart Css--> + <link href="/static/plugins/morrisjs/morris.css" rel="stylesheet" /> + + <!-- Custom Css --> + <link href="/static/css/style.css" rel="stylesheet"/> + <!--<link href="/static/plugins/materialize-css/css/materialize.css" rel="stylesheet"/>--> + + <!-- AdminBSB Themes. You can choose a theme from css/themes instead of get all themes --> + <link href="/static/css/themes/theme-teal.css" rel="stylesheet" /> + <script src="/static/plugins/jquery/jquery.min.js"></script> +</head> + +<body class="theme-red"> + <!-- Page Loader --> + <div class="page-loader-wrapper"> + <div class="loader"> + <div class="preloader"> + <div class="spinner-layer pl-red"> + <div class="circle-clipper left"> + <div class="circle"></div> + </div> + <div class="circle-clipper right"> + <div class="circle"></div> + </div> + </div> + </div> + <p>Please wait...</p> + </div> + </div> + <!-- #END# Page Loader --> + <!-- Overlay For Sidebars --> + <div class="overlay"></div> + <!-- #END# Overlay For Sidebars --> + <!-- Search Bar --> + <div class="search-bar"> + <div class="search-icon"> + <i class="material-icons">search</i> + </div> + <input type="text" placeholder="START TYPING..."> + <div class="close-search"> + <i class="material-icons">close</i> + </div> + </div> + <!-- #END# Search Bar --> + <!-- Top Bar --> + <nav class="navbar"> + <div class="container-fluid"> + <div class="navbar-header"> + <a href="javascript:void(0);" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse" aria-expanded="false"></a> + <a href="javascript:void(0);" class="bars"></a> + <a class="navbar-brand" href="{% url 'index' %}">QTIP-Web</a> + </div> + <div class="collapse navbar-collapse" id="navbar-collapse"> + <ul class="nav navbar-nav navbar-right"> + <!-- Call Search --> + <li><a href="javascript:void(0);" class="js-search" data-close="true"><i class="material-icons">search</i></a></li> + <!-- #END# Call Search --> + <!-- Notifications --> + <!-- + <li class="dropdown"> + <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button"> + <i class="material-icons">notifications</i> + <span class="label-count">7</span> + </a> + <ul class="dropdown-menu"> + <li class="header">NOTIFICATIONS</li> + <li class="body"> + <ul class="menu"> + <li> + <a href="javascript:void(0);"> + <div class="icon-circle bg-light-green"> + <i class="material-icons">person_add</i> + </div> + <div class="menu-info"> + <h4>12 new members joined</h4> + <p> + <i class="material-icons">access_time</i> 14 mins ago + </p> + </div> + </a> + </li> + <li> + <a href="javascript:void(0);"> + <div class="icon-circle bg-cyan"> + <i class="material-icons">add_shopping_cart</i> + </div> + <div class="menu-info"> + <h4>4 sales made</h4> + <p> + <i class="material-icons">access_time</i> 22 mins ago + </p> + </div> + </a> + </li> + <li> + <a href="javascript:void(0);"> + <div class="icon-circle bg-red"> + <i class="material-icons">delete_forever</i> + </div> + <div class="menu-info"> + <h4><b>Nancy Doe</b> deleted account</h4> + <p> + <i class="material-icons">access_time</i> 3 hours ago + </p> + </div> + </a> + </li> + <li> + <a href="javascript:void(0);"> + <div class="icon-circle bg-orange"> + <i class="material-icons">mode_edit</i> + </div> + <div class="menu-info"> + <h4><b>Nancy</b> changed name</h4> + <p> + <i class="material-icons">access_time</i> 2 hours ago + </p> + </div> + </a> + </li> + <li> + <a href="javascript:void(0);"> + <div class="icon-circle bg-blue-grey"> + <i class="material-icons">comment</i> + </div> + <div class="menu-info"> + <h4><b>John</b> commented your post</h4> + <p> + <i class="material-icons">access_time</i> 4 hours ago + </p> + </div> + </a> + </li> + <li> + <a href="javascript:void(0);"> + <div class="icon-circle bg-light-green"> + <i class="material-icons">cached</i> + </div> + <div class="menu-info"> + <h4><b>John</b> updated status</h4> + <p> + <i class="material-icons">access_time</i> 3 hours ago + </p> + </div> + </a> + </li> + <li> + <a href="javascript:void(0);"> + <div class="icon-circle bg-purple"> + <i class="material-icons">settings</i> + </div> + <div class="menu-info"> + <h4>Settings updated</h4> + <p> + <i class="material-icons">access_time</i> Yesterday + </p> + </div> + </a> + </li> + </ul> + </li> + <li class="footer"> + <a href="javascript:void(0);">View All Notifications</a> + </li> + </ul> + </li> + + + <li class="dropdown"> + <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button"> + <i class="material-icons">flag</i> + <span class="label-count">9</span> + </a> + <ul class="dropdown-menu"> + <li class="header">TASKS</li> + <li class="body"> + <ul class="menu tasks"> + <li> + <a href="javascript:void(0);"> + <h4> + Footer display issue + <small>32%</small> + </h4> + <div class="progress"> + <div class="progress-bar bg-pink" role="progressbar" aria-valuenow="85" aria-valuemin="0" aria-valuemax="100" style="width: 32%"> + </div> + </div> + </a> + </li> + <li> + <a href="javascript:void(0);"> + <h4> + Make new buttons + <small>45%</small> + </h4> + <div class="progress"> + <div class="progress-bar bg-cyan" role="progressbar" aria-valuenow="85" aria-valuemin="0" aria-valuemax="100" style="width: 45%"> + </div> + </div> + </a> + </li> + <li> + <a href="javascript:void(0);"> + <h4> + Create new dashboard + <small>54%</small> + </h4> + <div class="progress"> + <div class="progress-bar bg-teal" role="progressbar" aria-valuenow="85" aria-valuemin="0" aria-valuemax="100" style="width: 54%"> + </div> + </div> + </a> + </li> + <li> + <a href="javascript:void(0);"> + <h4> + Solve transition issue + <small>65%</small> + </h4> + <div class="progress"> + <div class="progress-bar bg-orange" role="progressbar" aria-valuenow="85" aria-valuemin="0" aria-valuemax="100" style="width: 65%"> + </div> + </div> + </a> + </li> + <li> + <a href="javascript:void(0);"> + <h4> + Answer GitHub questions + <small>92%</small> + </h4> + <div class="progress"> + <div class="progress-bar bg-purple" role="progressbar" aria-valuenow="85" aria-valuemin="0" aria-valuemax="100" style="width: 92%"> + </div> + </div> + </a> + </li> + </ul> + </li> + <li class="footer"> + <a href="javascript:void(0);">View All Tasks</a> + </li> + </ul> + </li> + <!-- #END# Tasks --> + <li class="pull-right"><a href="javascript:void(0);" class="js-right-sidebar" data-close="true"><i class="material-icons">more_vert</i></a></li> + </ul> + </div> + </div> + </nav> + <!-- #Top Bar --> + <section> + <!-- Left Sidebar --> + <aside id="leftsidebar" class="sidebar"> + <!-- User Info --> + <div class="user-info"> + <div class="image"> + <img src="/static/images/user.png" width="48" height="48" alt="User" /> + </div> + <div class="info-container"> + <div class="name" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ user.username }}</div> + <div class="email">{{ user.email }}</div> + <div class="btn-group user-helper-dropdown"> + <i class="material-icons" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">keyboard_arrow_down</i> + <ul class="dropdown-menu pull-right"> + <li><a href="/bench/logout"><i class="material-icons">input</i>Sign Out</a></li> + </ul> + </div> + </div> + </div> + <!-- #User Info --> + <!-- Menu --> + <div class="menu"> + <ul class="list"> + <li class="header">MAIN NAVIGATION</li> + <li class="active"> + <a href="{% url 'index' %}"> + <i class="material-icons">home</i> + <span>Home</span> + </a> + </li> + <li> + <a href="{% url 'repos' %}"> + <i class="material-icons">text_fields</i> + <span>Repos</span> + </a> + </li> + <li> + <a href="{% url 'run' %}"> + <i class="material-icons">layers</i> + <span>Run Benchmarks</span> + </a> + </li> + <li> + <a href="{% url 'tasks' %}" > + <i class="material-icons">widgets</i> + <span>Tasks</span> + </a> + </li> + </ul> + </div> + <!-- #Menu --> + <!-- Footer --> + <div class="legal"> + <div class="copyright"> + © 2016 - 2017 <a href="javascript:void(0);">AdminBSB - Material Design</a>. + </div> + <div class="version"> + <b>Version: </b> 1.0.5 + </div> + </div> + <!-- #Footer --> + </aside> + <!-- #END# Left Sidebar --> + <!-- Right Sidebar --> + <aside id="rightsidebar" class="right-sidebar"> + <ul class="nav nav-tabs tab-nav-right" role="tablist"> + <li role="presentation" class="active"><a href="#skins" data-toggle="tab">SKINS</a></li> + <li role="presentation"><a href="#settings" data-toggle="tab">SETTINGS</a></li> + </ul> + <div class="tab-content"> + <div role="tabpanel" class="tab-pane fade in active in active" id="skins"> + <ul class="demo-choose-skin"> + <li data-theme="red" class="active"> + <div class="red"></div> + <span>Red</span> + </li> + <li data-theme="pink"> + <div class="pink"></div> + <span>Pink</span> + </li> + <li data-theme="purple"> + <div class="purple"></div> + <span>Purple</span> + </li> + <li data-theme="deep-purple"> + <div class="deep-purple"></div> + <span>Deep Purple</span> + </li> + <li data-theme="indigo"> + <div class="indigo"></div> + <span>Indigo</span> + </li> + <li data-theme="blue"> + <div class="blue"></div> + <span>Blue</span> + </li> + <li data-theme="light-blue"> + <div class="light-blue"></div> + <span>Light Blue</span> + </li> + <li data-theme="cyan"> + <div class="cyan"></div> + <span>Cyan</span> + </li> + <li data-theme="teal"> + <div class="teal"></div> + <span>Teal</span> + </li> + <li data-theme="green"> + <div class="green"></div> + <span>Green</span> + </li> + <li data-theme="light-green"> + <div class="light-green"></div> + <span>Light Green</span> + </li> + <li data-theme="lime"> + <div class="lime"></div> + <span>Lime</span> + </li> + <li data-theme="yellow"> + <div class="yellow"></div> + <span>Yellow</span> + </li> + <li data-theme="amber"> + <div class="amber"></div> + <span>Amber</span> + </li> + <li data-theme="orange"> + <div class="orange"></div> + <span>Orange</span> + </li> + <li data-theme="deep-orange"> + <div class="deep-orange"></div> + <span>Deep Orange</span> + </li> + <li data-theme="brown"> + <div class="brown"></div> + <span>Brown</span> + </li> + <li data-theme="grey"> + <div class="grey"></div> + <span>Grey</span> + </li> + <li data-theme="blue-grey"> + <div class="blue-grey"></div> + <span>Blue Grey</span> + </li> + <li data-theme="black"> + <div class="black"></div> + <span>Black</span> + </li> + </ul> + </div> + <div role="tabpanel" class="tab-pane fade" id="settings"> + <div class="demo-settings"> + <p>GENERAL SETTINGS</p> + <ul class="setting-list"> + <li> + <span>Report Panel Usage</span> + <div class="switch"> + <label><input type="checkbox" checked><span class="lever"></span></label> + </div> + </li> + <li> + <span>Email Redirect</span> + <div class="switch"> + <label><input type="checkbox"><span class="lever"></span></label> + </div> + </li> + </ul> + <p>SYSTEM SETTINGS</p> + <ul class="setting-list"> + <li> + <span>Notifications</span> + <div class="switch"> + <label><input type="checkbox" checked><span class="lever"></span></label> + </div> + </li> + <li> + <span>Auto Updates</span> + <div class="switch"> + <label><input type="checkbox" checked><span class="lever"></span></label> + </div> + </li> + </ul> + <p>ACCOUNT SETTINGS</p> + <ul class="setting-list"> + <li> + <span>Offline</span> + <div class="switch"> + <label><input type="checkbox"><span class="lever"></span></label> + </div> + </li> + <li> + <span>Location Permission</span> + <div class="switch"> + <label><input type="checkbox" checked><span class="lever"></span></label> + </div> + </li> + </ul> + </div> + </div> + </div> + </aside> + <!-- #END# Right Sidebar --> + </section> + + <section class="content"> + <div class="container-fluid"> + {% block content %} + {% endblock %} + </section> + + <!-- Bootstrap Core Js --> + <script src="/static/plugins/bootstrap/js/bootstrap.js"></script> + + <!-- Select Plugin Js --> + <script src="/static/plugins/bootstrap-select/js/bootstrap-select.js"></script> + + <!-- Slimscroll Plugin Js --> + <script src="/static/plugins/jquery-slimscroll/jquery.slimscroll.js"></script> + + <!-- Waves Effect Plugin Js --> + <script src="/static/plugins/node-waves/waves.js"></script> + + <!-- Jquery CountTo Plugin Js --> + <script src="/static/plugins/jquery-countto/jquery.countTo.js"></script> + + <!-- Morris Plugin Js --> + <script src="/static/plugins/raphael/raphael.min.js"></script> + <script src="/static/plugins/morrisjs/morris.js"></script> + + <!-- ChartJs --> + <!--<script src="/static/plugins/chartjs/Chart.bundle.js"></script> + + <!-- Flot Charts Plugin Js + <script src="/static/plugins/flot-charts/jquery.flot.js"></script> + <script src="/static/plugins/flot-charts/jquery.flot.resize.js"></script> + <script src="/static/plugins/flot-charts/jquery.flot.pie.js"></script> + <script src="/static/plugins/flot-charts/jquery.flot.categories.js"></script> + <script src="/static/plugins/flot-charts/jquery.flot.time.js"></script>--> + + <!-- Sparkline Chart Plugin Js --> + <script src="/static/plugins/jquery-sparkline/jquery.sparkline.js"></script> + + <!-- Custom Js --> + <script src="/static/js/admin.js"></script> + <script src="/static/js/pages/index.js"></script> + + <!-- Demo Js --> + <script src="/static/js/demo.js"></script> +</body> + +</html> diff --git a/qtip/web/templates/bench/index.html b/qtip/web/templates/bench/index.html new file mode 100644 index 00000000..b3625a33 --- /dev/null +++ b/qtip/web/templates/bench/index.html @@ -0,0 +1,3 @@ +{% extends 'bench/base.html' %} +{% block content %} +{% endblock %}
\ No newline at end of file diff --git a/qtip/web/templates/bench/repo_form.html b/qtip/web/templates/bench/repo_form.html index 109436a9..158b8481 100644 --- a/qtip/web/templates/bench/repo_form.html +++ b/qtip/web/templates/bench/repo_form.html @@ -1,15 +1,43 @@ {% extends 'bench/base.html' %} {% block content %} - <div> - <h3>Repos</h3> - {% for repo in repos %} - <li>{{ repo.name }}</li> - {% endfor %} - </div> - <form role="form" method="post" action="">{% csrf_token %} - {{ form }} - <div class=input-field" style="margin:30px 20px"> - <button type="submit" value="Login"/>Submit</button> + <div class="card" > + <div class="header"> + <h2>Repos</h2> + <ul class="header-dropdown m-r-0"> + <li> + <button data-toggle="modal" data-target="#repoform" class="btn bg-purple waves-effect"><i id="template-role" class="material-icons">{{ template_role }}</i></button> + </li> + </ul> + </div> + <div class="body"> + {% for repo in repos %} + <ul class="font-15" ><a href="{% url 'repo_update' repo.id %}">{{ repo.name }}</a></ul> + {% endfor %} </div> - </form> + </div> + <div id="repoform" class="modal fade in" role="dialog" tabindex="-1"> + <div class="modal-dialog" role="document"> + <div class="modal-content"> + <div class="modal-header"></div> + <div class="modal-body"> + <form role="form" method="post" action="">{% csrf_token %} + {{ form }} + <div class=input-field" style="margin:30px 20px"> + <button type="submit" value="Login">Submit</button> + </div> + </form> + </div> + <div class="modal-footer"></div> + </div> + </div> + </div> + <script> + $(window).on('load',function(){ + if($('#template-role').text() == "edit") + { + console.log("hello"); + $('#repoform').modal('show'); + } + }); + </script> {% endblock %} diff --git a/qtip/web/templates/bench/run.html b/qtip/web/templates/bench/run.html index 8eaa251b..eabd2ea6 100644 --- a/qtip/web/templates/bench/run.html +++ b/qtip/web/templates/bench/run.html @@ -1,15 +1,14 @@ {% extends 'bench/base.html' %} {% block content %} - <div> - <h3>Repos</h3> - {% for repo in repos %} - <li>{{ repo.name }}</li> - {% endfor %} - </div> - <form role="form" method="post" action="">{% csrf_token %} - {{ form }} - <div class=input-field" style="margin:30px 20px"> - <button type="submit" value="Login"/>Submit</button> + <div class="card"> + <div class="header"> + <h2>Run</h2> </div> - </form> + <form role="form" method="post" action="">{% csrf_token %} + {{ form }} + <div class=input-field"> + <button class="btn" type="submit" value="Login"/>Submit</button> + </div> + </form> + </div> {% endblock %}
\ No newline at end of file diff --git a/qtip/web/templates/bench/task_detail.html b/qtip/web/templates/bench/task_detail.html index d715022b..3f42c10a 100644 --- a/qtip/web/templates/bench/task_detail.html +++ b/qtip/web/templates/bench/task_detail.html @@ -1,17 +1,34 @@ {% extends 'bench/base.html' %} {% block content %} - <div> - <h3>Task</h3> - <table> - <tr> - <td>{{ object.repo}}</td><td>{{ object.get_status_display }}</td><td>{{ object.start_time }}</td> - <td>{{ object.end_time }}</td><td>{{ object.duration }}</td><td>{{ object.log }}</td> - </tr> - </table> - <div> - <p> - {{ log | linebreaks }} - </p> + <div class="card"> + <div class="header"> + <h2>Task</h2> + </div> + <div class="body"> + <table class="table-responsive table"> + <thead> + <tr role="row"> + <th>Repo</th> + <th>Status</th> + <th>Start Time</th> + <th>End Time</th> + <th>Run time</th> + </tr> + </thead> + <tbody> + <tr role="row"> + <td>{{ object.repo}}</td><td>{{ object.get_status_display }}</td><td>{{ object.start_time }}</td> + <td>{{ object.end_time }}</td><td>{{ object.duration }}</td><td>{{ object.log }}</td> + </tr> + </tbody> + </table> + </div> + <div class="body"> + <div> + <p> + {{ log | linebreaks }} + </p> + </div> </div> </div> {% endblock %}
\ No newline at end of file diff --git a/qtip/web/templates/bench/task_list.html b/qtip/web/templates/bench/task_list.html index 188d6b81..074483ab 100644 --- a/qtip/web/templates/bench/task_list.html +++ b/qtip/web/templates/bench/task_list.html @@ -1,22 +1,77 @@ {% extends 'bench/base.html' %} {% block content %} - <div> - <h3>Tasks Log</h3> - <table> - <th>Repo</th> - <th>Status</th> - <th>Start Time</th> - <th>End Time</th> - <th>Run time</th> - {% for task in object_list %} - <tr onclick="location.href='{% url 'task_view' task.id %}'"> - <td>{{ task.repo }}</td> - <td>{{ task.get_status_display }}</td> - <td>{{ task.start_time }}</td> - <td>{{ task.end_time }}</td> - <td>{{ task.run_time }}</td> - </tr> - {% endfor %} - <table> - </div> + + <!-- JQuery DataTable Css --> + <link href="/static/plugins/jquery-datatable/skin/bootstrap/css/dataTables.bootstrap.css" rel="stylesheet"> + <div class="card"> + <div class="header"> + <h2> + Tasks Log + </h2> + <ul class="header-dropdown m-r--5"> + <li class="dropdown"> + <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> + <i class="material-icons">more_vert</i> + </a> + <ul class="dropdown-menu pull-right"> + <li><a href="javascript:void(0);" class=" waves-effect waves-block">Action</a></li> + <li><a href="javascript:void(0);" class=" waves-effect waves-block">Another action</a></li> + <li><a href="javascript:void(0);" class=" waves-effect waves-block">Something else here</a></li> + </ul> + </li> + </ul> + </div> + <div class="body"> + <div class="table-responsive"> + <div id="DataTables_Table_1_wrapper" class="dataTables_wrapper form-inline dt-bootstrap"><div class="dt-buttons"></div> + <table class="table table-bordered table-striped table-hover dataTable js-exportable" id="DataTables_Table_1" role="grid" aria-describedby="DataTables_Table_1_info"> + <thead> + <tr role="row"> + <th class="sorting" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Name: activate to sort column descending">Repo</th> + <th class="sorting" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Name: activate to sort column descending">Status</th> + <th class="sorting" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Name: activate to sort column descending">Start Time</th> + <th class="sorting" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Name: activate to sort column descending">End Time</th> + <th class="sorting" aria-controls="DataTables_Table_1" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Name: activate to sort column descending">Run time</th> + </tr> + </thead> + <tbody> + {% for task in object_list %} + <tr role="row" onclick="location.href='{% url 'task_view' task.id %}'"> + <td>{{ task.repo }}</td> + <td>{{ task.get_status_display }}</td> + <td>{{ task.start_time }}</td> + <td>{{ task.end_time }}</td> + <td>{{ task.run_time }}</td> + </tr> + {% endfor %} + </tbody> + <tfoot> + <tr role="row"> + <th rowspan="1" colspan="1">Repo</th> + <th rowspan="1" colspan="1" >Status</th> + <th rowspan="1" colspan="1" >Start Time</th> + <th rowspan="1" colspan="1" >End Time</th> + <th rowspan="1" colspan="1">Run time</th> + </tr> + </tfoot> + </table> + </div> + </div> + </div> + + +<!-- Jquery DataTable Plugin Js --> + <script src="/static/plugins/jquery-datatable/jquery.dataTables.js"></script> + <script src="/static/plugins/jquery-datatable/skin/bootstrap/js/dataTables.bootstrap.js"></script> + <script src="/static/plugins/jquery-datatable/extensions/export/dataTables.buttons.min.js"></script> + <script src="/static/plugins/jquery-datatable/extensions/export/buttons.flash.min.js"></script> + <script src="/static/plugins/jquery-datatable/extensions/export/jszip.min.js"></script> + <script src="/static/plugins/jquery-datatable/extensions/export/pdfmake.min.js"></script> + <script src="/static/plugins/jquery-datatable/extensions/export/vfs_fonts.js"></script> + <script src="/static/plugins/jquery-datatable/extensions/export/buttons.html5.min.js"></script> + <script src="/static/plugins/jquery-datatable/extensions/export/buttons.print.min.js"></script> + + <!-- Custom Js --> + <script src="/static/js/admin.js"></script> + <script src="/static/js/pages/tables/jquery-datatable.js"></script> {% endblock %}
\ No newline at end of file diff --git a/qtip/web/templates/registration/login.html b/qtip/web/templates/registration/login.html index 53da9376..1e15b90b 100644 --- a/qtip/web/templates/registration/login.html +++ b/qtip/web/templates/registration/login.html @@ -1,18 +1,90 @@ <!DOCTYPE html> -<html lang="en"> - <head> - <meta charset="utf-8"> - <title>QTIP Benchmarking Services</title> - </head> - <body> - {% block content %} - <form role="form" method="post" action= "/bench/login/">{% csrf_token %} - {{ form }} - <div class=input-field" style="margin:30px 20px"> - <button type="submit" value="Login"/>Login</button> - <input type="hidden" name="next" value = "{{ next }}"/> +<html> +<head> + <meta charset="UTF-8"> + <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"> + <title>Sign In | Bootstrap Based Admin Template - Material Design</title> + <!-- Favicon--> + <link rel="icon" href="/static/favicon.ico" type="image/x-icon"> + + <!-- Google Fonts --> + <link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin,cyrillic-ext" rel="stylesheet" type="text/css"> + <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" type="text/css"> + + <!-- Bootstrap Core Css --> + <link href="/static/plugins/bootstrap/css/bootstrap.css" rel="stylesheet"> + + <!-- Waves Effect Css --> + <link href="/static/plugins/node-waves/waves.css" rel="stylesheet" /> + + <!-- Animation Css --> + <link href="/static/plugins/animate-css/animate.css" rel="stylesheet" /> + + <!-- Custom Css --> + <link href="/static/css/style.css" rel="stylesheet"> +</head> + +<body class="login-page"> + <div class="login-box"> + <div class="card"> + <div class="body"> + {% block content %} + <form id="sign_in" method="POST" action="/bench/login/" > {% csrf_token %} + <div class="msg">Sign in to start your session</div> + <div class="input-group"> + <span class="input-group-addon"> + <i class="material-icons">person</i> + </span> + <div class="form-line"> + <input type="text" class="form-control" name="{{ form.username.html_name}}" placeholder="Username" required autofocus> + </div> + </div> + <div class="input-group"> + <span class="input-group-addon"> + <i class="material-icons">lock</i> + </span> + <div class="form-line"> + <input type="password" class="form-control" name="{{ form.password.html_name }}" placeholder="Password" required> + </div> + </div> + <div class="row"> + <div class="col-xs-8 p-t-5"> + <input type="checkbox" name="rememberme" id="rememberme" class="filled-in chk-col-pink"> + <label for="rememberme">Remember Me</label> + </div> + <div class="col-xs-4"> + <button class="btn btn-block bg-pink waves-effect" type="submit">SIGN IN</button> + </div> + </div> + <div class="row m-t-15 m-b--20"> + <div class="col-xs-6"> + <a href="sign-up.html">Register Now!</a> + </div> + <div class="col-xs-6 align-right"> + <a href="forgot-password.html">Forgot Password?</a> + </div> + </div> + {{ form.errors }} + </form> </div> - </form> - {% endblock %} - </body> -</html>
\ No newline at end of file + </div> + </div> + {% endblock %} + <!-- Jquery Core Js --> + <script src="/static/plugins/jquery/jquery.min.js"></script> + + <!-- Bootstrap Core Js --> + <script src="/static/plugins/bootstrap/js/bootstrap.js"></script> + + <!-- Waves Effect Plugin Js --> + <script src="/static/plugins/node-waves/waves.js"></script> + + <!-- Validation Plugin Js --> + <script src="/static/plugins/jquery-validation/jquery.validate.js"></script> + + <!-- Custom Js --> + <script src="/static/js/admin.js"></script> + <script src="/static/js/pages/examples/sign-in.js"></script> +</body> + +</html> |