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
aea74f0e
Unverified
Commit
aea74f0e
authored
Dec 10, 2018
by
Torkel Ödegaard
Committed by
GitHub
Dec 10, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14426 from grafana/fix-singlestat-repeat-variable-issue
fixed issue with singlestat and repeated scopedVars
parents
6f061ab1
976d25d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
public/app/plugins/panel/singlestat/module.ts
+5
-2
No files found.
public/app/plugins/panel/singlestat/module.ts
View file @
aea74f0e
...
...
@@ -107,7 +107,10 @@ class SingleStatCtrl extends MetricsPanelCtrl {
}
onDataReceived
(
dataList
)
{
const
data
:
any
=
{};
const
data
:
any
=
{
scopedVars
:
_
.
extend
({},
this
.
panel
.
scopedVars
),
};
if
(
dataList
.
length
>
0
&&
dataList
[
0
].
type
===
'table'
)
{
this
.
dataType
=
'table'
;
const
tableData
=
dataList
.
map
(
this
.
tableHandler
.
bind
(
this
));
...
...
@@ -117,6 +120,7 @@ class SingleStatCtrl extends MetricsPanelCtrl {
this
.
series
=
dataList
.
map
(
this
.
seriesHandler
.
bind
(
this
));
this
.
setValues
(
data
);
}
this
.
data
=
data
;
this
.
render
();
}
...
...
@@ -320,7 +324,6 @@ class SingleStatCtrl extends MetricsPanelCtrl {
}
// Add $__name variable for using in prefix or postfix
data
.
scopedVars
=
_
.
extend
({},
this
.
panel
.
scopedVars
);
data
.
scopedVars
[
'__name'
]
=
{
value
:
this
.
series
[
0
].
label
};
}
this
.
setValueMapping
(
data
);
...
...
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