From bc34874bbbc65cf1bb87fc635004775be5790c14 Mon Sep 17 00:00:00 2001 From: Erik Sundell Date: Thu, 7 Mar 2024 07:25:11 +0100 Subject: [PATCH] Annotations: Add selector to new query button (#83240) add selector --- .../settings/annotations/AnnotationSettingsList.tsx | 9 ++++++++- .../AnnotationSettings/AnnotationSettingsList.tsx | 10 +++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/public/app/features/dashboard-scene/settings/annotations/AnnotationSettingsList.tsx b/public/app/features/dashboard-scene/settings/annotations/AnnotationSettingsList.tsx index 89e83dfba18..3ceb2393f2e 100644 --- a/public/app/features/dashboard-scene/settings/annotations/AnnotationSettingsList.tsx +++ b/public/app/features/dashboard-scene/settings/annotations/AnnotationSettingsList.tsx @@ -119,7 +119,14 @@ export const AnnotationSettingsList = ({ annotations, onNew, onEdit, onMove, onD }} /> )} - {!showEmptyListCTA && New query} + {!showEmptyListCTA && ( + + New query + + )} ); }; diff --git a/public/app/features/dashboard/components/AnnotationSettings/AnnotationSettingsList.tsx b/public/app/features/dashboard/components/AnnotationSettings/AnnotationSettingsList.tsx index 21de6545af2..10b5e49de3d 100644 --- a/public/app/features/dashboard/components/AnnotationSettings/AnnotationSettingsList.tsx +++ b/public/app/features/dashboard/components/AnnotationSettings/AnnotationSettingsList.tsx @@ -2,6 +2,7 @@ import { css } from '@emotion/css'; import React, { useState } from 'react'; import { arrayUtils, AnnotationQuery } from '@grafana/data'; +import { selectors } from '@grafana/e2e-selectors'; import { getDataSourceSrv } from '@grafana/runtime'; import { Button, DeleteButton, IconButton, useStyles2, VerticalGroup } from '@grafana/ui'; import EmptyListCTA from 'app/core/components/EmptyListCTA/EmptyListCTA'; @@ -127,7 +128,14 @@ export const AnnotationSettingsList = ({ dashboard, onNew, onEdit }: Props) => { }} /> )} - {!showEmptyListCTA && New query} + {!showEmptyListCTA && ( + + New query + + )} ); };