Source
`#key_, #snmp_community, #snmp_oid, #snmpv3_contextname, #snmpv3_securityname, #snmpv3_authpassphrase,
<?php declare(strict_types = 0);
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
** without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
** See the GNU Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
/**
* @var CView $this
*/
?>
window.check_popup = new class {
init() {
this.overlay = overlays_stack.getById('discovery-check');
this.dialogue = this.overlay.$dialogue[0];
this.form = this.overlay.$dialogue.$body[0].querySelector('form');
this._loadViews();
this.form.style.display = '';
this.overlay.recoverFocus();
}
_loadViews() {
new CViewSwitcher('type-select', 'change', <?= json_encode([
SVC_SSH => ['dcheck_ports', 'dcheck_ports_label'],
SVC_LDAP => ['dcheck_ports', 'dcheck_ports_label'],
SVC_SMTP => ['dcheck_ports', 'dcheck_ports_label'],
SVC_FTP => ['dcheck_ports', 'dcheck_ports_label'],
SVC_HTTP => ['dcheck_ports', 'dcheck_ports_label'],
SVC_POP => ['dcheck_ports', 'dcheck_ports_label'],
SVC_NNTP => ['dcheck_ports', 'dcheck_ports_label'],
SVC_IMAP => ['dcheck_ports', 'dcheck_ports_label'],
SVC_TCP => ['dcheck_ports', 'dcheck_ports_label'],
SVC_AGENT => [
'dcheck_ports', 'dcheck_ports_label',
'dcheck_key', 'dcheck_key_label'
],
SVC_SNMPv1 => [
'dcheck_ports', 'dcheck_ports_label',
'dcheck_snmp_community', 'dcheck_snmp_community_label',
'dcheck_snmp_oid', 'dcheck_snmp_oid_label'
],
SVC_SNMPv2c => [
'dcheck_ports', 'dcheck_ports_label',
'dcheck_snmp_community', 'dcheck_snmp_community_label',
'dcheck_snmp_oid', 'dcheck_snmp_oid_label'
],
SVC_ICMPPING => ['allow_redirect_field', 'allow_redirect_label'],
SVC_SNMPv3 => [
'dcheck_ports', 'dcheck_ports_label',
'dcheck_snmp_oid', 'dcheck_snmp_oid_label',
'dcheck_snmpv3_contextname', 'dcheck_snmpv3_contextname_label',