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
451a8bef
Commit
451a8bef
authored
Apr 11, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(pluginslist): minor update
parent
c518fdc1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
28 deletions
+13
-28
public/app/features/plugins/partials/plugin_edit.html
+5
-0
public/app/plugins/panel/pluginlist/module.html
+3
-4
public/app/plugins/panel/pluginlist/module.ts
+4
-23
public/sass/components/_panel_pluginlist.scss
+1
-1
No files found.
public/app/features/plugins/partials/plugin_edit.html
View file @
451a8bef
...
...
@@ -55,6 +55,11 @@
<section
class=
"page-sidebar-section"
>
<h4>
Version
</h4>
<span>
{{ctrl.model.info.version}}
</span>
<div
ng-show=
"ctrl.model.hasUpdate"
>
<a
href=
"https://grafana.net/plugins/{{ctrl.model.id}}"
target=
"_blank"
>
Update Available!
</a>
</div>
</section>
<section
class=
"page-sidebar-section"
ng-show=
"ctrl.model.type === 'app'"
>
<h5>
Includes
</h4>
...
...
public/app/plugins/panel/pluginlist/module.html
View file @
451a8bef
<div
class=
"pluginlist"
>
<div
class=
"pluginlist-section"
ng-repeat=
"category in ctrl.viewModel"
>
<h5
class=
"pluginlist-section-header"
>
<i
class=
"icon-gf icon-gf-{{category.type}} pluginlist-icon"
></i>
<h6
class=
"pluginlist-section-header"
>
{{category.header}}
</h
5
>
</h
6
>
<div
class=
"pluginlist-item"
ng-repeat=
"plugin in category.list"
>
<a
class=
"pluginlist-link pluginlist-link-{{plugin.state}}"
href=
"plugins/{{plugin.id}}/edit"
>
<img
ng-src=
"{{plugin.info.logos.small}}"
class=
"pluginlist-image"
>
...
...
@@ -12,7 +11,7 @@
<span
class=
"pluginlist-message pluginlist-message--update"
ng-show=
"plugin.hasUpdate"
>
Update available!
</span>
<span
class=
"pluginlist-message pluginlist-message--enable"
ng-show=
"!plugin.enabled"
>
<span
class=
"pluginlist-message pluginlist-message--enable"
ng-show=
"!plugin.enabled
&& !plugin.hasUpdate
"
>
Enable now
</span>
<span
class=
"pluginlist-message pluginlist-message--no-update"
ng-show=
"plugin.enabled && !plugin.hasUpdate"
>
...
...
public/app/plugins/panel/pluginlist/module.ts
View file @
451a8bef
...
...
@@ -26,6 +26,7 @@ class DashListCtrl extends PanelCtrl {
{
header
:
"Installed Panels"
,
list
:
[],
type
:
'panel'
},
{
header
:
"Installed Datasources"
,
list
:
[],
type
:
'datasource'
},
];
this
.
update
();
}
...
...
@@ -42,30 +43,10 @@ class DashListCtrl extends PanelCtrl {
this
.
viewModel
[
2
].
list
=
_
.
filter
(
plugins
,
{
type
:
'datasource'
});
for
(
let
plugin
of
this
.
pluginList
)
{
if
(
!
plugin
.
enabled
)
{
plugin
.
state
=
'not-enabled'
;
}
}
}).
then
(
this
.
checkForUpdates
.
bind
(
this
));
}
checkForUpdates
()
{
return
this
.
backendSrv
.
get
(
'api/gnet/plugins/repo'
).
then
(
data
=>
{
var
gNetPlugins
=
_
.
reduce
(
data
.
plugins
,
(
memo
,
val
)
=>
{
memo
[
val
.
id
]
=
val
;
return
memo
;
},
{});
for
(
let
plugin
of
this
.
pluginList
)
{
var
source
=
gNetPlugins
[
plugin
.
id
];
if
(
!
source
)
{
continue
;
}
if
(
plugin
.
info
.
version
!==
source
.
versions
[
0
].
version
)
{
plugin
.
hasUpdate
=
true
;
if
(
plugin
.
hasUpdate
)
{
plugin
.
state
=
'has-update'
;
}
else
if
(
!
plugin
.
enabled
)
{
plugin
.
state
=
'not-enabled'
;
}
}
});
...
...
public/sass/components/_panel_pluginlist.scss
View file @
451a8bef
...
...
@@ -29,7 +29,7 @@
}
.pluginlist-title
{
margin-right
:
$spacer
/
3
;
margin-right
:
$spacer
/
3
;
}
.pluginlist-version
{
...
...
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