Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
3c966caa
Commit
3c966caa
authored
Sep 15, 2016
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(cli): download all plugin dependencies
parent
fc67ab1d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
pkg/cmd/grafana-cli/commands/install_command.go
+3
-3
pkg/cmd/grafana-cli/models/model.go
+3
-3
No files found.
pkg/cmd/grafana-cli/commands/install_command.go
View file @
3c966caa
...
...
@@ -14,6 +14,7 @@ import (
"strings"
"github.com/fatih/color"
"github.com/grafana/grafana-cli/pkg/log"
"github.com/grafana/grafana/pkg/cmd/grafana-cli/logger"
m
"github.com/grafana/grafana/pkg/cmd/grafana-cli/models"
s
"github.com/grafana/grafana/pkg/cmd/grafana-cli/services"
...
...
@@ -90,13 +91,12 @@ func InstallPlugin(pluginName, version string, c CommandLine) error {
logger
.
Infof
(
"%s Installed %s successfully
\n
"
,
color
.
GreenString
(
"✔"
),
plugin
.
Id
)
/* Enable once we need support for downloading depedencies
res
,
_
:=
s
.
ReadPlugin
(
pluginFolder
,
pluginName
)
for _, v := range res.Dependenc
y
.Plugins {
for
_
,
v
:=
range
res
.
Dependenc
ies
.
Plugins
{
InstallPlugin
(
v
.
Id
,
version
,
c
)
log
.
Infof
(
"Installed dependency: %v ✔
\n
"
,
v
.
Id
)
}
*/
return
err
}
...
...
pkg/cmd/grafana-cli/models/model.go
View file @
3c966caa
...
...
@@ -9,11 +9,11 @@ type InstalledPlugin struct {
Name
string
`json:"name"`
Type
string
`json:"type"`
Info
PluginInfo
`json:"info"`
Dependenc
y
Dependency
`json:"dependencies"`
Info
PluginInfo
`json:"info"`
Dependenc
ies
Dependencies
`json:"dependencies"`
}
type
Dependenc
y
struct
{
type
Dependenc
ies
struct
{
GrafanaVersion
string
`json:"grafanaVersion"`
Plugins
[]
Plugin
`json:"plugins"`
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment