diff options
author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-01-19 15:34:39 +0000 |
---|---|---|
committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-01-19 15:34:39 +0000 |
commit | 938eeba4af4a46126fc4d2fcbe46c15c98d70090 (patch) | |
tree | daf653ad9c11f00b291719b19c19adcb72ca20f1 /frontends/php/popup.php | |
parent | a901997b009039670ecc3144465ecea54d16af4a (diff) | |
download | zabbix-938eeba4af4a46126fc4d2fcbe46c15c98d70090.tar.gz zabbix-938eeba4af4a46126fc4d2fcbe46c15c98d70090.tar.xz zabbix-938eeba4af4a46126fc4d2fcbe46c15c98d70090.zip |
- developed configuration interface of http monitoring (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3732 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/popup.php')
-rw-r--r-- | frontends/php/popup.php | 38 |
1 files changed, 37 insertions, 1 deletions
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"; <?php function get_window_opener($frame, $field, $value) { - return "window.opener.document.forms['".addslashes($frame)."'].".addslashes($field).".value='".addslashes($value)."';"; + return empty($field) ? "" : "window.opener.document.forms['".addslashes($frame)."'].".addslashes($field).".value='".addslashes($value)."';"; } ?> <?php @@ -703,6 +707,38 @@ function add_variable(formname,value) } $table->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(); + } ?> <?php |