From 56159a1c43070dffa54bfc23968663282920ac22 Mon Sep 17 00:00:00 2001 From: Diana Payton <52059945+oddlittlebird@users.noreply.github.com> Date: Mon, 29 Mar 2021 13:45:36 -0700 Subject: [PATCH] Annotation UI text edits (#32458) * Update event_editor.html * Update annotations_srv.ts * Update editor_ctrl.ts * Update standardAnnotationSupport.ts --- public/app/features/annotations/annotations_srv.ts | 6 +++--- public/app/features/annotations/editor_ctrl.ts | 12 ++++++------ .../features/annotations/partials/event_editor.html | 4 ++-- .../annotations/standardAnnotationSupport.ts | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/public/app/features/annotations/annotations_srv.ts b/public/app/features/annotations/annotations_srv.ts index 0d93568bd30..dcd8a59f72a 100644 --- a/public/app/features/annotations/annotations_srv.ts +++ b/public/app/features/annotations/annotations_srv.ts @@ -55,12 +55,12 @@ export class AnnotationsSrv { .then((results) => { // combine the annotations and flatten results let annotations: AnnotationEvent[] = flattenDeep(results[0]); - // when in edit mode we need to use this function to get the saved id + // when in edit mode we need to use this function to get the saved ID let panelFilterId = options.panel.getSavedId(); // filter out annotations that do not belong to requesting panel annotations = annotations.filter((item) => { - // if event has panel id and query is of type dashboard then panel and requesting panel id must match + // if event has panel ID and query is of type dashboard then panel and requesting panel ID must match if (item.panelId && item.source.type === 'dashboard') { return item.panelId === panelFilterId; } @@ -154,7 +154,7 @@ export class AnnotationsSrv { dashboard: dashboard, }); } - // Note: future annotatoin lifecycle will use observables directly + // Note: future annotation lifecycle will use observables directly return executeAnnotationQuery(options, datasource, annotation) .toPromise() .then((res) => { diff --git a/public/app/features/annotations/editor_ctrl.ts b/public/app/features/annotations/editor_ctrl.ts index eaf10085c54..2f5a940e9d2 100644 --- a/public/app/features/annotations/editor_ctrl.ts +++ b/public/app/features/annotations/editor_ctrl.ts @@ -33,12 +33,12 @@ export class AnnotationsEditorCtrl { buttonTitle: 'Add Annotation Query', infoBox: { __html: `
Annotations provide a way to integrate event data into your graphs. They are visualized as vertical lines - and icons on all graph panels. When you hover over an annotation icon you can get event text & tags for - the event. You can add annotation events directly from grafana by holding CTRL or CMD + click on graph (or + and icons on all graph panels. When you hover over an annotation icon you can get event text and tags for + the event. You can add annotation events directly from Grafana by holding Ctrl or CMD + click on graph (or drag region). These will be stored in Grafana's annotation database.
- Checkout the - Annotations documentation for more information.`, @@ -86,7 +86,7 @@ export class AnnotationsEditorCtrl { }); if (!replaced) { - console.warn('updating annotatoin, but not in the dashboard', annotation); + console.warn('updating annotation, but not in the dashboard', annotation); } this.currentAnnotation = annotation; @@ -132,7 +132,7 @@ export class AnnotationsEditorCtrl { add() { const sameName: any = _.find(this.dashboard.annotations.list, { name: this.currentAnnotation.name }); if (sameName) { - appEvents.emit(AppEvents.alertWarning, ['Validation', 'Annotations with the same name already exists']); + appEvents.emit(AppEvents.alertWarning, ['Validation', 'Annotation with the same name already exists']); return; } this.dashboard.annotations.list = [...this.dashboard.annotations.list, this.currentAnnotation]; diff --git a/public/app/features/annotations/partials/event_editor.html b/public/app/features/annotations/partials/event_editor.html index 286decb34ce..b11b24ca767 100644 --- a/public/app/features/annotations/partials/event_editor.html +++ b/public/app/features/annotations/partials/event_editor.html @@ -5,8 +5,8 @@