mirror of
https://github.com/openziti/zrok.git
synced 2025-08-09 08:05:04 +02:00
remove service03 type; consolidated service type (#119)
This commit is contained in:
@ -45,22 +45,30 @@ func overviewHandler(_ metadata.OverviewParams, principal *rest_model_zrok.Princ
|
||||
return metadata.NewOverviewInternalServerError()
|
||||
}
|
||||
for _, svc := range svcs {
|
||||
fe := ""
|
||||
feEndpoint := ""
|
||||
if svc.FrontendEndpoint != nil {
|
||||
fe = *svc.FrontendEndpoint
|
||||
feEndpoint = *svc.FrontendEndpoint
|
||||
}
|
||||
be := ""
|
||||
feSelection := ""
|
||||
if svc.FrontendSelection != nil {
|
||||
feSelection = *svc.FrontendSelection
|
||||
}
|
||||
beProxyEndpoint := ""
|
||||
if svc.BackendProxyEndpoint != nil {
|
||||
be = *svc.BackendProxyEndpoint
|
||||
beProxyEndpoint = *svc.BackendProxyEndpoint
|
||||
}
|
||||
es.Services = append(es.Services, &rest_model_zrok.Service{
|
||||
CreatedAt: svc.CreatedAt.UnixMilli(),
|
||||
FrontendEndpoint: fe,
|
||||
BackendProxyEndpoint: be,
|
||||
UpdatedAt: svc.UpdatedAt.UnixMilli(),
|
||||
ZID: svc.ZId,
|
||||
Token: svc.Token,
|
||||
ZID: svc.ZId,
|
||||
ShareMode: svc.ShareMode,
|
||||
BackendMode: svc.BackendMode,
|
||||
FrontendSelection: feSelection,
|
||||
FrontendEndpoint: feEndpoint,
|
||||
BackendProxyEndpoint: beProxyEndpoint,
|
||||
Reserved: svc.Reserved,
|
||||
Metrics: sparkData[svc.Token],
|
||||
CreatedAt: svc.CreatedAt.UnixMilli(),
|
||||
UpdatedAt: svc.UpdatedAt.UnixMilli(),
|
||||
})
|
||||
}
|
||||
out = append(out, es)
|
||||
|
Reference in New Issue
Block a user