X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fquerytable%2Fstatic%2Fjs%2Fquerytable.js;h=7ddf300d75e3fe8e0e839b7c9ef1e925c00e4f90;hb=261afa50a6fade31685a23b104ab919bebaf25ef;hp=eb5f834dbf6316fc64197f5de9e562a219b6173e;hpb=376307342a51ecd274fc8c0d24a14030c73cd292;p=myslice.git diff --git a/plugins/querytable/static/js/querytable.js b/plugins/querytable/static/js/querytable.js index eb5f834d..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', }; @@ -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;