[pdm-devel] [PATCH yew-comp 1/2] tasks: don't mark running tasks from pve with 'error' color

Dominik Csapak d.csapak at proxmox.com
Tue Mar 18 15:32:50 CET 2025


running tasks from the PVE tasks API have 'RUNNING' in their status
field (in contrast to e.g. the PBS API) instead of nothing. To not mark
them with an error color, we have to make an exception for this here.

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 src/tasks.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tasks.rs b/src/tasks.rs
index 1b65c8e..499f5b9 100644
--- a/src/tasks.rs
+++ b/src/tasks.rs
@@ -172,7 +172,7 @@ impl LoadableComponent for ProxmoxTasks {
                     if status != "OK" {
                         if status.starts_with("WARNINGS:") {
                             args.add_class("pwt-color-warning");
-                        } else {
+                        } else if status != "RUNNING" {
                             args.add_class("pwt-color-error");
                         }
                     }
-- 
2.39.5





More information about the pdm-devel mailing list