mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 19:14:19 +08:00
Add basic resource trimming command (#41780)
* Add basic trim command * Indent properly * Actually apply defaults if the user asks for it
This commit is contained in:
@ -214,6 +214,22 @@ so must be recompiled to validate newly-added CUE files.`,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "trim-resource",
|
||||
Usage: "trim schema-specified defaults from a resource",
|
||||
Action: runCueCommand(cmd.trimResource),
|
||||
Flags: []cli.Flag{
|
||||
&cli.StringFlag{
|
||||
Name: "dashboard",
|
||||
Usage: "path to file containing (valid) dashboard JSON",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "apply",
|
||||
Usage: "invert the operation: apply defaults instead of trimming them",
|
||||
Value: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "gen-ts",
|
||||
Usage: "generate TypeScript from all known CUE file types",
|
||||
|
Reference in New Issue
Block a user