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
fb74ebb4
Commit
fb74ebb4
authored
Feb 09, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
:Merge branch 'master' of github.com:grafana/grafana
parents
8784be9a
fba3d7cb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
6 deletions
+20
-6
pkg/plugins/frontend_plugin.go
+3
-0
pkg/plugins/models.go
+12
-6
pkg/plugins/plugins_test.go
+1
-0
tests/app-plugin-json/plugin.json
+4
-0
No files found.
pkg/plugins/frontend_plugin.go
View file @
fb74ebb4
...
...
@@ -25,6 +25,9 @@ func (fp *FrontendPluginBase) initFrontendPlugin() {
fp
.
Info
.
Logos
.
Small
=
evalRelativePluginUrlPath
(
fp
.
Info
.
Logos
.
Small
,
fp
.
Id
)
fp
.
Info
.
Logos
.
Large
=
evalRelativePluginUrlPath
(
fp
.
Info
.
Logos
.
Large
,
fp
.
Id
)
for
i
:=
-
0
;
i
<
len
(
fp
.
Info
.
Screenshots
);
i
++
{
fp
.
Info
.
Screenshots
[
i
]
.
Path
=
evalRelativePluginUrlPath
(
fp
.
Info
.
Screenshots
[
i
]
.
Path
,
fp
.
Id
)
}
fp
.
handleModuleDefaults
()
}
...
...
pkg/plugins/models.go
View file @
fb74ebb4
...
...
@@ -19,12 +19,13 @@ type PluginBase struct {
}
type
PluginInfo
struct
{
Author
PluginInfoLink
`json:"author"`
Description
string
`json:"description"`
Links
[]
PluginInfoLink
`json:"links"`
Logos
PluginLogos
`json:"logos"`
Version
string
`json:"version"`
Updated
string
`json:"updated"`
Author
PluginInfoLink
`json:"author"`
Description
string
`json:"description"`
Links
[]
PluginInfoLink
`json:"links"`
Logos
PluginLogos
`json:"logos"`
Screenshots
[]
PluginScreenshots
`json:"screenshots"`
Version
string
`json:"version"`
Updated
string
`json:"updated"`
}
type
PluginInfoLink
struct
{
...
...
@@ -37,6 +38,11 @@ type PluginLogos struct {
Large
string
`json:"large"`
}
type
PluginScreenshots
struct
{
Path
string
`json:"path"`
Name
string
`json:"name"`
}
type
PluginStaticRoute
struct
{
Directory
string
PluginId
string
...
...
pkg/plugins/plugins_test.go
View file @
fb74ebb4
...
...
@@ -34,6 +34,7 @@ func TestPluginScans(t *testing.T) {
So
(
err
,
ShouldBeNil
)
So
(
len
(
Apps
),
ShouldBeGreaterThan
,
0
)
So
(
Apps
[
"app-example"
]
.
Info
.
Logos
.
Large
,
ShouldEqual
,
"public/plugins/app-example/img/logo_large.png"
)
So
(
Apps
[
"app-example"
]
.
Info
.
Screenshots
[
1
]
.
Path
,
ShouldEqual
,
"public/plugins/app-example/img/screenshot2.png"
)
})
}
tests/app-plugin-json/plugin.json
View file @
fb74ebb4
...
...
@@ -26,6 +26,10 @@
"small"
:
"img/logo_small.png"
,
"large"
:
"img/logo_large.png"
},
"screenshots"
:
[
{
"name"
:
"img1"
,
"path"
:
"img/screenshot1.png"
},
{
"name"
:
"img2"
,
"path"
:
"img/screenshot2.png"
}
],
"links"
:
[
{
"name"
:
"Project site"
,
"url"
:
"http://project.com"
},
{
"name"
:
"License & Terms"
,
"url"
:
"http://license.com"
}
...
...
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