[pve-devel] [PATCH v3 proxmox-backup 1/1] ui: tasks: use format_task_status

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


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

No changes from v2.

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

diff --git a/www/panel/Tasks.js b/www/panel/Tasks.js
index a194e478..a64e0eee 100644
--- a/www/panel/Tasks.js
+++ b/www/panel/Tasks.js
@@ -372,14 +372,7 @@ Ext.define('PBS.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 pve-devel mailing list