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
0e5b790b
Commit
0e5b790b
authored
Mar 16, 2018
by
Alexander Zobnin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: fix rendering link to panel in collapsed row
parent
1014f7c4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletions
+21
-1
public/app/features/dashboard/view_state_srv.ts
+21
-1
No files found.
public/app/features/dashboard/view_state_srv.ts
View file @
0e5b790b
import
angular
from
'angular'
;
import
angular
from
'angular'
;
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
config
from
'app/core/config'
;
import
config
from
'app/core/config'
;
import
{
DashboardModel
}
from
'./dashboard_model'
;
// represents the transient view state
// represents the transient view state
// like fullscreen panel & edit
// like fullscreen panel & edit
...
@@ -8,7 +9,7 @@ export class DashboardViewState {
...
@@ -8,7 +9,7 @@ export class DashboardViewState {
state
:
any
;
state
:
any
;
panelScopes
:
any
;
panelScopes
:
any
;
$scope
:
any
;
$scope
:
any
;
dashboard
:
any
;
dashboard
:
DashboardModel
;
editStateChanged
:
any
;
editStateChanged
:
any
;
fullscreenPanel
:
any
;
fullscreenPanel
:
any
;
oldTimeRange
:
any
;
oldTimeRange
:
any
;
...
@@ -89,6 +90,12 @@ export class DashboardViewState {
...
@@ -89,6 +90,12 @@ export class DashboardViewState {
}
}
}
}
if
(
this
.
state
.
fullscreen
&&
this
.
state
.
panelId
)
{
// Trying to render panel in fullscreen when it's in the collapsed row causes an issue.
// So in this case expand collapsed row first.
this
.
toggleCollapsedPanelRow
(
this
.
state
.
panelId
);
}
// if no edit state cleanup tab parm
// if no edit state cleanup tab parm
if
(
!
this
.
state
.
edit
)
{
if
(
!
this
.
state
.
edit
)
{
delete
this
.
state
.
tab
;
delete
this
.
state
.
tab
;
...
@@ -103,6 +110,19 @@ export class DashboardViewState {
...
@@ -103,6 +110,19 @@ export class DashboardViewState {
this
.
syncState
();
this
.
syncState
();
}
}
toggleCollapsedPanelRow
(
panelId
)
{
for
(
let
panel
of
this
.
dashboard
.
panels
)
{
if
(
panel
.
collapsed
)
{
for
(
let
rowPanel
of
panel
.
panels
)
{
if
(
rowPanel
.
id
===
panelId
)
{
this
.
dashboard
.
toggleRow
(
panel
);
return
;
}
}
}
}
}
syncState
()
{
syncState
()
{
if
(
this
.
panelScopes
.
length
===
0
)
{
if
(
this
.
panelScopes
.
length
===
0
)
{
return
;
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