Commit 574baa71 by Daniel Lee Committed by GitHub

Merge pull request #11719 from mtanda/annotation_on_non_editable_dashboard

create annotation on non-editable dashboard
parents 3305ac1f 87c9c475
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment