diff --git a/internal/namespaces/cockpit/v1beta1/custom.go b/internal/namespaces/cockpit/v1beta1/custom.go index 8b93c089a2..df191d73e0 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", "token", "get").Override(cockpitTokenGetBuilder) return cmds } diff --git a/internal/namespaces/cockpit/v1beta1/custom_cockpit.go b/internal/namespaces/cockpit/v1beta1/custom_cockpit.go index 2b4781bfae..3540c24ce0 100644 --- a/internal/namespaces/cockpit/v1beta1/custom_cockpit.go +++ b/internal/namespaces/cockpit/v1beta1/custom_cockpit.go @@ -120,3 +120,16 @@ func cockpitCockpitDeactivateBuilder(command *core.Command) *core.Command { } return command } + +func cockpitTokenGetBuilder(c *core.Command) *core.Command { + c.View = &core.View{ + Sections: []*core.ViewSection{ + { + Title: "Scopes", + FieldName: "Scopes", + }, + }, + } + + return c +}