mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
2010-08-09 Sergio Martin <sergio.martin@artica.es>
* extensions/module_groups.php: Fixed the status colors of the modules by groups matrix git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3110 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
c87a24bc21
commit
b4e7b4d556
@ -1,3 +1,8 @@
|
|||||||
|
2010-08-09 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
|
* extensions/module_groups.php: Fixed the status colors of
|
||||||
|
the modules by groups matrix
|
||||||
|
|
||||||
2010-08-09 Sergio Martin <sergio.martin@artica.es>
|
2010-08-09 Sergio Martin <sergio.martin@artica.es>
|
||||||
|
|
||||||
* extensions/agents_modules.php
|
* extensions/agents_modules.php
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
function mainModuleGroups() {
|
function mainModuleGroups() {
|
||||||
global $config; //the useful global var of Pandora Console, it has many data can you use
|
global $config; //the useful global var of Pandora Console, it has many data can you use
|
||||||
|
|
||||||
|
require_once ('include/functions_reporting.php');
|
||||||
|
|
||||||
//The big query
|
//The big query
|
||||||
$sql = "select COUNT(id_agente) AS count, estado
|
$sql = "select COUNT(id_agente) AS count, estado
|
||||||
FROM tagente_estado
|
FROM tagente_estado
|
||||||
@ -85,21 +87,29 @@ function mainModuleGroups() {
|
|||||||
$color = 'transparent'; //Defaut color for cell
|
$color = 'transparent'; //Defaut color for cell
|
||||||
$font_color = '#000000'; //Default font color for cell
|
$font_color = '#000000'; //Default font color for cell
|
||||||
if ($count == 0) {
|
if ($count == 0) {
|
||||||
$color = '#babdb6'; //Grey when the cell for this model group and agent group hasn't modules.
|
$color = '#eeeeee'; //Soft grey when the cell for this model group and agent group hasn't modules.
|
||||||
$alinkStart = '';
|
$alinkStart = '';
|
||||||
$alinkEnd = '';
|
$alinkEnd = '';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (array_key_exists(0,$states) && (count($states) == 1))
|
// TODO: ADD Alerts fired status
|
||||||
$color = '#8ae234'; //Green when the cell for this model group and agent has OK state all modules.
|
/*if (array_key_exists(4,$states)) {
|
||||||
else {
|
$color = '#ffa300'; //Orange when the cell for this model group and agent has at least one alert fired.
|
||||||
if (array_key_exists(1,$states)) {
|
}*/
|
||||||
|
if (array_key_exists(1,$states)) {
|
||||||
$color = '#cc0000'; //Red when the cell for this model group and agent has at least one module in critical state and the rest in any state.
|
$color = '#cc0000'; //Red when the cell for this model group and agent has at least one module in critical state and the rest in any state.
|
||||||
$font_color = '#ffffff';
|
$font_color = '#ffffff';
|
||||||
}
|
}
|
||||||
else
|
elseif (array_key_exists(2,$states)) {
|
||||||
$color = '#fce94f'; //Yellow when the cell for this model group and agent has at least one in warning state and the rest in green state.
|
$color = '#fce94f'; //Yellow when the cell for this model group and agent has at least one in warning state and the rest in green state.
|
||||||
}
|
}
|
||||||
|
elseif (array_key_exists(3,$states)) {
|
||||||
|
$color = '#babdb6'; //Grey when the cell for this model group and agent has at least one module in unknown state and the rest in any state.
|
||||||
|
}
|
||||||
|
elseif (array_key_exists(0,$states)) {
|
||||||
|
$color = '#8ae234'; //Green when the cell for this model group and agent has OK state all modules.
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$alinkStart = '<a href="index.php?sec=estado&sec2=operation/agentes/status_monitor&status=-1&ag_group=' . $idAgentGroup .
|
$alinkStart = '<a href="index.php?sec=estado&sec2=operation/agentes/status_monitor&status=-1&ag_group=' . $idAgentGroup .
|
||||||
'&modulegroup=' . $idModelGroup . '".
|
'&modulegroup=' . $idModelGroup . '".
|
||||||
@ -129,16 +139,16 @@ function mainModuleGroups() {
|
|||||||
'</li>' .
|
'</li>' .
|
||||||
'<li style="clear: both;">
|
'<li style="clear: both;">
|
||||||
<div style="float: left; background: #fce94f; height: 20px; width: 80px;margin-right: 5px; margin-bottom: 5px;"> </div>' .
|
<div style="float: left; background: #fce94f; height: 20px; width: 80px;margin-right: 5px; margin-bottom: 5px;"> </div>' .
|
||||||
__("Yellow cell when the module group and agent have at least one in warning state and the others in green state.") .
|
__("Yellow cell when the module group and agent have at least one in warning state and the others in grey or green state.") .
|
||||||
|
'</li>' .
|
||||||
|
'<li style="clear: both;">
|
||||||
|
<div style="float: left; background: #babdb6; height: 20px; width: 80px;margin-right: 5px; margin-bottom: 5px;"> </div>' .
|
||||||
|
__("Grey cell when the module group and agent have at least one in unknown state and the others in green state.") .
|
||||||
'</li>' .
|
'</li>' .
|
||||||
'<li style="clear: both;">
|
'<li style="clear: both;">
|
||||||
<div style="float: left; background: #8ae234; height: 20px; width: 80px;margin-right: 5px; margin-bottom: 5px;"> </div>' .
|
<div style="float: left; background: #8ae234; height: 20px; width: 80px;margin-right: 5px; margin-bottom: 5px;"> </div>' .
|
||||||
__("Green cell when the module group and agent have all modules in OK state.") .
|
__("Green cell when the module group and agent have all modules in OK state.") .
|
||||||
'</li>' .
|
'</li>' .
|
||||||
'<li style="clear: both;">
|
|
||||||
<div style="float: left; background: #babdb6; height: 20px; width: 80px;margin-right: 5px; margin-bottom: 5px;"> </div>' .
|
|
||||||
__("Grey cell when the module group and agent don't have any modules.") .
|
|
||||||
'</li>' .
|
|
||||||
"</ul>" .
|
"</ul>" .
|
||||||
"</p>";
|
"</p>";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user