mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge pull request #11719 from mtanda/annotation_on_non_editable_dashboard
create annotation on non-editable dashboard
This commit is contained in:
commit
574baa7151
@ -674,7 +674,7 @@ function graphDirective(timeSrv, popoverSrv, contextSrv) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((ranges.ctrlKey || ranges.metaKey) && dashboard.meta.canEdit) {
|
||||
if ((ranges.ctrlKey || ranges.metaKey) && (dashboard.meta.canEdit || dashboard.meta.canMakeEditable)) {
|
||||
// Add annotation
|
||||
setTimeout(() => {
|
||||
eventManager.updateTime(ranges.xaxis);
|
||||
@ -695,7 +695,7 @@ function graphDirective(timeSrv, popoverSrv, contextSrv) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((pos.ctrlKey || pos.metaKey) && dashboard.meta.canEdit) {
|
||||
if ((pos.ctrlKey || pos.metaKey) && (dashboard.meta.canEdit || dashboard.meta.canMakeEditable)) {
|
||||
// Skip if range selected (added in "plotselected" event handler)
|
||||
let isRangeSelection = pos.x !== pos.x1;
|
||||
if (!isRangeSelection) {
|
||||
|
Loading…
Reference in New Issue
Block a user