diff options
| author | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-03-20 14:07:18 +0000 |
|---|---|---|
| committer | osmiy <osmiy@97f52cf1-0a1b-0410-bd0e-c28be96e8082> | 2007-03-20 14:07:18 +0000 |
| commit | f3b0ed3265201da1d292b7d80beb31a190f4cc2f (patch) | |
| tree | 1cec643d8a3be8025f0344f0100bed2dcbbc1811 /frontends/php/include/forms.inc.php | |
| parent | a23c4de7f946b02f036315d319591ff5cfe08a93 (diff) | |
| download | zabbix-f3b0ed3265201da1d292b7d80beb31a190f4cc2f.tar.gz zabbix-f3b0ed3265201da1d292b7d80beb31a190f4cc2f.tar.xz zabbix-f3b0ed3265201da1d292b7d80beb31a190f4cc2f.zip | |
- added default ports for discovery checks (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3901 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'frontends/php/include/forms.inc.php')
| -rw-r--r-- | frontends/php/include/forms.inc.php | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/frontends/php/include/forms.inc.php b/frontends/php/include/forms.inc.php index cde4d5b2..b15b5a32 100644 --- a/frontends/php/include/forms.inc.php +++ b/frontends/php/include/forms.inc.php @@ -80,7 +80,7 @@ $dchecks = get_request('dchecks',array()); } $new_check_type = get_request('new_check_type', SVC_HTTP); - $new_check_ports= get_request('new_check_ports', '80,8080'); + $new_check_ports= get_request('new_check_ports', '80'); $form->AddRow(S_NAME, new CTextBox('name', $name, 40)); $form->AddRow(S_IP_FIRST, new CTextBox('ipfirst', $ipfirst, 27)); @@ -109,10 +109,28 @@ $form->AddRow(S_CHECKS, $dchecks); } - $cmbChkType = new CComboBox('new_check_type',$new_check_type); + $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) $cmbChkType->AddItem($type_int, discovery_check_type2str($type_int)); + if(isset($_REQUEST['type_changed'])) + { + switch($new_check_type) + { + case SVC_SSH: $new_check_ports = 22; break; + case SVC_LDAP: $new_check_ports = 389; break; + case SVC_SMTP: $new_check_ports = 25; break; + case SVC_FTP: $new_check_ports = 21; break; + case SVC_HTTP: $new_check_ports = 80; break; + case SVC_POP: $new_check_ports = 110; break; + case SVC_NNTP: $new_check_ports = 119; break; + case SVC_IMAP: $new_check_ports = 143; break; + case SVC_TCP: $new_check_ports = 80; break; + } + } + $form->AddRow(S_NEW_CHECK, array( $cmbChkType, SPACE, S_PORTS_SMALL, SPACE, new CTextBox('new_check_ports', $new_check_ports), |
