Caching: Resources, Leases and Slices pre-loaded on the dashboard using REST
authorLoic Baron <loic.baron@lip6.fr>
Wed, 29 Oct 2014 13:16:52 +0000 (14:16 +0100)
committerLoic Baron <loic.baron@lip6.fr>
Wed, 29 Oct 2014 13:16:52 +0000 (14:16 +0100)
portal/templates/base.html

index 0f2ecb5..df8fd9c 100644 (file)
@@ -69,11 +69,27 @@ $(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
+            */
+            $.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( "" ));