1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-23 22:50:09 +03:00

M #~: remove reload from datatable by websocket ()

Signed-off-by: Jorge Lobo <jlobo@opennebula.io>
(cherry picked from commit 44020f9f62e90f0967e354713ad23dda8b176a5d)
This commit is contained in:
Jorge Miguel Lobo Escalona 2021-04-26 13:04:54 +02:00 committed by Ruben S. Montero
parent f543fab68c
commit 41caa050b6
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

@ -97,38 +97,35 @@ define(function (require) {
default:
break;
}
/*
// this code recreate the datatable for VM and HOST this call foundation()
var response = {};
response[object] = event_data.HOOK_MESSAGE[object];
var request = {
"request": {
"data": [response[object].ID],
"method": "show",
"resource": object
var response = {};
response[object] = event_data.HOOK_MESSAGE[object];
var request = {
"request": {
"data": [response[object].ID],
"method": "show",
"resource": object
}
};
// update VM and HOST
var tab = $("#" + tab_id);
if(
Sunstone.getDataTable(tab_id) &&
Sunstone.getDataTable(tab_id).updateElement &&
typeof Sunstone.getDataTable(tab_id).updateElement === "function"
){
Sunstone.getDataTable(tab_id).updateElement(request, response);
}
};
// update VM and HOST
var tab = $("#" + tab_id);
if(
Sunstone.getDataTable(tab_id) &&
Sunstone.getDataTable(tab_id).updateElement &&
typeof Sunstone.getDataTable(tab_id).updateElement === "function"
){
Sunstone.getDataTable(tab_id).updateElement(request, response);
}
if (Sunstone.rightInfoVisible(tab) && event_data.HOOK_MESSAGE.RESOURCE_ID == Sunstone.rightInfoResourceId(tab)) {
callFunction(response);
}
if (event_data.HOOK_MESSAGE.STATE == "DONE"){
Sunstone.getDataTable(tab_id).waitingNodes();
Sunstone.runAction(object + ".list", {force: true});
}
if (Sunstone.rightInfoVisible(tab) && event_data.HOOK_MESSAGE.RESOURCE_ID == Sunstone.rightInfoResourceId(tab)) {
callFunction(response);
}
if (event_data.HOOK_MESSAGE.STATE == "DONE"){
Sunstone.getDataTable(tab_id).waitingNodes();
Sunstone.runAction(object + ".list", {force: true});
}
*/
}
});