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
ffe14072
Commit
ffe14072
authored
Jan 12, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(apps): minor progress
parent
2fe58461
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
pkg/api/index.go
+1
-1
pkg/plugins/app_plugin.go
+10
-5
No files found.
pkg/api/index.go
View file @
ffe14072
...
...
@@ -85,7 +85,7 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
if
plugin
.
Pinned
{
data
.
MainNavLinks
=
append
(
data
.
MainNavLinks
,
&
dtos
.
NavLink
{
Text
:
plugin
.
Name
,
Url
:
setting
.
AppSubUrl
+
"/apps/edit/"
+
plugin
.
Id
,
Url
:
"/apps/edit/"
+
plugin
.
Id
,
Img
:
plugin
.
Info
.
Logos
.
Small
,
})
}
...
...
pkg/plugins/app_plugin.go
View file @
ffe14072
...
...
@@ -26,13 +26,18 @@ type AppPlugin struct {
Enabled
bool
`json:"-"`
}
func
(
p
*
AppPlugin
)
Load
(
decoder
*
json
.
Decoder
,
pluginDir
string
)
error
{
if
err
:=
decoder
.
Decode
(
&
p
);
err
!=
nil
{
func
(
ap
p
*
AppPlugin
)
Load
(
decoder
*
json
.
Decoder
,
pluginDir
string
)
error
{
if
err
:=
decoder
.
Decode
(
&
ap
p
);
err
!=
nil
{
return
err
}
p
.
PluginDir
=
pluginDir
p
.
initFrontendPlugin
()
Apps
[
p
.
Id
]
=
p
if
app
.
Css
!=
nil
{
app
.
Css
.
Dark
=
evalRelativePluginUrlPath
(
app
.
Css
.
Dark
,
app
.
Id
)
app
.
Css
.
Light
=
evalRelativePluginUrlPath
(
app
.
Css
.
Light
,
app
.
Id
)
}
app
.
PluginDir
=
pluginDir
app
.
initFrontendPlugin
()
Apps
[
app
.
Id
]
=
app
return
nil
}
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