KeybindingSrv: Prevent dashboard save modal when dashboard cannot be saved (#42505)

This commit is contained in:
Dominik Prokop 2021-12-01 13:47:47 +01:00 committed by GitHub
parent e170073aff
commit fa930e7dbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,6 +173,7 @@ export class KeybindingSrv {
}); });
this.bind('mod+s', () => { this.bind('mod+s', () => {
if (dashboard.meta.canSave) {
appEvents.publish( appEvents.publish(
new ShowModalReactEvent({ new ShowModalReactEvent({
component: SaveDashboardModalProxy, component: SaveDashboardModalProxy,
@ -181,6 +182,7 @@ export class KeybindingSrv {
}, },
}) })
); );
}
}); });
this.bind('t z', () => { this.bind('t z', () => {