Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab
authorLoic Baron <loic.baron@lip6.fr>
Wed, 2 Apr 2014 10:42:43 +0000 (12:42 +0200)
committerLoic Baron <loic.baron@lip6.fr>
Wed, 2 Apr 2014 10:42:43 +0000 (12:42 +0200)
Conflicts:
portal/templates/base.html

27 files changed:
auth/manifoldbackend.py
debian/control
debian/deb-cheat-sheet
plugins/googlemap/static/js/googlemap.js
plugins/querytable/static/js/querytable.js
portal/about.py
portal/accountview.py
portal/contactview.py
portal/homeview.py
portal/institution.py
portal/slicerequestview.py
portal/sliceresourceview.py
portal/slicetabusers.py
portal/sliceview.py
portal/static/img/favicon.ico [new file with mode: 0644]
portal/static/js/myslice.js
portal/supportview.py
portal/templates/_widget-topmenu.html
portal/templates/about.html
portal/templates/base.html
portal/templates/fed4fire/fed4fire_home-view.html [deleted file]
portal/templates/fed4fire/fed4fire_widget-topmenu.html
portal/templates/home-view.html
portal/templates/onelab/onelab_home-view.html [deleted file]
portal/templates/onelab/onelab_widget-topmenu.html
portal/validationview.py
ui/static/img/favicon.ico [deleted file]

index eb87ab8..afb8782 100644 (file)
@@ -61,9 +61,13 @@ class ManifoldBackend:
         except User.DoesNotExist:
             # Create a user in Django's local database
             user = User.objects.create_user(username, username, 'passworddoesntmatter')
-            user.first_name = "DUMMY_FIRST_NAME" #person['first_name']
-            user.last_name = "DUMMY LAST NAME" # person['last_name']
             user.email = person['email']
+
+        if 'firstname' in person:
+            user.first_name = person['firstname']
+        if 'lastname' in person:
+            user.last_name = person['lastname']
+
         return user
 
     # Required for your backend to work properly - unchanged in most scenarios
index 4a4eb05..1acac30 100644 (file)
@@ -3,16 +3,19 @@ Maintainer: Thierry Parmentelat <Thierry.Parmentelat@inria.fr>
 Section: misc
 Priority: optional
 Standards-Version: 3.9.2
-Build-Depends: devscripts, debhelper (>=7.0.50~), debconf, dpatch, python-setuptools, make, python-django
+# we need manifold to be installed to run manage.py collectstatic
+Build-Depends: devscripts, debhelper (>=7.0.50~), debconf, dpatch, python-setuptools, make, python-django, manifold
 X-Python-Version: >= 2.7
 
-Package: myslice
-Architecture: any
-Depends: unfold, python-django-south
-Description: Myslice plugins, based on django and unfold frontend
-
 # Thierry: the recipe I'm using somehow only works with several packages
 Package: unfold
 Architecture: any
 Depends: python, python-django, python-pyparsing, apache2, libapache2-mod-wsgi, openssl
 Description: Generic django-based frontend for manifold backends
+
+#
+Package: myslice
+Architecture: any
+Depends: python-django-south, unfold, manifold
+Description: Myslice plugins, based on django and unfold frontend
+
index 8524fb8..182c3d3 100644 (file)
@@ -16,3 +16,8 @@ dpkg-deb -c myslice_0.2.4.lxc.2013.11.26_amd64.deb
 dpkg -s myslice
 dpkg --info -c myslice_0.2.4.lxc.2013.11.26_amd64.deb
 
+--- install from a local .deb 
+dpkg -i foo.deb
+- or, if this has deps that need to be pulled through apt-get:
+gdebi foo.deb
+(install with apt-get install -y gdebi-core)
index 6db222d..8a740b2 100644 (file)
@@ -94,6 +94,8 @@
             //create empty LatLngBounds object in order to automatically center the map on the displayed objects
             this.bounds = new google.maps.LatLngBounds();
             var center = new google.maps.LatLng(this.options.latitude, this.options.longitude);
