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
abf1f6a1
Commit
abf1f6a1
authored
Nov 03, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ux(dashboard): added back hide controls toggle and shortcut, #6442
parent
d0513d3a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
3 deletions
+29
-3
public/app/core/directives/dash_class.js
+7
-3
public/app/core/services/keybindingSrv.ts
+4
-0
public/app/features/dashboard/model.ts
+2
-0
public/app/features/dashboard/partials/settings.html
+6
-0
public/sass/pages/_dashboard.scss
+10
-0
No files found.
public/app/core/directives/dash_class.js
View file @
abf1f6a1
...
...
@@ -18,13 +18,17 @@ function (_, $, coreModule) {
elem
.
toggleClass
(
'panel-in-fullscreen'
,
false
);
});
$scope
.
$watch
(
'dashboard.editMode'
,
function
()
{
var
lastHideControlsVal
;
$scope
.
$watch
(
'dashboard.hideControls'
,
function
()
{
if
(
!
$scope
.
dashboard
)
{
return
;
}
var
editMode
=
$scope
.
dashboard
.
editMode
;
elem
.
toggleClass
(
'dash-edit-mode'
,
editMode
===
true
);
var
hideControls
=
$scope
.
dashboard
.
hideControls
;
if
(
lastHideControlsVal
!==
hideControls
)
{
elem
.
toggleClass
(
'hide-controls'
,
hideControls
);
lastHideControlsVal
=
hideControls
;
}
});
$scope
.
$watch
(
'playlistSrv'
,
function
(
newValue
)
{
...
...
public/app/core/services/keybindingSrv.ts
View file @
abf1f6a1
...
...
@@ -85,6 +85,10 @@ export class KeybindingSrv {
scope
.
broadcastRefresh
();
});
this
.
bind
(
'ctrl+h'
,
()
=>
{
dashboard
.
hideControls
=
!
dashboard
.
hideControls
;
});
this
.
bind
([
'ctrl+s'
,
'command+s'
],
()
=>
{
scope
.
appEvent
(
'save-dashboard'
);
});
...
...
public/app/features/dashboard/model.ts
View file @
abf1f6a1
...
...
@@ -22,6 +22,7 @@ export class DashboardModel {
rows
:
DashboardRow
[];
time
:
any
;
timepicker
:
any
;
hideControls
:
any
;
templating
:
any
;
annotations
:
any
;
refresh
:
any
;
...
...
@@ -51,6 +52,7 @@ export class DashboardModel {
this
.
timezone
=
data
.
timezone
||
''
;
this
.
editable
=
data
.
editable
!==
false
;
this
.
sharedCrosshair
=
data
.
sharedCrosshair
||
false
;
this
.
hideControls
=
data
.
hideControls
||
false
;
this
.
time
=
data
.
time
||
{
from
:
'now-6h'
,
to
:
'now'
};
this
.
timepicker
=
data
.
timepicker
||
{};
this
.
templating
=
this
.
ensureListExist
(
data
.
templating
);
...
...
public/app/features/dashboard/partials/settings.html
View file @
abf1f6a1
...
...
@@ -56,6 +56,12 @@
label-class=
"width-11"
>
</gf-form-switch>
<gf-form-switch
class=
"gf-form"
label=
"Hide Controls"
tooltip=
"Hide row controls. Shortcut: CTRL+H"
checked=
"dashboard.hideControls"
label-class=
"width-11"
>
</gf-form-switch>
<gf-form-switch
class=
"gf-form"
label=
"Shared Crosshair"
tooltip=
"Shared Crosshair line on all graphs. Shortcut: CTRL+O"
checked=
"dashboard.sharedCrosshair"
...
...
public/sass/pages/_dashboard.scss
View file @
abf1f6a1
...
...
@@ -18,6 +18,7 @@
.dashnav-refresh-action
,
.dashnav-zoom-out
,
.dashnav-action-icons
,
.dash-row-menu
,
.dashnav-move-timeframe
{
display
:
none
;
}
...
...
@@ -27,6 +28,15 @@
}
}
.hide-controls
{
.add-row-panel-hint
{
display
:
none
;
}
.dash-row-menu
{
display
:
none
;
}
}
div
.flot-text
{
color
:
$text-color
!
important
;
}
...
...
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