mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-30 22:50:10 +03:00
Bug #1909: Clear monitorization data if it takes more than 3 seconds to plot
This commit is contained in:
parent
715d65b63f
commit
3919260ad9
@ -869,6 +869,8 @@ function updateHostsView (request,host_list){
|
||||
}
|
||||
];
|
||||
|
||||
var t0 = new Date().getTime();
|
||||
|
||||
// TODO: plot only when the dashboard is visible
|
||||
for(var i=0; i<host_dashboard_graphs.length; i++) {
|
||||
plot_totals(
|
||||
@ -876,6 +878,13 @@ function updateHostsView (request,host_list){
|
||||
host_dashboard_graphs[i]
|
||||
);
|
||||
}
|
||||
|
||||
var t1 = new Date().getTime();
|
||||
|
||||
// If plot takes more than 3 seconds, clear the monitoring data
|
||||
if (t1 - t0 > 3000) {
|
||||
host_monitoring_data = {};
|
||||
}
|
||||
}
|
||||
|
||||
//SunstoneMonitoring.monitor('HOST', host_list)
|
||||
|
@ -1222,6 +1222,8 @@ function updateVMachinesView(request, vmachine_list){
|
||||
}
|
||||
];
|
||||
|
||||
var t0 = new Date().getTime();
|
||||
|
||||
var vm_monitoring_data_copy = jQuery.extend(true, {}, vm_monitoring_data);
|
||||
|
||||
// TODO: plot only when the dashboard is visible
|
||||
@ -1231,6 +1233,13 @@ function updateVMachinesView(request, vmachine_list){
|
||||
vm_dashboard_graphs[i]
|
||||
);
|
||||
}
|
||||
|
||||
var t1 = new Date().getTime();
|
||||
|
||||
// If plot takes more than 3 seconds, clear the monitoring data
|
||||
if (t1 - t0 > 3000) {
|
||||
vm_monitoring_data = {};
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user