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
d8f2a207
Unverified
Commit
d8f2a207
authored
Dec 27, 2017
by
Dan Cech
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add button to trigger evaluation of tag queries
parent
a3dba607
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
5 deletions
+26
-5
public/app/plugins/datasource/graphite/partials/query.editor.html
+13
-4
public/app/plugins/datasource/graphite/query_ctrl.ts
+13
-1
No files found.
public/app/plugins/datasource/graphite/partials/query.editor.html
View file @
d8f2a207
...
...
@@ -10,7 +10,7 @@
<label
class=
"gf-form-label width-6 query-keyword"
>
Series
</label>
</div>
<div
ng-repeat=
"tag in ctrl.queryModel.tags"
class=
"gf-form"
>
<div
ng-
if=
"ctrl.queryModel.seriesByTagUsed"
ng-
repeat=
"tag in ctrl.queryModel.tags"
class=
"gf-form"
>
<gf-form-dropdown
model=
"tag.key"
lookup-text=
"false"
...
...
@@ -44,13 +44,22 @@
<label
class=
"gf-form-label query-keyword"
ng-if=
"ctrl.showDelimiter($index)"
>
AND
</label>
</div>
<div
ng-repeat=
"segment in ctrl.segments"
role=
"menuitem"
class=
"gf-form"
>
<div
ng-if=
"ctrl.queryModel.seriesByTagUsed"
ng-repeat=
"segment in ctrl.addTagSegments"
role=
"menuitem"
class=
"gf-form"
>
<metric-segment
segment=
"segment"
get-options=
"ctrl.getTagsAsSegments()"
on-change=
"ctrl.addNewTag(segment)"
/>
</div>
<div
ng-if=
"!ctrl.queryModel.seriesByTagUsed"
ng-repeat=
"segment in ctrl.segments"
role=
"menuitem"
class=
"gf-form"
>
<metric-segment
segment=
"segment"
get-options=
"ctrl.getAltSegments($index)"
on-change=
"ctrl.segmentValueChanged(segment, $index)"
/>
</div>
<div
ng-if=
"ctrl.queryModel.seriesByTagUsed"
ng-repeat=
"segment in ctrl.addTagSegments"
role=
"menuitem"
class=
"gf-form"
>
<metric-segment
segment=
"segment"
get-options=
"ctrl.getTagsAsSegments()"
on-change=
"ctrl.addNewTag(segment)"
/>
<div
ng-if=
"ctrl.paused"
class=
"gf-form"
>
<a
ng-click=
"ctrl.unpause()"
class=
"gf-form-label query-part"
><i
class=
"fa fa-play"
></i></a>
</div>
<!--
<div ng-if="!ctrl.paused" class="gf-form">
<a ng-click="ctrl.pause()" class="gf-form-label query-part"><i class="fa fa-pause"></i></a>
</div>
-->
<div
class=
"gf-form gf-form--grow"
>
<div
class=
"gf-form-label gf-form-label--grow"
></div>
...
...
public/app/plugins/datasource/graphite/query_ctrl.ts
View file @
d8f2a207
...
...
@@ -17,11 +17,13 @@ export class GraphiteQueryCtrl extends QueryCtrl {
addTagSegments
:
any
[];
removeTagValue
:
string
;
supportsTags
:
boolean
;
paused
:
boolean
;
/** @ngInject **/
constructor
(
$scope
,
$injector
,
private
uiSegmentSrv
,
private
templateSrv
)
{
super
(
$scope
,
$injector
);
this
.
supportsTags
=
this
.
datasource
.
supportsTags
;
this
.
paused
=
false
;
if
(
this
.
target
)
{
this
.
target
.
target
=
this
.
target
.
target
||
''
;
...
...
@@ -191,6 +193,7 @@ export class GraphiteQueryCtrl extends QueryCtrl {
if
(
segment
.
type
===
'tag'
)
{
let
tag
=
removeTagPrefix
(
segment
.
value
);
this
.
pause
();
this
.
addSeriesByTagFunc
(
tag
);
return
;
}
...
...
@@ -235,7 +238,7 @@ export class GraphiteQueryCtrl extends QueryCtrl {
var
oldTarget
=
this
.
queryModel
.
target
.
target
;
this
.
updateModelTarget
();
if
(
this
.
queryModel
.
target
!==
oldTarget
)
{
if
(
this
.
queryModel
.
target
!==
oldTarget
&&
!
this
.
paused
)
{
this
.
panelCtrl
.
refresh
();
}
}
...
...
@@ -372,6 +375,15 @@ export class GraphiteQueryCtrl extends QueryCtrl {
showDelimiter
(
index
)
{
return
index
!==
this
.
queryModel
.
tags
.
length
-
1
;
}
pause
()
{
this
.
paused
=
true
;
}
unpause
()
{
this
.
paused
=
false
;
this
.
panelCtrl
.
refresh
();
}
}
function
mapToDropdownOptions
(
results
)
{
...
...
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