From 23ae2d3abc3be289cd68fc1ec18b7b6fd7ec5c3a Mon Sep 17 00:00:00 2001 From: Ricardo Weir Date: Mon, 13 Feb 2023 16:22:11 -0700 Subject: [PATCH] Revert client change Prior, table client configs were mistakenly swapped out for regular client configs. This caused requests using these methods to no longer return table column data under metadata.fields. Consequently, table data was blank in the dashboard UI. Now, the client config swap has been reverted and table fields should be populated in the dashboard UI. --- pkg/client/factory.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/client/factory.go b/pkg/client/factory.go index 09c3f8f..bec38ef 100644 --- a/pkg/client/factory.go +++ b/pkg/client/factory.go @@ -124,37 +124,37 @@ func (p *Factory) AdminClient(ctx *types.APIRequest, s *types.APISchema, namespa } func (p *Factory) ClientForWatch(ctx *types.APIRequest, s *types.APISchema, namespace string, warningHandler rest.WarningHandler) (dynamic.ResourceInterface, error) { - return newClient(ctx, p.clientCfg, s, namespace, p.impersonate, warningHandler) + return newClient(ctx, p.watchClientCfg, s, namespace, p.impersonate, warningHandler) } func (p *Factory) AdminClientForWatch(ctx *types.APIRequest, s *types.APISchema, namespace string, warningHandler rest.WarningHandler) (dynamic.ResourceInterface, error) { - return newClient(ctx, p.clientCfg, s, namespace, false, warningHandler) + return newClient(ctx, p.watchClientCfg, s, namespace, false, warningHandler) } func (p *Factory) TableClient(ctx *types.APIRequest, s *types.APISchema, namespace string, warningHandler rest.WarningHandler) (dynamic.ResourceInterface, error) { if attributes.Table(s) { - return newClient(ctx, p.clientCfg, s, namespace, p.impersonate, warningHandler) + return newClient(ctx, p.tableClientCfg, s, namespace, p.impersonate, warningHandler) } return p.Client(ctx, s, namespace, warningHandler) } func (p *Factory) TableAdminClient(ctx *types.APIRequest, s *types.APISchema, namespace string, warningHandler rest.WarningHandler) (dynamic.ResourceInterface, error) { if attributes.Table(s) { - return newClient(ctx, p.clientCfg, s, namespace, false, warningHandler) + return newClient(ctx, p.tableClientCfg, s, namespace, false, warningHandler) } return p.AdminClient(ctx, s, namespace, warningHandler) } func (p *Factory) TableClientForWatch(ctx *types.APIRequest, s *types.APISchema, namespace string, warningHandler rest.WarningHandler) (dynamic.ResourceInterface, error) { if attributes.Table(s) { - return newClient(ctx, p.clientCfg, s, namespace, p.impersonate, warningHandler) + return newClient(ctx, p.tableWatchClientCfg, s, namespace, p.impersonate, warningHandler) } return p.ClientForWatch(ctx, s, namespace, warningHandler) } func (p *Factory) TableAdminClientForWatch(ctx *types.APIRequest, s *types.APISchema, namespace string, warningHandler rest.WarningHandler) (dynamic.ResourceInterface, error) { if attributes.Table(s) { - return newClient(ctx, p.clientCfg, s, namespace, false, warningHandler) + return newClient(ctx, p.tableWatchClientCfg, s, namespace, false, warningHandler) } return p.AdminClientForWatch(ctx, s, namespace, warningHandler) }