summaryrefslogtreecommitdiffstats
path: root/frontends/php
diff options
context:
space:
mode:
authorhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2004-09-28 17:58:11 +0000
committerhugetoad <hugetoad@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2004-09-28 17:58:11 +0000
commit9c17c8be0eef94e9b0f62a9848d1dcd8a88d2130 (patch)
tree5788842d18d15c7226be38bb6b985dfe209c4ccd /frontends/php
parent9e2510e64cdac6a2513278b703b54af1ee785614 (diff)
downloadzabbix-9c17c8be0eef94e9b0f62a9848d1dcd8a88d2130.tar.gz
zabbix-9c17c8be0eef94e9b0f62a9848d1dcd8a88d2130.tar.xz
zabbix-9c17c8be0eef94e9b0f62a9848d1dcd8a88d2130.zip
Frontend improvements.
git-svn-id: svn://svn.zabbix.com/trunk@1439 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php')
-rw-r--r--frontends/php/config.php28
-rw-r--r--frontends/php/hosts.php108
-rw-r--r--frontends/php/include/html.inc.php7
-rw-r--r--frontends/php/report1.php94
-rw-r--r--frontends/php/report2.php53
-rw-r--r--frontends/php/srv_status.php29
-rw-r--r--frontends/php/tr_status.php4
7 files changed, 115 insertions, 208 deletions
diff --git a/frontends/php/config.php b/frontends/php/config.php
index a6c9cbf9..6029e281 100644
--- a/frontends/php/config.php
+++ b/frontends/php/config.php
@@ -119,35 +119,31 @@
?>
<?php
- echo "<TABLE BORDER=0 COLS=4 align=center WIDTH=100% BGCOLOR=\"#AAAAAA\" cellspacing=1 cellpadding=3>";
- echo "<TR BGCOLOR=\"#CCCCCC\"><TD WIDTH=3%><B>".S_ID."</B></TD>";
- echo "<TD WIDTH=10%><B>".S_TYPE."</B></TD>";
- echo "<TD><B>".S_DESCRIPTION_SMALL."</B></TD>";
- echo "<TD WIDTH=10%><B>".S_ACTIONS."</B></TD>";
- echo "</TR>";
+ table_begin();
+ table_header(array(S_ID,S_TYPE,S_DESCRIPTION_SMALL,S_ACTIONS));
$result=DBselect("select mt.mediatypeid,mt.type,mt.description,mt.smtp_server,mt.smtp_helo,mt.smtp_email,mt.exec_path from media_type mt order by mt.type");
$col=0;
while($row=DBfetch($result))
{
- if($col++%2==0) { echo "<TR BGCOLOR=#EEEEEE>"; }
- else { echo "<TR BGCOLOR=#DDDDDD>"; }
- echo "<td>".$row["mediatypeid"]."</td>";
if($row["type"]==0)
{
- echo "<td>".S_EMAIL."</td>";
+ $type=S_EMAIL;
}
else if($row["type"]==1)
{
- echo "<td>".S_SCRIPT."</td>";
+ $type=S_SCRIPT;
}
else
{
- echo "<td>".S_UNKNOWN."</td>";
+ $type=S_UNKNOWN;
}
- echo "<td>".$row["description"]."</td>";
- echo "<td><a href=\"config.php?register=change&mediatypeid=".$row["mediatypeid"]."\">".S_CHANGE."</a></td>";
- echo "</tr>";
+ $actions="<a href=\"config.php?register=change&mediatypeid=".$row["mediatypeid"]."\">".S_CHANGE."</a>";
+ table_row(array(
+ $row["mediatypeid"],
+ $type,
+ $row["description"],
+ $actions),$col++);
}
if(DBnum_rows($result)==0)
{
@@ -155,7 +151,7 @@
echo "<TD COLSPAN=4 ALIGN=CENTER>".S_NO_MEDIA_TYPES_DEFINED."</TD>";
echo "<TR>";
}
- echo "</TABLE>";
+ table_end();
echo"<br>";
?>
diff --git a/frontends/php/hosts.php b/frontends/php/hosts.php
index 673c84f4..7bc2ca02 100644
--- a/frontends/php/hosts.php
+++ b/frontends/php/hosts.php
@@ -108,40 +108,33 @@
<?php
- echo "<TABLE BORDER=0 COLS=4 align=center WIDTH=100% BGCOLOR=\"#AAAAAA\" cellspacing=1 cellpadding=3>";
- echo "<TR BGCOLOR=\"#CCCCCC\"><TD WIDTH=3%><B>".S_ID."</B></TD>";
- echo "<TD WIDTH=10%><B>".S_NAME."</B></TD>";
- echo "<TD><B>".S_MEMBERS."</B></TD>";
- echo "<TD WIDTH=10%><B>".S_ACTIONS."</B></TD>";
- echo "</TR>";
+ table_begin();
+ table_header(array(S_ID,S_NAME,S_MEMBERS,S_ACTIONS));
$result=DBselect("select groupid,name from groups order by name");
$col=0;
while($row=DBfetch($result))
{
-// if(!check_right("User group","R",$row["usrgrpid"]))
-// {
-// continue;
-// }
- if($col++%2==0) { echo "<TR BGCOLOR=#EEEEEE>"; }
- else { echo "<TR BGCOLOR=#DDDDDD>"; }
- echo "<TD>".$row["groupid"]."</TD>";
- echo "<TD>".$row["name"]."</TD>";
- echo "<TD>";
+ $members=array("hide"=>1,"value"=>"");
$result1=DBselect("select distinct h.host from hosts h, hosts_groups hg where h.hostid=hg.hostid and hg.groupid=".$row["groupid"]." order by host");
for($i=0;$i<DBnum_rows($result1);$i++)
{
- echo DBget_field($result1,$i,0);
+ $members["hide"]=0;
+ $members["value"]=$members["value"].DBget_field($result1,$i,0);
if($i<DBnum_rows($result1)-1)
{
- echo ",&nbsp;";
+ $members["value"]=$members["value"].",&nbsp;";
}
}
- echo "&nbsp;</TD>";
- echo "<TD>";
- echo "<A HREF=\"hosts.php?groupid=".$row["groupid"]."#form\">".S_CHANGE."</A>";
- echo "</TD>";
- echo "</TR>";
+ $members["value"]=$members["value"]."&nbsp;";
+ $actions="<A HREF=\"hosts.php?groupid=".$row["groupid"]."#form\">".S_CHANGE."</A>";
+
+ table_row(array(
+ $row["groupid"],
+ $row["name"],
+ $members,
+ $actions
+ ),$col++);
}
if(DBnum_rows($result)==0)
{
@@ -149,7 +142,7 @@
echo "<TD COLSPAN=4 ALIGN=CENTER>".S_NO_HOST_GROUPS_DEFINED."</TD>";
echo "<TR>";
}
- echo "</TABLE>";
+ table_end();
echo "<br>";
?>
@@ -195,16 +188,8 @@
<?php
if(!isset($_GET["hostid"]))
{
- echo "<TABLE BORDER=0 COLS=4 align=center WIDTH=100% BGCOLOR=\"#AAAAAA\" cellspacing=1 cellpadding=3>";
- echo "<TR BGCOLOR=\"#CCCCCC\">";
- echo "<TD WIDTH=3% NOSAVE><B>".S_ID."</B></TD>";
- echo "<TD><B>".S_HOST."</B></TD>";
- echo "<TD WIDTH=10% NOSAVE><B>".S_IP."</B></TD>";
- echo "<TD WIDTH=10% NOSAVE><B>".S_PORT."</B></TD>";
- echo "<TD WIDTH=10% NOSAVE><B>".S_STATUS."</B></TD>";
- echo "<TD WIDTH=10% NOSAVE><B>".S_ACTIONS."</B></TD>";
- echo "</TR>";
-
+ table_begin();
+ table_header(array(S_ID,S_HOST,S_IP,S_PORT,S_STATUS,S_ACTIONS));
if(isset($_GET["groupid"]))
{
@@ -223,75 +208,76 @@
{
continue;
}
- if($col++%2==0) { echo "<TR BGCOLOR=#EEEEEE>"; }
- else { echo "<TR BGCOLOR=#DDDDDD>"; }
-
- echo "<TD>".$row["hostid"]."</TD>";
- echo "<TD><a href=\"items.php?hostid=".$row["hostid"]."\">".$row["host"]."</a></TD>";
+ $host="<a href=\"items.php?hostid=".$row["hostid"]."\">".$row["host"]."</a>";
+
if($row["useip"]==1)
{
- echo "<TD>".$row["ip"]."</TD>";
+ $ip=$row["ip"];
}
else
{
- echo "<TD>-</TD>";
+ $ip="-";
}
- echo "<TD>".$row["port"]."</TD>";
- echo "<TD>";
if(check_right("Host","U",$row["hostid"]))
{
if($row["status"] == 0)
- echo "<a href=\"hosts.php?hostid=".$row["hostid"]."&register=changestatus&status=1\"><font color=\"00AA00\">".S_MONITORED."</font></a>";
+ $status=array("value"=>"<a href=\"hosts.php?hostid=".$row["hostid"]."&register=changestatus&status=1\">".S_MONITORED."</a>","class"=>"off");
else if($row["status"] == 1)
- echo "<a href=\"hosts.php?hostid=".$row["hostid"]."&register=changestatus&status=0\"><font color=\"AA0000\">".S_NOT_MONITORED."</font></a>";
+ $status=array("value"=>"<a href=\"hosts.php?hostid=".$row["hostid"]."&register=changestatus&status=0\">".S_NOT_MONITORED."</a>","class"=>"on");
else if($row["status"] == 2)
- echo "<font color=\"AAAAAA\">".S_UNREACHABLE."</font>";
+ $status=array("value"=>S_UNREACHABLE,"class"=>"unknown");
else if($row["status"] == 3)
- echo "<font color=\"AAAAAA\">".S_TEMPLATE."</font>";
+ $status=array("value"=>S_TEMPLATE,"class"=>"unknown");
else if($row["status"] == HOST_STATUS_DELETED)
- echo "<font color=\"AAAAAA\">".S_DELETED."</font>";
+ $status=array("value"=>S_DELETED,"class"=>"unknown");
else
- echo S_UNKNOWN;
+ $status=S_UNKNOWN;
}
else
{
if($row["status"] == 0)
- echo "<font color=\"00AA00\">".S_MONITORED."</font>";
+ $status=array("value"=>S_MONITORED,"class"=>"off");
else if($row["status"] == 1)
- echo "<font color=\"AA0000\">".S_NOT_MONITORED."</font>";
+ $status=array("value"=>S_NOT_MONITORED,"class"=>"on");
else if($row["status"] == 2)
- echo "<font color=\"AAAAAA\">".S_UNREACHABLE."</font>";
+ $status=array("value"=>S_UNREACHABLE,"class"=>"unknown");
else if($row["status"] == 3)
- echo "<font color=\"AAAAAA\">".S_TEMPLATE."</font>";
+ $status=array("value"=>S_TEMPLATE,"class"=>"unknown");
else if($row["status"] == HOST_STATUS_DELETED)
- echo "<font color=\"AAAAAA\">".S_DELETED."</font>";
+ $status=array("value"=>S_DELETED,"class"=>"unknown");
else
- echo S_UNKNOWN;
+ $status=S_UNKNOWN;
}
- echo "</TD>";
if(check_right("Host","U",$row["hostid"]))
{
if($row["status"] != HOST_STATUS_DELETED)
{
if(isset($_GET["groupid"]))
{
- echo "<TD><A HREF=\"hosts.php?register=change&hostid=".$row["hostid"]."&groupid=".$_GET["groupid"]."#form\">".S_CHANGE."</A></TD>";
+ $actions="<A HREF=\"hosts.php?register=change&hostid=".$row["hostid"]."&groupid=".$_GET["groupid"]."#form\">".S_CHANGE."</A>";
}
else
{
- echo "<TD><A HREF=\"hosts.php?register=change&hostid=".$row["hostid"]."#form\">".S_CHANGE."</A></TD>";
+ $actions="<A HREF=\"hosts.php?register=change&hostid=".$row["hostid"]."#form\">".S_CHANGE."</A>";
}
}
else
{
- echo "<TD>&nbsp;</TD>";
+ $actions="&nbsp;";
}
}
else
{
- echo "<TD>".S_CHANGE."</TD>";
+ $actions=S_CHANGE;
}
- echo "</TR>";
+ table_row(array(
+ $row["hostid"],
+ $host,
+ $ip,
+ $row["port"],
+ $status,
+ $actions
+ ),$col++);
}
if(DBnum_rows($result)==0)
{
@@ -299,7 +285,7 @@
echo "<TD COLSPAN=6 ALIGN=CENTER>".S_NO_HOSTS_DEFINED."</TD>";
echo "<TR>";
}
- echo "</TABLE>";
+ table_end();
}
?>
diff --git a/frontends/php/include/html.inc.php b/frontends/php/include/html.inc.php
index d796f799..1eeeec16 100644
--- a/frontends/php/include/html.inc.php
+++ b/frontends/php/include/html.inc.php
@@ -76,10 +76,13 @@
while(list($num,$element)=each($elements))
{
- if(!$element) continue;
+ if(is_array($element)&&isset($element["hide"])&&($element["hide"]==1)) continue;
if(is_array($element))
{
- echo "<td class=\"".$element["class"]."\">".$element["value"]."</td>";
+ if(isset($element["class"]))
+ echo "<td class=\"".$element["class"]."\">".$element["value"]."</td>";
+ else
+ echo "<td>".$element["value"]."</td>";
}
else
{
diff --git a/frontends/php/report1.php b/frontends/php/report1.php
index 48e780da..9c116df8 100644
--- a/frontends/php/report1.php
+++ b/frontends/php/report1.php
@@ -28,79 +28,37 @@
<?php
show_table_header(S_STATUS_OF_ZABBIX_BIG);
- echo "<TABLE BORDER=0 WIDTH=100% BGCOLOR=\"#AAAAAA\" cellspacing=1 cellpadding=3>";
- echo "<TR BGCOLOR=\"#CCCCCC\"><TD WIDTH=10%><B>".S_PARAMETER."</B></TD>";
- echo "<TD WIDTH=10% NOSAVE><B>".S_VALUE."</B></TD>";
- echo "</TR>";
+ table_begin();
- $stats=get_stats();
-?>
-
- <tr bgcolor="#eeeeee">
- <td><?php echo S_ZABBIX_SUCKERD_IS_RUNNING; ?></td>
- <?php
- $str="<font color=\"AA0000\">".S_NO."</font>";
- if( (exec("ps -ef|grep zabbix_suckerd|grep -v grep|wc -l")>0) || (exec("ps -ax|grep zabbix_suckerd|grep -v grep|wc -l")>0) )
- {
- $str="<font color=\"00AA00\">".S_YES."</font>";
- }
- ?>
- <td><?php echo $str; ?></td>
- </tr>
-
- <tr bgcolor="#dddddd">
- <td><?php echo S_ZABBIX_TRAPPERD_IS_RUNNING; ?></td>
- <?php
- $str="<font color=\"AA0000\">".S_NO."</font>";
- if( (exec("ps -ef|grep zabbix_trapperd|grep -v grep|wc -l")>0) || (exec("ps -ax|grep zabbix_trapperd|grep -v grep|wc -l")>0) )
- {
- $str="<font color=\"00AA00\">".S_YES."</font>";
- }
- ?>
- <td><?php echo $str; ?></td>
- </tr>
-
- <tr bgcolor="#eeeeee">
- <td><?php echo S_NUMBER_OF_VALUES_STORED; ?></td>
- <td><?php echo $stats["history_count"]; ?></td>
- </tr>
-
- <tr bgcolor="#dddddd">
- <td><?php echo S_NUMBER_OF_TRENDS_STORED; ?></td>
- <td><?php echo $stats["trends_count"]; ?></td>
- </tr>
+ table_header(array(S_PARAMETER,S_VALUE));
- <tr bgcolor="#eeeeee">
- <td><?php echo S_NUMBER_OF_ALARMS; ?></td>
- <td><?php echo $stats["alarms_count"]; ?></td>
- </tr>
-
- <tr bgcolor="#dddddd">
- <td><?php echo S_NUMBER_OF_ALERTS; ?></td>
- <td><?php echo $stats["alerts_count"]; ?></td>
- </tr>
-
- <tr bgcolor="#eeeeee">
- <td><?php echo S_NUMBER_OF_TRIGGERS_ENABLED_DISABLED; ?></td>
- <td><?php echo $stats["triggers_count"],"(",$stats["triggers_count_enabled"],"/",$stats["triggers_count_disabled"],")"; ?></td>
- </tr>
-
- <tr bgcolor="#dddddd">
- <td><?php echo S_NUMBER_OF_ITEMS_ACTIVE_TRAPPER; ?></td>
- <td><?php echo $stats["items_count"],"(",$stats["items_count_active"],"/",$stats["items_count_trapper"],"/",$stats["items_count_not_active"],"/",$stats["items_count_not_supported"],")"; ?></td>
- </tr>
+ $stats=get_stats();
- <tr bgcolor="#eeeeee">
- <td><?php echo S_NUMBER_OF_USERS; ?></td>
- <td><?php echo $stats["users_count"]; ?></td>
- </tr>
+ $col=0;
+ $str=array("value"=>S_NO,"class"=>"on");
+ if( (exec("ps -ef|grep zabbix_suckerd|grep -v grep|wc -l")>0) || (exec("ps -ax|grep zabbix_suckerd|grep -v grep|wc -l")>0) )
+ {
+ $str=array("value"=>S_YES,"class"=>"off");
+ }
+ table_row(array(S_ZABBIX_SUCKERD_IS_RUNNING,$str),$col++);
- <tr bgcolor="#dddddd">
- <td><?php echo S_NUMBER_OF_HOSTS_MONITORED; ?></td>
- <td><?php echo $stats["hosts_count"],"(",$stats["hosts_count_monitored"],"/",$stats["hosts_count_not_monitored"],"/",$stats["hosts_count_template"],")"; ?></td>
- </tr>
+ $str=array("value"=>S_NO,"class"=>"on");
+ if( (exec("ps -ef|grep zabbix_trapperd|grep -v grep|wc -l")>0) || (exec("ps -ax|grep zabbix_trapperd|grep -v grep|wc -l")>0) )
+ {
+ $str=array("value"=>S_YES,"class"=>"off");
+ }
+ table_row(array(S_ZABBIX_TRAPPERD_IS_RUNNING,$str),$col++);
+ table_row(array(S_NUMBER_OF_VALUES_STORED,$stats["history_count"]),$col++);
+ table_row(array(S_NUMBER_OF_TRENDS_STORED,$stats["trends_count"]),$col++);
+ table_row(array(S_NUMBER_OF_ALARMS,$stats["alarms_count"]),$col++);
+ table_row(array(S_NUMBER_OF_ALERTS,$stats["alerts_count"]),$col++);
+ table_row(array(S_NUMBER_OF_TRIGGERS_ENABLED_DISABLED,$stats["triggers_count"]."(".$stats["triggers_count_enabled"]."/".$stats["triggers_count_disabled"].")"),$col++);
+ table_row(array(S_NUMBER_OF_ITEMS_ACTIVE_TRAPPER,$stats["items_count"]."(".$stats["items_count_active"]."/".$stats["items_count_trapper"]."/".$stats["items_count_not_active"]."/".$stats["items_count_not_supported"].")"),$col++);
+ table_row(array(S_NUMBER_OF_USERS,$stats["users_count"]),$col++);
+ table_row(array(S_NUMBER_OF_HOSTS_MONITORED,$stats["hosts_count"]."(".$stats["hosts_count_monitored"]."/".$stats["hosts_count_not_monitored"]."/".$stats["hosts_count_template"].")"),$col++);
- </table>
+ table_end();
+?>
<?php
show_footer();
diff --git a/frontends/php/report2.php b/frontends/php/report2.php
index 31a42250..79dc74db 100644
--- a/frontends/php/report2.php
+++ b/frontends/php/report2.php
@@ -72,15 +72,8 @@
show_table_header($row["host"]);
$result=DBselect("select distinct h.hostid,h.host,t.triggerid,t.expression,t.description,t.value from triggers t,hosts h,items i,functions f where f.itemid=i.itemid and h.hostid=i.hostid and t.status=0 and t.triggerid=f.triggerid and h.hostid=".$_GET["hostid"]." and h.status in (0,2) and i.status=0 order by h.host, t.description");
- echo "<TABLE BORDER=0 COLS=3 WIDTH=100% BGCOLOR=\"#AAAAAA\" cellspacing=1 cellpadding=3>";
- echo "<TR BGCOLOR=\"#CCCCCC\">";
- echo "<TD><B>".S_DESCRIPTION."</B></TD>";
-// echo "<TD><B>Expression</B></TD>";
- echo "<TD WIDTH=5%><B>".S_TRUE."</B></TD>";
- echo "<TD WIDTH=5%><B>".S_FALSE."</B></TD>";
- echo "<TD WIDTH=5%><B>".S_UNKNOWN."</B></TD>";
- echo "<TD WIDTH=5%><B>".S_GRAPH."</B></TD>";
- echo "</TR>\n";
+ table_begin();
+ table_header(array(S_DESCRIPTION,S_TRUE,S_FALSE,S_UNKNOWN,S_GRAPH));
$col=0;
while($row=DBfetch($result))
{
@@ -90,35 +83,25 @@
}
$lasthost=$row["host"];
- if($col++%2 == 1) { echo "<TR BGCOLOR=#DDDDDD>"; }
- else { echo "<TR BGCOLOR=#EEEEEE>"; }
-
-// $description=$row["description"];
-
-// if( strstr($description,"%s"))
-// {
- $description=expand_trigger_description($row["triggerid"]);
-// }
- echo "<TD><a href=\"alarms.php?triggerid=".$row["triggerid"]."\">$description</a></TD>";
-// $description=rawurlencode($row["description"]);
+ $description=expand_trigger_description($row["triggerid"]);
+ $description="<a href=\"alarms.php?triggerid=".$row["triggerid"]."\">$description</a>";
-// echo "<TD>".explode_exp($row["expression"],1)."</TD>";
$availability=calculate_availability($row["triggerid"],0,0);
- echo "<TD><font color=\"AA0000\">";
- printf("%.4f%%",$availability["true"]);
- echo "</font></TD>";
- echo "<TD><font color=\"00AA00\">";
- printf("%.4f%%",$availability["false"]);
- echo "</font></TD>";
- echo "<TD>";
- printf("%.4f%%",$availability["unknown"]);
- echo "</TD>";
- echo "<TD>";
- echo "<a href=\"report2.php?hostid=".$_GET["hostid"]."&triggerid=".$row["triggerid"]."\">".S_SHOW."</a>";
- echo "</TD>";
- echo "</TR>\n";
+
+ $true=array("value"=>sprintf("%.4f%%",$availability["true"]), "class"=>"on");
+ $false=array("value"=>sprintf("%.4f%%",$availability["false"]), "class"=>"off");
+ $unknown=array("value"=>sprintf("%.4f%%",$availability["unknown"]), "class"=>"unknown");
+ $actions="<a href=\"report2.php?hostid=".$_GET["hostid"]."&triggerid=".$row["triggerid"]."\">".S_SHOW."</a>";
+
+ table_row(array(
+ $description,
+ $true,
+ $false,
+ $unknown,
+ $actions
+ ),$col++);
}
- echo "</table>\n";
+ table_end();
}
?>
diff --git a/frontends/php/srv_status.php b/frontends/php/srv_status.php
index b7013f4e..fb0a391d 100644
--- a/frontends/php/srv_status.php
+++ b/frontends/php/srv_status.php
@@ -44,17 +44,8 @@
$now=time();
$result=DBselect("select serviceid,name,triggerid,status,showsla,goodsla from services order by sortorder,name");
- echo "<table border=0 width=100% bgcolor='#AAAAAA' cellspacing=1 cellpadding=3>";
- echo "\n";
- echo "<tr bgcolor='#CCCCCC'>";
- echo "<td width=40%><b>".S_SERVICE."</b></td>";
- echo "<td width=10%><b>".S_STATUS."</b></td>";
- echo "<td><b>".S_REASON."</b></td>";
- echo "<td width=20%><b>".S_SLA_LAST_7_DAYS."</b></td>";
- echo "<td width=10% align=center><b>".nbsp(S_PLANNED_CURRENT_SLA)."</b></td>";
- echo "<td width=5%><b>".S_GRAPH."</b></td>";
- echo "</tr>";
- echo "\n";
+ table_begin();
+ table_header(array(S_SERVICE,S_STATUS,S_REASON,S_SLA_LAST_7_DAYS,nbsp(S_PLANNED_CURRENT_SLA),S_GRAPH));
$col=0;
if(isset($_GET["serviceid"]))
{
@@ -122,12 +113,7 @@
$childs=get_num_of_service_childs($row["serviceid"]);
if(isset($row["triggerid"]))
{
-// $trigger=get_trigger_by_triggerid($row["triggerid"]);
-// $description=$trigger["description"];
-// if( strstr($description,"%s"))
-// {
- $description=nbsp(expand_trigger_description($row["triggerid"]));
-// }
+ $description=nbsp(expand_trigger_description($row["triggerid"]));
$description="[<a href=\"alarms.php?triggerid=".$row["triggerid"]."\">".S_TRIGGER_BIG."</a>] $description";
}
else
@@ -172,12 +158,7 @@
{
if(does_service_depend_on_the_service($row["serviceid"],$row2["serviceid"]))
{
-// $trigger=get_trigger_by_triggerid($row2["triggerid"]);
-// $description=$trigger["description"];
-// if( strstr($description,"%s"))
-// {
- $description=nbsp(expand_trigger_description($row2["triggerid"]));
-// }
+ $description=nbsp(expand_trigger_description($row2["triggerid"]));
echo "<li class=\"itservices\"><a href=\"alarms.php?triggerid=".$row2["triggerid"]."\">$description</a></li>";
}
}
@@ -221,7 +202,7 @@
echo "<td><a href=\"srv_status.php?serviceid=".$row["serviceid"]."&showgraph=1\">Show</a></td>";
echo "</tr>";
}
- echo "</table>";
+ table_end();
?>
<?php
diff --git a/frontends/php/tr_status.php b/frontends/php/tr_status.php
index a3a9e7e7..6c77c621 100644
--- a/frontends/php/tr_status.php
+++ b/frontends/php/tr_status.php
@@ -571,7 +571,7 @@
$lastchange="<A HREF=\"alarms.php?triggerid=".$row["triggerid"]."\">".date("d M H:i:s",$row["lastchange"])."</a>";
- $actions=FALSE;
+ $actions=array("hide"=>1);
if($noactions!='true')
{
$actions="<A HREF=\"actions.php?triggerid=".$row["triggerid"]."\">".S_SHOW_ACTIONS."</A> - ";
@@ -585,7 +585,7 @@
$actions=$actions."<A HREF=\"triggers.php?triggerid=".$row["triggerid"]."#form\">".S_CHANGE."</A>";
}
}
- $comments=FALSE;
+ $comments=array("hide"=>1);;
if($row["comments"] != "")
{
$comments="<A HREF=\"tr_comments.php?triggerid=".$row["triggerid"]."\">".S_SHOW."</a>";