+
+            console.log("GoogleMap zoom = "+this.options.zoom);
             var myOptions = {
                 zoom: this.options.zoom,
                 center: center,
index 375aa8f..c2f0d55 100644 (file)
             });
             $(".dataTables_filter").append("<div style='display:inline-block;height:27px;width:27px;padding-left:6px;padding-top:4px;'><span class='glyphicon glyphicon-search'></span></div>");
             $(".dataTables_filter input").css("width","100%");
-            $(".columns_selector").append("columns");
-            $(".columns_selector").css("float","right");
-            $(".columns_selector").css("width","inherit");
         }, // initialize_table
 
         /**
index 5080601..99434a7 100644 (file)
@@ -37,7 +37,7 @@ class AboutView (FreeAccessView, ThemeView):
             env['person'] = None
     
         env['theme'] = self.theme
-    
+        env['section'] = "About"
 
         env['username']=the_user(request)
         env['topmenu_items'] = topmenu_items(None, request)
index 8243e39..67c765d 100644 (file)
@@ -203,6 +203,7 @@ class AccountView(LoginRequiredAutoLogoutView, ThemeView):
         # so we can sho who is logged
         context['username'] = the_user(self.request)
         context['theme'] = self.theme
+        context['section'] = "User account"
 #        context ['firstname'] = config['firstname']
         prelude_env = page.prelude_env()
         context.update(prelude_env)
index b89aa75..95fb44e 100644 (file)
@@ -77,4 +77,5 @@ class ContactView (FreeAccessView, ThemeView):
                 'topmenu_items': topmenu_items('Contact', request),
                 'theme' : self.theme,
                 'username': username,
+                'section': "Contact"
                 })
index 7c47d99..62b4136 100644 (file)
@@ -26,6 +26,8 @@ class HomeView (FreeAccessView, ThemeView):
     def post (self,request):
         env = self.default_env()
         env['theme'] = self.theme
+        env['section'] = "Dashboard"
+        
         username = request.POST.get('username')
         password = request.POST.get('password')
         
@@ -78,7 +80,7 @@ class HomeView (FreeAccessView, ThemeView):
             env['person'] = None
     
         env['theme'] = self.theme
-    
+        env['section'] = "Dashboard"
 
         env['username']=the_user(request)
         env['topmenu_items'] = topmenu_items(None, request)
index 4ee9016..792fc6b 100644 (file)
@@ -75,6 +75,7 @@ class InstitutionView (FreeAccessView, ThemeView):
             env['person'] = None
     
         env['theme'] = self.theme
+        env['section'] = "Institution"
         env['pi'] = pi 
         env['username']=the_user(request)
         env['topmenu_items'] = topmenu_items(None, request)
index fc093d1..1f377d8 100644 (file)
@@ -110,7 +110,8 @@ class SliceRequestView (LoginRequiredAutoLogoutView, ThemeView):
             'user_hrn': user_hrn,
             'cc_myself': True,
             'authorities': authorities,
-            'theme': self.theme
+            'theme': self.theme,
+            'section': "Slice request"
         }
         template_env.update(slice_request)
         template_env.update(page.prelude_env())
index 254e2fd..6883765 100644 (file)
@@ -143,7 +143,7 @@ class SliceResourceView (LoginRequiredView, ThemeView):
             # center on Paris
             latitude   = 49.,
             longitude  = 9,
-            zoom       = 4,
+            zoom       = 8,
         )
 
         # --------------------------------------------------------------------------
index 861b0cb..df9b6c9 100644 (file)
@@ -15,6 +15,7 @@ from manifold.core.query             import Query, AnalyzedQuery
 from manifoldapi.manifoldapi         import execute_query
 
 from myslice.theme import ThemeView
+import json
 
 class SliceUserView (LoginRequiredView, ThemeView):
     template_name = "slice-tab-users-view.html"
@@ -23,5 +24,15 @@ class SliceUserView (LoginRequiredView, ThemeView):
         if request.user.is_authenticated():
             user_query  = Query().get('user').select('user_hrn','parent_authority').filter_by('user_hrn','==','$user_hrn')
             user_details = execute_query(self.request, user_query)
-    
+            # if sfa returns None
+            if user_details[0]['parent_authority'] is None:
+                # find in local DB 
+                user_query  = Query().get('local:user').select('config')
+                user_details = execute_query(request, user_query)
+                for user_config in user_details:
+                        config = json.loads(user_config['config'])
+                        config['authority'] = config.get('authority')
+                        user_details[0]['parent_authority'] = config['authority']
+                    
+             
         return render_to_response(self.template, {"slice": slicename, "user_details":user_details[0], "theme": self.theme, "username": request.user, "section":"users"}, context_instance=RequestContext(request))
index 10cab7c..e79b48e 100644 (file)
@@ -20,4 +20,4 @@ class SliceView (LoginRequiredView, ThemeView):
     template_name = "slice-view.html"
     
     def get(self, request, slicename):
-        return render_to_response(self.template, {"slice": slicename, "theme": self.theme, "username": request.user, "section":"slice"}, context_instance=RequestContext(request))
+        return render_to_response(self.template, {"slice": slicename, "theme": self.theme, "username": request.user, "section": "Slice %s" % slicename }, context_instance=RequestContext(request))
diff --git a/portal/static/img/favicon.ico b/portal/static/img/favicon.ico
new file mode 100644 (file)
index 0000000..a2754aa
Binary files /dev/null and b/portal/static/img/favicon.ico differ
index c7c32d2..0807d49 100644 (file)
@@ -106,14 +106,15 @@ var myslice = {
        user: function() {
                if ($.isEmptyObject(this.user)) {
                        //this.login(function() { return this.user; });
-               } else {
-                       return this.user;
+                       this.user = localStorage.getItem('user');
                }
+               return this.user;
        },
 
        login: function(fn) {
                $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
                        myslice.user = new user(data[0]);
+                       localStorage.setItem('user', JSON.stringify(myslice.user));
                });
        },
 
index f42bbd8..5bd0d75 100644 (file)
@@ -33,7 +33,7 @@ class SupportView (FreeAccessView, ThemeView):
             env['person'] = None
     
         env['theme'] = self.theme
-    
+        env['section'] = "Support"
 
         env['username']=the_user(request)
 
index 4ed429a..cf81029 100644 (file)
                        </a>
                                
                                <div class="dropdown-menu" style="z-index:99;">
-                                               <ul>
+                                               <ul id="dropdown-slice-list">
                                                        <li><a href="/portal/slice_request/">Request Slice</a></li>
-                                                       <li><a href="/slice/ple.upmc.agent3/">ple.upmc.agent3</a></li>
-                                                   <li><a href="/slice/ple.upmc.agent/">ple.upmc.agent</a></li>
-                                                   <li><a href="/slice/ple.upmc.myslicedemo/">ple.upmc.myslicedemo</a></li>
-                                                   <li><a href="/slice/ple.upmc.slicestat/">ple.upmc.slicestat</a></li>
-                                                   <li><a href="/slice/ple.upmc.agent2/">ple.upmc.agent2</a></li>
                                                </ul>
                                </div>
                                </li>
index cb118c2..4c4817a 100644 (file)
@@ -1,71 +1,99 @@
-{% extends "layout.html" %}
+{% extends "layout_wide.html" %}
 
 {% block content %}
-<div class="row">
-       <div class="col-md-12">
-       <h1><img src="{{ STATIC_URL }}icons/slices-xs.png" alt="About MySlice" /> About</h1>
-       </div>
+<div class="container">
+    <div class="row">
+        <div class="col-md-12">
+            <ul class="nav nav-tabs nav-section">
+                <li class="active"><a href="#about"><img src="{{ STATIC_URL }}icons/slices-xs.png" alt="About" />About</a></li>
+                <li><a href="#components">Underlying technologies</a></li>
+            </ul>
+        </div>
+    </div>
 </div>
 
-<div class="row">
-       <div class="col-md-12">
-       <h3>A ready-made and easily customisable user interface for your testbed.</h3>
 
-       <p>
-               MySlice is an ambitious project aiming to support researchers throughout the lifecycle of experiments that can run on a variety 
-               of testbeds spanning different administrative domains and networking technologies. Its basic principle is to bring together 
-               available resources with useful information (characteristics, performance, network measurements).
-       </p>
-       <p>
-       MySlice inititiave started in Janury 2011 by offering annotation services for the first ederated experimental resources. Today, 
-       MySlice has taken a big step toward becoming a tand-alone web framework, which will present all available resources from testbeds 
-       across the world, interconnected through the Slice-based Facility Architecture (SFA) and annotated by the TopHat measurement system.
-       </p>
-       <p>
-       Our framework is built with standard programming tools (python and javascript for the front-end and python for the back-end) 
-       and has a modular structure based on the concept of plugins for implementing different core functionalities (query editing, 
-       data display, and resource allocation).
-       </p>
-       <p>
-       The goal is to enable developers with expertise on different testbed technologies and different experimental 
-       practices to work in parallel for optimizing the tools presented to the users allowing them for a wide range of choices 
-       according to their own requirements. Opening in this way the development of web-based user tools for experimentation and 
-       sharing effort and information can increase significantly the chances for the achievement of our challenging objective.
-       </p>
+<div class="container tab-content">
+    <div class="tab-pane active row" id="about">
+               <div class="col-md-12">
+                       <p>
+                               OneLab Portal is a central place to get acess to all OneLab testbeds.In order to get access to the portal,
+                               an experimenter needs to  <a href="/portal/register">register</a> to the portal. The portal administrative body
+                               is responsible to accept or reject newly registered users.   
+                       </p>
+                       <p>
+                               To learn more about OneLab visit:  <a href="http://onelab.eu/" target="_blank">http://onelab.eu/</a>                    
+                       </p>
+                       <p>
+                               If you have any questions regarding using the portal visit: <a href="/portal/support">OneLab support</a>
+                       </p>
+                       <p>
+                               OneLab portal is a community effot. To get more information about OneLab portal team visit: 
+                               <a href="http://myslice.info/community" target="_blank">http://myslice.info/community</a>
+                       </p>
+               </div>
        </div>
-</div>
-
-
-<div class="row">
-       <div class="col-md-12">
-<h2>Portal Components</h2>
-<h3>Myslice (Web Frontend)</h3>
-<p>
-       MySlice is an ambitious project aiming to support researchers throughout the 
-       lifecycle of experiments that can run on a variety of testbeds spanning different 
-       administrative domains and networking technologies. Its basic principle is to bring 
-       together available <b>resources</b> with <b>useful information</b> (characteristics, performance, network measurements).
-       </p>
+       <div class="tab-pane row" id="components">
+               <div class="col-md-12">
+                       <h3>A ready-made and easily customisable user interface for your testbed.</h3>
+                               <p>
+                                       MySlice is an ambitious project aiming to support researchers throughout the lifecycle of experiments that can run on a variety 
+                                       of testbeds spanning different administrative domains and networking technologies. Its basic principle is to bring together 
+                                       available resources with useful information (characteristics, performance, network measurements).
+                               </p>
+                               <p>
+                                       MySlice inititiave started in Janury 2011 by offering annotation services for the first ederated experimental resources. Today, 
+                                       MySlice has taken a big step toward becoming a tand-alone web framework, which will present all available resources from testbeds 
+                                       across the world, interconnected through the Slice-based Facility Architecture (SFA) and annotated by the TopHat measurement system.
+                               </p>
+                               <p>
+                                       Our framework is built with standard programming tools (python and javascript for the front-end and python for the back-end) 
+                                       and has a modular structure based on the concept of plugins for implementing different core functionalities (query editing, 
+                                       data display, and resource allocation).
+                               </p>
+                               <p>
+                                       The goal is to enable developers with expertise on different testbed technologies and different experimental 
+                                       practices to work in parallel for optimizing the tools presented to the users allowing them for a wide range of choices 
+                                       according to their own requirements. Opening in this way the development of web-based user tools for experimentation and 
+                                       sharing effort and information can increase significantly the chances for the achievement of our challenging objective.
+                               </p>
+               </div>
+               <div class="col-md-12">
+                       <h3>Portal Components</h3>
+                               <h5>Myslice (Web Frontend)</h5>
+                                       <p>
+                                               MySlice is an ambitious project aiming to support researchers throughout the 
+                                               lifecycle of experiments that can run on a variety of testbeds spanning different 
+                                               administrative domains and networking technologies. Its basic principle is to bring 
+                                               together available <b>resources</b> with <b>useful information</b> (characteristics, performance, network measurements).
+                                       </p>
+                                       <p> More Info: <a href="http://myslice.info/" target="_blank">http://myslice.info/</a></p>
+                                       <p> Code: <a href="http://git.onelab.eu/?p=myslice.git;a=summary" target="_blank">Git Repository</a> (read only)</p> 
+                                       <p> 
+                                               If you need write access to the git repository you need first to send your public key to <a href="mailto:support@myslice.info">support@myslice.info</a>.
+                                       </p>
 
-<p> More Info: <a href="http://myslice.info/" target="_blank">http://myslice.info/</a></p>
-<p> Code: <a href="http://git.onelab.eu/?p=myslice.git;a=summary" target="_blank">Git Repository</a> (read only)</p> 
 
-<p> 
-If you need write access to the git repository you need first to send your public key to <a href="mailto:support@myslice.info">support@myslice.info</a>.
-</p>
+                               <h5>Manifold (Portal backend)</h5>
+                                       <p>Manifold is the backend that is running behind the portal.</p>
+                                       <p> Documentation: <a href="http://trac.myslice.info/" target="_blank">http://trac.myslice.info/</a></p>
+                                       <p> Code: <a href="https://git.top-hat.info/?p=tophat.git;a=shortlog;h=refs/heads/devel" target="_blank">Git Repository</a> (read only)</p>     
 
+                               <h5>OneLab Registry</h5>
+                                       <p>It's a SFA registry. SFA Registry is a specific installation mode of the SFAWrapper (Registry Only mode).</p>
+                                       <p> More Info: <a href="http://svn.planet-lab.org/wiki/SfaDeveloperRegistryTutorial#RunninginRegistry-Onlymode" target="_blank">SFA Registry</a></p>
+       </div>
+   </div>
+</div>
 
-<h3>Manifold (Portal backend)</h3>
-Manifold is the backend that is running behind the portal.
-
-<p> Documentation: <a href="http://trac.myslice.info/" target="_blank">http://trac.myslice.info/</a></p>
-<p> Code: <a href="https://git.top-hat.info/?p=tophat.git;a=shortlog;h=refs/heads/devel" target="_blank">Git Repository</a> (read only)</p>    
-
-<h3>OneLab Registry</h3>
-<p>It's a SFA registry. SFA Registry is a specific installation mode of the SFAWrapper (Registry Only mode).</p>
-<p> More Info: <a href="http://svn.planet-lab.org/wiki/SfaDeveloperRegistryTutorial#RunninginRegistry-Onlymode" target="_blank">SFA Registry</a></p>
+<script>
+$(document).ready(function() {
+    $('.nav-tabs a').click(function (e) {
+        e.preventDefault();
+        $(this).tab('show');
+    });
+});
+</script>
 
-    </div>
-</div>
 
 {% endblock %}
index 1c5a2d4..6bb7e23 100644 (file)
@@ -3,7 +3,7 @@
 <html lang="en"><head>
 <title>{{theme}} portal - {{ section }}</title>
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
-<link rel="shortcut icon" href="/static/img/myslice-icon.png">
+<link rel="shortcut icon" href="/static/img/favicon.ico">
 {# This is where insert_str will end up #}{% media_container prelude %}
 {% include 'messages-transient-header.html' %}
 <script type="text/javascript"> {# raw js code - use {% insert prelude_js %} ... {% endinsert %} #} {% container prelude_js %}</script>
diff --git a/portal/templates/fed4fire/fed4fire_home-view.html b/portal/templates/fed4fire/fed4fire_home-view.html
deleted file mode 100644 (file)
index f7da2da..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-{% extends "layout.html" %}
-
-{% block content %}
-<div class="row" id="home-dashboard">
-       <ul class="nav nav-tabs">
-         <li class="active"><a class="home-tab" data-panel="user" href="#">USER</a></li>
-         <li><a class="home-tab" data-panel="manager" href="#">MANAGER</a></li>
-       </ul>
-       <div class="home-panel" id="user">
-               <table>
-                       <tr>
-                               <td>ACCOUNT</td>
-                               <td>SLICES</td>
-                               <td>SUPPORT</td>
-                       </tr>
-                       <tr>
-                               <td><a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a></td>
-                               <td><a href="#"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a></td>
-                               <td><a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a></td>
-                       </tr>
-                       <tr>
-                               {% if person %}
-                               <td class="logged-in">
-                                       <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
-                                       <div>
-                                       {% if person.last_name %}
-                                               {{person.first_name}} {{person.last_name}}<br />
-                                       {% endif %}
-                                       <span class="label">Email:</span> <a href='/portal/account/'>{{person.email}}</a>
-                               </div>
-                               {% else %}
-                               <td>
-                                       {% include '_widget-login-user.html' %}
-                               {% endif %}
-                               </td>
-                               <td>
-                               {% if person %}
-                                       <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request Slice</button>
-                                       <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
-                               {% else %}
-                               {% endif %}
-                               </td>
-                               <td class="support">
-                                       <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create Ticket</button>
-                                       <div>
-                                               <a href="/portal/contact">Contact</a> <br />
-                                               <a href="/portal/support/documentation">Documentation</a>
-                                       </div>
-                               </td>
-                       </tr>
-               </table>
-       </div>
-       <div class="home-panel" id="manager">
-               <table>
-                       <tr>
-                               <td>INSTITUTION</td>
-                               <td>SLICES</td>
-                               <td>REQUESTS</td>
-                       </tr>
-                       <tr>
-                               <td><a href="/portal/institution"><img src="{{ STATIC_URL }}img/icon_authority_color.png" alt="" /></a></td>
-                               <td><a href="/portal/institution#slices"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a></td>
-                               <td><a href="/portal/validate"><img src="{{ STATIC_URL }}img/icon_testbed_color.png" alt="" /></a></td>
-                       </tr>
-                       <tr>
-                               {% if person %}
-                               <td class="logged-in">
-                                       <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
-                               {% else %}
-                               <td>
-                                       {% include '_widget-login-manager.html' %}
-                               {% endif %}
-                               </td>
-                               <td>
-                                       {% if person %}
-                                   <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create Slice</button>
-                                       {% endif %}
-                               </td>
-                               <td class="support">
-                                       {% if person %}
-                                   <button id="validaterequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> Validate Requests</button>
-                                       {% endif %}
-                               </td>
-                       </tr>
-               </table>
-       </div>
-</div>
-<script>
-       $(document).ready(function() {
-               $('a.home-tab').click(function() {
-                       $('ul.nav-tabs li').removeClass('active');
-                       $(this).parent().addClass('active');
-                       $('div.home-panel').hide();
-                       $('div#'+$(this).data('panel')).show();
-               });
-               $('button#validaterequestbtn').click(function() {
-                       window.location="/portal/validate/";
-               });
-               $('button#ticketbtn').click(function() {
-                       window.location="/portal/contact/";
-               });
-               $('button#slicerequestbtn').click(function() {
-                       window.location="/portal/slice_request/";
-               });
-               
-               {% if person %}
-        $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
-                 var items = [];
-          if(data.length > 0){
-                   $.each( data[0].slices, function(i, val) {
-                           items.push( "<li><a href=\"/slice/"+val+"\">" + val + "</a></li>" );
-                   });
-                   $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
-                 }else{
-                   $("div#home-slice-list").html("no slice");
-          }
-               });
-               {% endif %}
-       });
-</script>
-{% endblock %}
index 865a2bc..74edfdc 100644 (file)
@@ -27,7 +27,7 @@
                        </a>
                                
                                <div class="dropdown-menu" style="z-index:99;">
-                                               <ul>
+                                               <ul id="dropdown-slice-list">
                                                        <li><a href="/portal/slice_request/">Request Slice</a></li>
                             <!--
                                                        <li><a href="/slice/ple.upmc.agent3/">ple.upmc.agent3</a></li>
index d7b3c33..93e1f15 100644 (file)
                </table>
        </div>
 </div>
-<script>
+<script type="text/javascript">
        $(document).ready(function() {
+        {% if person %}
+        myslice.login();
+        {% endif %}
+
                $('a.home-tab').click(function() {
                        $('ul.nav-tabs li').removeClass('active');
                        $(this).parent().addClass('active');
                $('button#slicerequestbtn').click(function() {
                        window.location="/portal/slice_request/";
                });
-               
-               {% if person %}
-        $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
-                 var items = [];
-          if(data.length > 0){
-                 $.each( data[0].slices, function(i, val) {
-                       items.push( "<li><a href=\"/slice/"+val+"\">" + val + "</a></li>" );
-                 });
-                 
-                 $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
-                 }else{
-                 $("div#home-slice-list").html("no slice");
-          } 
-               });
-               {% endif %}
-       });
+/*-------
+List of slices has been moved in 
+portal/templates/base.html
+This should go into session
+--------*/
+});
 </script>
 {% endblock %}
