Source
const exclude = ['action', 'filter_src', 'filter_show_counter', 'filter_custom_time', 'filter_name'];
<?php
/*
** 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>
const view = {
host_view_form: null,
filter: null,
refresh_url: null,
refresh_simple_url: null,
refresh_interval: null,
refresh_counters: null,
running: false,
timeout: null,
deferred: null,
applied_filter_groupids: [],
_refresh_message_box: null,
_popup_message_box: null,
init({filter_options, refresh_url, refresh_interval, applied_filter_groupids}) {
this.refresh_url = new Curl(refresh_url, false);
this.refresh_interval = refresh_interval;
this.applied_filter_groupids = applied_filter_groupids;
const url = new Curl('zabbix.php', false);
url.setArgument('action', 'host.view.refresh');
this.refresh_simple_url = url.getUrl();
this.initTabFilter(filter_options);
this.host_view_form = $('form[name=host_view]');
this.running = true;
this.refresh();
},
initTabFilter(filter_options) {
if (!filter_options) {
return;
}
this.refresh_counters = this.createCountersRefresh(1);