From e02e3981f92dcb2d171a9848f0dd537391b1c67c Mon Sep 17 00:00:00 2001 From: Joshua Li Date: Wed, 28 Aug 2024 22:28:24 +0000 Subject: [PATCH] update query assist icon Signed-off-by: Joshua Li --- .../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 2539f5a05835..2b86245cc43d 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'; const [getAvailableLanguagesForDataSource, clearCache] = (() => { const availableLanguagesByDataSource: Map = new Map(); @@ -90,7 +91,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', + }), }; } },