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
a8a3e026
Unverified
Commit
a8a3e026
authored
Jan 31, 2021
by
Torkel Ödegaard
Committed by
GitHub
Jan 31, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PanelEdit: Trigger refresh when changing data source (#30744)
parent
e0356f7b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
+9
-1
public/app/features/dashboard/components/PanelEditor/PanelEditorQueries.tsx
+9
-1
No files found.
public/app/features/dashboard/components/PanelEditor/PanelEditorQueries.tsx
View file @
a8a3e026
...
@@ -49,7 +49,10 @@ export class PanelEditorQueries extends PureComponent<Props, State> {
...
@@ -49,7 +49,10 @@ export class PanelEditorQueries extends PureComponent<Props, State> {
onOptionsChange
=
(
options
:
QueryGroupOptions
)
=>
{
onOptionsChange
=
(
options
:
QueryGroupOptions
)
=>
{
const
{
panel
}
=
this
.
props
;
const
{
panel
}
=
this
.
props
;
panel
.
datasource
=
options
.
dataSource
.
default
?
null
:
options
.
dataSource
.
name
!
;
const
newDataSourceName
=
options
.
dataSource
.
default
?
null
:
options
.
dataSource
.
name
!
;
const
dataSourceChanged
=
newDataSourceName
!==
panel
.
datasource
;
panel
.
datasource
=
newDataSourceName
;
panel
.
targets
=
options
.
queries
;
panel
.
targets
=
options
.
queries
;
panel
.
timeFrom
=
options
.
timeRange
?.
from
;
panel
.
timeFrom
=
options
.
timeRange
?.
from
;
panel
.
timeShift
=
options
.
timeRange
?.
shift
;
panel
.
timeShift
=
options
.
timeRange
?.
shift
;
...
@@ -57,6 +60,11 @@ export class PanelEditorQueries extends PureComponent<Props, State> {
...
@@ -57,6 +60,11 @@ export class PanelEditorQueries extends PureComponent<Props, State> {
panel
.
interval
=
options
.
minInterval
;
panel
.
interval
=
options
.
minInterval
;
panel
.
maxDataPoints
=
options
.
maxDataPoints
;
panel
.
maxDataPoints
=
options
.
maxDataPoints
;
if
(
dataSourceChanged
)
{
// trigger queries when changing data source
setTimeout
(
this
.
onRunQueries
,
10
);
}
this
.
setState
({
options
:
options
});
this
.
setState
({
options
:
options
});
};
};
...
...
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