You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2017/12/14 01:51:29 UTC

[airavata-sandbox] 07/08: Added screens for reviewer and admin dashboards

This is an automated email from the ASF dual-hosted git repository.

smarru pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-sandbox.git

commit 5639172c9b7856d308f43c88a059fea3b2e34a0b
Author: Prasandeep Singh <pr...@gmail.com>
AuthorDate: Sun Dec 10 22:07:38 2017 -0500

    Added screens for reviewer and admin dashboards
---
 .../templates/dashboard/{index.html => admin.html} |  25 +++++++++++++++------
 .../dashboard/templates/dashboard/index.html       |   2 +-
 .../templates/dashboard/request_form.html          |   2 ++
 .../dashboard/{index.html => reviewer.html}        |  11 ++++-----
 .../ResourceAllocationManager/dashboard/urls.py    |   7 ++++++
 .../ResourceAllocationManager/dashboard/urls.pyc   | Bin 892 -> 1033 bytes
 .../ResourceAllocationManager/dashboard/views.py   |  16 +++++++++++++
 .../ResourceAllocationManager/dashboard/views.pyc  | Bin 4554 -> 5676 bytes
 .../django/ResourceAllocationManager/db.sqlite3    | Bin 52224 -> 52224 bytes
 9 files changed, 48 insertions(+), 15 deletions(-)

diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/index.html b/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/admin.html
similarity index 50%
copy from allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/index.html
copy to allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/admin.html
index 88e25c4..1dda602 100644
--- a/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/index.html
+++ b/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/admin.html
@@ -1,8 +1,8 @@
 {% extends 'dashboard/base.html' %}
-{% block title %} Allocation Manager - Home{% endblock %}
+{% block title %} Allocation Manager - Admin{% endblock %}
 {% block body %}
     {% if all_requests %}
-        <h3 style="margin-left: 7%">My Requests</h3>
+        <h3 style="margin-left: 7%">Requests to Approve/Reject</h3>
         <!-- All Requests-->
         <div class="container">
           <table class="table table-hover table-bordered table-striped table-responsive">
@@ -12,7 +12,7 @@
                 <th>Request Title</th>
                 <th>Request Description</th>
                 <th>Allocation Requested</th>
-                <th>Allocation Status</th>
+                <th style="text-align: center">Assign Reviewer(s)</th>
               </tr>
             </thead>
             <tbody>
@@ -21,16 +21,27 @@
                     <td>{{ request.id }}</td>
                     <td>{{ request.request_title }}</td>
                     <td>{{ request.request_description }}</td>
-                    <td>10</td>
-                    <td>Pending</td>
+                    <td>{{ request.service_units}}</td>
+                    <td>
+                        <div class="form-group">
+                            <div class="col-sm-10">
+                                <select class="selectpicker" data-style="btn-primary" data-live-search="true" multiple>
+                                    <option>Reviewer 1</option>
+                                    <option>Reviewer 2</option>
+                                    <option>Reviewer 3</option>
+                                    <option>Reviewer 4</option>
+                                </select>
+                                <button type="submit" class="btn btn-success">Assign</button>
+                            </div>
+                        </div>
+                    </td>
                   </tr>
                 {% endfor %}
             </tbody>
           </table>
         </div>
 
-
     {%  else %}
-        <h3>You don't have any requests</h3>
+        <h3>No Requests to Review</h3>
     {% endif %}
 {%  endblock %}
\ No newline at end of file
diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/index.html b/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/index.html
index 88e25c4..fac06d2 100644
--- a/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/index.html
+++ b/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/index.html
@@ -22,7 +22,7 @@
                     <td>{{ request.request_title }}</td>
                     <td>{{ request.request_description }}</td>
                     <td>10</td>
-                    <td>Pending</td>
+                    <td>{{ request.request_status }}</td>
                   </tr>
                 {% endfor %}
             </tbody>
diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/request_form.html b/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/request_form.html
index 5e973c3..65a7e06 100644
--- a/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/request_form.html
+++ b/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/request_form.html
@@ -3,7 +3,9 @@
 {% block request_active %}active{% endblock %}
 
 {%  block body %}
+
     <div class="container-fluid">
+        <h2>New Request</h2>
         <div class="row">
             <div class="col-sm-12 col-md-7">
                 <div class="panel panel-default">
diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/index.html b/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/reviewer.html
similarity index 78%
copy from allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/index.html
copy to allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/reviewer.html
index 88e25c4..80f6d73 100644
--- a/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/index.html
+++ b/allocation-manager/django/ResourceAllocationManager/dashboard/templates/dashboard/reviewer.html
@@ -1,8 +1,8 @@
 {% extends 'dashboard/base.html' %}
-{% block title %} Allocation Manager - Home{% endblock %}
+{% block title %} Allocation Manager - Reviewer{% endblock %}
 {% block body %}
     {% if all_requests %}
-        <h3 style="margin-left: 7%">My Requests</h3>
+        <h3 style="margin-left: 7%">Requests to Review</h3>
         <!-- All Requests-->
         <div class="container">
           <table class="table table-hover table-bordered table-striped table-responsive">
@@ -12,7 +12,6 @@
                 <th>Request Title</th>
                 <th>Request Description</th>
                 <th>Allocation Requested</th>
-                <th>Allocation Status</th>
               </tr>
             </thead>
             <tbody>
@@ -21,16 +20,14 @@
                     <td>{{ request.id }}</td>
                     <td>{{ request.request_title }}</td>
                     <td>{{ request.request_description }}</td>
-                    <td>10</td>
-                    <td>Pending</td>
+                    <td>{{ request.service_units}}</td>
                   </tr>
                 {% endfor %}
             </tbody>
           </table>
         </div>
 
-
     {%  else %}
-        <h3>You don't have any requests</h3>
+        <h3>No Requests to Review</h3>
     {% endif %}
 {%  endblock %}
\ No newline at end of file
diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/urls.py b/allocation-manager/django/ResourceAllocationManager/dashboard/urls.py
index 8f26ba3..1beadcb 100644
--- a/allocation-manager/django/ResourceAllocationManager/dashboard/urls.py
+++ b/allocation-manager/django/ResourceAllocationManager/dashboard/urls.py
@@ -8,6 +8,13 @@ urlpatterns = [
     # url(r'^$', views.index, name='index'),
     url(r'^$', views.IndexView.as_view(), name='index'),
 
+    # /dashboard/reviewer
+    url(r'^reviewer/$', views.ReviewerView.as_view(), name='reviewer'),
+
+
+    # /dashboard/admin
+    url(r'^admin/$', views.AdminView.as_view(), name='admin'),
+
 
     url(r'^register/$', views.UserFormView.as_view(), name='register'),
 
diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/urls.pyc b/allocation-manager/django/ResourceAllocationManager/dashboard/urls.pyc
index ad9dfb3..abfcbe7 100644
Binary files a/allocation-manager/django/ResourceAllocationManager/dashboard/urls.pyc and b/allocation-manager/django/ResourceAllocationManager/dashboard/urls.pyc differ
diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/views.py b/allocation-manager/django/ResourceAllocationManager/dashboard/views.py
index 706a7f0..6e51a30 100644
--- a/allocation-manager/django/ResourceAllocationManager/dashboard/views.py
+++ b/allocation-manager/django/ResourceAllocationManager/dashboard/views.py
@@ -15,6 +15,22 @@ class IndexView(generic.ListView):
     def get_queryset(self):
         return Request.objects.all()
 
+class ReviewerView(generic.ListView):
+    template_name = 'dashboard/reviewer.html'
+    context_object_name = 'all_requests'
+
+    def get_queryset(self):
+        return Request.objects.all()
+
+
+class AdminView(generic.ListView):
+    template_name = 'dashboard/admin.html'
+    context_object_name = 'all_requests'
+
+    def get_queryset(self):
+        return Request.objects.all()
+
+
 
 class DetailView(generic.DetailView):
     model = Request
diff --git a/allocation-manager/django/ResourceAllocationManager/dashboard/views.pyc b/allocation-manager/django/ResourceAllocationManager/dashboard/views.pyc
index 4f74faa..149ad31 100644
Binary files a/allocation-manager/django/ResourceAllocationManager/dashboard/views.pyc and b/allocation-manager/django/ResourceAllocationManager/dashboard/views.pyc differ
diff --git a/allocation-manager/django/ResourceAllocationManager/db.sqlite3 b/allocation-manager/django/ResourceAllocationManager/db.sqlite3
index f3033e4..a8a979a 100644
Binary files a/allocation-manager/django/ResourceAllocationManager/db.sqlite3 and b/allocation-manager/django/ResourceAllocationManager/db.sqlite3 differ

-- 
To stop receiving notification emails like this one, please contact
"commits@airavata.apache.org" <co...@airavata.apache.org>.