Source
<?php declare(strict_types = 0);
/*
** Zabbix
** 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 General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** 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 General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
/**
* @var CView $this
*/
?>
<script type="text/x-jquery-tmpl" id="filter-tag-row-tmpl">
<?= CTagFilterFieldHelper::getTemplate() ?>
</script>
<script>
const view = {
serviceid: null,
mode_switch_url: null,
parent_url: null,
delete_url: null,
refresh_url: null,
refresh_interval: null,
back_url: null,
is_refresh_paused: false,
is_refresh_pending: false,
init({serviceid, mode_switch_url, parent_url, delete_url, refresh_url, refresh_interval, back_url = null}) {
this.serviceid = serviceid;
this.mode_switch_url = mode_switch_url;
this.parent_url = parent_url;
this.delete_url = delete_url;
this.refresh_url = refresh_url;
this.refresh_interval = refresh_interval;
this.back_url = back_url;
this.initViewModeSwitcher();
this.initTagFilter();
this.initActionButtons();
this.initRefresh();
},
initViewModeSwitcher() {
for (const element of document.getElementsByName('list_mode')) {
if (!element.checked) {
element.addEventListener('click', () => {
location.href = this.mode_switch_url;
});