Source
overlay.$dialogue[0].addEventListener('dialogue.close', this._events.editWidgetPropertiesClose, {once: true});
/*
** 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 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/>.
**/
const ZBX_STYLE_BTN_DASHBOARD_PAGE_PROPERTIES = 'btn-dashboard-page-properties';
const ZBX_STYLE_DASHBOARD_IS_MULTIPAGE = 'dashboard-is-multipage';
const ZBX_STYLE_DASHBOARD_IS_EDIT_MODE = 'dashboard-is-edit-mode';
const ZBX_STYLE_DASHBOARD_NAVIGATION_IS_SCROLLABLE = 'is-scrollable';
const ZBX_STYLE_DASHBOARD_SELECTED_TAB = 'selected-tab';
const DASHBOARD_STATE_INITIAL = 'initial';
const DASHBOARD_STATE_ACTIVE = 'active';
const DASHBOARD_CLIPBOARD_TYPE_WIDGET = 'widget';
const DASHBOARD_CLIPBOARD_TYPE_DASHBOARD_PAGE = 'dashboard-page';
const DASHBOARD_EVENT_BUSY = 'dashboard-busy';
const DASHBOARD_EVENT_IDLE = 'dashboard-idle';
const DASHBOARD_EVENT_EDIT = 'dashboard-edit';
const DASHBOARD_EVENT_APPLY_PROPERTIES = 'dashboard-apply-properties';
const DASHBOARD_EVENT_CONFIGURATION_OUTDATED = 'dashboard-configuration-outdated';
class CDashboard {
static ZBX_STYLE_IS_READY = 'is-ready';
static REFERENCE_DASHBOARD = 'DASHBOARD';
static EVENT_FEEDBACK = 'dashboard-feedback';
#broadcast_options;
#broadcast_cache = new Map();
#edit_widget_cache = null;
constructor(target, {
containers,
buttons,
data,
max_dashboard_pages,
cell_width,
cell_height,
max_columns,
max_rows,
widget_defaults,
widget_last_type = null,
configuration_hash = null,
is_editable,
is_edit_mode,
can_edit_dashboards,
is_kiosk_mode,
broadcast_options = {},
csrf_token = null
}) {
this._target = target;
this._containers = {
grid: containers.grid,
navigation: containers.navigation,
navigation_tabs: containers.navigation_tabs
}
this._buttons = {
previous_page: buttons.previous_page,
next_page: buttons.next_page,
slideshow: buttons.slideshow
};
this._data = {
dashboardid: data.dashboardid,
name: data.name,
userid: data.userid,
templateid: data.templateid,
display_period: data.display_period,
auto_start: data.auto_start
};
this._max_dashboard_pages = max_dashboard_pages;
this._cell_width = cell_width;