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
5dfac9a7
Commit
5dfac9a7
authored
Mar 23, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(plugins): added plugin logo to navbar on plugin page, #4452
parent
b06d8093
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
41 additions
and
15 deletions
+41
-15
public/app/core/components/navbar/navbar.html
+2
-1
public/app/core/components/navbar/navbar.ts
+1
-0
public/app/features/panel/metrics_panel_ctrl.ts
+8
-2
public/app/features/plugins/partials/plugin_page.html
+1
-1
public/app/features/plugins/plugin_page_ctrl.ts
+14
-0
public/app/plugins/datasource/graphite/datasource.ts
+1
-1
public/app/plugins/datasource/graphite/partials/query.options.html
+9
-10
public/sass/components/_navbar.scss
+5
-0
No files found.
public/app/core/components/navbar/navbar.html
View file @
5dfac9a7
...
...
@@ -9,7 +9,8 @@
</a>
<a
href=
"{{ctrl.titleUrl}}"
class=
"navbar-page-btn"
ng-show=
"ctrl.title"
>
<i
class=
"{{ctrl.icon}}"
></i>
<i
class=
"{{ctrl.icon}}"
ng-show=
"ctrl.icon"
></i>
<img
src=
"{{ctrl.iconUrl}}"
ng-show=
"ctrl.iconUrl"
></i>
{{ctrl.title}}
</a>
...
...
public/app/core/components/navbar/navbar.ts
View file @
5dfac9a7
...
...
@@ -22,6 +22,7 @@ export function navbarDirective() {
scope
:
{
title
:
"@"
,
titleUrl
:
"@"
,
iconUrl
:
"@"
,
},
link
:
function
(
scope
,
elem
,
attrs
,
ctrl
)
{
ctrl
.
icon
=
attrs
.
icon
;
...
...
public/app/features/panel/metrics_panel_ctrl.ts
View file @
5dfac9a7
...
...
@@ -62,7 +62,13 @@ class MetricsPanelCtrl extends PanelCtrl {
// if we have snapshot data use that
if
(
this
.
panel
.
snapshotData
)
{
this
.
updateTimeRange
();
this
.
events
.
emit
(
'data-snapshot-load'
,
this
.
panel
.
snapshotData
);
var
data
=
this
.
panel
.
snapshotData
;
// backward compatability
if
(
!
_
.
isArray
(
data
))
{
data
=
data
;
}
this
.
events
.
emit
(
'data-snapshot-load'
,
data
);
return
;
}
...
...
@@ -191,7 +197,7 @@ class MetricsPanelCtrl extends PanelCtrl {
}
if
(
this
.
dashboard
.
snapshot
)
{
this
.
panel
.
snapshotData
=
result
;
this
.
panel
.
snapshotData
=
result
.
data
;
}
return
this
.
events
.
emit
(
'data-received'
,
result
.
data
);
...
...
public/app/features/plugins/partials/plugin_page.html
View file @
5dfac9a7
<navbar
icon
=
"icon-gf icon-gf-apps
"
title=
"{{ctrl.appModel.name}}"
title-url=
"{{ctrl.appModel.defaultNavUrl}}"
>
<navbar
icon
-url=
"{{ctrl.appLogoUrl}}
"
title=
"{{ctrl.appModel.name}}"
title-url=
"{{ctrl.appModel.defaultNavUrl}}"
>
</navbar>
<div
class=
"page-container"
>
...
...
public/app/features/plugins/plugin_page_ctrl.ts
View file @
5dfac9a7
...
...
@@ -3,18 +3,32 @@
import
angular
from
'angular'
;
import
_
from
'lodash'
;
var
pluginInfoCache
=
{};
export
class
AppPageCtrl
{
page
:
any
;
pluginId
:
any
;
appModel
:
any
;
appLogoUrl
:
any
;
/** @ngInject */
constructor
(
private
backendSrv
,
private
$routeParams
:
any
,
private
$rootScope
)
{
this
.
pluginId
=
$routeParams
.
pluginId
;
if
(
pluginInfoCache
[
this
.
pluginId
])
{
this
.
appModel
=
pluginInfoCache
[
this
.
pluginId
];
}
else
{
this
.
loadPluginInfo
();
}
}
loadPluginInfo
()
{
this
.
backendSrv
.
get
(
`/api/plugins/
${
this
.
pluginId
}
/settings`
).
then
(
app
=>
{
this
.
appModel
=
app
;
this
.
page
=
_
.
findWhere
(
app
.
includes
,
{
slug
:
this
.
$routeParams
.
slug
});
this
.
appLogoUrl
=
app
.
info
.
logos
.
small
;
pluginInfoCache
[
this
.
pluginId
]
=
app
;
if
(
!
this
.
page
)
{
this
.
$rootScope
.
appEvent
(
'alert-error'
,
[
'App Page Not Found'
,
''
]);
...
...
public/app/plugins/datasource/graphite/datasource.ts
View file @
5dfac9a7
...
...
@@ -27,7 +27,7 @@ export function GraphiteDatasource(instanceSettings, $q, backendSrv, templateSrv
var
params
=
this
.
buildGraphiteParams
(
graphOptions
,
options
.
scopedVars
);
if
(
params
.
length
===
0
)
{
return
$q
.
when
(
[]
);
return
$q
.
when
(
{
data
:
[]}
);
}
if
(
options
.
format
===
'png'
)
{
...
...
public/app/plugins/datasource/graphite/partials/query.options.html
View file @
5dfac9a7
<section
class=
"grafana-metric-options gf-form-group"
>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label"
>
<i
class=
"fa fa-wrench"
></i>
<div
class=
"gf-form
max-width-15
"
>
<span
class=
"gf-form-label
width-8
"
>
Cache timeout
</span>
<span
class=
"gf-form-label width-8"
>
Cache timeout
</span>
<input
type=
"text"
class=
"gf-form-input"
ng-model=
"ctrl.panelCtrl.panel.cacheTimeout"
...
...
@@ -14,8 +13,8 @@
placeholder=
"60"
>
</input>
</div>
<div
class=
"gf-form"
>
<span
class=
"gf-form-label
width-10
"
>
Max data points
</span>
<div
class=
"gf-form
max-width-15
"
>
<span
class=
"gf-form-label"
>
Max data points
</span>
<input
type=
"text"
class=
"gf-form-input"
ng-model=
"ctrl.panelCtrl.panel.maxDataPoints"
...
...
@@ -32,25 +31,25 @@
<span
class=
"gf-form-label width-12"
>
<i
class=
"fa fa-info-circle"
></i>
<a
ng-click=
"ctrl.panelCtrl.toggleEditorHelp(1);"
bs-tooltip=
"'click to show helpful info'"
data-placement=
"bottom"
>
s
horter legend names
S
horter legend names
</a>
</span>
<span
class=
"gf-form-label width-12"
>
<i
class=
"fa fa-info-circle"
></i>
<a
ng-click=
"ctrl.panelCtrl.toggleEditorHelp(2);"
bs-tooltip=
"'click to show helpful info'"
data-placement=
"bottom"
>
s
eries as parameters
S
eries as parameters
</a>
</span>
<span
class=
"gf-form-label width-7"
>
<i
class=
"fa fa-info-circle"
></i>
<a
ng-click=
"ctrl.panelCtrl.toggleEditorHelp(3)"
bs-tooltip=
"'click to show helpful info'"
data-placement=
"bottom"
>
s
tacking
S
tacking
</a>
</span>
<span
class=
"gf-form-label width-8"
>
<i
class=
"fa fa-info-circle"
></i>
<a
ng-click=
"ctrl.panelCtrl.toggleEditorHelp(4)"
bs-tooltip=
"'click to show helpful info'"
data-placement=
"bottom"
>
t
emplating
T
emplating
</a>
</span>
<span
class=
"gf-form-label width-10"
>
...
...
public/sass/components/_navbar.scss
View file @
5dfac9a7
...
...
@@ -131,6 +131,11 @@
font-size
:
20px
;
line-height
:
8px
;
}
>
img
{
max-width
:
27px
;
max-height
:
27px
;
}
}
.sidemenu-pinned
{
...
...
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