X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fquerytable%2Fstatic%2Fjs%2Fquerytable.js;h=7ddf300d75e3fe8e0e839b7c9ef1e925c00e4f90;hb=261afa50a6fade31685a23b104ab919bebaf25ef;hp=15477a424e645d4b413b367908129f0d2a0b5579;hpb=4f924a3d5b8d6ca7cf022e15900369c7a0c4ce7e;p=myslice.git diff --git a/plugins/querytable/static/js/querytable.js b/plugins/querytable/static/js/querytable.js index 15477a42..7ddf300d 100644 --- a/plugins/querytable/static/js/querytable.js +++ b/plugins/querytable/static/js/querytable.js @@ -12,7 +12,8 @@ QUERYTABLE_BGCOLOR_REMOVED = 2; var QUERYTABLE_MAP = { - 'Testbed': 'network_hrn', + 'Facility': 'facility_name', + 'Testbed': 'testbed_name', 'Resource name': 'hostname', 'Type': 'type', }; @@ -97,7 +98,7 @@ QUERYTABLE_BGCOLOR_REMOVED = 2; sPaginationType: 'bootstrap', // Handle the null values & the error : Datatables warning Requested unknown parameter // http://datatables.net/forums/discussion/5331/datatables-warning-...-requested-unknown-parameter/p2 - aoColumnDefs: [{sDefaultContent: '',aTargets: [ '_all' ]}], + aoColumnDefs: [{sDefaultContent: '', aTargets: [ '_all' ]}], // WARNING: this one causes tables in a 'tabs' that are not exposed at the time this is run to show up empty // sScrollX: '100%', /* Horizontal scrolling */ bProcessing: true, /* Loading */ @@ -455,26 +456,26 @@ QUERYTABLE_BGCOLOR_REMOVED = 2; switch(data.state) { case STATE_SET: - switch(data.value) { + switch(data.op) { case STATE_SET_IN: case STATE_SET_IN_SUCCESS: case STATE_SET_OUT_FAILURE: - this.set_checkbox_from_data(data.key, true); - this.set_bgcolor(data.key, QUERYTABLE_BGCOLOR_RESET); + this.set_checkbox_from_data(data.value, true); + this.set_bgcolor(data.value, QUERYTABLE_BGCOLOR_RESET); break; case STATE_SET_OUT: case STATE_SET_OUT_SUCCESS: case STATE_SET_IN_FAILURE: - this.set_checkbox_from_data(data.key, false); - this.set_bgcolor(data.key, QUERYTABLE_BGCOLOR_RESET); + this.set_checkbox_from_data(data.value, false); + this.set_bgcolor(data.value, QUERYTABLE_BGCOLOR_RESET); break; case STATE_SET_IN_PENDING: this.set_checkbox_from_data(data.key, true); - this.set_bgcolor(data.key, QUERYTABLE_BGCOLOR_ADDED); + this.set_bgcolor(data.value, QUERYTABLE_BGCOLOR_ADDED); break; case STATE_SET_OUT_PENDING: this.set_checkbox_from_data(data.key, false); - this.set_bgcolor(data.key, QUERYTABLE_BGCOLOR_REMOVED); + this.set_bgcolor(data.value, QUERYTABLE_BGCOLOR_REMOVED); break; } break;