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
dacfa6b9
Commit
dacfa6b9
authored
Oct 06, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issue in metric_segment
parent
04a5ad52
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
public/app/core/directives/metric_segment.js
+9
-7
No files found.
public/app/core/directives/metric_segment.js
View file @
dacfa6b9
...
...
@@ -186,25 +186,27 @@ function (_, $, coreModule) {
$scope
.
getOptionsInternal
=
function
()
{
if
(
$scope
.
options
)
{
var
optionSegment
s
=
_
.
map
(
$scope
.
options
,
function
(
option
)
{
cachedOption
s
=
_
.
map
(
$scope
.
options
,
function
(
option
)
{
return
uiSegmentSrv
.
newSegment
({
value
:
option
.
text
});
});
return
$q
.
when
(
optionSegment
s
);
return
$q
.
when
(
cachedOption
s
);
}
else
{
return
$scope
.
getOptions
().
then
(
function
(
options
)
{
cachedOptions
=
options
;
return
_
.
map
(
options
,
function
(
option
)
{
cachedOptions
=
_
.
map
(
options
,
function
(
option
)
{
if
(
option
.
html
)
{
return
option
;
}
return
uiSegmentSrv
.
newSegment
({
value
:
option
.
text
});
});
return
cachedOptions
;
});
}
};
$scope
.
onSegmentChange
=
function
()
{
var
options
=
$scope
.
options
||
cachedOptions
;
if
(
o
ptions
)
{
var
option
=
_
.
find
(
options
,
{
text
:
$scope
.
segment
.
value
});
if
(
cachedO
ptions
)
{
var
option
=
_
.
find
(
cachedOptions
,
{
value
:
$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