[pbs-devel] [PATCH v2 widget-toolkit 3/7] format task status: improve replace() usage

Fabian Ebner f.ebner at proxmox.com
Fri Apr 9 10:44:32 CEST 2021


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

New in v2.

 src/Utils.js | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/Utils.js b/src/Utils.js
index 155ef49..1dd227a 100644
--- a/src/Utils.js
+++ b/src/Utils.js
@@ -741,8 +741,7 @@ utilities: {
 	switch (parsed) {
 	    case 'unknown': return Proxmox.Utils.unknownText;
 	    case 'error': return Proxmox.Utils.errorText + ': ' + status;
-	    case 'warning': return Proxmox.Utils.warningsText +
-		status.replace('WARNINGS', '');
+	    case 'warning': return status.replace('WARNINGS', Proxmox.Utils.warningsText);
 	    case 'ok': // fall-through
 	    default: return status;
 	}
-- 
2.20.1






More information about the pbs-devel mailing list