mirror of
https://github.com/grafana/grafana.git
synced 2025-01-09 23:53:25 -06:00
feat(cli): make all plugin commands subcommands
This commit is contained in:
parent
273311eed2
commit
7f8643efde
@ -17,30 +17,30 @@ On Linux systems the grafana-cli will assume that the grafana plugin directory i
|
||||
|
||||
List available plugins
|
||||
```
|
||||
grafana-cli list-remote
|
||||
grafana-cli plugins list-remote
|
||||
```
|
||||
|
||||
Install a plugin type
|
||||
```
|
||||
grafana-cli install <plugin-id>
|
||||
grafana-cli plugins install <plugin-id>
|
||||
```
|
||||
|
||||
List installed plugins
|
||||
```
|
||||
grafana-cli ls
|
||||
grafana-cli plugins ls
|
||||
```
|
||||
|
||||
Upgrade all installed plugins
|
||||
```
|
||||
grafana-cli upgrade-all
|
||||
grafana-cli plugins upgrade-all
|
||||
```
|
||||
|
||||
Upgrade one plugin
|
||||
```
|
||||
grafana-cli upgrade <plugin-id>
|
||||
grafana-cli plugins upgrade <plugin-id>
|
||||
```
|
||||
|
||||
Remove one plugin
|
||||
```
|
||||
grafana-cli remove <plugin-id>
|
||||
grafana-cli plugins remove <plugin-id>
|
||||
```
|
||||
|
@ -22,7 +22,7 @@ func runCommand(command func(commandLine CommandLine) error) func(context *cli.C
|
||||
}
|
||||
}
|
||||
|
||||
var Commands = []cli.Command{
|
||||
var pluginCommands = []cli.Command{
|
||||
{
|
||||
Name: "install",
|
||||
Usage: "install <plugin name>",
|
||||
@ -49,3 +49,11 @@ var Commands = []cli.Command{
|
||||
Action: runCommand(removeCommand),
|
||||
},
|
||||
}
|
||||
|
||||
var Commands = []cli.Command{
|
||||
{
|
||||
Name: "plugins",
|
||||
Usage: "Manage plugins for grafana",
|
||||
Subcommands: pluginCommands,
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user