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
ab34b174
Commit
ab34b174
authored
Apr 11, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added update notice to plugin list
parent
6ac3bd4c
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
7 deletions
+35
-7
pkg/api/frontendsettings.go
+2
-0
pkg/plugins/update_checker.go
+1
-1
public/app/core/controllers/login_ctrl.js
+3
-1
public/app/features/plugins/partials/ds_list.html
+2
-1
public/app/features/plugins/partials/plugin_list.html
+5
-0
public/app/partials/login.html
+3
-3
public/sass/components/_cards.scss
+19
-1
No files found.
pkg/api/frontendsettings.go
View file @
ab34b174
...
...
@@ -140,6 +140,8 @@ func getFrontendSettingsMap(c *middleware.Context) (map[string]interface{}, erro
"version"
:
setting
.
BuildVersion
,
"commit"
:
setting
.
BuildCommit
,
"buildstamp"
:
setting
.
BuildStamp
,
"latestVersion"
:
plugins
.
GrafanaLatestVersion
,
"hasUpdate"
:
plugins
.
GrafanaHasUpdate
,
},
}
...
...
pkg/plugins/update_checker.go
View file @
ab34b174
...
...
@@ -69,7 +69,6 @@ func checkForUpdates() {
return
}
log
.
Info
(
"GNET PLUG: %v"
,
len
(
data
.
Plugins
))
for
_
,
plug
:=
range
Plugins
{
for
_
,
gplug
:=
range
data
.
Plugins
{
if
gplug
.
Id
==
plug
.
Id
{
...
...
@@ -103,6 +102,7 @@ func checkForUpdates() {
if
strings
.
Contains
(
setting
.
BuildVersion
,
"-"
)
{
GrafanaLatestVersion
=
githubLatest
.
Testing
GrafanaHasUpdate
=
githubLatest
.
Testing
!=
setting
.
BuildVersion
}
else
{
GrafanaLatestVersion
=
githubLatest
.
Stable
GrafanaHasUpdate
=
githubLatest
.
Stable
!=
setting
.
BuildVersion
...
...
public/app/core/controllers/login_ctrl.js
View file @
ab34b174
...
...
@@ -39,7 +39,9 @@ function (angular, coreModule, config) {
$scope
.
buildInfo
=
{
version
:
config
.
buildInfo
.
version
,
commit
:
config
.
buildInfo
.
commit
,
buildstamp
:
new
Date
(
config
.
buildInfo
.
buildstamp
*
1000
)
buildstamp
:
new
Date
(
config
.
buildInfo
.
buildstamp
*
1000
),
latestVersion
:
config
.
buildInfo
.
latestVersion
,
hasUpdate
:
config
.
buildInfo
.
hasUpdate
,
};
$scope
.
submit
=
function
()
{
...
...
public/app/features/plugins/partials/ds_list.html
View file @
ab34b174
...
...
@@ -20,9 +20,10 @@
<li
class=
"card-item-wrapper"
ng-repeat=
"ds in ctrl.datasources"
>
<a
class=
"card-item"
href=
"datasources/edit/{{ds.id}}/"
>
<div
class=
"card-item-header"
>
<
i
class=
"icon-gf icon-gf-{{ds.type}}"
></i
>
<
div
class=
"card-item-type"
>
{{ds.type}}
</div>
</div>
<div
class=
"card-item-body"
>
<figure
class=
"card-item-figure"
>
<img
ng-src=
"{{ds.typeLogoUrl}}"
>
...
...
public/app/features/plugins/partials/plugin_list.html
View file @
ab34b174
...
...
@@ -33,9 +33,14 @@
<li
class=
"card-item-wrapper"
ng-repeat=
"plugin in ctrl.plugins"
>
<a
class=
"card-item"
href=
"plugins/{{plugin.id}}/edit"
>
<div
class=
"card-item-header"
>
<div
class=
"card-item-type"
>
<i
class=
"icon-gf icon-gf-{{plugin.type}}"
></i>
{{plugin.type}}
</div>
<div
class=
"card-item-notice"
ng-show=
"plugin.hasUpdate"
>
<span
bs-tooltip=
"plugin.latestVersion"
>
Update available!
</span>
</div>
</div>
<div
class=
"card-item-body"
>
<figure
class=
"card-item-figure"
>
<img
ng-src=
"{{plugin.info.logos.small}}"
>
...
...
public/app/partials/login.html
View file @
ab34b174
...
...
@@ -78,9 +78,9 @@
Grafana version: {{buildInfo.version}}, commit: {{buildInfo.commit}},
build date: {{buildInfo.buildstamp | date: 'yyyy-MM-dd HH:mm:ss' }}
</div>
<div
class=
"version-footer text-center small"
ng-show=
"buildInfo.hasUpdate"
>
<a
class=
"external-link"
target=
"_blank"
href=
"http://grafana.org/download"
>
New Grafana Version Available ({{buildInfo.latestVersion}})
</a>
</div>
</div>
</div>
</div>
public/sass/components/_cards.scss
View file @
ab34b174
...
...
@@ -76,13 +76,20 @@
}
.card-item-header
{
margin-bottom
:
$spacer
;
}
.card-item-type
{
color
:
$text-color-weak
;
text-transform
:
uppercase
;
margin-bottom
:
$spacer
;
font-size
:
$font-size-sm
;
font-weight
:
bold
;
}
.card-item-notice
{
font-size
:
$font-size-sm
;
}
.card-item-name
{
color
:
$headings-color
;
overflow
:
hidden
;
...
...
@@ -107,6 +114,16 @@
.card-list-layout-grid
{
.card-item-type
{
display
:
inline-block
;
}
.card-item-notice
{
font-size
:
$font-size-sm
;
display
:
inline-block
;
margin-left
:
$spacer
;
}
.card-item-header-action
{
float
:
right
;
}
...
...
@@ -165,6 +182,7 @@
.card-item-header
{
float
:
right
;
text-align
:
right
;
}
.card-item-figure
{
...
...
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