mirror of
https://github.com/grafana/grafana.git
synced 2024-11-30 12:44:10 -06:00
Merge branch 'v4ux' of https://github.com/grafana/grafana into v4ux
This commit is contained in:
commit
80f8c0712c
@ -18,13 +18,17 @@ function (_, $, coreModule) {
|
|||||||
elem.toggleClass('panel-in-fullscreen', false);
|
elem.toggleClass('panel-in-fullscreen', false);
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.$watch('dashboard.editMode', function() {
|
var lastHideControlsVal;
|
||||||
|
$scope.$watch('dashboard.hideControls', function() {
|
||||||
if (!$scope.dashboard) {
|
if (!$scope.dashboard) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var editMode = $scope.dashboard.editMode;
|
var hideControls = $scope.dashboard.hideControls;
|
||||||
elem.toggleClass('dash-edit-mode', editMode === true);
|
if (lastHideControlsVal !== hideControls) {
|
||||||
|
elem.toggleClass('hide-controls', hideControls);
|
||||||
|
lastHideControlsVal = hideControls;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.$watch('playlistSrv', function(newValue) {
|
$scope.$watch('playlistSrv', function(newValue) {
|
||||||
|
@ -85,6 +85,10 @@ export class KeybindingSrv {
|
|||||||
scope.broadcastRefresh();
|
scope.broadcastRefresh();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.bind('ctrl+h', () => {
|
||||||
|
dashboard.hideControls = !dashboard.hideControls;
|
||||||
|
});
|
||||||
|
|
||||||
this.bind(['ctrl+s', 'command+s'], () => {
|
this.bind(['ctrl+s', 'command+s'], () => {
|
||||||
scope.appEvent('save-dashboard');
|
scope.appEvent('save-dashboard');
|
||||||
});
|
});
|
||||||
|
@ -22,6 +22,7 @@ export class DashboardModel {
|
|||||||
rows: DashboardRow[];
|
rows: DashboardRow[];
|
||||||
time: any;
|
time: any;
|
||||||
timepicker: any;
|
timepicker: any;
|
||||||
|
hideControls: any;
|
||||||
templating: any;
|
templating: any;
|
||||||
annotations: any;
|
annotations: any;
|
||||||
refresh: any;
|
refresh: any;
|
||||||
@ -51,6 +52,7 @@ export class DashboardModel {
|
|||||||
this.timezone = data.timezone || '';
|
this.timezone = data.timezone || '';
|
||||||
this.editable = data.editable !== false;
|
this.editable = data.editable !== false;
|
||||||
this.sharedCrosshair = data.sharedCrosshair || false;
|
this.sharedCrosshair = data.sharedCrosshair || false;
|
||||||
|
this.hideControls = data.hideControls || false;
|
||||||
this.time = data.time || { from: 'now-6h', to: 'now' };
|
this.time = data.time || { from: 'now-6h', to: 'now' };
|
||||||
this.timepicker = data.timepicker || {};
|
this.timepicker = data.timepicker || {};
|
||||||
this.templating = this.ensureListExist(data.templating);
|
this.templating = this.ensureListExist(data.templating);
|
||||||
|
@ -54,6 +54,12 @@
|
|||||||
tooltip="Uncheck, then save and reload to disable all dashboard editing"
|
tooltip="Uncheck, then save and reload to disable all dashboard editing"
|
||||||
checked="dashboard.editable"
|
checked="dashboard.editable"
|
||||||
label-class="width-11">
|
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>
|
||||||
<gf-form-switch class="gf-form"
|
<gf-form-switch class="gf-form"
|
||||||
label="Shared Crosshair"
|
label="Shared Crosshair"
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
.dashnav-refresh-action,
|
.dashnav-refresh-action,
|
||||||
.dashnav-zoom-out,
|
.dashnav-zoom-out,
|
||||||
.dashnav-action-icons,
|
.dashnav-action-icons,
|
||||||
|
.dash-row-menu,
|
||||||
.dashnav-move-timeframe {
|
.dashnav-move-timeframe {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@ -27,6 +28,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hide-controls {
|
||||||
|
.add-row-panel-hint {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.dash-row-menu {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
div.flot-text {
|
div.flot-text {
|
||||||
color: $text-color !important;
|
color: $text-color !important;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user