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
faf6a5fd
Commit
faf6a5fd
authored
Dec 14, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issue in metric segment and option lookup, #6912
parent
38d8ba8f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
public/app/core/services/segment_srv.js
+4
-1
public/app/plugins/datasource/graphite/query_ctrl.ts
+1
-1
No files found.
public/app/core/services/segment_srv.js
View file @
faf6a5fd
...
...
@@ -23,6 +23,9 @@ function (angular, _, coreModule) {
return
;
}
// temp hack to work around legacy inconsistency in segment model
this
.
text
=
options
.
value
;
this
.
cssClass
=
options
.
cssClass
;
this
.
custom
=
options
.
custom
;
this
.
type
=
options
.
type
;
...
...
@@ -79,7 +82,7 @@ function (angular, _, coreModule) {
this
.
transformToSegments
=
function
(
addTemplateVars
,
variableTypeFilter
)
{
return
function
(
results
)
{
var
segments
=
_
.
map
(
results
,
function
(
segment
)
{
return
self
.
newSegment
({
value
:
segment
.
text
,
expandable
:
segment
.
expandable
});
return
self
.
newSegment
({
value
:
segment
.
text
,
expandable
:
segment
.
expandable
});
});
if
(
addTemplateVars
)
{
...
...
public/app/plugins/datasource/graphite/query_ctrl.ts
View file @
faf6a5fd
...
...
@@ -161,7 +161,7 @@ export class GraphiteQueryCtrl extends QueryCtrl {
return
this
.
datasource
.
metricFindQuery
(
query
).
then
(
segments
=>
{
var
altSegments
=
_
.
map
(
segments
,
segment
=>
{
return
this
.
uiSegmentSrv
.
newSegment
({
value
:
segment
.
text
,
expandable
:
segment
.
expandable
});
return
this
.
uiSegmentSrv
.
newSegment
({
value
:
segment
.
text
,
expandable
:
segment
.
expandable
});
});
if
(
altSegments
.
length
===
0
)
{
return
altSegments
;
}
...
...
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