Source
* Recoverable notification is just partial of raw with one mandatory field - `eventid`. New iterator sequence reflects
/*
** Zabbix
** Copyright (C) 2001-2022 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.
**/
/**
* Represents DOM node for notification list. Stores the collection of ZBX_Notification objects.
*/
function ZBX_NotificationCollection() {
this._dangling_nodes = [];
this._list_sequence = [];
this._list_obj = {};
this.makeNodes();
this.node.style.right = '10px';
this.node.style.top = '0px';
}
/**
* @return {array}
*/
ZBX_NotificationCollection.prototype.getIds = function() {
return this._list_sequence;
};
/**
* @param {callable} callback
*/
ZBX_NotificationCollection.prototype.map = function(callback) {
var len = this._list_sequence.length;
while (--len > -1) {
callback(this.getById(this._list_sequence[len]), len);
}
};
/**
* @param {callable} callback
*
* @return {array}
*/
ZBX_NotificationCollection.prototype.filterList = function(callback) {
var list = [],
len = this._list_sequence.length;
while (--len > -1) {