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
e9f1e86c
Unverified
Commit
e9f1e86c
authored
Sep 16, 2019
by
Hugo Häggmark
Committed by
GitHub
Sep 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: Fixes crash using back button with zoomed graph (#19122)
Fixes: #19114
parent
97ff7573
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletions
+28
-1
public/app/features/explore/state/reducers.test.ts
+27
-1
public/app/features/explore/state/reducers.ts
+1
-0
No files found.
public/app/features/explore/state/reducers.test.ts
View file @
e9f1e86c
...
...
@@ -20,6 +20,7 @@ import {
scanStopAction
,
toggleGraphAction
,
toggleTableAction
,
changeRangeAction
,
}
from
'./actionTypes'
;
import
{
Reducer
}
from
'redux'
;
import
{
ActionOf
}
from
'app/core/redux/actionCreatorFactory'
;
...
...
@@ -27,7 +28,7 @@ import { updateLocation } from 'app/core/actions/location';
import
{
serializeStateToUrlParam
}
from
'app/core/utils/explore'
;
import
TableModel
from
'app/core/table_model'
;
import
{
DataSourceApi
,
DataQuery
}
from
'@grafana/ui'
;
import
{
LogsModel
,
LogsDedupStrategy
}
from
'@grafana/data'
;
import
{
LogsModel
,
LogsDedupStrategy
,
dateTime
}
from
'@grafana/data'
;
describe
(
'Explore item reducer'
,
()
=>
{
describe
(
'scanning'
,
()
=>
{
...
...
@@ -196,6 +197,31 @@ describe('Explore item reducer', () => {
});
});
});
describe
(
'changing range'
,
()
=>
{
describe
(
'when changeRangeAction is dispatched'
,
()
=>
{
it
(
'then it should set correct state'
,
()
=>
{
reducerTester
()
.
givenReducer
(
itemReducer
,
{
update
:
{
...
makeInitialUpdateState
(),
range
:
true
},
range
:
null
,
absoluteRange
:
null
,
})
.
whenActionIsDispatched
(
changeRangeAction
({
exploreId
:
ExploreId
.
left
,
absoluteRange
:
{
from
:
1546297200000
,
to
:
1546383600000
},
range
:
{
from
:
dateTime
(
'2019-01-01'
),
to
:
dateTime
(
'2019-01-02'
),
raw
:
{
from
:
'now-1d'
,
to
:
'now'
}
},
})
)
.
thenStateShouldEqual
({
update
:
{
...
makeInitialUpdateState
(),
range
:
false
},
absoluteRange
:
{
from
:
1546297200000
,
to
:
1546383600000
},
range
:
{
from
:
dateTime
(
'2019-01-01'
),
to
:
dateTime
(
'2019-01-02'
),
raw
:
{
from
:
'now-1d'
,
to
:
'now'
}
},
});
});
});
});
});
export
const
setup
=
(
urlStateOverrides
?:
any
)
=>
{
...
...
public/app/features/explore/state/reducers.ts
View file @
e9f1e86c
...
...
@@ -540,6 +540,7 @@ export const itemReducer = reducerFactory<ExploreItemState>({} as ExploreItemSta
...
state
,
range
,
absoluteRange
,
update
:
makeInitialUpdateState
(),
};
},
})
...
...
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