";
// Set some containers to legend, graph, timestamp tooltip, etc.
$return .= "
";
+
+
+ // Get other required module datas to draw warning and critical
+ if ($agent_module_id == 0) {
+ $yellow_up = 0;
+ $red_up = 0;
+ $yellow_inverse = false;
+ $red_inverse = false;
+ } else {
+ $module_data = db_get_row_sql ('SELECT * FROM tagente_modulo WHERE id_agente_modulo = ' . $agent_module_id);
+ $yellow_up = $module_data['max_warning'];
+ $red_up = $module_data['max_critical'];
+ $yellow_inverse = !($module_data['warning_inverse'] == 0);
+ $red_inverse = !($module_data['critical_inverse'] == 0);
+ }
+
if ($menu) {
$threshold = false;
- if ($yellow_threshold != 0 || $red_threshold != 0) {
+ if ($yellow_threshold != $yellow_up || $red_threshold != $red_up) {
$threshold = true;
}
@@ -426,6 +442,10 @@ function flot_area_graph($chart_data, $width, $height, $color, $legend,
"$force_integer, \n" .
"'$separator', \n" .
"'$separator2', \n" .
+ "'$yellow_up', \n" .
+ "'$red_up', \n" .
+ "'$yellow_inverse', \n" .
+ "'$red_inverse', \n" .
"'$series_suffix_str',
'$vconsole');";
$return .= "\n//]]>";
diff --git a/pandora_console/include/graphs/pChart/pDraw.class.php b/pandora_console/include/graphs/pChart/pDraw.class.php
index 814f4ec824..300d2f49ba 100755
--- a/pandora_console/include/graphs/pChart/pDraw.class.php
+++ b/pandora_console/include/graphs/pChart/pDraw.class.php
@@ -2556,6 +2556,7 @@
if (floor($Value2) == 0) { return(0); }
if (is_infinite($Value2)) { return(0); }
if ($Value2 == 0.0) { return(0); }
+ if ($Value1 > $Value2) { return(0); }
if ($this->mod_check($Value1, $Value2)) { return(0); }
if (floor($Value2) != 0) { return($Value1 % $Value2); }
diff --git a/pandora_console/install.php b/pandora_console/install.php
index e448a26dba..87d1775152 100644
--- a/pandora_console/install.php
+++ b/pandora_console/install.php
@@ -63,7 +63,7 @@
/dev/null 2>&1
fi
-
+
echo "Stopping Tentacle Server"
rc_status -v
fi