mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-08 20:58:17 +03:00
feature #2461: Do not ask for monitoring info and logs until the tab is clicked
This commit is contained in:
parent
997337c900
commit
4f3fd8db57
@ -1454,9 +1454,20 @@ function updateVMInfo(request,vm){
|
||||
|
||||
//Pop up the info panel and asynchronously get vm_log and stats
|
||||
Sunstone.popUpInfoPanel("vm_info_panel", "vms-tab");
|
||||
Sunstone.runAction("VM.log",vm_info.ID);
|
||||
Sunstone.runAction("VM.monitor",vm_info.ID,
|
||||
{ monitor_resources : "CPU,MEMORY,NET_TX,NET_RX"});
|
||||
|
||||
$("[href='#vm_capacity_tab']").on("click", function(){
|
||||
Sunstone.runAction("VM.monitor",vm_info.ID,
|
||||
{ monitor_resources : "CPU,MEMORY"});
|
||||
})
|
||||
|
||||
$("[href='#vm_network_tab']").on("click", function(){
|
||||
Sunstone.runAction("VM.monitor",vm_info.ID,
|
||||
{ monitor_resources : "NET_TX,NET_RX"});
|
||||
})
|
||||
|
||||
$("[href='#vm_log_tab']").on("click", function(){
|
||||
Sunstone.runAction("VM.log",vm_info.ID);
|
||||
})
|
||||
|
||||
var $info_panel = $('div#vm_info_panel');
|
||||
var $hotplugging_tab = $('div#vm_hotplugging_tab', $info_panel);
|
||||
@ -2320,25 +2331,17 @@ function printCapacity(vm_info){
|
||||
</div>\
|
||||
<div class="row">\
|
||||
<div class="large-12 columns">\
|
||||
<div class="large-10 columns centered graph vm_cpu_graph" style="height: 100px;">\
|
||||
<div class="large-12 columns centered graph vm_cpu_graph" style="height: 100px;">\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
<div class="row graph_legend">\
|
||||
<div class="large-10 columns centered" id="vm_cpu_legend">\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
<div class="large-6 columns">\
|
||||
<div class="row text-center">\
|
||||
<h3 class="subheader"><small>'+tr("REAL MEMORY")+'</small></h3>\
|
||||
</div>\
|
||||
<div class="row">\
|
||||
<div class="large-10 columns centered graph vm_memory_graph" style="height: 100px;">\
|
||||
</div>\
|
||||
</div>\
|
||||
<div class="row graph_legend">\
|
||||
<div class="large-10 columns centered" id="vm_memory_legend">\
|
||||
<div class="large-12 columns centered graph vm_memory_graph" style="height: 100px;">\
|
||||
</div>\
|
||||
</div>\
|
||||
</div>\
|
||||
|
@ -1860,7 +1860,7 @@ function plot_graph(response, info) {
|
||||
|
||||
var data = response.monitoring[attribute];
|
||||
|
||||
if(info.derivative == true) {
|
||||
if(info.derivative == true && data) {
|
||||
derivative(data);
|
||||
}
|
||||
|
||||
@ -1889,11 +1889,13 @@ function plot_graph(response, info) {
|
||||
color: "#efefef",
|
||||
size: 8
|
||||
},
|
||||
yaxis : { tickFormatter: function(val, axis) {
|
||||
yaxis : {
|
||||
tickFormatter: function(val, axis) {
|
||||
return humanize(val, info.convert_from_bytes, info.y_sufix);
|
||||
},
|
||||
min: 0,
|
||||
color: "#efefef",
|
||||
|
||||
size: 8
|
||||
},
|
||||
series: {
|
||||
@ -1934,7 +1936,9 @@ function plot_totals(response, info) {
|
||||
|
||||
var data = response[id][attribute];
|
||||
|
||||
derivative(data);
|
||||
if (data) {
|
||||
derivative(data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user