Source
* @return {Promise<any>} Resolved promise will contain item type, or null in case of error or if no item is
<?php declare(strict_types = 0);
/*
** 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/>.
**/
use Widgets\ItemHistory\Includes\CWidgetFieldColumnsList;
?>
window.item_history_column_edit = new class {
/**
* @type {Overlay}
*/
#overlay;
/**
* @type {HTMLElement}
*/
#dialogue;
/**
* @type {HTMLFormElement}
*/
#form;
/**
* @type {string}
*/
#$thresholds_table;
/**
* @type {string}
*/
#highlights_table;
/**
* @type {number|null}
*/
#item_value_type;
init({form_id, templateid, thresholds, highlights, colors, item_value_type, multiselect_item_name}) {
this.#overlay = overlays_stack.getById('item-history-column-edit-overlay');
this.#dialogue = this.#overlay.$dialogue[0];
this.#form = document.getElementById(form_id);
this.#$thresholds_table = document.getElementById('thresholds_table');
this.#highlights_table = document.getElementById('highlights_table');
this.#item_value_type = item_value_type;
let current_item_name = multiselect_item_name;