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
124b21a6
Unverified
Commit
124b21a6
authored
Sep 13, 2018
by
Dan Cech
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use pluginName consistently when upgrading plugins
parent
06855d2b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
pkg/cmd/grafana-cli/commands/upgrade_command.go
+3
-3
pkg/cmd/grafana-cli/services/services.go
+2
-2
No files found.
pkg/cmd/grafana-cli/commands/upgrade_command.go
View file @
124b21a6
...
@@ -16,7 +16,7 @@ func upgradeCommand(c CommandLine) error {
...
@@ -16,7 +16,7 @@ func upgradeCommand(c CommandLine) error {
return
err
return
err
}
}
v
,
err2
:=
s
.
GetPlugin
(
localPlugin
.
Id
,
c
.
RepoDirectory
())
v
,
err2
:=
s
.
GetPlugin
(
pluginName
,
c
.
RepoDirectory
())
if
err2
!=
nil
{
if
err2
!=
nil
{
return
err2
return
err2
...
@@ -24,9 +24,9 @@ func upgradeCommand(c CommandLine) error {
...
@@ -24,9 +24,9 @@ func upgradeCommand(c CommandLine) error {
if
ShouldUpgrade
(
localPlugin
.
Info
.
Version
,
v
)
{
if
ShouldUpgrade
(
localPlugin
.
Info
.
Version
,
v
)
{
s
.
RemoveInstalledPlugin
(
pluginsDir
,
pluginName
)
s
.
RemoveInstalledPlugin
(
pluginsDir
,
pluginName
)
return
InstallPlugin
(
localPlugin
.
Id
,
""
,
c
)
return
InstallPlugin
(
pluginName
,
""
,
c
)
}
}
logger
.
Infof
(
"%s %s is up to date
\n
"
,
color
.
GreenString
(
"✔"
),
localPlugin
.
Id
)
logger
.
Infof
(
"%s %s is up to date
\n
"
,
color
.
GreenString
(
"✔"
),
pluginName
)
return
nil
return
nil
}
}
pkg/cmd/grafana-cli/services/services.go
View file @
124b21a6
...
@@ -63,7 +63,7 @@ func ListAllPlugins(repoUrl string) (m.PluginRepo, error) {
...
@@ -63,7 +63,7 @@ func ListAllPlugins(repoUrl string) (m.PluginRepo, error) {
var
data
m
.
PluginRepo
var
data
m
.
PluginRepo
err
=
json
.
Unmarshal
(
body
,
&
data
)
err
=
json
.
Unmarshal
(
body
,
&
data
)
if
err
!=
nil
{
if
err
!=
nil
{
logger
.
Info
(
"Failed to unmarshal
graphite
response error:"
,
err
)
logger
.
Info
(
"Failed to unmarshal
plugin repo
response error:"
,
err
)
return
m
.
PluginRepo
{},
err
return
m
.
PluginRepo
{},
err
}
}
...
@@ -140,7 +140,7 @@ func GetPlugin(pluginId, repoUrl string) (m.Plugin, error) {
...
@@ -140,7 +140,7 @@ func GetPlugin(pluginId, repoUrl string) (m.Plugin, error) {
var
data
m
.
Plugin
var
data
m
.
Plugin
err
=
json
.
Unmarshal
(
body
,
&
data
)
err
=
json
.
Unmarshal
(
body
,
&
data
)
if
err
!=
nil
{
if
err
!=
nil
{
logger
.
Info
(
"Failed to unmarshal
graphite
response error:"
,
err
)
logger
.
Info
(
"Failed to unmarshal
plugin repo
response error:"
,
err
)
return
m
.
Plugin
{},
err
return
m
.
Plugin
{},
err
}
}
...
...
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