Source
/*
** 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/>.
**/
class CWidgetHostNavigator extends CWidget {
/**
* Host navigator instance.
*
* @type {CHostNavigator|null}
*/
#host_navigator = null;
/**
* Listeners of host navigator widget.
*
* @type {Object}
*/
#listeners = {};
/**
* Scroll amount of contents.
*
* @type {number}
*/
#contents_scroll_top = 0;
/**
* ID of selected host.
*
* @type {string|null}
*/
#selected_hostid = null;
/**
* CSRF token for navigation.tree.toggle action.
*
* @type {string|null}
*/
#csrf_token = null;
onActivate() {
this._contents.scrollTop = this.#contents_scroll_top;
}
onDeactivate() {
this.#contents_scroll_top = this._contents.scrollTop;
}
onDestroy() {
this.#updateProfiles(false, [], this._widgetid);
}