From 9b17f409e46f6fdf8ecb17c56eed7d6064eaf17e Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 28 Aug 2024 16:29:12 -0700 Subject: [PATCH] [discover] update query assist icon (#7898) (#7899) (cherry picked from commit 7a8e4270a9cca875bd1546fa1a6a82214b0f90d9) Signed-off-by: Joshua Li Signed-off-by: github-actions[bot] Co-authored-by: github-actions[bot] --- .../public/assets/query_assist_mark.svg | 38 ++++++++++--------- .../query_assist/utils/create_extension.tsx | 7 +++- 2 files changed, 26 insertions(+), 19 deletions(-) diff --git a/src/plugins/query_enhancements/public/assets/query_assist_mark.svg b/src/plugins/query_enhancements/public/assets/query_assist_mark.svg index b744e8c35e8f..01699001144d 100644 --- a/src/plugins/query_enhancements/public/assets/query_assist_mark.svg +++ b/src/plugins/query_enhancements/public/assets/query_assist_mark.svg @@ -1,18 +1,22 @@ - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + diff --git a/src/plugins/query_enhancements/public/query_assist/utils/create_extension.tsx b/src/plugins/query_enhancements/public/query_assist/utils/create_extension.tsx index ac56f35a7281..3b0b12760749 100644 --- a/src/plugins/query_enhancements/public/query_assist/utils/create_extension.tsx +++ b/src/plugins/query_enhancements/public/query_assist/utils/create_extension.tsx @@ -3,6 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ +import { i18n } from '@osd/i18n'; import { HttpSetup } from 'opensearch-dashboards/public'; import React, { useEffect, useState } from 'react'; import { distinctUntilChanged, map, startWith, switchMap } from 'rxjs/operators'; @@ -14,8 +15,8 @@ import { } from '../../../../data/public'; import { API } from '../../../common'; import { ConfigSchema } from '../../../common/config'; -import { QueryAssistBanner, QueryAssistBar } from '../components'; import assistantMark from '../../assets/query_assist_mark.svg'; +import { QueryAssistBanner, QueryAssistBar } from '../components'; /** * @returns list of query assist supported languages for the given data source. @@ -84,7 +85,9 @@ export const createQueryAssistExtension = ( return { type: DATA_STRUCTURE_META_TYPES.FEATURE, icon: { type: assistantMark }, - tooltip: 'Query assist is available', + tooltip: i18n.translate('queryAssist.meta.icon.tooltip', { + defaultMessage: 'Query assist is available', + }), }; } },