2013-11-06 Sergio Martin <sergio.martin@artica.es>

* include/constants.php
	include/functions_graph.php: Added color collection in
	constants file and use it in custom graphs to avoid
	ugly black colors in graphs with more than three graphs
	Incident #346



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9012 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2013-11-06 10:32:41 +00:00
parent c7ce959c11
commit 43570354c8
3 changed files with 25 additions and 1 deletions

View File

@ -1,3 +1,11 @@
2013-11-06 Sergio Martin <sergio.martin@artica.es>
* include/constants.php
include/functions_graph.php: Added color collection in
constants file and use it in custom graphs to avoid
ugly black colors in graphs with more than three graphs
Incident #346
2013-11-05 Sergio Martin <sergio.martin@artica.es>
* include/api.php: Create a special call on Pandora FMS

View File

@ -131,6 +131,14 @@ define('COL_MAJOR','#C97A4A');
define('COL_INFORMATIONAL','#E4E4E4');
define('COL_MAINTENANCE','#3BA0FF');
define('COL_GRAPH1', '#C397F2');
define('COL_GRAPH2', '#FFE66C');
define('COL_GRAPH3', '#92CCA3');
define('COL_GRAPH4', '#EA6D5B');
define('COL_GRAPH5', '#6BD8DD');
define('COL_GRAPH6', '#F49B31');
define('COL_GRAPH7', '#999999');
define('COL_GRAPH8', '#F2B8C1');
/* The styles */
@ -342,4 +350,4 @@ define("EVENTS_GOING_DOWN_NORMAL", 'going_down_normal');
define("EVENTS_GOING_DOWN_CRITICAL", 'going_down_critical');
define("EVENTS_GOING_UP_NORMAL", 'going_up_normal');
define("EVENTS_CONFIGURATION_CHANGE", 'configuration_change');
?>
?>

View File

@ -1230,6 +1230,14 @@ function graphic_combined_module ($module_list, $weight_list, $period, $width, $
$color[0] = array('border' => '#000000', 'color' => $config['graph_color1'], 'alpha' => 50);
$color[1] = array('border' => '#000000', 'color' => $config['graph_color2'], 'alpha' => 50);
$color[2] = array('border' => '#000000', 'color' => $config['graph_color3'], 'alpha' => 50);
$color[3] = array('border' => '#000000', 'color' => COL_GRAPH1, 'alpha' => 50);
$color[4] = array('border' => '#000000', 'color' => COL_GRAPH2, 'alpha' => 50);
$color[5] = array('border' => '#000000', 'color' => COL_GRAPH3, 'alpha' => 50);
$color[6] = array('border' => '#000000', 'color' => COL_GRAPH4, 'alpha' => 50);
$color[7] = array('border' => '#000000', 'color' => COL_GRAPH5, 'alpha' => 50);
$color[8] = array('border' => '#000000', 'color' => COL_GRAPH6, 'alpha' => 50);
$color[9] = array('border' => '#000000', 'color' => COL_GRAPH7, 'alpha' => 50);
$color[10] = array('border' => '#000000', 'color' => COL_GRAPH8, 'alpha' => 50);
switch ($stacked) {
case GRAPH_AREA: