git://git.onelab.eu
/
myslice.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2dc3544
)
Caching: Resources, Leases and Slices pre-loaded on the dashboard using REST
author
Loic Baron
<loic.baron@lip6.fr>
Wed, 29 Oct 2014 13:16:52 +0000
(14:16 +0100)
committer
Loic Baron
<loic.baron@lip6.fr>
Wed, 29 Oct 2014 13:16:52 +0000
(14:16 +0100)
portal/templates/base.html
patch
|
blob
|
history
diff --git
a/portal/templates/base.html
b/portal/templates/base.html
index
0f2ecb5
..
df8fd9c
100644
(file)
--- a/
portal/templates/base.html
+++ b/
portal/templates/base.html
@@
-69,11
+69,27
@@
$(document).ready(function() {
slices = user.slices;
drawSlices(slices);
}
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>" );
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( "" ));
});
$("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
$("ul#dropdown-slice-list").append(items.join( "" ));