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
34dd1a22
Commit
34dd1a22
authored
Feb 04, 2019
by
Hugo Häggmark
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug with removing a QueryRow thats not part of nextQueries
parent
96aef3ba
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
public/app/features/explore/state/reducers.ts
+4
-3
public/app/store/configureStore.ts
+2
-2
No files found.
public/app/features/explore/state/reducers.ts
View file @
34dd1a22
...
...
@@ -331,7 +331,7 @@ export const itemReducer = reducerFactory<ExploreItemState>({} as ExploreItemSta
.
addMapper
({
filter
:
removeQueryRowAction
,
mapper
:
(
state
,
action
):
ExploreItemState
=>
{
const
{
datasourceInstance
,
initialQueries
,
queryIntervals
,
queryTransactions
}
=
state
;
const
{
datasourceInstance
,
initialQueries
,
queryIntervals
,
queryTransactions
,
queryKeys
}
=
state
;
const
{
index
}
=
action
.
payload
;
if
(
initialQueries
.
length
<=
1
)
{
...
...
@@ -339,9 +339,10 @@ export const itemReducer = reducerFactory<ExploreItemState>({} as ExploreItemSta
}
const
nextQueries
=
[...
initialQueries
.
slice
(
0
,
index
),
...
initialQueries
.
slice
(
index
+
1
)];
const
nextQueryKeys
=
[...
queryKeys
.
slice
(
0
,
index
),
...
queryKeys
.
slice
(
index
+
1
)];
// Discard transactions related to row query
const
nextQueryTransactions
=
queryTransactions
.
filter
(
qt
=>
qt
.
rowIndex
!==
index
);
const
nextQueryTransactions
=
queryTransactions
.
filter
(
qt
=>
nextQueries
.
some
(
nq
=>
nq
.
key
===
qt
.
query
.
key
)
);
const
results
=
calculateResultsFromQueryTransactions
(
nextQueryTransactions
,
datasourceInstance
,
...
...
@@ -354,7 +355,7 @@ export const itemReducer = reducerFactory<ExploreItemState>({} as ExploreItemSta
initialQueries
:
nextQueries
,
logsHighlighterExpressions
:
undefined
,
queryTransactions
:
nextQueryTransactions
,
queryKeys
:
getQueryKeys
(
nextQueries
,
state
.
datasourceInstance
)
,
queryKeys
:
nextQueryKeys
,
};
},
})
...
...
public/app/store/configureStore.ts
View file @
34dd1a22
import
{
createStore
,
applyMiddleware
,
compose
,
combineReducers
}
from
'redux'
;
import
thunk
from
'redux-thunk'
;
//
import { createLogger } from 'redux-logger';
import
{
createLogger
}
from
'redux-logger'
;
import
sharedReducers
from
'app/core/reducers'
;
import
alertingReducers
from
'app/features/alerting/state/reducers'
;
import
teamsReducers
from
'app/features/teams/state/reducers'
;
...
...
@@ -39,7 +39,7 @@ export function configureStore() {
if
(
process
.
env
.
NODE_ENV
!==
'production'
)
{
// DEV builds we had the logger middleware
setStore
(
createStore
(
rootReducer
,
{},
composeEnhancers
(
applyMiddleware
(
thunk
))));
setStore
(
createStore
(
rootReducer
,
{},
composeEnhancers
(
applyMiddleware
(
thunk
,
createLogger
()
))));
}
else
{
setStore
(
createStore
(
rootReducer
,
{},
composeEnhancers
(
applyMiddleware
(
thunk
))));
}
...
...
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