9
9
10
10
"github.com/gizak/termui/v3/widgets"
11
11
"github.com/pkg/errors"
12
+
13
+ "github.com/rs/zerolog/log"
12
14
"github.com/threefoldtech/zbus"
13
15
"github.com/threefoldtech/zos/pkg/app"
14
16
"github.com/threefoldtech/zos/pkg/environment"
@@ -54,6 +56,14 @@ func headerRenderer(ctx context.Context, c zbus.Client, h *widgets.Paragraph, r
54
56
}
55
57
56
58
go func () {
59
+ registrarLable := "registrar"
60
+ zui := stubs .NewZUIStub (c )
61
+
62
+ // empty out zui errors for registrar
63
+ if zuiErr := zui .PushErrors (ctx , registrarLable , []string {}); zuiErr != nil {
64
+ log .Info ().Err (zuiErr ).Send ()
65
+ }
66
+
57
67
farmID , _ := identity .FarmID (ctx )
58
68
for version := range ch {
59
69
var name string
@@ -69,15 +79,18 @@ func headerRenderer(ctx context.Context, c zbus.Client, h *widgets.Paragraph, r
69
79
if isInProgressError (err ) {
70
80
nodeID = green (err .Error ())
71
81
} else {
72
- nodeID = red (err .Error ())
82
+ nodeID = red (fmt .Sprintf ("%d (unregistered)" , node ))
83
+ if zuiErr := zui .PushErrors (ctx , registrarLable , []string {err .Error ()}); zuiErr != nil {
84
+ log .Info ().Err (zuiErr ).Send ()
85
+ }
73
86
}
74
87
} else {
75
88
nodeID = green (fmt .Sprint (node ))
76
89
}
77
90
78
91
cache := green ("OK" )
79
92
if app .CheckFlag (app .LimitedCache ) {
80
- cache = red ("no ssd disks detected" )
93
+ cache = red ("no ssd disks detected, running on hdd-only mode " )
81
94
} else if app .CheckFlag (app .ReadonlyCache ) {
82
95
cache = red ("cache is read-only" )
83
96
}
0 commit comments