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
ff759b0e
Unverified
Commit
ff759b0e
authored
Dec 27, 2017
by
Dan Cech
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
send prefix when auto-completing tags
parent
d8f2a207
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
public/app/plugins/datasource/graphite/partials/query.editor.html
+2
-2
public/app/plugins/datasource/graphite/query_ctrl.ts
+7
-7
No files found.
public/app/plugins/datasource/graphite/partials/query.editor.html
View file @
ff759b0e
...
...
@@ -45,11 +45,11 @@
</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)"
/>
<metric-segment
segment=
"segment"
get-options=
"ctrl.getTagsAsSegments(
$query
)"
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)"
/>
<metric-segment
segment=
"segment"
get-options=
"ctrl.getAltSegments($index
, $query
)"
on-change=
"ctrl.segmentValueChanged(segment, $index)"
/>
</div>
<div
ng-if=
"ctrl.paused"
class=
"gf-form"
>
...
...
public/app/plugins/datasource/graphite/query_ctrl.ts
View file @
ff759b0e
...
...
@@ -105,7 +105,7 @@ export class GraphiteQueryCtrl extends QueryCtrl {
});
}
getAltSegments
(
index
)
{
getAltSegments
(
index
,
prefix
)
{
var
query
=
index
===
0
?
'*'
:
this
.
queryModel
.
getSegmentPathUpTo
(
index
)
+
'.*'
;
var
options
=
{
range
:
this
.
panelCtrl
.
range
,
...
...
@@ -122,7 +122,7 @@ export class GraphiteQueryCtrl extends QueryCtrl {
});
});
if
(
altSegments
.
length
===
0
)
{
if
(
index
>
0
&&
altSegments
.
length
===
0
)
{
return
altSegments
;
}
...
...
@@ -159,7 +159,7 @@ export class GraphiteQueryCtrl extends QueryCtrl {
if
(
this
.
supportsTags
&&
index
===
0
)
{
this
.
removeTaggedEntry
(
altSegments
);
return
this
.
addAltTagSegments
(
inde
x
,
altSegments
);
return
this
.
addAltTagSegments
(
prefi
x
,
altSegments
);
}
else
{
return
altSegments
;
}
...
...
@@ -169,8 +169,8 @@ export class GraphiteQueryCtrl extends QueryCtrl {
});
}
addAltTagSegments
(
inde
x
,
altSegments
)
{
return
this
.
getTagsAsSegments
().
then
(
tagSegments
=>
{
addAltTagSegments
(
prefi
x
,
altSegments
)
{
return
this
.
getTagsAsSegments
(
prefix
).
then
(
tagSegments
=>
{
tagSegments
=
_
.
map
(
tagSegments
,
segment
=>
{
segment
.
value
=
TAG_PREFIX
+
segment
.
value
;
return
segment
;
...
...
@@ -315,9 +315,9 @@ export class GraphiteQueryCtrl extends QueryCtrl {
});
}
getTagsAsSegments
()
{
getTagsAsSegments
(
tagPrefix
)
{
let
tagExpressions
=
this
.
queryModel
.
renderTagExpressions
();
return
this
.
datasource
.
getTagsAutoComplete
(
tagExpressions
).
then
(
values
=>
{
return
this
.
datasource
.
getTagsAutoComplete
(
tagExpressions
,
tagPrefix
).
then
(
values
=>
{
return
_
.
map
(
values
,
val
=>
{
return
this
.
uiSegmentSrv
.
newSegment
({
value
:
val
.
text
,
...
...
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