format task status: improve replace() usage

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fabian Ebner 2021-04-09 10:44:32 +02:00 committed by Thomas Lamprecht
parent 9865b73e56
commit 9b4b243aa1

View File

@ -743,8 +743,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;
}