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
a15984b6
Commit
a15984b6
authored
Jan 12, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(apps): pages work
parent
4c59e48c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
12 deletions
+20
-12
pkg/api/dtos/apps.go
+2
-0
pkg/plugins/app_plugin.go
+2
-2
pkg/plugins/models.go
+2
-0
public/app/features/apps/partials/edit.html
+14
-10
No files found.
pkg/api/dtos/apps.go
View file @
a15984b6
...
@@ -11,6 +11,7 @@ type AppSettings struct {
...
@@ -11,6 +11,7 @@ type AppSettings struct {
Enabled
bool
`json:"enabled"`
Enabled
bool
`json:"enabled"`
Pinned
bool
`json:"pinned"`
Pinned
bool
`json:"pinned"`
Info
*
plugins
.
PluginInfo
`json:"info"`
Info
*
plugins
.
PluginInfo
`json:"info"`
Pages
[]
*
plugins
.
AppPluginPage
`json:"pages"`
JsonData
map
[
string
]
interface
{}
`json:"jsonData"`
JsonData
map
[
string
]
interface
{}
`json:"jsonData"`
}
}
...
@@ -19,6 +20,7 @@ func NewAppSettingsDto(def *plugins.AppPlugin, data *models.AppSettings) *AppSet
...
@@ -19,6 +20,7 @@ func NewAppSettingsDto(def *plugins.AppPlugin, data *models.AppSettings) *AppSet
AppId
:
def
.
Id
,
AppId
:
def
.
Id
,
Name
:
def
.
Name
,
Name
:
def
.
Name
,
Info
:
&
def
.
Info
,
Info
:
&
def
.
Info
,
Pages
:
def
.
Pages
,
}
}
if
data
!=
nil
{
if
data
!=
nil
{
...
...
pkg/plugins/app_plugin.go
View file @
a15984b6
...
@@ -7,7 +7,7 @@ import (
...
@@ -7,7 +7,7 @@ import (
)
)
type
AppPluginPage
struct
{
type
AppPluginPage
struct
{
Text
string
`json:"text
"`
Name
string
`json:"name
"`
Url
string
`json:"url"`
Url
string
`json:"url"`
ReqRole
models
.
RoleType
`json:"reqRole"`
ReqRole
models
.
RoleType
`json:"reqRole"`
}
}
...
@@ -20,7 +20,7 @@ type AppPluginCss struct {
...
@@ -20,7 +20,7 @@ type AppPluginCss struct {
type
AppPlugin
struct
{
type
AppPlugin
struct
{
FrontendPluginBase
FrontendPluginBase
Css
*
AppPluginCss
`json:"css"`
Css
*
AppPluginCss
`json:"css"`
Page
[]
*
AppPluginPage
`json:"page
"`
Page
s
[]
*
AppPluginPage
`json:"pages
"`
Pinned
bool
`json:"-"`
Pinned
bool
`json:"-"`
Enabled
bool
`json:"-"`
Enabled
bool
`json:"-"`
...
...
pkg/plugins/models.go
View file @
a15984b6
...
@@ -24,6 +24,8 @@ type PluginInfo struct {
...
@@ -24,6 +24,8 @@ type PluginInfo struct {
Description
string
`json:"description"`
Description
string
`json:"description"`
Links
[]
PluginInfoLink
`json:"links"`
Links
[]
PluginInfoLink
`json:"links"`
Logos
PluginLogos
`json:"logos"`
Logos
PluginLogos
`json:"logos"`
Version
string
`json:"version"`
Updated
string
`json:"updated"`
}
}
type
PluginInfoLink
struct
{
type
PluginInfoLink
struct
{
...
...
public/app/features/apps/partials/edit.html
View file @
a15984b6
...
@@ -21,9 +21,15 @@
...
@@ -21,9 +21,15 @@
</div>
</div>
<div
class=
"page-wide-margined"
ng-init=
"ctrl.init()"
>
<div
class=
"page-wide-margined"
ng-init=
"ctrl.init()"
>
<h1>
{{ctrl.appModel.name}}
</h1>
<h1>
{{ctrl.appModel.name}}
</h1>
<em>
<em>
{{ctrl.appModel.info.description}}
{{ctrl.appModel.info.description}}
<br>
<span
style=
"small"
>
Version: {{ctrl.appModel.info.version}}
Updated: {{ctrl.appModel.info.updated}}
</span>
</em>
</em>
<br><br>
<br><br>
...
@@ -42,8 +48,7 @@
...
@@ -42,8 +48,7 @@
Dashboards
Dashboards
</div>
</div>
<ul>
<ul>
<li>
Test
</li>
<li><em
class=
"small"
>
None
</em></li>
<li>
Test2
</li>
</ul>
</ul>
</div>
</div>
<div
class=
"simple-box-body simple-box-column"
>
<div
class=
"simple-box-body simple-box-column"
>
...
@@ -52,8 +57,7 @@
...
@@ -52,8 +57,7 @@
Panels
Panels
</div>
</div>
<ul>
<ul>
<li>
Test
</li>
<li><em
class=
"small"
>
None
</em></li>
<li>
Test2
</li>
</ul>
</ul>
</div>
</div>
<div
class=
"simple-box-body simple-box-column"
>
<div
class=
"simple-box-body simple-box-column"
>
...
@@ -62,8 +66,7 @@
...
@@ -62,8 +66,7 @@
Datasources
Datasources
</div>
</div>
<ul>
<ul>
<li>
Test
</li>
<li><em
class=
"small"
>
None
</em></li>
<li>
Test2
</li>
</ul>
</ul>
</div>
</div>
<div
class=
"simple-box-body simple-box-column"
>
<div
class=
"simple-box-body simple-box-column"
>
...
@@ -72,8 +75,9 @@
...
@@ -72,8 +75,9 @@
Pages
Pages
</div>
</div>
<ul>
<ul>
<li>
Test
</li>
<li
ng-repeat=
"page in ctrl.appModel.pages"
>
<li>
Test2
</li>
<a
href=
"{{page.url}}"
class=
"external-link"
>
{{page.name}}
</a>
</li>
</ul>
</ul>
</div>
</div>
...
...
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