mirror of
https://github.com/grafana/grafana.git
synced 2026-07-29 15:59:50 -05:00
Merge pull request #12796 from dehrax/12768-panel-heights
WIP: Fit panels to screen height
This commit is contained in:
@@ -15,7 +15,14 @@ export class KeybindingSrv {
|
||||
timepickerOpen = false;
|
||||
|
||||
/** @ngInject */
|
||||
constructor(private $rootScope, private $location, private datasourceSrv, private timeSrv, private contextSrv) {
|
||||
constructor(
|
||||
private $rootScope,
|
||||
private $location,
|
||||
private datasourceSrv,
|
||||
private timeSrv,
|
||||
private contextSrv,
|
||||
private $route
|
||||
) {
|
||||
// clear out all shortcuts on route change
|
||||
$rootScope.$on('$routeChangeSuccess', () => {
|
||||
Mousetrap.reset();
|
||||
@@ -259,6 +266,14 @@ export class KeybindingSrv {
|
||||
this.bind('d v', () => {
|
||||
appEvents.emit('toggle-view-mode');
|
||||
});
|
||||
|
||||
//Autofit panels
|
||||
this.bind('d a', () => {
|
||||
this.$location.search('autofitpanels', this.$location.search().autofitpanels ? null : true);
|
||||
//Force reload
|
||||
|
||||
this.$route.reload();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user