From: Loic Baron Date: Fri, 26 Jun 2015 10:46:23 +0000 (+0200) Subject: js updated for accessing nitos nodes X-Git-Url: http://git.onelab.eu/?p=myslice.git;a=commitdiff_plain;h=638bef2312f862f8e148c9ad5a4675316c1ca961 js updated for accessing nitos nodes --- diff --git a/plugins/asap/static/js/asap.js b/plugins/asap/static/js/asap.js index 861f0cf9..107049b7 100644 --- a/plugins/asap/static/js/asap.js +++ b/plugins/asap/static/js/asap.js @@ -50,7 +50,7 @@ var AsapDateSelected = new Date(); /* PLUGIN EVENTS */ // on_show like in querytable - remove(id) { + remove: function(id) { return (elem=document.getElementById(id)).parentNode.removeChild(elem); }, /* GUI EVENTS */ diff --git a/plugins/asap/templates/asap.html b/plugins/asap/templates/asap.html index 3da60415..f26847a7 100644 --- a/plugins/asap/templates/asap.html +++ b/plugins/asap/templates/asap.html @@ -1,6 +1,7 @@
-

Reserve resources as soon as possible

+

Reserve resources as soon as possible *

+
* This feature is only available for FIT IoT-Lab testbed at the moment
diff --git a/plugins/querytable/static/js/querytable.js b/plugins/querytable/static/js/querytable.js index c1b19235..444fe604 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 @@ -206,16 +206,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] + ''); } diff --git a/portal/static/img/testbeds/FIT NITOS Paris.png b/portal/static/img/testbeds/FIT NITOS Paris.png new file mode 100644 index 00000000..10302275 Binary files /dev/null and b/portal/static/img/testbeds/FIT NITOS Paris.png differ diff --git a/portal/static/img/testbeds/FIT NITOS R2Lab.png b/portal/static/img/testbeds/FIT NITOS R2Lab.png new file mode 100644 index 00000000..10302275 Binary files /dev/null and b/portal/static/img/testbeds/FIT NITOS R2Lab.png differ diff --git a/portal/static/js/experiment.js b/portal/static/js/experiment.js index 3bddd235..2094cdab 100644 --- a/portal/static/js/experiment.js +++ b/portal/static/js/experiment.js @@ -1,5 +1,5 @@ function render_node(platform, node){ - console.log(platform,node); + //console.log(platform,node); nitos = false; if('@component_manager_id' in node){ // urn:publicid:IDN+ple+authority+cm @@ -23,7 +23,7 @@ function render_node(platform, node){ elm = document.getElementById(testbed); newElement = document.createElement('p'); if('services' in node && 'login' in node['services']){ - console.log(node['services']['login']); + //console.log(node['services']['login']); login = node['services']['login']; // TODO: Check if this login info has already been printed or not // Ex: IoT-Lab 1 ssh gateway per site, but info is per node in the RSpec diff --git a/portal/static/js/join.js b/portal/static/js/join.js index 44d8c750..87a7c283 100644 --- a/portal/static/js/join.js +++ b/portal/static/js/join.js @@ -40,9 +40,9 @@ jQuery(document).ready(function(){ pi_title: { required: true }, - pi_phone: { + /*pi_phone: { required: true - }, + },*/ pi_email: { required: true }, diff --git a/portal/templates/join_view.html b/portal/templates/join_view.html index ff9dad42..d0657663 100644 --- a/portal/templates/join_view.html +++ b/portal/templates/join_view.html @@ -97,7 +97,7 @@
+ style="width:200px" placeholder="Phone number" maxlength="20" class="form-control">
diff --git a/portal/templates/slice-tab-experiment.html b/portal/templates/slice-tab-experiment.html index 9673ad61..1af56614 100644 --- a/portal/templates/slice-tab-experiment.html +++ b/portal/templates/slice-tab-experiment.html @@ -11,14 +11,11 @@ function is_finished(len_platforms, pf_status){ $(document).ready(function() { var platform_status = Array(); var platform_empty = Array(); - console.log('{{platforms}}'); {% for platform in platforms %} // /sfa/Describe?hrn=onelab.upmc.projectx.slicex&platform[]={{platform}}&type=slice $.post("/sfa/Describe",{'hrn':'{{slicename}}', 'type':'slice', 'platform':['{{platform}}']}, function( data ) { - console.log(data); if('parsed' in data['{{platform}}'] && 'rspec' in data['{{platform}}']['parsed']){ rspec = data['{{platform}}']['parsed']['rspec']; - console.log(rspec); if('node' in rspec){ if(rspec['node'] instanceof Array) { jQuery.each( rspec['node'], function( i, node ) { @@ -27,6 +24,8 @@ $(document).ready(function() { }else{ render_node('{{platform}}',rspec['node']); } + }else{ + platform_empty.push('{{platform}}'); } }else{ platform_empty.push('{{platform}}'); @@ -34,7 +33,7 @@ $(document).ready(function() { platform_status.push('{{platform}}'); if(is_finished({{len_platforms}},platform_status.length)){ $("#loading").hide(); - if(platform_empty.length > 0){ + if(platform_empty.length == {{len_platforms}}){ $("#warning_message").show(); } } @@ -42,7 +41,6 @@ $(document).ready(function() { {% endfor %} }); -