Source
xxxxxxxxxx
/*
** Zabbix
** Copyright (C) 2001-2024 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.
**/
class CNavigationTree {
static ZBX_STYLE_CLASS = 'navigation-tree';
static ZBX_STYLE_NODES = 'navigation-tree-nodes';
static ZBX_STYLE_NODE = 'navigation-tree-node';
static ZBX_STYLE_NODE_IS_GROUP = 'navigation-tree-node-is-group';
static ZBX_STYLE_NODE_IS_OPEN = 'navigation-tree-node-is-open';
static ZBX_STYLE_NODE_IS_SELECTED = 'navigation-tree-node-is-selected';
static ZBX_STYLE_NODE_INFO = 'navigation-tree-node-info';
static ZBX_STYLE_NODE_INFO_HELPERS = 'navigation-tree-node-info-helpers';
static ZBX_STYLE_NODE_INFO_PRIMARY = 'navigation-tree-node-info-primary';
static ZBX_STYLE_NODE_INFO_SECONDARY = 'navigation-tree-node-info-secondary';
static ZBX_STYLE_NODE_INFO_LEVEL = 'navigation-tree-node-info-level';
static ZBX_STYLE_NODE_INFO_ARROW = 'navigation-tree-node-info-arrow';
static ZBX_STYLE_NODE_INFO_NAME = 'navigation-tree-node-info-name';
static ZBX_STYLE_NODE_INFO_MAINTENANCE = 'navigation-tree-node-info-maintenance';
static ZBX_STYLE_NODE_INFO_PROBLEMS = 'navigation-tree-node-info-problems';
static ZBX_STYLE_NODE_INFO_PROBLEMS_HINT = 'navigation-tree-node-info-problems-hint';
static ZBX_STYLE_NODE_INFO_PROBLEMS_HINT_SEVERITY = 'navigation-tree-node-info-problems-hint-severity';
static ZBX_STYLE_NODE_INFO_PROBLEMS_HINT_SEVERITY_COLOR = 'navigation-tree-node-info-problems-hint-severity-color';
static ZBX_STYLE_NODE_INFO_PROBLEMS_HINT_SEVERITY_NAME = 'navigation-tree-node-info-problems-hint-severity-name';
static ZBX_STYLE_NODE_INFO_PROBLEMS_HINT_SEVERITY_COUNT = 'navigation-tree-node-info-problems-hint-severity-count';
static ZBX_STYLE_NODE_INFO_GROUP_HINT = 'navigation-tree-node-info-group-hint';
static ZBX_STYLE_NODE_INFO_GROUP_HINT_ATTRIBUTE = 'navigation-tree-node-info-group-hint-attribute';
static ZBX_STYLE_NODE_INFO_GROUP_HINT_VALUE = 'navigation-tree-node-info-group-hint-value';
static ZBX_STYLE_NODE_CHILDREN = 'navigation-tree-node-children';
static ZBX_STYLE_GROUP_UNCATEGORIZED = 'navigation-tree-group-uncategorized';
static EVENT_ITEM_SELECT = 'item.select';
static EVENT_GROUP_TOGGLE = 'group.toggle';
/**
* Root container element.
*
* @type {HTMLElement}
*/
#container;
/**
* Container element of nodes.
*
* @type {HTMLElement}
*/
#container_nodes;
/**
* Events of navigation tree.
*
* @type {Object}
*/
#events;
/**
* Navigation tree elements (nodes, arrows, names, etc.).
*
* @type {Object}
*/
#tree_elements;
/**
* ID of selected item.
*
* @type {string}
*/
#selected_id;
/**
* Whether to show problems or not.
*
* @type {boolean}
*/