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
91848190
Commit
91848190
authored
Oct 08, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(metricsegment): fixed issue with metric segment, fixes #6212
parent
913f17ee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
public/app/core/directives/metric_segment.js
+9
-10
No files found.
public/app/core/directives/metric_segment.js
View file @
91848190
...
...
@@ -43,7 +43,7 @@ function (_, $, coreModule) {
var
selected
=
_
.
find
(
$scope
.
altSegments
,
{
value
:
value
});
if
(
selected
)
{
segment
.
value
=
selected
.
value
;
segment
.
html
=
selected
.
html
;
segment
.
html
=
selected
.
html
||
selected
.
value
;
segment
.
fake
=
false
;
segment
.
expandable
=
selected
.
expandable
;
}
...
...
@@ -186,27 +186,26 @@ function (_, $, coreModule) {
$scope
.
getOptionsInternal
=
function
()
{
if
(
$scope
.
options
)
{
cachedOptions
=
_
.
map
(
$scope
.
options
,
function
(
option
)
{
return
uiSegmentSrv
.
newSegment
({
value
:
option
.
text
});
})
;
return
$q
.
when
(
cachedOptions
);
cachedOptions
=
$scope
.
options
;
return
$q
.
when
(
_
.
map
(
$scope
.
options
,
function
(
option
)
{
return
{
value
:
option
.
text
}
;
})
);
}
else
{
return
$scope
.
getOptions
().
then
(
function
(
options
)
{
cachedOptions
=
_
.
map
(
options
,
function
(
option
)
{
cachedOptions
=
options
;
return
_
.
map
(
options
,
function
(
option
)
{
if
(
option
.
html
)
{
return
option
;
}
return
uiSegmentSrv
.
newSegment
({
value
:
option
.
text
})
;
return
{
value
:
option
.
text
}
;
});
return
cachedOptions
;
});
}
};
$scope
.
onSegmentChange
=
function
()
{
if
(
cachedOptions
)
{
var
option
=
_
.
find
(
cachedOptions
,
{
value
:
$scope
.
segment
.
value
});
var
option
=
_
.
find
(
cachedOptions
,
{
text
:
$scope
.
segment
.
value
});
if
(
option
&&
option
.
value
!==
$scope
.
property
)
{
$scope
.
property
=
option
.
value
;
}
else
if
(
attrs
.
custom
!==
'false'
)
{
...
...
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