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
34f1611d
Commit
34f1611d
authored
Feb 22, 2018
by
Marcus Efraimsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboards: fix keyboard shortcut for expand/collapse rows
parent
609f3c1c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
6 deletions
+30
-6
public/app/core/services/keybindingSrv.ts
+2
-6
public/app/features/dashboard/dashboard_model.ts
+28
-0
No files found.
public/app/core/services/keybindingSrv.ts
View file @
34f1611d
...
...
@@ -213,16 +213,12 @@ export class KeybindingSrv {
// collapse all rows
this
.
bind
(
'd shift+c'
,
()
=>
{
for
(
let
row
of
dashboard
.
rows
)
{
row
.
collapse
=
true
;
}
dashboard
.
collapseRows
();
});
// expand all rows
this
.
bind
(
'd shift+e'
,
()
=>
{
for
(
let
row
of
dashboard
.
rows
)
{
row
.
collapse
=
false
;
}
dashboard
.
expandRows
();
});
this
.
bind
(
'd n'
,
e
=>
{
...
...
public/app/features/dashboard/dashboard_model.ts
View file @
34f1611d
...
...
@@ -524,6 +524,34 @@ export class DashboardModel {
this
.
removePanel
(
row
);
}
expandRows
()
{
for
(
let
i
=
0
;
i
<
this
.
panels
.
length
;
i
++
)
{
var
panel
=
this
.
panels
[
i
];
if
(
panel
.
type
!==
'row'
)
{
continue
;
}
if
(
panel
.
collapsed
)
{
this
.
toggleRow
(
panel
);
}
}
}
collapseRows
()
{
for
(
let
i
=
0
;
i
<
this
.
panels
.
length
;
i
++
)
{
var
panel
=
this
.
panels
[
i
];
if
(
panel
.
type
!==
'row'
)
{
continue
;
}
if
(
!
panel
.
collapsed
)
{
this
.
toggleRow
(
panel
);
}
}
}
setPanelFocus
(
id
)
{
this
.
meta
.
focusPanelId
=
id
;
}
...
...
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