Source
$(`#operation_optag_${optag.row_index}_tag, #operation_optag_${optag.row_index}_value`).textareaFlexible();
<?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/>.
**/
?>
window.operation_popup = new class {
init({eventsource, recovery_phase, data, scripts_with_warning, actionid}) {
this.recovery_phase = recovery_phase;
this.eventsource = eventsource;
this.overlay = overlays_stack.getById('operations');
this.dialogue = this.overlay.$dialogue[0];
this.form = this.overlay.$dialogue.$body[0].querySelector('form');
this.actionid = actionid;
this.row_index = data.row_index;
this.data = data;
this.scripts_with_warning = scripts_with_warning;
if (document.getElementById('operation-condition-list')) {
this.condition_count = (document.getElementById('operation-condition-list').rows.length - 2);
}
this._loadViews();
this._processTypeOfCalculation();
if (this.data.opconditions.length > 0) {
this.data.opconditions.map((row, index) => {
this._createOperationConditionsRow(row, index);
})
}
}
_loadViews() {
this._customMessageFields();
this.#loadHostTags(this.data.optag);
this._removeAllFields();
const operation_type = document.getElementById('operation-type-select').value;
this.#toggleScriptWarningIcon(operation_type);
this._changeView(operation_type);
document.getElementById('operation-type-select').addEventListener('change', (e) => {
this.#toggleScriptWarningIcon(e.target.value);
this._removeAllFields();
this._changeView(e.target.value);
this._processTypeOfCalculation();
});
this.dialogue.addEventListener('click', (e) => {
if (e.target.classList.contains('operation-condition-list-footer')) {
this._openConditionsPopup(e.target);
}