Source
<?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
*/
?>
<script>
const view = {
refresh_url: null,
refresh_data: null,
refresh_simple_url: null,
refresh_interval: null,
refresh_counters: null,
running: false,
timeout: null,
_refresh_message_box: null,
_popup_message_box: null,
active_filter: null,
layout_mode: null,
checkbox_object: null,
init({refresh_url, refresh_data, refresh_interval, filter_options, checkbox_object, filter_set, layout_mode}) {
this.refresh_url = new Curl(refresh_url);
this.refresh_data = refresh_data;
this.refresh_interval = refresh_interval;
this.checkbox_object = checkbox_object;
this.filter_set = filter_set;
this.layout_mode = layout_mode;
const url = new Curl('zabbix.php');
url.setArgument('action', 'latest.view.refresh');
this.refresh_simple_url = url.getUrl();
this.initTabFilter(filter_options);
this.initExpandableSubfilter();
this.initListActions();
this.initItemFormEvents(this.getCurrentForm().get(0));
if (this.refresh_interval != 0 && this.filter_set) {
this.running = true;
this.scheduleRefresh();
}
},
initTabFilter(filter_options) {