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
4b524faf
Commit
4b524faf
authored
Oct 19, 2018
by
Dave Waters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial work to add shortcut to toggle legend - generic
parent
eabb04ce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
1 deletions
+14
-1
public/app/core/components/help/help.ts
+1
-0
public/app/core/services/keybindingSrv.ts
+12
-0
public/app/plugins/panel/graph/module.ts
+1
-1
No files found.
public/app/core/components/help/help.ts
View file @
4b524faf
...
...
@@ -34,6 +34,7 @@ export class HelpCtrl {
{
keys
:
[
'p'
,
's'
],
description
:
'Open Panel Share Modal'
},
{
keys
:
[
'p'
,
'd'
],
description
:
'Duplicate Panel'
},
{
keys
:
[
'p'
,
'r'
],
description
:
'Remove Panel'
},
{
keys
:
[
'p'
,
'l'
],
description
:
'Toggle panel legend'
},
],
'Time Range'
:
[
{
keys
:
[
't'
,
'z'
],
description
:
'Zoom out time range'
},
...
...
public/app/core/services/keybindingSrv.ts
View file @
4b524faf
...
...
@@ -242,6 +242,18 @@ export class KeybindingSrv {
}
});
// toggle panel legend
this
.
bind
(
'p l'
,
()
=>
{
if
(
dashboard
.
meta
.
focusPanelId
)
{
const
panelInfo
=
dashboard
.
getPanelInfoById
(
dashboard
.
meta
.
focusPanelId
);
if
(
panelInfo
.
panel
.
legend
)
{
const
panelRef
=
dashboard
.
getPanelById
(
dashboard
.
meta
.
focusPanelId
);
panelRef
.
legend
.
show
=
!
panelRef
.
legend
.
show
;
panelRef
.
refresh
();
}
}
});
// collapse all rows
this
.
bind
(
'd shift+c'
,
()
=>
{
dashboard
.
collapseRows
();
...
...
public/app/plugins/panel/graph/module.ts
View file @
4b524faf
...
...
@@ -147,7 +147,7 @@ class GraphCtrl extends MetricsPanelCtrl {
onInitPanelActions
(
actions
)
{
actions
.
push
({
text
:
'Export CSV'
,
click
:
'ctrl.exportCsv()'
});
actions
.
push
({
text
:
'Toggle legend'
,
click
:
'ctrl.toggleLegend()'
});
actions
.
push
({
text
:
'Toggle legend'
,
click
:
'ctrl.toggleLegend()'
,
shortcut
:
'p l'
});
}
issueQueries
(
datasource
)
{
...
...
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