git://git.onelab.eu
/
unfold.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TMP fix: base.html template Query myslice:user is faster than user
[unfold.git]
/
portal
/
templates
/
base.html
diff --git
a/portal/templates/base.html
b/portal/templates/base.html
index
0f2ecb5
..
cc60f7f
100644
(file)
--- a/
portal/templates/base.html
+++ b/
portal/templates/base.html
@@
-55,7
+55,7
@@
$(document).ready(function() {
var slices = [];
if($.isEmptyObject(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{
if(data.length > 0){
drawSlices(data[0].slices);
}else{
@@
-69,11
+69,22
@@
$(document).ready(function() {
slices = user.slices;
drawSlices(slices);
}
slices = user.slices;
drawSlices(slices);
}
+
+ /*
+ Launch queries to get the resources and leases in Manifold Cache
+ */
+
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
+ // 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( "" ));
});
$("div#home-slice-list").html($( "<ul/>", { html: items.join( "" ) }));
$("ul#dropdown-slice-list").append(items.join( "" ));