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 {
DataSourceApi
,
PanelData
,
RawTimeRange
,
TimeRange
,
GraphSeriesXY
,
TimeZone
,
AbsoluteTimeRange
,
...
...
@@ -51,6 +52,7 @@ import {
DEFAULT_RANGE
,
DEFAULT_UI_STATE
,
getTimeRangeFromUrl
,
getTimeRange
,
lastUsedDatasourceKeyForOrgId
,
}
from
'app/core/utils/explore'
;
import
{
Emitter
}
from
'app/core/utils/emitter'
;
...
...
@@ -93,7 +95,7 @@ interface ExploreProps {
queryKeys
:
string
[];
initialDatasource
:
string
;
initialQueries
:
DataQuery
[];
initialRange
:
Raw
TimeRange
;
initialRange
:
TimeRange
;
mode
:
ExploreMode
;
initialUI
:
ExploreUIState
;
isLive
:
boolean
;
...
...
@@ -394,7 +396,9 @@ function mapStateToProps(state: StoreState, { exploreId }: ExploreProps): Partia
{})
as
ExploreUrlState
;
const
initialDatasource
=
datasource
||
store
.
get
(
lastUsedDatasourceKeyForOrgId
(
state
.
user
.
orgId
));
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
;
...
...
public/app/features/explore/state/actions.ts
View file @
ba7d8c1a
...
...
@@ -265,7 +265,7 @@ export function initializeExplore(
exploreId
:
ExploreId
,
datasourceName
:
string
,
queries
:
DataQuery
[],
ra
wRange
:
Raw
TimeRange
,
ra
nge
:
TimeRange
,
mode
:
ExploreMode
,
containerWidth
:
number
,
eventBridge
:
Emitter
,
...
...
@@ -273,8 +273,6 @@ export function initializeExplore(
originPanelId
:
number
):
ThunkResult
<
void
>
{
return
async
(
dispatch
,
getState
)
=>
{
const
timeZone
=
getTimeZone
(
getState
().
user
);
const
range
=
getTimeRange
(
timeZone
,
rawRange
);
dispatch
(
loadExploreDatasourcesAndSetDatasource
(
exploreId
,
datasourceName
));
dispatch
(
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