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
3c143525
Commit
3c143525
authored
Nov 02, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(ux dashboard editmode): added shortcut to setting menu, #6442
parent
8980f481
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
3 deletions
+27
-3
public/app/features/dashboard/dashnav/dashnav.html
+6
-1
public/app/features/dashboard/keybindings.js
+1
-1
public/app/features/panel/panel_directive.ts
+0
-1
public/sass/components/_dropdown.scss
+20
-0
No files found.
public/app/features/dashboard/dashnav/dashnav.html
View file @
3c143525
...
@@ -52,7 +52,12 @@
...
@@ -52,7 +52,12 @@
<li
ng-if=
"::showSettingsMenu"
class=
"dropdown"
>
<li
ng-if=
"::showSettingsMenu"
class=
"dropdown"
>
<a
class=
"pointer"
ng-click=
"hideTooltip($event)"
bs-tooltip=
"'Manage dashboard'"
data-placement=
"bottom"
data-toggle=
"dropdown"
><i
class=
"fa fa-cog"
></i></a>
<a
class=
"pointer"
ng-click=
"hideTooltip($event)"
bs-tooltip=
"'Manage dashboard'"
data-placement=
"bottom"
data-toggle=
"dropdown"
><i
class=
"fa fa-cog"
></i></a>
<ul
class=
"dropdown-menu"
>
<ul
class=
"dropdown-menu"
>
<li
ng-if=
"dashboardMeta.canEdit"
><a
class=
"pointer"
ng-click=
"dashboard.toggleEditMode();"
>
Enter Build Mode
</a></li>
<li
ng-if=
"dashboardMeta.canEdit"
class=
"dropdown-menu-item-with-shortcut"
>
<a
class=
"pointer"
ng-click=
"dashboard.toggleEditMode();"
>
Build Mode
<span
class=
"dropdown-menu-item-shortcut"
>
b
</span>
</a>
</li>
<li
ng-if=
"dashboardMeta.canEdit"
><a
class=
"pointer"
ng-click=
"openEditView('settings');"
>
Settings
</a></li>
<li
ng-if=
"dashboardMeta.canEdit"
><a
class=
"pointer"
ng-click=
"openEditView('settings');"
>
Settings
</a></li>
<li
ng-if=
"dashboardMeta.canEdit"
><a
class=
"pointer"
ng-click=
"openEditView('annotations');"
>
Annotations
</a></li>
<li
ng-if=
"dashboardMeta.canEdit"
><a
class=
"pointer"
ng-click=
"openEditView('annotations');"
>
Annotations
</a></li>
<li
ng-if=
"dashboardMeta.canEdit"
><a
class=
"pointer"
ng-click=
"openEditView('templating');"
>
Templating
</a></li>
<li
ng-if=
"dashboardMeta.canEdit"
><a
class=
"pointer"
ng-click=
"openEditView('templating');"
>
Templating
</a></li>
...
...
public/app/features/dashboard/keybindings.js
View file @
3c143525
...
@@ -48,7 +48,7 @@ function(angular, $) {
...
@@ -48,7 +48,7 @@ function(angular, $) {
scope
.
broadcastRefresh
();
scope
.
broadcastRefresh
();
},
{
inputDisabled
:
true
});
},
{
inputDisabled
:
true
});
keyboardManager
.
bind
(
'
ctrl+
b'
,
function
()
{
keyboardManager
.
bind
(
'b'
,
function
()
{
scope
.
dashboard
.
toggleEditMode
();
scope
.
dashboard
.
toggleEditMode
();
},
{
inputDisabled
:
true
});
},
{
inputDisabled
:
true
});
...
...
public/app/features/panel/panel_directive.ts
View file @
3c143525
...
@@ -76,7 +76,6 @@ module.directive('grafanaPanel', function($rootScope) {
...
@@ -76,7 +76,6 @@ module.directive('grafanaPanel', function($rootScope) {
// set initial height
// set initial height
if
(
!
ctrl
.
containerHeight
)
{
if
(
!
ctrl
.
containerHeight
)
{
console
.
log
(
'setting initial height'
);
ctrl
.
calculatePanelHeight
();
ctrl
.
calculatePanelHeight
();
panelContainer
.
css
({
minHeight
:
ctrl
.
containerHeight
});
panelContainer
.
css
({
minHeight
:
ctrl
.
containerHeight
});
lastHeight
=
ctrl
.
containerHeight
;
lastHeight
=
ctrl
.
containerHeight
;
...
...
public/sass/components/_dropdown.scss
View file @
3c143525
...
@@ -258,3 +258,23 @@
...
@@ -258,3 +258,23 @@
z-index
:
1051
;
z-index
:
1051
;
margin-top
:
2px
;
// give it some space to breathe
margin-top
:
2px
;
// give it some space to breathe
}
}
.dropdown-menu-item-with-shortcut
{
a
{
min-width
:
12rem
;
}
}
.dropdown-menu-item-shortcut
{
display
:
block
;
float
:
right
;
color
:
$text-muted
;
&
:
:
before
{
font-family
:
FontAwesome
;
width
:
2rem
;
display
:
inline-block
;
text-align
:
center
;
content
:
"\f11c"
;
}
}
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