summaryrefslogtreecommitdiffstats
path: root/frontends/php/include/forms.inc.php
diff options
context:
space:
mode:
authorosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-04-27 13:46:18 +0000
committerosmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-04-27 13:46:18 +0000
commit197f1a047712d303efa5adbe77bc71b75d4bb992 (patch)
tree3f756a119296e8fdeae7232667b17f01727067fe /frontends/php/include/forms.inc.php
parent40925dcf142fcd6b8aa3f56c7c17d2b493dc3095 (diff)
downloadzabbix-197f1a047712d303efa5adbe77bc71b75d4bb992.tar.gz
zabbix-197f1a047712d303efa5adbe77bc71b75d4bb992.tar.xz
zabbix-197f1a047712d303efa5adbe77bc71b75d4bb992.zip
- added new drchecks (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@4071 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/forms.inc.php')
-rw-r--r--frontends/php/include/forms.inc.php19
1 files changed, 17 insertions, 2 deletions
diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php
index 1adb7679..4ec6c864 100644
--- a/frontends/php/include/forms.inc.php
+++ b/frontends/php/include/forms.inc.php
@@ -202,6 +202,8 @@
}
$new_check_type = get_request('new_check_type', SVC_HTTP);
$new_check_ports= get_request('new_check_ports', '80');
+ $new_check_key= get_request('new_check_key', '');
+ $new_check_snmp_community= get_request('new_check_snmp_community', '');
$form->AddRow(S_NAME, new CTextBox('name', $name, 40));
$form->AddRow(S_IP_RANGE, new CTextBox('iprange', $iprange, 27));
@@ -228,7 +230,7 @@
$cmbChkType = new CComboBox('new_check_type',$new_check_type,
"if(add_variable(this, 'type_changed', 1)) submit()"
);
- foreach(array(SVC_SSH, SVC_LDAP, SVC_SMTP, SVC_FTP, SVC_HTTP, SVC_POP, SVC_NNTP, SVC_IMAP, SVC_TCP) as $type_int)
+ foreach(array(SVC_SSH, SVC_LDAP, SVC_SMTP, SVC_FTP, SVC_HTTP, SVC_POP, SVC_NNTP, SVC_IMAP, SVC_TCP, SVC_AGENT, SVC_SNMPv1, SVC_SNMPv2) as $type_int)
$cmbChkType->AddItem($type_int, discovery_check_type2str($type_int));
if(isset($_REQUEST['type_changed']))
@@ -244,12 +246,25 @@
case SVC_NNTP: $new_check_ports = 119; break;
case SVC_IMAP: $new_check_ports = 143; break;
case SVC_TCP: $new_check_ports = 80; break;
+ case SVC_AGENT: $new_check_ports = 10050; break;
+ case SVC_SNMPv1:$new_check_ports = 161; break;
+ case SVC_SNMPv2:$new_check_ports = 161; break;
}
}
+ $external_param = array();
+ switch($new_check_type)
+ {
+ case SVC_SNMPv1:
+ $external_param = array_merge($external_param, array(BR, S_SNMP_COMMUNITY, SPACE, new CTextBox('new_check_snmp_community', $new_check_snmp_community)));
+ case SVC_SNMPv2:
+ case SVC_AGENT:
+ $external_param = array_merge($external_param, array(BR, S_KEY, new CTextBox('new_check_key', $new_check_key), BR));
+ }
$form->AddRow(S_NEW_CHECK, array(
$cmbChkType, SPACE,
S_PORTS_SMALL, SPACE, new CTextBox('new_check_ports', $new_check_ports),
+ $external_param,
new CButton('add_check', S_ADD)
),'new');
@@ -2961,7 +2976,7 @@ include_once 'include/discovery.inc.php';
case CONDITION_TYPE_DSERVICE_TYPE:
$cmbCondVal = new CComboBox('new_condition[value]');
foreach(array(SVC_SSH, SVC_LDAP, SVC_SMTP, SVC_FTP, SVC_HTTP,
- SVC_POP, SVC_NNTP, SVC_IMAP, SVC_TCP) as $svc)
+ SVC_POP, SVC_NNTP, SVC_IMAP, SVC_TCP,SVC_AGENT,SVC_SNMPv1,SVC_SNMPv2) as $svc)
$cmbCondVal->AddItem($svc,discovery_check_type2str($svc));
$rowCondition[] = $cmbCondVal;