From: root Date: Tue, 4 Mar 2014 18:02:05 +0000 (+0100) Subject: Testbed list: Adding icon and description to testbed list X-Git-Tag: myslice-1.1~234^2~2 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=a4e4119a5851a775863e8a5e733f7214db4a37fc;p=unfold.git Testbed list: Adding icon and description to testbed list --- diff --git a/portal/static/js/myslice-ui.js b/portal/static/js/myslice-ui.js index 1f62c47d..2990f05f 100644 --- a/portal/static/js/myslice-ui.js +++ b/portal/static/js/myslice-ui.js @@ -8,10 +8,34 @@ $(document).ready(function() { /* Testbeds list */ - $("div#testbed-list").ready(function() { - $("table#testbedList").load("/table/network/", { "fields" : ["network_hrn","description"], "options": ["checkbox"] }, function() { - + $.post("/rest/network/", { "fields" : ["network_hrn", "network_longname", "description"]}, function(data) { + var testbed_data = []; + var testbed_row = ""; + testbed_row += ""; + testbed_row += ""; + testbed_row += ""; + testbed_row += "network_hrn"; + testbed_row += "Full name"; + testbed_row += "Description"; + testbed_row += ""; + testbed_row += ""; + testbed_data.push(testbed_row); + $.each( data, function(key, val) { + testbed_row = "" + testbed_row += ""; + testbed_row += ""; + testbed_row += ""+val.network_hrn+""; + testbed_row += ""+val.network_longname+""; + testbed_row += ""+val.description+""; + testbed_row += ""; + + testbed_data.push(testbed_row); }); + $("table#testbedList").html(testbed_data.join('')); + $("div#testbed-list-loaded").css("display","block"); + $("div#testbed-list-loading").css("display","none"); + + }); $("#objectList").load("/table/resource/", {"fields" : ["hostname","hrn","country","type"], "options": ["checkbox"] }, function(data) {