Skip to content

Commit

Permalink
update pull-dashboard cmd with missing tag flag (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
runz0rd authored Oct 15, 2021
1 parent ed7caf3 commit ffe4153
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ var pullDashboardsCmd = &cobra.Command{
Use: "pull-dashboards",
Short: "Pull grafana dashboards in to the directory",
Long: `Save to the directory grafana dashboards.
Directory name specified by flag --directory. If flag --tags is used,
additional directory will be created with tag name creating structure like directory/tag`,
Directory name specified by flag --directory. If flag --tag is used,
only dashboards with given tag are pulled`,
Run: func(cmd *cobra.Command, args []string) {
var (
folderId int
Expand Down Expand Up @@ -201,9 +201,9 @@ func init() {
pullDataSourcesCmd.PersistentFlags().StringP("tag", "t", "", "Dashboard tag to read")
pushDashboardsCmd.PersistentFlags().IntP("folderId", "f", 0, "Directory Id to which push dashboards")
pushDashboardsCmd.PersistentFlags().StringP("folderName", "n", "", "Directory name to which push dashboards")

pullDashboardsCmd.PersistentFlags().IntP("folderId", "f", -1, "Directory Id from which pull dashboards")
pullDashboardsCmd.PersistentFlags().StringP("folderName", "n", "", "Directory name from which pull dashboards")
pullDashboardsCmd.PersistentFlags().StringP("tag", "t", "", "Dashboard tag to p")

if err := viper.BindPFlag("apikey", rootCmd.PersistentFlags().Lookup("apikey")); err != nil {
log.Println(err)
Expand Down

0 comments on commit ffe4153

Please sign in to comment.