[pbs-devel] [PATCH v3 proxmox-widget-toolkit 1/1] node: tasks: use helper to format status again

Fabian Ebner f.ebner at proxmox.com
Thu Jul 8 11:14:54 CEST 2021


which avoids the all-caps "WARNINGS:" and uses the localized version.
The call was thrown out by the big overhaul in
9e059d560c872f14aef0e586010a6b6a91ce2729.

Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---

New in v3, but essentially restoring the already applied
4294143f92f43c3288304b35de3419b035d38cd2.

 src/node/Tasks.js | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/node/Tasks.js b/src/node/Tasks.js
index aa074b4..c852615 100644
--- a/src/node/Tasks.js
+++ b/src/node/Tasks.js
@@ -435,14 +435,7 @@ Ext.define('Proxmox.node.Tasks', {
 		    return '';
 		}
 
-		let parsed = Proxmox.Utils.parse_task_status(value);
-		switch (parsed) {
-		    case 'unknown': return Proxmox.Utils.unknownText;
-		    case 'error': return Proxmox.Utils.errorText + ': ' + value;
-		    case 'ok': // fall-through
-		    case 'warning': // fall-through
-		    default: return value;
-		}
+		return Proxmox.Utils.format_task_status(value);
 	    },
 	},
     ],
-- 
2.30.2






More information about the pbs-devel mailing list