summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/triggers.inc.php
diff options
context:
space:
mode:
authorartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-02-22 15:28:41 +0000
committerartem <artem@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-02-22 15:28:41 +0000
commit9848b90bd9eddf0324ffdc0d8f089c6c24683fe8 (patch)
tree755bae71a9ecbc5d3f3c9085c0583a345c0c00d8 /frontends/php/include/triggers.inc.php
parent2a35ecbf642a185e3b53f66f783272e03fe99e93 (diff)
downloadzabbix-9848b90bd9eddf0324ffdc0d8f089c6c24683fe8.tar.gz
zabbix-9848b90bd9eddf0324ffdc0d8f089c6c24683fe8.tar.xz
zabbix-9848b90bd9eddf0324ffdc0d8f089c6c24683fe8.zip
- [DEV-118] added dashboard screen to monitoring (Artem)
- [ZBX-206] merged rev.5367:5370 of 1.4/ (Artem) [fixed case sensitive hosts sorting] - [DEV-119] changes how users online are counted (Artem) - implemented patch [added y axis calculation type: "Calculated [Min=0]"] (Artem) - changes in schema.sql (Artem) - fixed JS lib, url class (Artem) - some other small fixes (Artem) git-svn-id: svn://svn.zabbix.com/trunk@5387 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/triggers.inc.php')
-rw-r--r--frontends/php/include/triggers.inc.php36
1 files changed, 24 insertions, 12 deletions
diff --git a/frontends/php/include/triggers.inc.php b/frontends/php/include/triggers.inc.php
index 1be995d4..9bec6e0e 100644
--- a/frontends/php/include/triggers.inc.php
+++ b/frontends/php/include/triggers.inc.php
@@ -181,20 +181,31 @@
* convert severity constant in to the CSS style name
*
* Author:
- * Eugene Grigorjev (eugene.grigorjev@zabbix.com)
+ * Aly
*
* Comments:
*
*/
- function get_severity_style($severity)
- {
- if($severity == TRIGGER_SEVERITY_INFORMATION) return 'information';
- elseif($severity == TRIGGER_SEVERITY_WARNING) return 'warning';
- elseif($severity == TRIGGER_SEVERITY_AVERAGE) return 'average';
- elseif($severity == TRIGGER_SEVERITY_HIGH) return 'high';
- elseif($severity == TRIGGER_SEVERITY_DISASTER) return 'disaster';
-
- return '';
+ function get_severity_style($severity,$type=true){
+ switch($severity){
+ case TRIGGER_SEVERITY_DISASTER:
+ $style='disaster';
+ break;
+ case TRIGGER_SEVERITY_HIGH:
+ $style='high';
+ break;
+ case TRIGGER_SEVERITY_AVERAGE:
+ $style='average';
+ break;
+ case TRIGGER_SEVERITY_WARNING:
+ $style='warning';
+ break;
+ case TRIGGER_SEVERITY_INFORMATION:
+ default:
+ $style='information';
+ }
+ if(!$type) $style='normal';//$style.='_empty';
+ return $style;
}
/*
@@ -1780,7 +1791,7 @@
$row['host'] = get_node_name_by_elid($row['hostid']).$row['host'];
$row['description'] = expand_trigger_description_constants($row['description'], $row);
- $hosts[$row['host']] = $row['host'];
+ $hosts[strtolower($row['host'])] = $row['host'];
$triggers[$row['description']][$row['host']] = array(
'hostid' => $row['hostid'],
'triggerid' => $row['triggerid'],
@@ -1792,7 +1803,8 @@
{
return $table;
}
- sort($hosts);
+ ksort($hosts);
+
if($view_style == STYLE_TOP){
$header=array(new CCol(S_TRIGGERS,'center'));
foreach($hosts as $hostname)