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
5bbe047e
Commit
5bbe047e
authored
Feb 16, 2018
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "removes dependencies install for plugins"
This reverts commit
47e363ea
.
parent
3b04efa4
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletions
+21
-1
pkg/cmd/grafana-cli/commands/install_command.go
+8
-1
pkg/cmd/grafana-cli/models/model.go
+1
-0
pkg/plugins/models.go
+12
-0
No files found.
pkg/cmd/grafana-cli/commands/install_command.go
View file @
5bbe047e
...
...
@@ -91,7 +91,14 @@ func InstallPlugin(pluginName, version string, c CommandLine) error {
}
logger
.
Infof
(
"%s Installed %s successfully
\n
"
,
color
.
GreenString
(
"✔"
),
pluginName
)
return
nil
res
,
_
:=
s
.
ReadPlugin
(
pluginFolder
,
pluginName
)
for
_
,
v
:=
range
res
.
Dependencies
.
Plugins
{
InstallPlugin
(
v
.
Id
,
version
,
c
)
logger
.
Infof
(
"Installed dependency: %v ✔
\n
"
,
v
.
Id
)
}
return
err
}
func
SelectVersion
(
plugin
m
.
Plugin
,
version
string
)
(
m
.
Version
,
error
)
{
...
...
pkg/cmd/grafana-cli/models/model.go
View file @
5bbe047e
...
...
@@ -15,6 +15,7 @@ type InstalledPlugin struct {
type
Dependencies
struct
{
GrafanaVersion
string
`json:"grafanaVersion"`
Plugins
[]
Plugin
`json:"plugins"`
}
type
PluginInfo
struct
{
...
...
pkg/plugins/models.go
View file @
5bbe047e
...
...
@@ -59,6 +59,10 @@ func (pb *PluginBase) registerPlugin(pluginDir string) error {
plog
.
Info
(
"Registering plugin"
,
"name"
,
pb
.
Name
)
}
if
len
(
pb
.
Dependencies
.
Plugins
)
==
0
{
pb
.
Dependencies
.
Plugins
=
[]
PluginDependencyItem
{}
}
if
pb
.
Dependencies
.
GrafanaVersion
==
""
{
pb
.
Dependencies
.
GrafanaVersion
=
"*"
}
...
...
@@ -76,6 +80,7 @@ func (pb *PluginBase) registerPlugin(pluginDir string) error {
type
PluginDependencies
struct
{
GrafanaVersion
string
`json:"grafanaVersion"`
Plugins
[]
PluginDependencyItem
`json:"plugins"`
}
type
PluginInclude
struct
{
...
...
@@ -91,6 +96,13 @@ type PluginInclude struct {
Id
string
`json:"-"`
}
type
PluginDependencyItem
struct
{
Type
string
`json:"type"`
Id
string
`json:"id"`
Name
string
`json:"name"`
Version
string
`json:"version"`
}
type
PluginInfo
struct
{
Author
PluginInfoLink
`json:"author"`
Description
string
`json:"description"`
...
...
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