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
ee1d4ce0
Commit
ee1d4ce0
authored
Oct 10, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix tab switching
parent
565edc1e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
public/app/core/reducers/location.ts
+9
-2
public/app/features/dashboard/dashgrid/PanelEditor.tsx
+1
-0
public/app/types/location.ts
+1
-0
No files found.
public/app/core/reducers/location.ts
View file @
ee1d4ce0
import
{
Action
}
from
'app/core/actions/location'
;
import
{
LocationState
}
from
'app/types'
;
import
{
renderUrl
}
from
'app/core/utils/url'
;
import
_
from
'lodash'
;
export
const
initialState
:
LocationState
=
{
url
:
''
,
...
...
@@ -12,11 +13,17 @@ export const initialState: LocationState = {
export
const
locationReducer
=
(
state
=
initialState
,
action
:
Action
):
LocationState
=>
{
switch
(
action
.
type
)
{
case
'UPDATE_LOCATION'
:
{
const
{
path
,
query
,
routeParams
}
=
action
.
payload
;
const
{
path
,
routeParams
}
=
action
.
payload
;
let
query
=
action
.
payload
.
query
||
state
.
query
;
if
(
action
.
payload
.
partial
)
{
query
=
_
.
defaults
(
query
,
state
.
query
);
}
return
{
url
:
renderUrl
(
path
||
state
.
path
,
query
),
path
:
path
||
state
.
path
,
query
:
query
||
state
.
query
,
query
:
query
,
routeParams
:
routeParams
||
state
.
routeParams
,
};
}
...
...
public/app/features/dashboard/dashgrid/PanelEditor.tsx
View file @
ee1d4ce0
...
...
@@ -67,6 +67,7 @@ export class PanelEditor extends React.Component<PanelEditorProps, any> {
store
.
dispatch
(
updateLocation
({
query
:
{
tab
:
tab
.
id
},
partial
:
true
,
})
);
};
...
...
public/app/types/location.ts
View file @
ee1d4ce0
...
...
@@ -2,6 +2,7 @@ export interface LocationUpdate {
path
?:
string
;
query
?:
UrlQueryMap
;
routeParams
?:
UrlQueryMap
;
partial
?:
boolean
;
}
export
interface
LocationState
{
...
...
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