From: Loic Baron Date: Wed, 29 Oct 2014 13:16:52 +0000 (+0100) Subject: Caching: Resources, Leases and Slices pre-loaded on the dashboard using REST X-Git-Tag: myslice-1.1~13^2~9^2~3 X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=commitdiff_plain;h=2ab33522a6a0799cb9aaf9a663e3b91a5e4fa2ac Caching: Resources, Leases and Slices pre-loaded on the dashboard using REST --- diff --git a/portal/templates/base.html b/portal/templates/base.html index 0f2ecb52..df8fd9c1 100644 --- a/portal/templates/base.html +++ b/portal/templates/base.html @@ -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( "
  • " + val + "
  • " ); + /* + 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($( "