mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
annotations: you can now read annoations via manually created annoation query
This commit is contained in:
@@ -84,7 +84,7 @@ coreModule.directive('grafanaGraph', function($rootScope, timeSrv) {
|
||||
let thisPanelEvent = event.panel.id === ctrl.panel.id;
|
||||
|
||||
// Select time for new annotation
|
||||
let createAnnotation = ctrl.inAddAnnotationMode || event.pos.ctrlKey || event.pos.metaKey;
|
||||
let createAnnotation = event.pos.ctrlKey || event.pos.metaKey;
|
||||
if (createAnnotation && thisPanelEvent) {
|
||||
let timeRange = {
|
||||
from: event.pos.x,
|
||||
@@ -92,7 +92,6 @@ coreModule.directive('grafanaGraph', function($rootScope, timeSrv) {
|
||||
};
|
||||
|
||||
ctrl.showAddAnnotationModal(timeRange);
|
||||
ctrl.inAddAnnotationMode = false;
|
||||
}
|
||||
}, scope);
|
||||
|
||||
@@ -656,12 +655,11 @@ coreModule.directive('grafanaGraph', function($rootScope, timeSrv) {
|
||||
}
|
||||
|
||||
elem.bind("plotselected", function (event, ranges) {
|
||||
if (ctrl.inAddAnnotationMode || ranges.ctrlKey || ranges.metaKey) {
|
||||
if (ranges.ctrlKey || ranges.metaKey) {
|
||||
// Create new annotation from time range
|
||||
let timeRange = ranges.xaxis;
|
||||
ctrl.showAddAnnotationModal(timeRange);
|
||||
plot.clearSelection();
|
||||
ctrl.inAddAnnotationMode = false;
|
||||
} else {
|
||||
scope.$apply(function() {
|
||||
timeSrv.setTime({
|
||||
|
||||
Reference in New Issue
Block a user