summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/forms.inc.php
diff options
context:
space:
mode:
authorsasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-02-28 15:26:46 +0000
committersasha <sasha@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2008-02-28 15:26:46 +0000
commit5ab023e55f2ba605336a5931916fa6acb08ae90f (patch)
treed845ddbab426835d74aad499e3bb5a6d7d3288f3 /frontends/php/include/forms.inc.php
parentd40b9c8636d4838ae6284f60c82c5b67f4bc6954 (diff)
downloadzabbix-5ab023e55f2ba605336a5931916fa6acb08ae90f.tar.gz
zabbix-5ab023e55f2ba605336a5931916fa6acb08ae90f.tar.xz
zabbix-5ab023e55f2ba605336a5931916fa6acb08ae90f.zip
- [DEV-108] GUI - Discovery
git-svn-id: svn://svn.zabbix.com/trunk@5413 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/forms.inc.php')
-rw-r--r--frontends/php/include/forms.inc.php26
1 files changed, 24 insertions, 2 deletions
diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php
index 421966ba..e65f18d8 100644
--- a/frontends/php/include/forms.inc.php
+++ b/frontends/php/include/forms.inc.php
@@ -178,7 +178,7 @@
if(isset($_REQUEST['druleid']) && $rule_data && (!isset($_REQUEST["form_refresh"]) || isset($_REQUEST["register"])))
{
-
+ $proxyid = $rule_data['proxyid'];
$name = $rule_data['name'];
$iprange = $rule_data['iprange'];
$delay = $rule_data['delay'];
@@ -195,6 +195,7 @@
}
else
{
+ $proxyid = get_request("proxyid",0);
$name = get_request('name','');
$iprange = get_request('iprange','192.168.0.1-255');
$delay = get_request('delay',3600);
@@ -208,6 +209,16 @@
$new_check_snmp_community= get_request('new_check_snmp_community', '');
$form->AddRow(S_NAME, new CTextBox('name', $name, 40));
+//Proxy
+ $cmbProxy = new CComboBox("proxyid", $proxyid);
+
+ $cmbProxy->AddItem(0, S_NO_PROXY);
+ $db_proxies = DBselect('SELECT proxyid,name FROM proxies');
+ while ($db_proxy = DBfetch($db_proxies))
+ $cmbProxy->AddItem($db_proxy['proxyid'], $db_proxy['name']);
+
+ $form->AddRow(S_DISCOVERY_BY_PROXY,$cmbProxy);
+//----------
$form->AddRow(S_IP_RANGE, new CTextBox('iprange', $iprange, 27));
$form->AddRow(S_DELAY.' (seconds)', new CNumericBox('delay', $delay, 8));
@@ -4183,6 +4194,7 @@ include_once 'include/discovery.inc.php';
$newgroup = get_request("newgroup","");
$host = get_request("host", "");
+ $proxyid= get_request("proxyis","");
$port = get_request("port", get_profile("HOST_PORT",10050));
$status = get_request("status", HOST_STATUS_MONITORED);
$useip = get_request("useip", 0);
@@ -4327,7 +4339,6 @@ include_once 'include/discovery.inc.php';
$frmHost->AddRow(S_CONNECT_TO,$cmbConnectBy);
}
-
if($show_only_tmp)
{
$port = "10050";
@@ -4340,6 +4351,17 @@ include_once 'include/discovery.inc.php';
{
$frmHost->AddRow(S_PORT,new CNumericBox("port",$port,5));
+//Proxy
+ $cmbProxy = new CComboBox("proxyid", $proxyid);
+
+ $cmbProxy->AddItem(0, S_NO_PROXY);
+ $db_proxies = DBselect('SELECT proxyid,name FROM proxies');
+ while ($db_proxy = DBfetch($db_proxies))
+ $cmbProxy->AddItem($db_proxy['proxyid'], $db_proxy['name']);
+
+ $frmHost->AddRow(S_MONITORED_BY_PROXY,$cmbProxy);
+//----------
+
$cmbStatus = new CComboBox("status",$status);
$cmbStatus->AddItem(HOST_STATUS_MONITORED, S_MONITORED);
$cmbStatus->AddItem(HOST_STATUS_NOT_MONITORED, S_NOT_MONITORED);