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
994c79b5
Commit
994c79b5
authored
Jan 28, 2019
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '15048/navigate-from-not-saved-panel'
parents
dc125f1e
520756fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
public/app/features/dashboard/services/DashboardViewStateSrv.test.ts
+0
-1
public/app/features/dashboard/services/DashboardViewStateSrv.ts
+11
-2
No files found.
public/app/features/dashboard/services/DashboardViewStateSrv.test.ts
View file @
994c79b5
...
...
@@ -58,7 +58,6 @@ describe('when updating view state', () => {
it
(
'should remove params from query string'
,
()
=>
{
viewState
.
update
({
fullscreen
:
true
,
panelId
:
1
,
edit
:
true
});
viewState
.
update
({
fullscreen
:
false
});
expect
(
viewState
.
dashboard
.
meta
.
fullscreen
).
toBe
(
false
);
expect
(
viewState
.
state
.
fullscreen
).
toBe
(
null
);
});
});
...
...
public/app/features/dashboard/services/DashboardViewStateSrv.ts
View file @
994c79b5
...
...
@@ -72,7 +72,6 @@ export class DashboardViewStateSrv {
}
_
.
extend
(
this
.
state
,
state
);
this
.
dashboard
.
meta
.
fullscreen
=
this
.
state
.
fullscreen
;
if
(
!
this
.
state
.
fullscreen
)
{
this
.
state
.
fullscreen
=
null
;
...
...
@@ -117,10 +116,20 @@ export class DashboardViewStateSrv {
}
syncState
()
{
if
(
this
.
dashboard
.
meta
.
fullscreen
)
{
if
(
this
.
state
.
fullscreen
)
{
const
panel
=
this
.
dashboard
.
getPanelById
(
this
.
state
.
panelId
);
if
(
!
panel
)
{
this
.
state
.
fullscreen
=
null
;
this
.
state
.
panelId
=
null
;
this
.
state
.
edit
=
null
;
this
.
update
(
this
.
state
);
setTimeout
(()
=>
{
appEvents
.
emit
(
'alert-error'
,
[
'Error'
,
'Panel not found'
]);
},
100
);
return
;
}
...
...
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