mirror of
https://github.com/grafana/grafana.git
synced 2026-07-29 15:59:50 -05:00
KeybindingSrv: Prevent dashboard save modal when dashboard cannot be saved (#42505)
This commit is contained in:
@@ -173,14 +173,16 @@ export class KeybindingSrv {
|
||||
});
|
||||
|
||||
this.bind('mod+s', () => {
|
||||
appEvents.publish(
|
||||
new ShowModalReactEvent({
|
||||
component: SaveDashboardModalProxy,
|
||||
props: {
|
||||
dashboard,
|
||||
},
|
||||
})
|
||||
);
|
||||
if (dashboard.meta.canSave) {
|
||||
appEvents.publish(
|
||||
new ShowModalReactEvent({
|
||||
component: SaveDashboardModalProxy,
|
||||
props: {
|
||||
dashboard,
|
||||
},
|
||||
})
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
this.bind('t z', () => {
|
||||
|
||||
Reference in New Issue
Block a user