From 4afd5b2f9da9c8f51e8d0ed066dcda1317a75499 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 25 May 2020 18:20:24 +0200 Subject: [PATCH] utils: task descriptions: allow to add/override entries Allows having only the common ones here, and more special ones in the per product code. Sometimes there are simple worker IDs which can have a very different meaning for one product, with this that clash can be resolved in a standardized way. Signed-off-by: Thomas Lamprecht --- Utils.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Utils.js b/Utils.js index 456c2e3..f4e70b5 100644 --- a/Utils.js +++ b/Utils.js @@ -552,6 +552,13 @@ Ext.define('Proxmox.Utils', { utilities: { zfscreate: [ gettext('ZFS Storage'), gettext('Create') ] }, + // to add or change existing for product specific ones + override_task_descriptions: function(extra) { + for (const [key, value] of Object.entries(extra)) { + Proxmox.Utils.task_desc_table[key] = value; + } + }, + format_task_description: function(type, id) { var farray = Proxmox.Utils.task_desc_table[type]; var text;