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

Feature #726: Plot series go in the same order as they were requested, making colors consistent among them.

This commit is contained in:
Hector Sanjuan 2011-07-22 16:54:48 +02:00 committed by Ruben S. Montero
parent 823891e560
commit cc6c65c3d8
3 changed files with 13 additions and 9 deletions

View File

@ -151,13 +151,14 @@ function plot_global_graph(data,info){
var series = [];
var width = ($(window).width()-129)*48/100;
var mon_count = 0;
var labels_array = info.monitor_resources.split(',');
$('#'+id).html('<div id="'+id+'_graph" style="height:70px;width:'+width+'px;margin-bottom:10px;"><div>');
for (var label in monitoring) {
for (var i=0; i<labels_array.length; i++) {
serie = {
label: label,
data: monitoring[label]
label: labels_array[i],
data: monitoring[labels_array[i]]
};
series.push(serie);
mon_count++;

View File

@ -136,14 +136,16 @@ function plot_global_graph(data,info){
var series = [];
var width = ($(window).width()-129)*48/100;
var mon_count = 0;
var labels_array = info.monitor_resources.split(',');
$('#'+id).html('<div id="'+id+'_graph" style="height:70px;width:'+width+'px;margin-bottom:10px;"><div>');
for (var label in monitoring) {
for (var i=0; i<labels_array.length; i++) {
serie = {
label: label,
data: monitoring[label]
label: labels_array[i],
data: monitoring[labels_array[i]]
};
series.push(serie);
mon_count++;
};

View File

@ -533,15 +533,16 @@ function plot_graph(data,context,id_prefix,info){
var humanize = info.humanize_figures ?
humanize_size : function(val){ return val };
var id_suffix = labels.replace(/,/g,'_');
var labels_array = labels.split(',');
var monitoring = data.monitoring
var series = [];
var serie;
var mon_count = 0;
for (var label in monitoring) {
for (var i=0; i<labels_array.length; i++) {
serie = {
label: label,
data: monitoring[label]
label: labels_array[i],
data: monitoring[labels_array[i]]
};
series.push(serie);
mon_count++;