Help us shape the future of Go! Take the 2026 Go Developer Survey

dashboard

package
v0.28.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommandAdd = &cli.Command{
	Name:        "dashboard",
	Description: "Use this command to add a dashboard.",
	Usage:       "Add a new dashboard from the provided configuration",
	Action:      add,
	Flags: []cli.Flag{

		&cli.StringFlag{
			Sources: cli.EnvVars("VELA_DASHBOARD_NAME", "DASHBOARD_NAME"),
			Name:    "name",
			Usage:   "provide the name for the dashboard",
		},
		&cli.StringSliceFlag{
			Sources: cli.EnvVars("VELA_DASHBOARD_REPOS", "DASHBOARD_REPOS"),
			Name:    "repos",
			Aliases: []string{"add-repos"},
			Usage:   "provide the list of repositories (org/repo) for the dashboard",
		},
		&cli.StringSliceFlag{
			Sources: cli.EnvVars("VELA_DASHBOARD_REPOS_BRANCH", "DASHBOARD_REPOS_BRANCH"),
			Name:    "branches",
			Aliases: []string{"branch"},
			Usage:   "filter builds in all repositories by branch",
		},
		&cli.StringSliceFlag{
			Sources: cli.EnvVars("VELA_DASHBOARD_REPOS_EVENT", "DASHBOARD_REPOS_EVENT"),
			Name:    "events",
			Aliases: []string{"event"},
			Usage:   "filter builds in all repositories by event",
		},
		&cli.StringSliceFlag{
			Sources: cli.EnvVars("VELA_DASHBOARD_ADMINS", "DASHBOARD_ADMINS"),
			Name:    "admins",
			Usage:   "provide the list of admins for the dashboard",
		},

		&cli.StringFlag{
			Sources: cli.EnvVars("VELA_OUTPUT", "REPO_OUTPUT"),
			Name:    internal.FlagOutput,
			Aliases: []string{"op"},
			Usage:   "format the output in json, spew or yaml",
		},
	},
	CustomHelpTemplate: fmt.Sprintf(`%s
EXAMPLES:
  1. Add a dashboard.
    $ {{.FullName}} --name my-dashboard
  2. Add a dashboard with repositories.
    $ {{.FullName}} --name my-dashboard --repos Org-1/Repo-1,Org-2/Repo-2
  3. Add a dashboard with repositories filtering builds by pushes to main.
    $ {{.FullName}} --name my-dashboard --repos Org-1/Repo-1,Org-2/Repo-2 --branch main --event push
  4. Add a dashboard with multiple admins.
    $ {{.FullName}} --name my-dashboard --admins JohnDoe,JaneDoe

DOCUMENTATION:

  https://go-vela.github.io/docs/reference/cli/dashboard/add/
`, cli.CommandHelpTemplate),
}

CommandAdd defines the command for creating a dashboard.

View Source
var CommandGet = &cli.Command{
	Name:        "dashboard",
	Aliases:     []string{"dashboards"},
	Description: "Use this command to get user dashboards.",
	Usage:       "Get user dashboards from the provided configuration",
	Action:      get,
	Flags: []cli.Flag{

		&cli.BoolFlag{
			Sources: cli.EnvVars("VELA_FULL", "DASHBOARD_FULL"),
			Name:    "full",
			Usage:   "output the repo and build information for the dashboard",
		},

		&cli.StringFlag{
			Sources: cli.EnvVars("VELA_OUTPUT", "DASHBOARD_OUTPUT"),
			Name:    internal.FlagOutput,
			Aliases: []string{"op"},
			Usage:   "format the output in json, spew or yaml",
		},
	},
	CustomHelpTemplate: fmt.Sprintf(`%s
EXAMPLES:
  1. Get user dashboards.
    $ {{.FullName}}
  2. Get user dashboards with repo and build information.
    $ {{.FullName}} --full

DOCUMENTATION:

  https://go-vela.github.io/docs/reference/cli/dashboard/get/
`, cli.CommandHelpTemplate),
}

CommandGet defines the command for viewing all user dashboards.

