2010-08-13 Sergio Martin <sergio.martin@artica.es>
* include/functions_visual_map.php: Added the alerts fired status to the visual maps drawing an orange edge around the static graph icon git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3142 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
2ce9c42526
commit
76a6cf8479
|
@ -1,3 +1,8 @@
|
|||
2010-08-13 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_visual_map.php: Added the alerts fired status
|
||||
to the visual maps drawing an orange edge around the static graph icon
|
||||
|
||||
2010-08-13 Miguel de Dios <miguel.dedios@artica.es>
|
||||
* include/functions_reporting.php: fixed the loop of alerts when Pandora
|
||||
haven't alerts.
|
||||
|
|
|
@ -61,6 +61,7 @@ function printItemInVisualConsole($layoutData) {
|
|||
$period = $layoutData['period'];
|
||||
|
||||
$sizeStyle = '';
|
||||
$borderStyle = '';
|
||||
$imageSize = '';
|
||||
|
||||
$text = '<span id="text_' . $id . '" class="text">' . $label . '</span>';
|
||||
|
@ -69,6 +70,10 @@ function printItemInVisualConsole($layoutData) {
|
|||
case STATIC_GRAPH:
|
||||
if ($layoutData['image'] != null) {
|
||||
$img = getImageStatusElement($layoutData);
|
||||
if(substr($img,0,1) == '4') {
|
||||
$borderStyle ='border: 2px solid #ffa300;';
|
||||
$img = substr_replace($img, '', 0,1);
|
||||
}
|
||||
$imgSizes = getimagesize($img);
|
||||
}
|
||||
if (($width != 0) && ($height != 0)) {
|
||||
|
@ -77,7 +82,7 @@ function printItemInVisualConsole($layoutData) {
|
|||
}
|
||||
echo '<div id="' . $id . '" class="item static_graph" style="text-align: center; color: ' . $color . '; position: absolute; ' . $sizeStyle . ' margin-top: ' . $top . 'px; margin-left: ' . $left . 'px;">';
|
||||
if ($layoutData['image'] != null) {
|
||||
echo '<img class="image" id="image_' . $id . '" src="' . $img . '" ' . $imageSize . ' /><br />';
|
||||
echo '<img class="image" id="image_' . $id . '" src="' . $img . '" ' . $imageSize . ' style="'.$borderStyle.'" /><br />';
|
||||
}
|
||||
echo $text;
|
||||
echo "</div>";
|
||||
|
@ -296,10 +301,13 @@ function getImageStatusElement($layoutData) {
|
|||
else {
|
||||
switch (getStatusElement($layoutData)) {
|
||||
case 1:
|
||||
case 4:
|
||||
//Critical (BAD or ALERT)
|
||||
//Critical (BAD)
|
||||
$img .= "_bad.png";
|
||||
break;
|
||||
case 4:
|
||||
//Critical (ALERT)
|
||||
$img = "4".$img."_bad.png";
|
||||
break;
|
||||
case 0:
|
||||
//Normal (OK)
|
||||
$img .= "_ok.png";
|
||||
|
@ -308,6 +316,8 @@ function getImageStatusElement($layoutData) {
|
|||
//Warning
|
||||
$img .= "_warning.png";
|
||||
break;
|
||||
case 3:
|
||||
//Unknown
|
||||
default:
|
||||
$img .= ".png";
|
||||
// Default is Grey (Other)
|
||||
|
@ -520,10 +530,13 @@ function print_pandora_visual_map ($id_layout, $show_links = true, $draw_lines =
|
|||
$img = "images/console/icons/".$layout_data["image"];
|
||||
switch ($status) {
|
||||
case 1:
|
||||
case 4:
|
||||
//Critical (BAD or ALERT)
|
||||
//Critical (BAD)
|
||||
$img .= "_bad.png";
|
||||
break;
|
||||
case 4:
|
||||
//Critical (ALERT)
|
||||
$img = "4".$img."_bad.png";
|
||||
break;
|
||||
case 0:
|
||||
//Normal (OK)
|
||||
$img .= "_ok.png";
|
||||
|
@ -532,10 +545,16 @@ function print_pandora_visual_map ($id_layout, $show_links = true, $draw_lines =
|
|||
//Warning
|
||||
$img .= "_warning.png";
|
||||
break;
|
||||
case 3:
|
||||
//Unknown
|
||||
default:
|
||||
// Default is Grey (Other)
|
||||
$img .= ".png";
|
||||
break;
|
||||
// Default is Grey (Other)
|
||||
}
|
||||
$borderStyle = '';
|
||||
if(substr($img,0,1) == '4') {
|
||||
$img_style['border'] ='2px solid #ffa300;';
|
||||
$img = substr_replace($img, '', 0,1);
|
||||
}
|
||||
|
||||
if (is_file($img))
|
||||
|
|
Loading…
Reference in New Issue