var platformParameters = {};
- $.get("/rest/platform", function(data) {
- var list = '<div class="list-group-item sl-platfrom"><span class="list-group-item-heading">Testbeds</span></div>';
- for(i=0; i<data.length;i++) {
- list += '<a href="#" class="list-group-item sl-platfrom" data-platform="'+data[i].platform+'"><span class="list-group-item-heading">'+data[i].platform_longname+'</span><p class="list-group-item-text">'+data[i].platform+'</p></a>';
- }
- $('#select-platform').html(list);
- }).done(function() {
-
- });
+
/* Testbeds list */
- $("div#testbed-list").ready(function() {
- $("table#testbedList").load("/table/network/", { "fields" : ["platform"], "options": ["checkbox"] }, function() {
-
- });
+ $("table#testbedList").load("/table/network/", { "fields" : ["network_hrn","description"], "options": ["checkbox"] }, function() {
+ $(this).dataTable( {
+ "sScrollY": window.innerHeight - 275,
+ "sDom": "frtiS",
+ "bScrollCollapse": true,
+ "bStateSave": true,
+ "bPaginate": false,
+ "bLengthChange": false,
+ "bFilter": false,
+ "bSort": true,
+ "bInfo": false,
+ "bAutoWidth": true,
+ "bAutoHeight": false
+ } );
});
$("#objectList").load("/table/resource/", {"fields" : ["hostname","hrn","country","type"], "options": ["checkbox"] }, function(data) {
"bAutoHeight": false,
"fnInitComplete": function(oSettings, json) {
for(var i = 0; i < myslice.pending.length; i++) {
- $('*[data-key="'+myslice.pending[i]+'"]').addClass("active");
+ var el = $('*[data-key="'+myslice.pending[i]+'"]');
+ el.addClass("active");
+ el.find('input[type=checkbox]').prop('checked', true);
+ if (myslice.count() > 0) {
+ $('#badge-pending').text(myslice.count());
+ $('#badge-pending').show();
+ }
}
}
} );
- $("input[type=checkbox]").live('click',function() {
+ $("input[type=checkbox]").click(function() {
var cnt = 0;
var id = $(this).val();
var row = $(this).parent().parent()