From 43af4d544b2492fe44ea5db57c04a607e3417064 Mon Sep 17 00:00:00 2001 From: Nathanael DEMACON Date: Fri, 24 Mar 2023 10:06:57 +0100 Subject: [PATCH 1/2] feat(cockpit): display endpoints separately --- internal/namespaces/cockpit/v1beta1/custom.go | 1 + .../namespaces/cockpit/v1beta1/custom_cockpit.go | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/internal/namespaces/cockpit/v1beta1/custom.go b/internal/namespaces/cockpit/v1beta1/custom.go index 8b93c089a2..5e597c0b9a 100644 --- a/internal/namespaces/cockpit/v1beta1/custom.go +++ b/internal/namespaces/cockpit/v1beta1/custom.go @@ -17,6 +17,7 @@ func GetCommands() *core.Commands { cmds.MustFind("cockpit", "cockpit", "activate").Override(cockpitCockpitActivateBuilder) cmds.MustFind("cockpit", "cockpit", "deactivate").Override(cockpitCockpitDeactivateBuilder) + cmds.MustFind("cockpit", "cockpit", "get").Override(cockpitCockpitGetBuilder) return cmds } diff --git a/internal/namespaces/cockpit/v1beta1/custom_cockpit.go b/internal/namespaces/cockpit/v1beta1/custom_cockpit.go index 2b4781bfae..ae0ae7885e 100644 --- a/internal/namespaces/cockpit/v1beta1/custom_cockpit.go +++ b/internal/namespaces/cockpit/v1beta1/custom_cockpit.go @@ -120,3 +120,17 @@ func cockpitCockpitDeactivateBuilder(command *core.Command) *core.Command { } return command } + +func cockpitCockpitGetBuilder(c *core.Command) *core.Command { + c.View = &core.View{ + Sections: []*core.ViewSection{ + { + Title: "Endpoints", + FieldName: "Endpoints", + }, + }, + } + + return c +} + From 12236a517155611befc8cfeb48c00e20303e43f2 Mon Sep 17 00:00:00 2001 From: Nathanael DEMACON Date: Fri, 24 Mar 2023 10:20:45 +0100 Subject: [PATCH 2/2] gofmt --- internal/namespaces/cockpit/v1beta1/custom_cockpit.go | 1 - 1 file changed, 1 deletion(-) diff --git a/internal/namespaces/cockpit/v1beta1/custom_cockpit.go b/internal/namespaces/cockpit/v1beta1/custom_cockpit.go index ae0ae7885e..112a9dc8d4 100644 --- a/internal/namespaces/cockpit/v1beta1/custom_cockpit.go +++ b/internal/namespaces/cockpit/v1beta1/custom_cockpit.go @@ -133,4 +133,3 @@ func cockpitCockpitGetBuilder(c *core.Command) *core.Command { return c } -