瀏覽代碼

set Health value to Status if existent

Check if Health has any value and save it to be displayed.
If Health is empty, continue as normal.
Thales 1 年之前
父節點
當前提交
34137419ed
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      backend/stack.ts

+ 5 - 1
backend/stack.ts

@@ -351,7 +351,11 @@ export class Stack {
         for (let line of lines) {
             try {
                 let obj = JSON.parse(line);
-                statusList.set(obj.Service, obj.State);
+                if (obj.Health === "") {
++                       statusList.set(obj.Service, obj.State);
++               } else {
++                       statusList.set(obj.Service, obj.Health);
++               }
             } catch (e) {
             }
         }