Source
<input type="hidden" id="status_rules_#{row_index}_limit_status" name="status_rules[#{row_index}][limit_status]" value="#{limit_status}">
<?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/>.
**/
?>
window.service_edit_popup = new class {
init({tabs_id, serviceid, children, children_problem_tags_html, problem_tags, status_rules, search_limit}) {
this._initTemplates();
this.serviceid = serviceid;
this.search_limit = search_limit;
this.overlay = overlays_stack.getById('service_edit');
this.dialogue = this.overlay.$dialogue[0];
this.form = this.overlay.$dialogue.$body[0].querySelector('form');
this.footer = this.overlay.$dialogue.$footer[0];
for (const status_rule of status_rules) {
this._addStatusRule(status_rule);
}
this.children = new Map();
for (const service of children) {
this.children.set(service.serviceid, {
serviceid: service.serviceid,
name: service.name,
problem_tags_html: children_problem_tags_html[service.serviceid]
});
}
this._filterChildren();
// Setup parent services.
jQuery('#parent_serviceids_')
.multiSelect('getSelectButton')
.addEventListener('click', () => {
this._selectParents();
});
// Setup problem tags.
const $problem_tags = jQuery(document.getElementById('problem_tags'));
$problem_tags.dynamicRows({
template: '#problem-tag-row-tmpl',
allow_empty: true,
rows: problem_tags,