From 49bfc34617be66a36cf227aa2cc5d5f5a2a25ed7 Mon Sep 17 00:00:00 2001 From: Reven Sanchez Date: Mon, 27 Feb 2017 18:44:06 -0800 Subject: [PATCH] Fix inconsistent category order of varnish4_ plugin Varnish4_ plugin displays categories in an arbitrary order, changing the colors of the graphs with each run. This fix introduces a 'sort' statement in the category iteration function to force the same order consistently. --- plugins/varnish/varnish4_ | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/varnish/varnish4_ b/plugins/varnish/varnish4_ index f4d01e2a..ec96075c 100644 --- a/plugins/varnish/varnish4_ +++ b/plugins/varnish/varnish4_ @@ -1081,7 +1081,7 @@ sub get_config print_if_exist(\%ASPECTS,$graph,$field,"graph_$field"); } - foreach my $value (keys %values) { + foreach my $value (sort keys %values) { # Just print the description/type if it's a dynamic # counter. It'll be silent if it isn't. if(print_dynamic($value,'.label',('description','type','ident'))) {