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

Dietmar Maurer dietmar at proxmox.com
Thu Mar 20 07:25:18 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.

Instead of nothing? 

Would it be more clear to use:

if !(status == "OK" /* PBS */ || status == "RUNNING" /* PVE */)) {

}

> 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
> 
> 
> 
> _______________________________________________
> pdm-devel mailing list
> pdm-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pdm-devel




More information about the pdm-devel mailing list