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
54b677bd
Unverified
Commit
54b677bd
authored
Sep 15, 2020
by
Ryan McKinley
Committed by
GitHub
Sep 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Graph: show range warning when all data is outside time range (#27603)
parent
a524c572
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
23 deletions
+23
-23
public/app/plugins/panel/graph/module.ts
+23
-23
No files found.
public/app/plugins/panel/graph/module.ts
View file @
54b677bd
...
@@ -271,35 +271,35 @@ export class GraphCtrl extends MetricsPanelCtrl {
...
@@ -271,35 +271,35 @@ export class GraphCtrl extends MetricsPanelCtrl {
};
};
}
}
//
Look for data points outside time range
//
If any data is in range, do not return an error
for
(
const
series
of
this
.
seriesList
)
{
for
(
const
series
of
this
.
seriesList
)
{
if
(
!
series
.
isOutsideRange
)
{
if
(
!
series
.
isOutsideRange
)
{
continue
;
return
undefined
;
}
}
}
const
dataWarning
:
DataWarning
=
{
// All data is outside the time range
title
:
'Data outside time range'
,
const
dataWarning
:
DataWarning
=
{
tip
:
'Can be caused by timezone mismatch or missing time filter in query'
,
title
:
'Data outside time range'
,
tip
:
'Can be caused by timezone mismatch or missing time filter in query'
,
};
const
range
=
getDataTimeRange
(
this
.
dataList
);
if
(
range
)
{
dataWarning
.
actionText
=
'Zoom to data'
;
dataWarning
.
action
=
()
=>
{
getLocationSrv
().
update
({
partial
:
true
,
query
:
{
from
:
range
.
from
,
to
:
range
.
to
,
},
});
};
};
const
range
=
getDataTimeRange
(
this
.
dataList
);
if
(
range
)
{
dataWarning
.
actionText
=
'Zoom to data'
;
dataWarning
.
action
=
()
=>
{
getLocationSrv
().
update
({
partial
:
true
,
query
:
{
from
:
range
.
from
,
to
:
range
.
to
,
},
});
};
}
return
dataWarning
;
}
}
return
undefined
;
return
dataWarning
;
}
}
onRender
()
{
onRender
()
{
...
...
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