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
7856e2f1
Commit
7856e2f1
authored
Mar 16, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: metrics_panel and time range issue introduced earlier today, fixes #7849
parent
32f89f65
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
public/app/features/panel/metrics_panel_ctrl.ts
+5
-2
No files found.
public/app/features/panel/metrics_panel_ctrl.ts
View file @
7856e2f1
...
@@ -93,6 +93,7 @@ class MetricsPanelCtrl extends PanelCtrl {
...
@@ -93,6 +93,7 @@ class MetricsPanelCtrl extends PanelCtrl {
// load datasource service
// load datasource service
this
.
setTimeQueryStart
();
this
.
setTimeQueryStart
();
this
.
datasourceSrv
.
get
(
this
.
panel
.
datasource
)
this
.
datasourceSrv
.
get
(
this
.
panel
.
datasource
)
.
then
(
this
.
updateTimeRange
.
bind
(
this
))
.
then
(
this
.
issueQueries
.
bind
(
this
))
.
then
(
this
.
issueQueries
.
bind
(
this
))
.
then
(
this
.
handleQueryResult
.
bind
(
this
))
.
then
(
this
.
handleQueryResult
.
bind
(
this
))
.
catch
(
err
=>
{
.
catch
(
err
=>
{
...
@@ -119,7 +120,8 @@ class MetricsPanelCtrl extends PanelCtrl {
...
@@ -119,7 +120,8 @@ class MetricsPanelCtrl extends PanelCtrl {
this
.
timing
.
queryEnd
=
new
Date
().
getTime
();
this
.
timing
.
queryEnd
=
new
Date
().
getTime
();
}
}
updateTimeRange
()
{
updateTimeRange
(
datasource
?)
{
this
.
datasource
=
datasource
||
this
.
datasource
;
this
.
range
=
this
.
timeSrv
.
timeRange
();
this
.
range
=
this
.
timeSrv
.
timeRange
();
this
.
rangeRaw
=
this
.
range
.
raw
;
this
.
rangeRaw
=
this
.
range
.
raw
;
...
@@ -132,6 +134,8 @@ class MetricsPanelCtrl extends PanelCtrl {
...
@@ -132,6 +134,8 @@ class MetricsPanelCtrl extends PanelCtrl {
}
}
this
.
calculateInterval
();
this
.
calculateInterval
();
return
this
.
datasource
;
};
};
calculateInterval
()
{
calculateInterval
()
{
...
@@ -194,7 +198,6 @@ class MetricsPanelCtrl extends PanelCtrl {
...
@@ -194,7 +198,6 @@ class MetricsPanelCtrl extends PanelCtrl {
issueQueries
(
datasource
)
{
issueQueries
(
datasource
)
{
this
.
datasource
=
datasource
;
this
.
datasource
=
datasource
;
this
.
updateTimeRange
();
if
(
!
this
.
panel
.
targets
||
this
.
panel
.
targets
.
length
===
0
)
{
if
(
!
this
.
panel
.
targets
||
this
.
panel
.
targets
.
length
===
0
)
{
return
this
.
$q
.
when
([]);
return
this
.
$q
.
when
([]);
...
...
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