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
cee2e478
Commit
cee2e478
authored
Feb 11, 2019
by
Dominik Prokop
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not read store state from toggle panelaction creator
parent
14bf960b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
15 deletions
+19
-15
public/app/features/explore/GraphContainer.tsx
+1
-1
public/app/features/explore/LogsContainer.tsx
+1
-1
public/app/features/explore/TableContainer.tsx
+1
-1
public/app/features/explore/state/actions.ts
+16
-12
No files found.
public/app/features/explore/GraphContainer.tsx
View file @
cee2e478
...
...
@@ -25,7 +25,7 @@ interface GraphContainerProps {
export
class
GraphContainer
extends
PureComponent
<
GraphContainerProps
>
{
onClickGraphButton
=
()
=>
{
this
.
props
.
toggleGraph
(
this
.
props
.
exploreId
);
this
.
props
.
toggleGraph
(
this
.
props
.
exploreId
,
this
.
props
.
showingGraph
);
};
onChangeTime
=
(
timeRange
:
TimeRange
)
=>
{
...
...
public/app/features/explore/LogsContainer.tsx
View file @
cee2e478
...
...
@@ -32,7 +32,7 @@ interface LogsContainerProps {
export
class
LogsContainer
extends
PureComponent
<
LogsContainerProps
>
{
onClickLogsButton
=
()
=>
{
this
.
props
.
toggleLogs
(
this
.
props
.
exploreId
);
this
.
props
.
toggleLogs
(
this
.
props
.
exploreId
,
this
.
props
.
showingLogs
);
};
handleDedupStrategyChange
=
(
dedupStrategy
:
LogsDedupStrategy
)
=>
{
...
...
public/app/features/explore/TableContainer.tsx
View file @
cee2e478
...
...
@@ -21,7 +21,7 @@ interface TableContainerProps {
export
class
TableContainer
extends
PureComponent
<
TableContainerProps
>
{
onClickTableButton
=
()
=>
{
this
.
props
.
toggleTable
(
this
.
props
.
exploreId
);
this
.
props
.
toggleTable
(
this
.
props
.
exploreId
,
this
.
props
.
showingTable
);
};
render
()
{
...
...
public/app/features/explore/state/actions.ts
View file @
cee2e478
...
...
@@ -714,25 +714,20 @@ const togglePanelActionCreator = (
|
ActionCreator
<
ToggleGraphPayload
>
|
ActionCreator
<
ToggleLogsPayload
>
|
ActionCreator
<
ToggleTablePayload
>
)
=>
(
exploreId
:
ExploreId
)
=>
{
return
(
dispatch
,
getState
)
=>
{
let
shouldRunQueries
,
uiFragmentStateUpdate
:
Partial
<
ExploreUIState
>
;
)
=>
(
exploreId
:
ExploreId
,
isPanelVisible
:
boolean
)
=>
{
return
(
dispatch
)
=>
{
let
uiFragmentStateUpdate
:
Partial
<
ExploreUIState
>
;
const
shouldRunQueries
=
!
isPanelVisible
;
switch
(
actionCreator
.
type
)
{
case
toggleGraphAction
.
type
:
const
isShowingGraph
=
getState
().
explore
[
exploreId
].
showingGraph
;
shouldRunQueries
=
!
isShowingGraph
;
uiFragmentStateUpdate
=
{
showingGraph
:
!
isShowingGraph
};
uiFragmentStateUpdate
=
{
showingGraph
:
!
isPanelVisible
};
break
;
case
toggleLogsAction
.
type
:
const
isShowingLogs
=
getState
().
explore
[
exploreId
].
showingLogs
;
shouldRunQueries
=
!
isShowingLogs
;
uiFragmentStateUpdate
=
{
showingLogs
:
!
isShowingLogs
};
uiFragmentStateUpdate
=
{
showingLogs
:
!
isPanelVisible
};
break
;
case
toggleTableAction
.
type
:
const
isShowingTable
=
getState
().
explore
[
exploreId
].
showingTable
;
shouldRunQueries
=
!
isShowingTable
;
uiFragmentStateUpdate
=
{
showingTable
:
!
isShowingTable
};
uiFragmentStateUpdate
=
{
showingTable
:
!
isPanelVisible
};
break
;
}
...
...
@@ -768,3 +763,12 @@ export const changeDedupStrategy = (exploreId, dedupStrategy: LogsDedupStrategy)
dispatch
(
updateExploreUIState
(
exploreId
,
{
dedupStrategy
}));
};
};
/**
* Change logs deduplication strategy and update URL.
*/
export
const
hiddenLogLe
=
(
exploreId
,
dedupStrategy
:
LogsDedupStrategy
)
=>
{
return
dispatch
=>
{
dispatch
(
updateExploreUIState
(
exploreId
,
{
dedupStrategy
}));
};
};
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