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
dc3b6147
Commit
dc3b6147
authored
Sep 21, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(submenu): fixed issue with submenu and annotation display, and annotation issue in table panel
parent
d0b75cdb
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
29 deletions
+22
-29
public/app/features/annotations/annotations_srv.ts
+1
-1
public/app/features/dashboard/submenu/submenu.html
+18
-25
public/app/features/dashboard/submenu/submenu.ts
+1
-2
public/app/plugins/panel/table/module.ts
+2
-1
No files found.
public/app/features/annotations/annotations_srv.ts
View file @
dc3b6147
...
...
@@ -29,7 +29,7 @@ export class AnnotationsSrv {
this
.
getGlobalAnnotations
(
options
),
this
.
getPanelAnnotations
(
options
)
]).
then
(
allResults
=>
{
return
_
.
flatten
(
allResults
);
return
_
.
flatten
Deep
(
allResults
);
}).
catch
(
err
=>
{
this
.
$rootScope
.
appEvent
(
'alert-error'
,
[
'Annotations failed'
,
(
err
.
message
||
err
)]);
});
...
...
public/app/features/dashboard/submenu/submenu.html
View file @
dc3b6147
<div
class=
"submenu-controls gf-form-query"
>
<ul
ng-if=
"ctrl.dashboard.templating.list.length > 0"
>
<li
ng-repeat=
"variable in ctrl.variables"
ng-hide=
"variable.hide === 2"
class=
"submenu-item gf-form-inline"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label template-variable"
ng-hide=
"variable.hide === 1"
>
{{variable.label || variable.name}}:
</label>
<value-select-dropdown
ng-if=
"variable.type !== 'adhoc'"
variable=
"variable"
on-updated=
"ctrl.variableUpdated(variable)"
get-values-for-tag=
"ctrl.getValuesForTag(variable, tagKey)"
></value-select-dropdown>
</div>
<ad-hoc-filters
ng-if=
"variable.type === 'adhoc'"
variable=
"variable"
></ad-hoc-filters>
</li>
</ul>
<div
ng-repeat=
"variable in ctrl.variables"
ng-hide=
"variable.hide === 2"
class=
"submenu-item gf-form-inline"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label template-variable"
ng-hide=
"variable.hide === 1"
>
{{variable.label || variable.name}}:
</label>
<value-select-dropdown
ng-if=
"variable.type !== 'adhoc'"
variable=
"variable"
on-updated=
"ctrl.variableUpdated(variable)"
get-values-for-tag=
"ctrl.getValuesForTag(variable, tagKey)"
></value-select-dropdown>
</div>
<ad-hoc-filters
ng-if=
"variable.type === 'adhoc'"
variable=
"variable"
></ad-hoc-filters>
</div>
<ul
ng-if=
"ctrl.dashboard.annotations.list.length > 0"
>
<li
ng-repeat=
"annotation in ctrl.dashboard.annotations.list"
class=
"submenu-item annotation-segment"
ng-class=
"{'annotation-disabled': !annotation.enable}"
>
<a
ng-click=
"ctrl.disableAnnotation(annotation)"
>
<i
class=
"fa fa-bolt"
style=
"color:{{annotation.iconColor}}"
></i>
{{annotation.name}}
<input
class=
"cr1"
id=
"hideYAxis"
type=
"checkbox"
ng-model=
"annotation.enable"
ng-checked=
"annotation.enable"
>
<label
for=
"hideYAxis"
class=
"cr1"
></label>
</a>
</li>
</ul>
<div
ng-if=
"ctrl.dashboard.annotations.list.length > 0"
>
<div
ng-repeat=
"annotation in ctrl.dashboard.annotations.list"
class=
"submenu-item"
ng-class=
"{'annotation-disabled': !annotation.enable}"
>
<gf-form-switch
class=
"gf-form"
label=
"{{annotation.name}}"
checked=
"annotation.enable"
on-change=
"ctrl.annotationStateChanged()"
></gf-form-switch>
</div>
</ul>
<ul
class=
"pull-right"
ng-if=
"ctrl.dashboard.links.length > 0"
>
<dash-links-container
links=
"ctrl.dashboard.links"
></dash-links-container>
</ul>
<ul
class=
"pull-right"
ng-if=
"ctrl.dashboard.links.length > 0"
>
<dash-links-container
links=
"ctrl.dashboard.links"
></dash-links-container>
</ul>
<div
class=
"clearfix"
></div>
<div
class=
"clearfix"
></div>
</div>
public/app/features/dashboard/submenu/submenu.ts
View file @
dc3b6147
...
...
@@ -17,8 +17,7 @@ export class SubmenuCtrl {
this
.
variables
=
this
.
variableSrv
.
variables
;
}
disableAnnotation
(
annotation
)
{
annotation
.
enable
=
!
annotation
.
enable
;
annotationStateChanged
()
{
this
.
$rootScope
.
$broadcast
(
'refresh'
);
}
...
...
public/app/plugins/panel/table/module.ts
View file @
dc3b6147
...
...
@@ -78,7 +78,8 @@ class TablePanelCtrl extends MetricsPanelCtrl {
if
(
this
.
panel
.
transform
===
'annotations'
)
{
this
.
setTimeQueryStart
();
return
this
.
annotationsSrv
.
getAnnotations
(
this
.
dashboard
).
then
(
annotations
=>
{
return
this
.
annotationsSrv
.
getAnnotations
({
dashboard
:
this
.
dashboard
,
panel
:
this
.
panel
,
range
:
this
.
range
})
.
then
(
annotations
=>
{
return
{
data
:
annotations
};
});
}
...
...
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