Browse Source

fix(cli): remove dev text values

bergquist 9 years ago
parent
commit
5adac86b43

+ 2 - 2
pkg/cmd/grafana-cli/commands/commands.go

@@ -22,7 +22,7 @@ func runCommand(command func(commandLine CommandLine) error) func(context *cli.C
 var Commands = []cli.Command{
 	{
 		Name:   "install",
-		Usage:  "installs stuff",
+		Usage:  "installs a plugin",
 		Action: runCommand(installCommand),
 	}, {
 		Name:   "list-remote",
@@ -42,7 +42,7 @@ var Commands = []cli.Command{
 		Action: runCommand(lsCommand),
 	}, {
 		Name:   "remove",
-		Usage:  "removes stuff",
+		Usage:  "removes installed plugin",
 		Action: runCommand(removeCommand),
 	},
 }

+ 2 - 3
pkg/cmd/grafana-cli/commands/install_command.go

@@ -77,10 +77,9 @@ func InstallPlugin(pluginName, pluginFolder, version string) error {
 	res := services.ReadPlugin(pluginFolder, pluginName)
 
 	for _, v := range res.Dependency.Plugins {
-		log.Infof("Depends on %s install!\n", v.Id)
+		log.Infof("Installing Dependency: %s\n", v.Id)
 
-		//Todo: uncomment this code once the repo is more correct.
-		//InstallPlugin(v.Id, pluginFolder, "")
+		InstallPlugin(v.Id, pluginFolder, "")
 	}
 
 	return err

+ 5 - 5
pkg/cmd/grafana-cli/main.go

@@ -11,14 +11,14 @@ import (
 )
 
 func getGrafanaPluginPath() string {
+	//TODO: try to get path from os:env GF_PLUGIN_FOLDER
+
 	os := runtime.GOOS
-	if os == "linux" {
+	if os == "windows" {
+		return "C:\\opt\\grafana\\plugins"
+	} else {
 		return "/var/lib/grafana/plugins"
-	} else if os == "windows" {
-		return "C:\\opt\\grafana\\plugins" // :&
 	}
-
-	return "tmp_do/" //based on your OS!
 }
 
 func main() {