From 938eeba4af4a46126fc4d2fcbe46c15c98d70090 Mon Sep 17 00:00:00 2001 From: osmiy Date: Fri, 19 Jan 2007 15:34:39 +0000 Subject: - developed configuration interface of http monitoring (Eugene) git-svn-id: svn://svn.zabbix.com/trunk@3732 97f52cf1-0a1b-0410-bd0e-c28be96e8082 --- frontends/php/popup.php | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'frontends/php/popup.php') diff --git a/frontends/php/popup.php b/frontends/php/popup.php index 516ca559..4734906f 100644 --- a/frontends/php/popup.php +++ b/frontends/php/popup.php @@ -37,6 +37,10 @@ $page["title"] = "S_HOSTS_BIG"; $min_user_type = USER_TYPE_ZABBIX_ADMIN; break; + case 'applications': + $page["title"] = "S_APPLICATIONS_BIG"; + $min_user_type = USER_TYPE_ZABBIX_USER; + break; case 'host_group': $page["title"] = "S_HOST_GROUPS_BIG"; $min_user_type = USER_TYPE_ZABBIX_USER; @@ -124,7 +128,7 @@ include_once "include/page_header.php"; Show(); } + elseif($srctbl == "applications") + { + $table = new CTableInfo(S_NO_APPLICATIONS_DEFINED); + $table->SetHeader(array( + (isset($hostid) ? null : S_HOST), + S_NAME)); + + $sql = "select distinct h.host,a.* from hosts h,applications a ". + " where h.hostid=a.hostid and ".DBid2nodeid("a.applicationid")."=".$nodeid. + " and h.hostid not in (".$denyed_hosts.")". + ($monitored_hosts ? " and h.status=".HOST_STATUS_MONITORED : ""); + + if(isset($hostid)) + $sql .= " and h.hostid=$hostid"; + + $sql .= " order by h.host,a.name"; + + $result = DBselect($sql); + while($row = DBfetch($result)) + { + + $name = new CLink($row["name"],"#","action"); + + $name->SetAction( + get_window_opener($dstfrm, $dstfld1, $row[$srcfld1]). + (empty($srcfld2) ? "" : get_window_opener($dstfrm, $dstfld2, $row[$srcfld2])). + " window.close();"); + + $table->AddRow(array($name)); + } + $table->Show(); + } ?>