diff --git a/portal/templates/onelab/onelab_home-view.html b/portal/templates/onelab/onelab_home-view.html
deleted file mode 100644 (file)
index 090f66b..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-{% extends "layout.html" %}
-
-{% block content %}
-<div class="row" id="home-dashboard">
-       <ul class="nav nav-tabs">
-         <li class="active"><a class="home-tab" data-panel="user" href="#">USER</a></li>
-         <li><a class="home-tab" data-panel="manager" href="#">MANAGER</a></li>
-       </ul>
-       <div class="home-panel" id="user">
-               <table>
-                       <tr>
-                               <td>ACCOUNT</td>
-                               <td>SLICES</td>
-                               <td>SUPPORT</td>
-                       </tr>
-                       <tr>
-                               <td><a href="/portal/account/"><img src="{{ STATIC_URL }}img/icon_user_color.png" alt="" /></a></td>
-                               <td><a href="#"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a></td>
-                               <td><a href="/portal/support"><img src="{{ STATIC_URL }}img/icon_support.png" alt="" /></a></td>
-                       </tr>
-                       <tr>
-                               {% if person %}
-                               <td class="logged-in">
-                                       <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
-                                       <div>
-                                       {% if person.last_name %}
-                                               {{person.first_name}} {{person.last_name}}<br />
-                                       {% endif %}
-                                       <span class="label">Email:</span> <a href='/portal/account/'>{{person.email}}</a>
-                               </div>
-                               {% else %}
-                               <td>
-                                       {% include 'onelab__widget-login-user.html' %}
-                               {% endif %}
-                               </td>
-                               <td>
-                               {% if person %}
-                                       <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Request Slice</button>
-                                       <div id="home-slice-list"><img src="{{ STATIC_URL }}img/loading.gif" alt="Loading Slices" /></div>
-                               {% else %}
-                               {% endif %}
-                               </td>
-                               <td class="support">
-                                       <button id="ticketbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create Ticket</button>
-                                       <div>
-                                               <a href="/portal/contact">Contact</a> <br />
-                                               <a href="/portal/support/documentation">Documentation</a>
-                                       </div>
-                               </td>
-                       </tr>
-               </table>
-       </div>
-       <div class="home-panel" id="manager">
-               <table>
-                       <tr>
-                               <td>INSTITUTION</td>
-                               <td>SLICES</td>
-                               <td>REQUESTS</td>
-                       </tr>
-                       <tr>
-                               <td><a href="/portal/institution"><img src="{{ STATIC_URL }}img/icon_authority_color.png" alt="" /></a></td>
-                               <td><a href="/portal/institution#slices"><img src="{{ STATIC_URL }}img/icon_slices.png" alt="" /></a></td>
-                               <td><a href="/portal/validate"><img src="{{ STATIC_URL }}img/icon_testbed_color.png" alt="" /></a></td>
-                       </tr>
-                       <tr>
-                               {% if person %}
-                               <td class="logged-in">
-                                       <button id="logoutbtn" type="button" class="btn btn-default" data-username="{{ username }}"><span class="glyphicon glyphicon-off"></span> Logout</button>
-                               {% else %}
-                               <td>
-                                       {% include 'onelab__widget-login-manager.html' %}
-                               {% endif %}
-                               </td>
-                               <td>
-                                       {% if person %}
-                                   <button id="slicerequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span> Create Slice</button>
-                                       {% endif %}
-                               </td>
-                               <td class="support">
-                                       {% if person %}
-                                   <button id="validaterequestbtn" type="button" class="btn btn-default"><span class="glyphicon glyphicon-ok"></span> Validate Requests</button>
-                                       {% endif %}
-                               </td>
-                       </tr>
-               </table>
-       </div>
-</div>
-<script>
-       $(document).ready(function() {
-               $('a.home-tab').click(function() {
-                       $('ul.nav-tabs li').removeClass('active');
-                       $(this).parent().addClass('active');
-                       $('div.home-panel').hide();
-                       $('div#'+$(this).data('panel')).show();
-               });
-               $('button#validaterequestbtn').click(function() {
-                       window.location="/portal/validate/";
-               });
-               $('button#ticketbtn').click(function() {
-                       window.location="/portal/contact/";
-               });
-               $('button#slicerequestbtn').click(function() {
-                       window.location="/portal/slice_request/";
-               });
-               
-               {% if person %}
-        $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
-                 var items = [];
-          if(data.length > 0){
-                   $.each( data[0].slices, function(i, val) {
-                           items.push( "<li><a href=\"/slice/"+val+"\">" + val + "</a></li>" );
-                   });
-                   $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
-                 }else{
-                   $("div#home-slice-list").html("no slice");
-          }
-               });
-               {% endif %}
-       });
-</script>
-{% endblock %}
index 4ed429a..cf81029 100644 (file)
                        </a>
                                
                                <div class="dropdown-menu" style="z-index:99;">
