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
ba7d8c1a
Unverified
Commit
ba7d8c1a
authored
Jan 14, 2020
by
Ivana Huckova
Committed by
GitHub
Jan 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explore: Fix timepicker when browsing back after switching datasource (#21454)
parent
a1579283
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
public/app/features/explore/Explore.tsx
+6
-2
public/app/features/explore/state/actions.ts
+1
-3
No files found.
public/app/features/explore/Explore.tsx
View file @
ba7d8c1a
...
@@ -31,6 +31,7 @@ import {
...
@@ -31,6 +31,7 @@ import {
DataSourceApi
,
DataSourceApi
,
PanelData
,
PanelData
,
RawTimeRange
,
RawTimeRange
,
TimeRange
,
GraphSeriesXY
,
GraphSeriesXY
,
TimeZone
,
TimeZone
,
AbsoluteTimeRange
,
AbsoluteTimeRange
,
...
@@ -51,6 +52,7 @@ import {
...
@@ -51,6 +52,7 @@ import {
DEFAULT_RANGE
,
DEFAULT_RANGE
,
DEFAULT_UI_STATE
,
DEFAULT_UI_STATE
,
getTimeRangeFromUrl
,
getTimeRangeFromUrl
,
getTimeRange
,
lastUsedDatasourceKeyForOrgId
,
lastUsedDatasourceKeyForOrgId
,
}
from
'app/core/utils/explore'
;
}
from
'app/core/utils/explore'
;
import
{
Emitter
}
from
'app/core/utils/emitter'
;
import
{
Emitter
}
from
'app/core/utils/emitter'
;
...
@@ -93,7 +95,7 @@ interface ExploreProps {
...
@@ -93,7 +95,7 @@ interface ExploreProps {
queryKeys
:
string
[];
queryKeys
:
string
[];
initialDatasource
:
string
;
initialDatasource
:
string
;
initialQueries
:
DataQuery
[];
initialQueries
:
DataQuery
[];
initialRange
:
Raw
TimeRange
;
initialRange
:
TimeRange
;
mode
:
ExploreMode
;
mode
:
ExploreMode
;
initialUI
:
ExploreUIState
;
initialUI
:
ExploreUIState
;
isLive
:
boolean
;
isLive
:
boolean
;
...
@@ -394,7 +396,9 @@ function mapStateToProps(state: StoreState, { exploreId }: ExploreProps): Partia
...
@@ -394,7 +396,9 @@ function mapStateToProps(state: StoreState, { exploreId }: ExploreProps): Partia
{})
as
ExploreUrlState
;
{})
as
ExploreUrlState
;
const
initialDatasource
=
datasource
||
store
.
get
(
lastUsedDatasourceKeyForOrgId
(
state
.
user
.
orgId
));
const
initialDatasource
=
datasource
||
store
.
get
(
lastUsedDatasourceKeyForOrgId
(
state
.
user
.
orgId
));
const
initialQueries
:
DataQuery
[]
=
ensureQueriesMemoized
(
queries
);
const
initialQueries
:
DataQuery
[]
=
ensureQueriesMemoized
(
queries
);
const
initialRange
=
urlRange
?
getTimeRangeFromUrlMemoized
(
urlRange
,
timeZone
).
raw
:
DEFAULT_RANGE
;
const
initialRange
=
urlRange
?
getTimeRangeFromUrlMemoized
(
urlRange
,
timeZone
)
:
getTimeRange
(
timeZone
,
DEFAULT_RANGE
);
let
newMode
:
ExploreMode
|
undefined
;
let
newMode
:
ExploreMode
|
undefined
;
...
...
public/app/features/explore/state/actions.ts
View file @
ba7d8c1a
...
@@ -265,7 +265,7 @@ export function initializeExplore(
...
@@ -265,7 +265,7 @@ export function initializeExplore(
exploreId
:
ExploreId
,
exploreId
:
ExploreId
,
datasourceName
:
string
,
datasourceName
:
string
,
queries
:
DataQuery
[],
queries
:
DataQuery
[],
ra
wRange
:
Raw
TimeRange
,
ra
nge
:
TimeRange
,
mode
:
ExploreMode
,
mode
:
ExploreMode
,
containerWidth
:
number
,
containerWidth
:
number
,
eventBridge
:
Emitter
,
eventBridge
:
Emitter
,
...
@@ -273,8 +273,6 @@ export function initializeExplore(
...
@@ -273,8 +273,6 @@ export function initializeExplore(
originPanelId
:
number
originPanelId
:
number
):
ThunkResult
<
void
>
{
):
ThunkResult
<
void
>
{
return
async
(
dispatch
,
getState
)
=>
{
return
async
(
dispatch
,
getState
)
=>
{
const
timeZone
=
getTimeZone
(
getState
().
user
);
const
range
=
getTimeRange
(
timeZone
,
rawRange
);
dispatch
(
loadExploreDatasourcesAndSetDatasource
(
exploreId
,
datasourceName
));
dispatch
(
loadExploreDatasourcesAndSetDatasource
(
exploreId
,
datasourceName
));
dispatch
(
dispatch
(
initializeExploreAction
({
initializeExploreAction
({
...
...
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