Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions pkg/cmd/project/view/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,6 @@ func viewRun(opts *ViewOptions) error {
return err
}

// Use basic format as default for project view when no -f flag is specified
if !opts.Command.Flags().Changed(constants.FlagOutputFormat) {
opts.Command.Flags().Set(constants.FlagOutputFormat, constants.OutputFormatBasic)
}

return output.PrintResource(project, opts.Command, output.Mappers[*projects.Project]{
Json: func(p *projects.Project) any {
cacBranch := "Not version controlled"
Expand Down
5 changes: 0 additions & 5 deletions pkg/cmd/projectgroup/view/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,6 @@ func viewRun(opts *ViewOptions) error {
return err
}

// Use basic format as default for project group view when no -f flag is specified
if !opts.Command.Flags().Changed(constants.FlagOutputFormat) {
opts.Command.Flags().Set(constants.FlagOutputFormat, constants.OutputFormatBasic)
}

return output.PrintResource(projectGroup, opts.Command, output.Mappers[*projectgroups.ProjectGroup]{
Json: func(pg *projectgroups.ProjectGroup) any {
projectList := make([]ProjectInfo, 0, len(projects))
Expand Down
5 changes: 0 additions & 5 deletions pkg/cmd/space/view/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,6 @@ func viewRun(opts *ViewOptions) error {
return err
}

// Use basic format as default for space view when no -f flag is specified
if !opts.Command.Flags().Changed(constants.FlagOutputFormat) {
opts.Command.Flags().Set(constants.FlagOutputFormat, constants.OutputFormatBasic)
}

host := opts.Host
return output.PrintResource(space, opts.Command, output.Mappers[*spaces.Space]{
Json: func(item *spaces.Space) any {
Expand Down
7 changes: 4 additions & 3 deletions pkg/machinescommon/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"github.com/OctopusDeploy/cli/pkg/cmd"
"github.com/OctopusDeploy/cli/pkg/output"
"github.com/OctopusDeploy/cli/pkg/util"
"github.com/OctopusDeploy/cli/pkg/util/flag"
"github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/machines"
"github.com/OctopusDeploy/go-octopusdeploy/v2/pkg/workerpools"
Expand Down Expand Up @@ -31,17 +32,17 @@ func RegisterWebFlag(cmd *cobra.Command, flags *WebFlags) {
}

func DoWebForTargets(target *machines.DeploymentTarget, dependencies *cmd.Dependencies, flags *WebFlags, description string) {
url := fmt.Sprintf("%s/app#/%s/infrastructure/machines/%s/settings", dependencies.Host, dependencies.Space.GetID(), target.GetID())
url := util.GenerateWebURL(dependencies.Host, dependencies.Space.GetID(), fmt.Sprintf("infrastructure/machines/%s/settings", target.GetID()))
doWeb(url, description, dependencies.Out, flags)
}

func DoWebForWorkers(worker *machines.Worker, dependencies *cmd.Dependencies, flags *WebFlags, description string) {
url := fmt.Sprintf("%s/app#/%s/infrastructure/workers/%s/settings", dependencies.Host, dependencies.Space.GetID(), worker.GetID())
url := util.GenerateWebURL(dependencies.Host, dependencies.Space.GetID(), fmt.Sprintf("infrastructure/workers/%s/settings", worker.GetID()))
doWeb(url, description, dependencies.Out, flags)
}

func DoWebForWorkerPools(workerPool workerpools.IWorkerPool, dependencies *cmd.Dependencies, flags *WebFlags) {
url := fmt.Sprintf("%s/app#/%s/infrastructure/workerpools/%s/settings", dependencies.Host, dependencies.Space.GetID(), workerPool.GetID())
url := util.GenerateWebURL(dependencies.Host, dependencies.Space.GetID(), fmt.Sprintf("infrastructure/workerpools/%s", workerPool.GetID()))
doWeb(url, "Worker Pool", dependencies.Out, flags)
}

Expand Down