From e69815f189316b179960b2d25520c61fad5d3598 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 6 Oct 2023 22:02:05 +0000 Subject: [PATCH] Explorer minor UI updates (#1096) * explorer ui updates Signed-off-by: Shenoy Pratik * bug fixes and snapshot update Signed-off-by: Shenoy Pratik * update app analytics tests Signed-off-by: Shenoy Pratik * update view test snapshots Signed-off-by: Shenoy Pratik --------- Signed-off-by: Shenoy Pratik (cherry picked from commit 34068f125f5b4a3aa12c130327191ddbb25532a0) Signed-off-by: github-actions[bot] --- .../__snapshots__/create.test.tsx.snap | 16 + .../__snapshots__/log_config.test.tsx.snap | 28 + .../components/common/search/autocomplete.tsx | 11 +- public/components/common/search/search.scss | 16 +- public/components/common/search/search.tsx | 90 +- .../components/common/search/sql_search.tsx | 93 +- .../custom_panel_view.test.tsx.snap | 28 + .../datasources/datasources_selection.tsx | 12 +- .../event_analytics/explorer/explorer.scss | 2 +- .../event_analytics/explorer/explorer.tsx | 149 +- .../__snapshots__/sidebar.test.tsx.snap | 16430 ++++++++-------- .../explorer/sidebar/sidebar.tsx | 57 +- .../visualizations/direct_query_vis.tsx | 20 +- .../redux/slices/query_slice.ts | 2 +- 14 files changed, 8432 insertions(+), 8522 deletions(-) diff --git a/public/components/application_analytics/__tests__/__snapshots__/create.test.tsx.snap b/public/components/application_analytics/__tests__/__snapshots__/create.test.tsx.snap index 7eb808caea..48a65f4ac6 100644 --- a/public/components/application_analytics/__tests__/__snapshots__/create.test.tsx.snap +++ b/public/components/application_analytics/__tests__/__snapshots__/create.test.tsx.snap @@ -311,6 +311,7 @@ Object { placeholder="Enter PPL query" rows="6" spellcheck="false" + style="margin-top: 0px; height: 18px; padding: 8px;" type="search" > source = openserach_dashboard_sample_logs @@ -1564,6 +1565,7 @@ Object { placeholder="Enter PPL query" rows="6" spellcheck="false" + style="margin-top: 0px; height: 18px; padding: 8px;" type="search" > source = openserach_dashboard_sample_logs @@ -2758,6 +2760,7 @@ Object { placeholder="Enter PPL query" rows="6" spellcheck="false" + style="margin-top: 0px; height: 18px; padding: 8px;" type="search" /> @@ -3925,6 +3928,7 @@ Object { placeholder="Enter PPL query" rows="6" spellcheck="false" + style="margin-top: 0px; height: 18px; padding: 8px;" type="search" /> @@ -5151,6 +5155,7 @@ Object { placeholder="Enter PPL query" rows="6" spellcheck="false" + style="margin-top: 0px; height: 18px; padding: 8px;" type="search" /> @@ -6318,6 +6323,7 @@ Object { placeholder="Enter PPL query" rows="6" spellcheck="false" + style="margin-top: 0px; height: 18px; padding: 8px;" type="search" /> @@ -7537,6 +7543,7 @@ Object { placeholder="Enter PPL query" rows="6" spellcheck="false" + style="margin-top: 0px; height: 18px; padding: 8px;" type="search" /> @@ -8641,6 +8648,7 @@ Object { placeholder="Enter PPL query" rows="6" spellcheck="false" + style="margin-top: 0px; height: 18px; padding: 8px;" type="search" /> @@ -9807,6 +9815,7 @@ Object { placeholder="Enter PPL query" rows="6" spellcheck="false" + style="margin-top: 0px; height: 18px; padding: 8px;" type="search" > source = openserach_dashboard_sample_logs @@ -10940,6 +10949,7 @@ Object { placeholder="Enter PPL query" rows="6" spellcheck="false" + style="margin-top: 0px; height: 18px; padding: 8px;" type="search" > source = openserach_dashboard_sample_logs @@ -12132,6 +12142,7 @@ Object { placeholder="Enter PPL query" rows="6" spellcheck="false" + style="margin-top: 0px; height: 18px; padding: 8px;" type="search" /> @@ -13299,6 +13310,7 @@ Object { placeholder="Enter PPL query" rows="6" spellcheck="false" + style="margin-top: 0px; height: 18px; padding: 8px;" type="search" /> @@ -14525,6 +14537,7 @@ Object { placeholder="Enter PPL query" rows="6" spellcheck="false" + style="margin-top: 0px; height: 18px; padding: 8px;" type="search" /> @@ -15692,6 +15705,7 @@ Object { placeholder="Enter PPL query" rows="6" spellcheck="false" + style="margin-top: 0px; height: 18px; padding: 8px;" type="search" /> @@ -16920,6 +16934,7 @@ Object { placeholder="Enter PPL query" rows="6" spellcheck="false" + style="margin-top: 0px; height: 18px; padding: 8px;" type="search" > source = openserach_dashboard_sample_logs @@ -18169,6 +18184,7 @@ Object { placeholder="Enter PPL query" rows="6" spellcheck="false" + style="margin-top: 0px; height: 18px; padding: 8px;" type="search" > source = openserach_dashboard_sample_logs diff --git a/public/components/application_analytics/__tests__/__snapshots__/log_config.test.tsx.snap b/public/components/application_analytics/__tests__/__snapshots__/log_config.test.tsx.snap index b958bdaf36..7a96c78913 100644 --- a/public/components/application_analytics/__tests__/__snapshots__/log_config.test.tsx.snap +++ b/public/components/application_analytics/__tests__/__snapshots__/log_config.test.tsx.snap @@ -516,6 +516,13 @@ exports[`Log Config component renders empty log config 1`] = ` onKeyDown={[Function]} placeholder="Enter PPL query" spellCheck="false" + style={ + Object { + "height": "18px", + "marginTop": "0px", + "padding": "8px", + } + } type="search" value="" > @@ -541,6 +548,13 @@ exports[`Log Config component renders empty log config 1`] = ` placeholder="Enter PPL query" rows={6} spellCheck="false" + style={ + Object { + "height": "18px", + "marginTop": "0px", + "padding": "8px", + } + } type="search" value="" /> @@ -1126,6 +1140,13 @@ exports[`Log Config component renders with query 1`] = ` onKeyDown={[Function]} placeholder="Enter PPL query" spellCheck="false" + style={ + Object { + "height": "18px", + "marginTop": "0px", + "padding": "8px", + } + } type="search" value="source = openserach_dashboard_sample_logs" > @@ -1151,6 +1172,13 @@ exports[`Log Config component renders with query 1`] = ` placeholder="Enter PPL query" rows={6} spellCheck="false" + style={ + Object { + "height": "18px", + "marginTop": "0px", + "padding": "8px", + } + } type="search" value="source = openserach_dashboard_sample_logs" /> diff --git a/public/components/common/search/autocomplete.tsx b/public/components/common/search/autocomplete.tsx index 4b9ab22cb9..8272d329f1 100644 --- a/public/components/common/search/autocomplete.tsx +++ b/public/components/common/search/autocomplete.tsx @@ -4,15 +4,15 @@ */ /* eslint-disable react-hooks/exhaustive-deps */ -import './search.scss'; -import $ from 'jquery'; -import React, { useEffect, useMemo, useState } from 'react'; import { AutocompleteState, createAutocomplete } from '@algolia/autocomplete-core'; import { EuiFieldText, EuiTextArea } from '@elastic/eui'; +import $ from 'jquery'; import DSLService from 'public/services/requests/dsl'; -import { IQueryBarProps } from './search'; -import { uiSettingsService } from '../../../../common/utils'; +import React, { useEffect, useMemo, useState } from 'react'; import { AutocompleteItem } from '../../../../common/constants/autocomplete'; +import { uiSettingsService } from '../../../../common/utils'; +import { IQueryBarProps } from './search'; +import './search.scss'; interface AutocompleteProps extends IQueryBarProps { getSuggestions: ( @@ -136,6 +136,7 @@ export const Autocomplete = (props: AutocompleteProps) => { return (