-                                               <ul>
+                                               <ul id="dropdown-slice-list">
                                                        <li><a href="/portal/slice_request/">Request Slice</a></li>
-                                                       <li><a href="/slice/ple.upmc.agent3/">ple.upmc.agent3</a></li>
-                                                   <li><a href="/slice/ple.upmc.agent/">ple.upmc.agent</a></li>
-                                                   <li><a href="/slice/ple.upmc.myslicedemo/">ple.upmc.myslicedemo</a></li>
-                                                   <li><a href="/slice/ple.upmc.slicestat/">ple.upmc.slicestat</a></li>
-                                                   <li><a href="/slice/ple.upmc.agent2/">ple.upmc.agent2</a></li>
                                                </ul>
                                </div>
                                </li>
index 9ecd962..b5170b9 100644 (file)
@@ -263,6 +263,7 @@ class ValidatePendingView(FreeAccessView, ThemeView):
         context['username'] = the_user(self.request) 
         
         context['theme'] = self.theme
+        context['section'] = "Requests"
         # XXX We need to prepare the page for queries
         #context.update(page.prelude_env())
 
diff --git a/ui/static/img/favicon.ico b/ui/static/img/favicon.ico
deleted file mode 100644 (file)
index 3925be4..0000000
Binary files a/ui/static/img/favicon.ico and /dev/null differ