X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fquerytable%2Fstatic%2Fjs%2Fquerytable.js;h=76934e79b49ab90b7c5881e9b843d9f852071f0c;hb=d035a1f93e4acbeee79b7c8200264687d940ccc2;hp=c1b19235c993ad11179f7cc84129661d9dd0ab14;hpb=6d197d7242b86bf96af689af3530971838fc557d;p=myslice.git diff --git a/plugins/querytable/static/js/querytable.js b/plugins/querytable/static/js/querytable.js index c1b19235..76934e79 100644 --- a/plugins/querytable/static/js/querytable.js +++ b/plugins/querytable/static/js/querytable.js @@ -164,7 +164,7 @@ QUERYTABLE_BGCOLOR_REMOVED = 2; $('table.dataTable').delegate('a.resource-info','click',function() { var aPos = sTable.fnGetPosition( this.parentNode ); var aData = sTable.fnGetData( aPos[0] ); - //console.log(aData); + console.log(aData); var index = {} // XXX Loic @ Hardcoded !!! Maybe a loop over all fields would be better @@ -174,14 +174,16 @@ QUERYTABLE_BGCOLOR_REMOVED = 2; index['hostname'] = self.getColIndex('hostname',cols); index['urn'] = self.getColIndex('urn',cols); index['type'] = self.getColIndex('type',cols); - index['status'] = self.getColIndex('boot_state',cols); + //index['status'] = self.getColIndex('boot_state',cols); + index['available'] = self.getColIndex('available',cols); index['testbed'] = self.getColIndex('testbed_name',cols); index['facility'] = self.getColIndex('facility_name',cols); var resourceData = { 'hostname' : strip(aData[index['hostname']]), 'urn' : aData[index['urn']], 'type' : aData[index['type']], - 'status' : aData[index['status']], + //'status' : aData[index['status']], + 'available' : aData[index['available']], 'testbed' : aData[index['testbed']], 'facility' : aData[index['facility']], }; @@ -206,16 +208,17 @@ QUERYTABLE_BGCOLOR_REMOVED = 2; } else { var logo = resourceData['testbed']; var resourceLocation = { - 'longitude' : aData[13], - 'latitude' : aData[23], + 'longitude' : aData[20], + 'latitude' : aData[17], }; var coordinates = resourceLocation['latitude']+','+resourceLocation['longitude']; + console.log(coordinates); } var modal = $('#resource-info-modal'); modal.find('.modal-title').text(resourceData['testbed'] + ': ' +resourceData['hostname']); table = modal.find('.modal-resource-info'); - table.html(''+resourceData['facility']+' - '+resourceData['testbed']+''); + table.html('
'+resourceData['facility']+' - '+resourceData['testbed']+'
'); for (var j in resourceData) { table.append('' + j + '' + resourceData[j] + ''); }