View Source
var CommandUpdate = &cli.Command{
	Name:        "dashboard",
	Description: "Use this command to update a dashboard.",
	Usage:       "Update a dashboard from the provided configuration",
	Action:      update,
	Flags: []cli.Flag{

		&cli.StringFlag{
			Sources: cli.EnvVars("VELA_DASHBOARD_ID", "DASHBOARD_ID"),
			Name:    "id",
			Usage:   "provide the uuid for the dashboard",
		},
		&cli.StringFlag{
			Sources: cli.EnvVars("VELA_DASHBOARD_NAME", "DASHBOARD_NAME"),
			Name:    "name",
			Usage:   "provide the name for the dashboard",
		},
		&cli.StringSliceFlag{
			Sources: cli.EnvVars("VELA_DASHBOARD_ADD_REPOS", "DASHBOARD_ADD_REPOS"),
			Name:    "add-repos",
			Usage:   "provide the list of repositories to add for the dashboard",
		},
		&cli.StringSliceFlag{
			Sources: cli.EnvVars("VELA_DASHBOARD_DROP_REPOS", "DASHBOARD_DROP_REPOS"),
			Name:    "drop-repos",
			Usage:   "provide the list of repositories to remove from the dashboard",
		},
		&cli.StringSliceFlag{
			Sources: cli.EnvVars("VELA_DASHBOARD_TARGET_REPOS", "DASHBOARD_TARGET_REPOS"),
			Name:    "target-repos",
			Usage:   "provide the list of repositories to target for updates for the dashboard",
		},
		&cli.StringSliceFlag{
			Sources: cli.EnvVars("VELA_DASHBOARD_ADD_ADMINS", "DASHBOARD_ADD_ADMINS"),
			Name:    "add-admins",
			Usage:   "provide the list of admins to add for the dashboard",
		},
		&cli.StringSliceFlag{
			Sources: cli.EnvVars("VELA_DASHBOARD_DROP_ADMINS", "DASHBOARD_DROP_ADMINS"),
			Name:    "drop-admins",
			Usage:   "provide the list of admins to remove from the dashboard",
		},
		&cli.StringSliceFlag{
			Sources: cli.EnvVars("VELA_DASHBOARD_REPOS_BRANCH", "DASHBOARD_REPOS_BRANCH"),
			Name:    "branches",
			Aliases: []string{"branch"},
			Usage:   "filter builds in all repositories by branch",
		},
		&cli.StringSliceFlag{
			Sources: cli.EnvVars("VELA_DASHBOARD_REPOS_EVENT", "DASHBOARD_REPOS_EVENT"),
			Name:    "events",
			Aliases: []string{"event"},
			Usage:   "filter builds in all repositories by event",
		},

		&cli.StringFlag{
			Sources: cli.EnvVars("VELA_OUTPUT", "REPO_OUTPUT"),
			Name:    internal.FlagOutput,
			Aliases: []string{"op"},
			Usage:   "format the output in json, spew or yaml",
		},
	},
	CustomHelpTemplate: fmt.Sprintf(`%s
EXAMPLES:
  1. Update a dashboard to add a repository.
    $ {{.FullName}} --id c8da1302-07d6-11ea-882f-4893bca275b8 --add-repos Org-1/Repo-1
  2. Update a dashboard to remove a repository.
    $ {{.FullName}} --id c8da1302-07d6-11ea-882f-4893bca275b8 --drop-repos Org-1/Repo-1
  3. Update a dashboard to add event and branch filters to specific repositories.
    $ {{.FullName}} --id c8da1302-07d6-11ea-882f-4893bca275b8 --target-repos Org-1/Repo-1,Org-2/Repo-2 --branches main --events push
  4. Update a dashboard to change the name.
    $ {{.FullName}} --id c8da1302-07d6-11ea-882f-4893bca275b8 --name MyDashboard
  5. Update a dashboard to add an admin.
    $ {{.FullName}} --id c8da1302-07d6-11ea-882f-4893bca275b8 --add-admins JohnDoe
  6. Update a dashboard to remove an admin.
    $ {{.FullName}} --id c8da1302-07d6-11ea-882f-4893bca275b8 --drop-admins JohnDoe

DOCUMENTATION:

  https://go-vela.github.io/docs/reference/cli/dashboard/update/
`, cli.CommandHelpTemplate),
}

CommandUpdate defines the command for updating a dashboard.

View Source
var CommandView = &cli.Command{
	Name:        "dashboard",
	Description: "Use this command to view a dashboard.",
	Usage:       "View a dashboard from the provided configuration",
	Action:      view,
	Flags: []cli.Flag{

		&cli.StringFlag{
			Sources: cli.EnvVars("VELA_DASHBOARD_ID", "DASHBOARD_ID"),
			Name:    "id",
			Usage:   "provide the uuid for the dashboard",
		},

		&cli.BoolFlag{
			Sources: cli.EnvVars("VELA_FULL", "DASHBOARD_FULL"),
			Name:    "full",
			Usage:   "output the repo and build information for the dashboard",
		},
		&cli.StringFlag{
			Sources: cli.EnvVars("VELA_OUTPUT", "REPO_OUTPUT"),
			Name:    internal.FlagOutput,
			Aliases: []string{"op"},
			Usage:   "format the output in json, spew or yaml",
		},
	},
	CustomHelpTemplate: fmt.Sprintf(`%s
EXAMPLES:
  1. View a dashboard.
    $ {{.FullName}} --id c8da1302-07d6-11ea-882f-4893bca275b8
  2. View a dashboard with repo and build information.
    $ {{.FullName}} --id c8da1302-07d6-11ea-882f-4893bca275b8 --full

DOCUMENTATION:

  https://go-vela.github.io/docs/reference/cli/dashboard/view/
`, cli.CommandHelpTemplate),
}

CommandView defines the command for viewing a dashboard.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL