From 37d19f4884a722c14202037ad08300869498b603 Mon Sep 17 00:00:00 2001 From: Yasin Date: Fri, 28 Nov 2014 12:38:59 +0100 Subject: [PATCH] f4f- homeview in progress --- .../fed4fire/fed4fire_home-view.html | 203 +++++++++++++++--- .../fed4fire/fed4fire_widget-topmenu.html | 1 - 2 files changed, 168 insertions(+), 36 deletions(-) diff --git a/portal/templates/fed4fire/fed4fire_home-view.html b/portal/templates/fed4fire/fed4fire_home-view.html index 09e4731c..4d844f3b 100644 --- a/portal/templates/fed4fire/fed4fire_home-view.html +++ b/portal/templates/fed4fire/fed4fire_home-view.html @@ -6,8 +6,57 @@ {% widget '_widget-news.html' %} --> {% if username %} + +
+ {%if 'no_creds' in user_cred %} +

NO CREDENTIALS are delegated to the portal!

+ {%endif%} + {%if 'creds_expired' in user_cred %} +

EXPIRED CREDENTIALS Please delegate again your credentials to the portal!

+ {%endif%} +
+ {%if 'is_pi' in pi %}

EXPERIMENT @@ -16,21 +65,22 @@

- + +
+
+

Your slices + + + +

Loading Slices
-
-

Experiment now

-
-
- - jFed -

MANAGEMENT

@@ -46,10 +96,10 @@ SUPPORT
- +
- +

@@ -65,16 +115,90 @@
- + +
+
+ {% if person.last_name %} + {{person.first_name}} {{person.last_name}}
+ {% endif %} + Username: {{person.email}} +
+
+
+ {%else%} +
+
+

+ EXPERIMENT +

+
+ +
+
+ +
+
+

Your slices + + +

+
+
+
Loading Slices
+
+ {% if pending_slices %} +

Pending slices + +

    + {% for slices in pending_slices %} +
  • {{slices}}
  • + {% endfor %} +
+ +

+ {%endif%} +
+
+

+ SUPPORT +

+
+ +
+
+ +
+

+
+ +
+
+ +
+

+ ACCOUNT +

+
+ +
+
+
{% if person.last_name %} {{person.first_name}} {{person.last_name}}
{% endif %} - Email: {{person.email}} + Username: {{person.email}}
+ {%endif%} + {% else %}
@@ -111,7 +235,7 @@ $('div#'+$(this).data('panel')).show(); }); $('button#validaterequestbtn').click(function() { - window.location="/portal/validate/"; + window.location="/portal/institution#requests"; }); $('button#ticketbtn').click(function() { window.location="/portal/contact/"; @@ -125,25 +249,34 @@ $('button#slicerequestbtn').click(function() { window.location="/portal/slice_request/"; }); -/*------- -List of slices has been moved in -portal/templates/base.html -This should go into session ---------*/ + + /* + Launch queries to get the resources and leases in Manifold Cache + */ + + $.post("/rest/resource/", function( data ) { + }); + $.post("/rest/lease/", function( data ) { + }); + + /*------- + List of slices has been moved in + portal/templates/base.html + This is now in localStorage + --------*/ + // myslice.user is in LocalStorage + if(myslice.user.slices.length>0){ + $.each( myslice.user.slices, function(i, val) { + /* + Launch a Query for each slice to get resources and leases in Manifold Cache + */ + $.post("/rest/slice/", { 'filters': { 'slice_hrn' : val } }, function(data) { + }); + }); + } }); - - +{# widget "_widget-monitor.html" #} +{# widget "_widget-stats-top-slices.html" #} + {% endblock %} diff --git a/portal/templates/fed4fire/fed4fire_widget-topmenu.html b/portal/templates/fed4fire/fed4fire_widget-topmenu.html index 66a5ce98..8bce7dda 100644 --- a/portal/templates/fed4fire/fed4fire_widget-topmenu.html +++ b/portal/templates/fed4fire/fed4fire_widget-topmenu.html @@ -39,7 +39,6 @@
-
  • |
  • -- 2.43.0