Merge branch 'onelab' of ssh://git.onelab.eu/git/myslice into onelab
[myslice.git] / portal / templates / base.html
index df8fd9c..0bf9ab4 100644 (file)
@@ -52,10 +52,10 @@ $(document).ready(function() {
     myslice.login();
 
     user = myslice.user();
-    
+
     var slices = [];
     if($.isEmptyObject(user)){
-        $.post("/rest/user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
+        $.post("/rest/myslice:user/",{'filters':{'user_hrn':'$user_hrn'}}, function( data ) {
             if(data.length > 0){
                 drawSlices(data[0].slices);  
             }else{
@@ -69,27 +69,22 @@ $(document).ready(function() {
         slices = user.slices;
         drawSlices(slices);
     }
-
+   
     /*
         Launch queries to get the resources and leases in Manifold Cache
     */
         
-    $.post("/rest/resource/", function( data ) {
-    });
-    $.post("/rest/lease/", function( data ) {
-    });
-
-   
     function drawSlices(slices){
         var items = [];
                
         $.each( slices, function(i, val) {
             items.push( "<li><a href=\"/resources/"+val+"\">" + val + "</a></li>" );
             /*
-            Launch a Query for each slice to get resources and leases in Manifold Cache
-            */
+            // Launch a Query for each slice to get resources and leases in Manifold Cache
+            // Now only done in Homeview to speed up the other pages
             $.post("/rest/slice/", { 'filters': { 'slice_hrn' : val } }, function(data) {
             });
+            */
         });
         $("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
         $("ul#dropdown-slice-list").append(items.join( "" ));