File tree 1 file changed +4
-20
lines changed
internal/pkg/agent/application/gateway/fleet
1 file changed +4
-20
lines changed Original file line number Diff line number Diff line change @@ -231,31 +231,15 @@ func (f *FleetGateway) convertToCheckinComponents(components []runtime.Component
231
231
return nil
232
232
}
233
233
stateString := func (s eaclient.UnitState ) string {
234
- switch s {
235
- case eaclient .UnitStateStarting :
236
- return "STARTING"
237
- case eaclient .UnitStateConfiguring :
238
- return "CONFIGURING"
239
- case eaclient .UnitStateHealthy :
240
- return "HEALTHY"
241
- case eaclient .UnitStateDegraded :
242
- return fleetStateDegraded
243
- case eaclient .UnitStateFailed :
244
- return "FAILED"
245
- case eaclient .UnitStateStopping :
246
- return "STOPPING"
247
- case eaclient .UnitStateStopped :
248
- return "STOPPED"
234
+ if state := s .String (); state != "UNKNOWN" {
235
+ return state
249
236
}
250
237
return ""
251
238
}
252
239
253
240
unitTypeString := func (t eaclient.UnitType ) string {
254
- switch t {
255
- case eaclient .UnitTypeInput :
256
- return "input"
257
- case eaclient .UnitTypeOutput :
258
- return "output"
241
+ if typ := t .String (); typ != "unknown" {
242
+ return typ
259
243
}
260
244
return ""
261
245
}
You can’t perform that action at this time.
0 commit comments