Source
const exclude = ['action', 'filter_src', 'filter_show_counter', 'filter_custom_time', 'filter_name'];
<?php
/*
** 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 = {
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);
this.refresh_interval = refresh_interval;
this.applied_filter_groupids = applied_filter_groupids;
const url = new Curl('zabbix.php');
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);
this.filter = new CTabFilter($('#monitoring_hosts_filter')[0], filter_options);
this.filter.on(TABFILTER_EVENT_URLSET, () => {
this.reloadPartialAndTabCounters();
});
},