input-enrichment.js: Add method `update()`

This commit is contained in:
Johannes Meyer 2020-11-06 11:35:38 +01:00
parent 67de8a079a
commit dc5e39ef1c
1 changed files with 10 additions and 0 deletions

View File

@ -39,6 +39,16 @@
};
InputEnrichment.prototype = new Icinga.EventListener();
/**
* @param data
*/
InputEnrichment.prototype.update = function (data) {
var input = document.querySelector(data[0]);
if (input !== null && this._enrichments.has(input)) {
this._enrichments.get(input).updateTerms(data[1]);
}
};
/**
* @param event
* @param content