Source
overlay.$dialogue[0].addEventListener('dialogue.close', this._events.editWidgetPropertiesClose, {once: true});
/*
** Zabbix
** Copyright (C) 2001-2023 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.
**/
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 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_min_rows,
widget_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,