From bed2f0ff674586017e8a40a68035776fabe8d365 Mon Sep 17 00:00:00 2001 From: Miki Date: Wed, 10 Jul 2024 17:21:21 -0700 Subject: [PATCH 01/11] Use EuiSmallButton Signed-off-by: Miki --- common/utils/toast_helper.tsx | 8 +++--- public/components/Main/main.tsx | 6 ++--- public/components/PPLPage/PPLPage.tsx | 22 ++++++++-------- .../components/QueryResults/QueryResults.tsx | 6 ++--- .../QueryResults/QueryResultsBody.tsx | 10 +++---- .../QueryResults/async_query_body.tsx | 10 +++---- public/components/SQLPage/CreateButton.tsx | 6 ++--- public/components/SQLPage/SQLPage.tsx | 26 +++++++++---------- .../SQLPage/acceleration_index_flyout.tsx | 10 +++---- .../create/create_acceleration.tsx | 6 ++--- .../selectors/define_index_options.tsx | 6 ++--- .../materialized_view/add_column_popover.tsx | 2 +- .../skipping_index/add_fields_modal.tsx | 8 +++--- .../skipping_index/delete_fields_modal.tsx | 8 +++--- .../skipping_index/skipping_index_builder.tsx | 10 +++---- 15 files changed, 72 insertions(+), 72 deletions(-) diff --git a/common/utils/toast_helper.tsx b/common/utils/toast_helper.tsx index d1209a92..b0876ebc 100644 --- a/common/utils/toast_helper.tsx +++ b/common/utils/toast_helper.tsx @@ -4,7 +4,7 @@ */ import { - EuiButton, + EuiSmallButton, EuiCodeBlock, EuiModal, EuiModalBody, @@ -61,7 +61,7 @@ const loadErrorModal = (errorDetailsMessage: string) => { - modal.close()}>Close + modal.close()}>Close ) @@ -80,9 +80,9 @@ export const RaiseErrorToast = ({ errorToastMessage, 'danger', toMountPoint( - loadErrorModal(errorDetailsMessage)}> + loadErrorModal(errorDetailsMessage)}> Error details - + ) ); diff --git a/public/components/Main/main.tsx b/public/components/Main/main.tsx index d64bcbcd..6f7f2edd 100644 --- a/public/components/Main/main.tsx +++ b/public/components/Main/main.tsx @@ -4,7 +4,7 @@ */ import { - EuiButton, + EuiSmallButton, EuiButtonIcon, EuiCallOut, EuiComboBoxOptionOption, @@ -1132,9 +1132,9 @@ export class Main extends React.Component { - + {linkTitle} - + diff --git a/public/components/PPLPage/PPLPage.tsx b/public/components/PPLPage/PPLPage.tsx index 1915e6c4..bcc8a701 100644 --- a/public/components/PPLPage/PPLPage.tsx +++ b/public/components/PPLPage/PPLPage.tsx @@ -4,7 +4,7 @@ */ import { - EuiButton, + EuiSmallButton, EuiCodeBlock, EuiCodeEditor, EuiComboBoxOptionOption, @@ -91,9 +91,9 @@ export class PPLPage extends React.Component { - + Close - + @@ -129,7 +129,7 @@ export class PPLPage extends React.Component { className="sql-editor-buttons" grow={false} > - { onClick={() => this.props.onRun(this.props.pplQuery)} > {this.props.asyncLoading ? 'Running' : 'Run'} - + { this.props.onClear(); }} > - + Clear - + {this.props.selectedDatasource && this.props.selectedDatasource[0].label === 'OpenSearch' ? ( this.props.onTranslate(this.props.pplQuery)}> - Explain - + ) : ( this.props.updatePPLQueries(SAMPLE_PPL_QUERY)}> - + Sample Query - + )} diff --git a/public/components/QueryResults/QueryResults.tsx b/public/components/QueryResults/QueryResults.tsx index e0daa960..549fc16b 100644 --- a/public/components/QueryResults/QueryResults.tsx +++ b/public/components/QueryResults/QueryResults.tsx @@ -9,7 +9,7 @@ import { SortableProperties, SortableProperty } from '@elastic/eui/lib/services' // @ts-ignore import { Comparators, - EuiButton, + EuiSmallButton, EuiButtonIcon, EuiComboBoxOptionOption, EuiContextMenuItem, @@ -324,14 +324,14 @@ export class QueryResults extends React.Component this.props.setIsResultFullScreen(false)} /> ) : ( - this.props.setIsResultFullScreen(true)} > Full screen view - + ))} diff --git a/public/components/QueryResults/QueryResultsBody.tsx b/public/components/QueryResults/QueryResultsBody.tsx index b2ac3e48..2014fc1f 100644 --- a/public/components/QueryResults/QueryResultsBody.tsx +++ b/public/components/QueryResults/QueryResultsBody.tsx @@ -9,7 +9,7 @@ import { SortableProperties } from '@elastic/eui/lib/services'; // @ts-ignore import { Comparators, - EuiButton, + EuiSmallButton, EuiButtonIcon, EuiCodeEditor, EuiComboBoxOptionOption, @@ -190,9 +190,9 @@ class QueryResultsBody extends React.Component - + Close - + @@ -860,14 +860,14 @@ class QueryResultsBody extends React.Component Download - + ); let modal; diff --git a/public/components/QueryResults/async_query_body.tsx b/public/components/QueryResults/async_query_body.tsx index 7c326bca..490860fd 100644 --- a/public/components/QueryResults/async_query_body.tsx +++ b/public/components/QueryResults/async_query_body.tsx @@ -4,7 +4,7 @@ */ import { - EuiButton, + EuiSmallButton, EuiFlexGroup, EuiIcon, EuiLoadingSpinner, @@ -41,9 +41,9 @@ export function AsyncQueryBody(props: AsyncQueryBodyProps) { {asyncQueryError} - + Close - + ); @@ -58,7 +58,7 @@ export function AsyncQueryBody(props: AsyncQueryBodyProps) {

Query failed

The query failed to execute and the operation could not be complete. - showModal()}>View error details + showModal()}>View error details {modal} ) : ( @@ -69,7 +69,7 @@ export function AsyncQueryBody(props: AsyncQueryBodyProps) { Status: {asyncLoadingStatus} {asyncLoadingStatus !== AsyncQueryStatus.Scheduled && ( - Cancel + Cancel )} )} diff --git a/public/components/SQLPage/CreateButton.tsx b/public/components/SQLPage/CreateButton.tsx index 2120b926..37c4e013 100644 --- a/public/components/SQLPage/CreateButton.tsx +++ b/public/components/SQLPage/CreateButton.tsx @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { EuiButton, EuiComboBoxOptionOption, EuiContextMenu, EuiPopover } from '@elastic/eui'; +import { EuiSmallButton, EuiComboBoxOptionOption, EuiContextMenu, EuiPopover } from '@elastic/eui'; import React, { useState } from 'react'; import { COVERING_INDEX_QUERY, @@ -66,9 +66,9 @@ export const CreateButton = ({ updateSQLQueries, selectedDatasource }: CreateBut ]; const button = ( - togglePopover(null)}> + togglePopover(null)}> Create - + ); return ( diff --git a/public/components/SQLPage/SQLPage.tsx b/public/components/SQLPage/SQLPage.tsx index 372c43c4..808332ed 100644 --- a/public/components/SQLPage/SQLPage.tsx +++ b/public/components/SQLPage/SQLPage.tsx @@ -4,7 +4,7 @@ */ import { - EuiButton, + EuiSmallButton, EuiCodeBlock, EuiCodeEditor, EuiComboBoxOptionOption, @@ -123,9 +123,9 @@ export class SQLPage extends React.Component { - + Close - + @@ -160,7 +160,7 @@ export class SQLPage extends React.Component { - { onClick={() => this.props.onRun(this.props.sqlQuery)} > {this.props.asyncLoading ? 'Running' : 'Run'} - + { this.props.onClear(); }} > - Clear - + {this.props.selectedDatasource && this.props.selectedDatasource[0].label === 'OpenSearch' ? ( @@ -191,22 +191,22 @@ export class SQLPage extends React.Component { grow={false} onClick={() => this.props.onTranslate(this.props.sqlQuery)} > - Explain - + ) : ( this.props.updateSQLQueries(SAMPLE_SQL_QUERY)} > - + Sample Query - + )} @@ -214,7 +214,7 @@ export class SQLPage extends React.Component { {this.props.selectedDatasource && this.props.selectedDatasource[0].label !== 'OpenSearch' && ( - this.renderCreateAccelerationFlyout({ @@ -225,7 +225,7 @@ export class SQLPage extends React.Component { isDisabled={this.props.asyncLoading} > Accelerate Table - + )} diff --git a/public/components/SQLPage/acceleration_index_flyout.tsx b/public/components/SQLPage/acceleration_index_flyout.tsx index 06b118dc..847fec0e 100644 --- a/public/components/SQLPage/acceleration_index_flyout.tsx +++ b/public/components/SQLPage/acceleration_index_flyout.tsx @@ -4,7 +4,7 @@ */ import { - EuiButton, + EuiSmallButton, EuiButtonEmpty, EuiDescriptionList, EuiDescriptionListDescription, @@ -146,7 +146,7 @@ export const AccelerationIndexFlyout = ({ - {`Describe ${indexMetaData.contextType}`} - + - {`Drop ${indexMetaData.contextType}`} - + diff --git a/public/components/acceleration/create/create_acceleration.tsx b/public/components/acceleration/create/create_acceleration.tsx index 82269449..14a6b9b5 100644 --- a/public/components/acceleration/create/create_acceleration.tsx +++ b/public/components/acceleration/create/create_acceleration.tsx @@ -4,7 +4,7 @@ */ import { - EuiButton, + EuiSmallButton, EuiButtonEmpty, EuiComboBoxOptionOption, EuiFlexGroup, @@ -144,9 +144,9 @@ export const CreateAcceleration = ({ - + Copy Query to Editor - + diff --git a/public/components/acceleration/selectors/define_index_options.tsx b/public/components/acceleration/selectors/define_index_options.tsx index 9f8c89b8..c5a63361 100644 --- a/public/components/acceleration/selectors/define_index_options.tsx +++ b/public/components/acceleration/selectors/define_index_options.tsx @@ -4,7 +4,7 @@ */ import { - EuiButton, + EuiSmallButton, EuiFieldText, EuiFlexGroup, EuiFlexItem, @@ -52,9 +52,9 @@ export const DefineIndexOptions = ({ - setModalComponent(<>)} fill> + setModalComponent(<>)} fill> Close - + ); diff --git a/public/components/acceleration/visual_editors/materialized_view/add_column_popover.tsx b/public/components/acceleration/visual_editors/materialized_view/add_column_popover.tsx index f396e0a8..6dfb4686 100644 --- a/public/components/acceleration/visual_editors/materialized_view/add_column_popover.tsx +++ b/public/components/acceleration/visual_editors/materialized_view/add_column_popover.tsx @@ -4,7 +4,7 @@ */ import { - EuiButton, + EuiSmallButton, EuiButtonEmpty, EuiComboBox, EuiComboBoxOptionOption, diff --git a/public/components/acceleration/visual_editors/skipping_index/add_fields_modal.tsx b/public/components/acceleration/visual_editors/skipping_index/add_fields_modal.tsx index 2fc8d883..f0fdf2e9 100644 --- a/public/components/acceleration/visual_editors/skipping_index/add_fields_modal.tsx +++ b/public/components/acceleration/visual_editors/skipping_index/add_fields_modal.tsx @@ -4,7 +4,7 @@ */ import { - EuiButton, + EuiSmallButton, EuiInMemoryTable, EuiModal, EuiModalBody, @@ -84,8 +84,8 @@ export const AddFieldsModal = ({ - setIsAddModalVisible(false)}>Cancel - setIsAddModalVisible(false)}>Cancel + { setAccelerationFormData( producer((accData) => { @@ -105,7 +105,7 @@ export const AddFieldsModal = ({ fill > Add - + ); diff --git a/public/components/acceleration/visual_editors/skipping_index/delete_fields_modal.tsx b/public/components/acceleration/visual_editors/skipping_index/delete_fields_modal.tsx index 225ff06d..2bb36fb0 100644 --- a/public/components/acceleration/visual_editors/skipping_index/delete_fields_modal.tsx +++ b/public/components/acceleration/visual_editors/skipping_index/delete_fields_modal.tsx @@ -4,7 +4,7 @@ */ import { - EuiButton, + EuiSmallButton, EuiInMemoryTable, EuiModal, EuiModalBody, @@ -80,8 +80,8 @@ export const DeleteFieldsModal = ({ - setIsDeleteModalVisible(false)}>Cancel - setIsDeleteModalVisible(false)}>Cancel + { setAccelerationFormData({ ...accelerationFormData, @@ -97,7 +97,7 @@ export const DeleteFieldsModal = ({ fill > Delete - + ); diff --git a/public/components/acceleration/visual_editors/skipping_index/skipping_index_builder.tsx b/public/components/acceleration/visual_editors/skipping_index/skipping_index_builder.tsx index 104cdb0b..01d9863e 100644 --- a/public/components/acceleration/visual_editors/skipping_index/skipping_index_builder.tsx +++ b/public/components/acceleration/visual_editors/skipping_index/skipping_index_builder.tsx @@ -5,7 +5,7 @@ import { EuiBasicTable, - EuiButton, + EuiSmallButton, EuiButtonIcon, EuiFlexGroup, EuiFlexItem, @@ -179,14 +179,14 @@ export const SkippingIndexBuilder = ({ /> - setIsAddModalVisible(true)}> + setIsAddModalVisible(true)}> Add fields - + - setIsDeleteModalVisible(true)} color="danger"> + setIsDeleteModalVisible(true)} color="danger"> Bulk delete - + {modal} From 03ce82574a39d6cf651b47254cd387c6feea2f97 Mon Sep 17 00:00:00 2001 From: Miki Date: Wed, 10 Jul 2024 23:05:09 -0700 Subject: [PATCH 02/11] Use EuiSmallButtonIcon Signed-off-by: Miki --- public/components/QueryResults/QueryResults.tsx | 4 ++-- public/components/QueryResults/QueryResultsBody.tsx | 6 +++--- .../visual_editors/materialized_view/column_expression.tsx | 4 ++-- .../skipping_index/skipping_index_builder.tsx | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/components/QueryResults/QueryResults.tsx b/public/components/QueryResults/QueryResults.tsx index 549fc16b..b8cc141a 100644 --- a/public/components/QueryResults/QueryResults.tsx +++ b/public/components/QueryResults/QueryResults.tsx @@ -10,7 +10,7 @@ import { SortableProperties, SortableProperty } from '@elastic/eui/lib/services' import { Comparators, EuiSmallButton, - EuiButtonIcon, + EuiSmallButtonIcon, EuiComboBoxOptionOption, EuiContextMenuItem, EuiContextMenuPanel, @@ -317,7 +317,7 @@ export class QueryResults extends React.Component {this.props.queryResults.length > 0 && (this.props.isResultFullScreen ? ( - this.toggleNodeData(node, expandedRowMap)} aria-label={ @@ -426,7 +426,7 @@ class QueryResultsBody extends React.Component this.updateExpandedRowMap(node, expandedRowMap)} aria-label={ expandedRowMap[node.parent!.nodeId] && diff --git a/public/components/acceleration/visual_editors/materialized_view/column_expression.tsx b/public/components/acceleration/visual_editors/materialized_view/column_expression.tsx index 9569b2d8..56c1d8c5 100644 --- a/public/components/acceleration/visual_editors/materialized_view/column_expression.tsx +++ b/public/components/acceleration/visual_editors/materialized_view/column_expression.tsx @@ -4,7 +4,7 @@ */ import { - EuiButtonIcon, + EuiSmallButtonIcon, EuiComboBox, EuiExpression, EuiFieldText, @@ -177,7 +177,7 @@ export const ColumnExpression = ({ )} - { return ( - { setAccelerationFormData({ ...accelerationFormData, From 6aad0e2fdffb7196715f51795b1165172f3ad195 Mon Sep 17 00:00:00 2001 From: Miki Date: Thu, 11 Jul 2024 08:10:34 -0700 Subject: [PATCH 03/11] Use EuiSmallButtonEmpty Signed-off-by: Miki --- common/utils/toast_helper.tsx | 5 +++-- public/components/QueryResults/QueryResults.tsx | 6 +++--- .../components/QueryResults/QueryResultsBody.tsx | 5 +++-- .../SQLPage/acceleration_index_flyout.tsx | 16 ++++++++-------- .../acceleration/create/create_acceleration.tsx | 6 +++--- .../materialized_view/add_column_popover.tsx | 6 +++--- 6 files changed, 23 insertions(+), 21 deletions(-) diff --git a/common/utils/toast_helper.tsx b/common/utils/toast_helper.tsx index b0876ebc..4499bbc5 100644 --- a/common/utils/toast_helper.tsx +++ b/common/utils/toast_helper.tsx @@ -5,6 +5,7 @@ import { EuiSmallButton, + EuiButton, EuiCodeBlock, EuiModal, EuiModalBody, @@ -80,9 +81,9 @@ export const RaiseErrorToast = ({ errorToastMessage, 'danger', toMountPoint( - loadErrorModal(errorDetailsMessage)}> + loadErrorModal(errorDetailsMessage)}> Error details - + ) ); diff --git a/public/components/QueryResults/QueryResults.tsx b/public/components/QueryResults/QueryResults.tsx index b8cc141a..6897d288 100644 --- a/public/components/QueryResults/QueryResults.tsx +++ b/public/components/QueryResults/QueryResults.tsx @@ -9,7 +9,7 @@ import { SortableProperties, SortableProperty } from '@elastic/eui/lib/services' // @ts-ignore import { Comparators, - EuiSmallButton, + EuiButton, EuiSmallButtonIcon, EuiComboBoxOptionOption, EuiContextMenuItem, @@ -324,14 +324,14 @@ export class QueryResults extends React.Component this.props.setIsResultFullScreen(false)} /> ) : ( - this.props.setIsResultFullScreen(true)} > Full screen view - + ))} diff --git a/public/components/QueryResults/QueryResultsBody.tsx b/public/components/QueryResults/QueryResultsBody.tsx index 41c07dd3..3439be16 100644 --- a/public/components/QueryResults/QueryResultsBody.tsx +++ b/public/components/QueryResults/QueryResultsBody.tsx @@ -10,6 +10,7 @@ import { SortableProperties } from '@elastic/eui/lib/services'; import { Comparators, EuiSmallButton, + EuiButton, EuiSmallButtonIcon, EuiCodeEditor, EuiComboBoxOptionOption, @@ -860,14 +861,14 @@ class QueryResultsBody extends React.Component Download - + ); let modal; diff --git a/public/components/SQLPage/acceleration_index_flyout.tsx b/public/components/SQLPage/acceleration_index_flyout.tsx index 847fec0e..f85510f6 100644 --- a/public/components/SQLPage/acceleration_index_flyout.tsx +++ b/public/components/SQLPage/acceleration_index_flyout.tsx @@ -4,8 +4,8 @@ */ import { - EuiSmallButton, - EuiButtonEmpty, + EuiButton, + EuiSmallButtonEmpty, EuiDescriptionList, EuiDescriptionListDescription, EuiDescriptionListTitle, @@ -139,14 +139,14 @@ export const AccelerationIndexFlyout = ({ - + Close - + - {`Describe ${indexMetaData.contextType}`} - + - {`Drop ${indexMetaData.contextType}`} - + diff --git a/public/components/acceleration/create/create_acceleration.tsx b/public/components/acceleration/create/create_acceleration.tsx index 14a6b9b5..85456666 100644 --- a/public/components/acceleration/create/create_acceleration.tsx +++ b/public/components/acceleration/create/create_acceleration.tsx @@ -5,7 +5,7 @@ import { EuiSmallButton, - EuiButtonEmpty, + EuiSmallButtonEmpty, EuiComboBoxOptionOption, EuiFlexGroup, EuiFlexItem, @@ -139,9 +139,9 @@ export const CreateAcceleration = ({ - + Close - + diff --git a/public/components/acceleration/visual_editors/materialized_view/add_column_popover.tsx b/public/components/acceleration/visual_editors/materialized_view/add_column_popover.tsx index 6dfb4686..7a9a6ea4 100644 --- a/public/components/acceleration/visual_editors/materialized_view/add_column_popover.tsx +++ b/public/components/acceleration/visual_editors/materialized_view/add_column_popover.tsx @@ -5,7 +5,7 @@ import { EuiSmallButton, - EuiButtonEmpty, + EuiSmallButtonEmpty, EuiComboBox, EuiComboBoxOptionOption, EuiFieldText, @@ -96,7 +96,7 @@ export const AddColumnPopOver = ({ { @@ -106,7 +106,7 @@ export const AddColumnPopOver = ({ size="xs" > Add Column - + } isOpen={isColumnPopOverOpen} closePopover={() => setIsColumnPopOverOpen(false)} From af10c4fd90f2d0a6177a4bd7c51ba86599fa29dc Mon Sep 17 00:00:00 2001 From: Miki Date: Thu, 11 Jul 2024 08:46:54 -0700 Subject: [PATCH 04/11] Use EuiCompressedFormRow Signed-off-by: Miki --- .../selectors/define_index_options.tsx | 6 ++--- .../selectors/index_setting_options.tsx | 26 +++++++++---------- .../selectors/index_type_selector.tsx | 6 ++--- .../selectors/source_selector.tsx | 14 +++++----- .../materialized_view/add_column_popover.tsx | 14 +++++----- .../materialized_view/column_expression.tsx | 14 +++++----- .../group_by_tumble_expression.tsx | 14 +++++----- 7 files changed, 47 insertions(+), 47 deletions(-) diff --git a/public/components/acceleration/selectors/define_index_options.tsx b/public/components/acceleration/selectors/define_index_options.tsx index c5a63361..2bfd7adc 100644 --- a/public/components/acceleration/selectors/define_index_options.tsx +++ b/public/components/acceleration/selectors/define_index_options.tsx @@ -8,7 +8,7 @@ import { EuiFieldText, EuiFlexGroup, EuiFlexItem, - EuiFormRow, + EuiCompressedFormRow, EuiIconTip, EuiLink, EuiMarkdownFormat, @@ -94,7 +94,7 @@ export const DefineIndexOptions = ({

Index settings

- - + {modalComponent} ); diff --git a/public/components/acceleration/selectors/index_setting_options.tsx b/public/components/acceleration/selectors/index_setting_options.tsx index 12cd2829..f773d60f 100644 --- a/public/components/acceleration/selectors/index_setting_options.tsx +++ b/public/components/acceleration/selectors/index_setting_options.tsx @@ -6,7 +6,7 @@ import { EuiFieldNumber, EuiFieldText, - EuiFormRow, + EuiCompressedFormRow, EuiRadioGroup, EuiSelect, EuiSpacer, @@ -150,7 +150,7 @@ export const IndexSettingOptions = ({ accelerationFormData={accelerationFormData} setAccelerationFormData={setAccelerationFormData} /> - - - + - - + @@ -210,9 +210,9 @@ export const IndexSettingOptions = ({ onChange={onChangeRefreshType} name="refresh type radio group" /> - + {refreshTypeSelected === intervalRefreshId && ( - } /> - + )} {refreshTypeSelected !== manualRefreshId && ( - - + )} {accelerationFormData.accelerationIndexType === 'materialized' && ( - } /> - + )} ); diff --git a/public/components/acceleration/selectors/index_type_selector.tsx b/public/components/acceleration/selectors/index_type_selector.tsx index 22c364d0..e3494cc4 100644 --- a/public/components/acceleration/selectors/index_type_selector.tsx +++ b/public/components/acceleration/selectors/index_type_selector.tsx @@ -6,7 +6,7 @@ import { EuiComboBox, EuiComboBoxOptionOption, - EuiFormRow, + EuiCompressedFormRow, EuiLink, EuiText, htmlIdGenerator, @@ -90,7 +90,7 @@ export const IndexTypeSelector = ({ }; return ( <> - - + ); }; diff --git a/public/components/acceleration/selectors/source_selector.tsx b/public/components/acceleration/selectors/source_selector.tsx index 793fcffd..0a5adb15 100644 --- a/public/components/acceleration/selectors/source_selector.tsx +++ b/public/components/acceleration/selectors/source_selector.tsx @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { EuiComboBox, EuiComboBoxOptionOption, EuiFormRow, EuiSpacer, EuiText } from '@elastic/eui'; +import { EuiComboBox, EuiComboBoxOptionOption, EuiCompressedFormRow, EuiSpacer, EuiText } from '@elastic/eui'; import producer from 'immer'; import React, { useEffect, useState } from 'react'; import { CoreStart } from '../../../../../../src/core/public'; @@ -153,7 +153,7 @@ export const AccelerationDataSourceSelector = ({ Select the data source to accelerate data from. External data sources may take time to load. - - - + - - + - + ); }; diff --git a/public/components/acceleration/visual_editors/materialized_view/add_column_popover.tsx b/public/components/acceleration/visual_editors/materialized_view/add_column_popover.tsx index 7a9a6ea4..d615a8ea 100644 --- a/public/components/acceleration/visual_editors/materialized_view/add_column_popover.tsx +++ b/public/components/acceleration/visual_editors/materialized_view/add_column_popover.tsx @@ -11,7 +11,7 @@ import { EuiFieldText, EuiFlexGroup, EuiFlexItem, - EuiFormRow, + EuiCompressedFormRow, EuiPopover, EuiPopoverFooter, EuiPopoverTitle, @@ -115,7 +115,7 @@ export const AddColumnPopOver = ({ <> - + - + - + - + - + - + diff --git a/public/components/acceleration/visual_editors/materialized_view/column_expression.tsx b/public/components/acceleration/visual_editors/materialized_view/column_expression.tsx index 56c1d8c5..37c33d55 100644 --- a/public/components/acceleration/visual_editors/materialized_view/column_expression.tsx +++ b/public/components/acceleration/visual_editors/materialized_view/column_expression.tsx @@ -10,7 +10,7 @@ import { EuiFieldText, EuiFlexGroup, EuiFlexItem, - EuiFormRow, + EuiCompressedFormRow, EuiPopover, } from '@elastic/eui'; import producer from 'immer'; @@ -86,7 +86,7 @@ export const ColumnExpression = ({ <> - + - + - + - + @@ -161,7 +161,7 @@ export const ColumnExpression = ({ panelPaddingSize="s" anchorPosition="downLeft" > - + - +
)} diff --git a/public/components/acceleration/visual_editors/materialized_view/group_by_tumble_expression.tsx b/public/components/acceleration/visual_editors/materialized_view/group_by_tumble_expression.tsx index 9ee0a12f..ab910607 100644 --- a/public/components/acceleration/visual_editors/materialized_view/group_by_tumble_expression.tsx +++ b/public/components/acceleration/visual_editors/materialized_view/group_by_tumble_expression.tsx @@ -10,7 +10,7 @@ import { EuiFieldNumber, EuiFlexGroup, EuiFlexItem, - EuiFormRow, + EuiCompressedFormRow, EuiPopover, EuiSelect, } from '@elastic/eui'; @@ -87,7 +87,7 @@ export const GroupByTumbleExpression = ({ > - + - + - + - + - + - + From 42f063cd94f592a747483e635109ede16a9c4240 Mon Sep 17 00:00:00 2001 From: Miki Date: Thu, 11 Jul 2024 10:48:45 -0700 Subject: [PATCH 05/11] Use EuiCompressedField* Signed-off-by: Miki --- .../selectors/define_index_options.tsx | 4 ++-- .../selectors/index_setting_options.tsx | 14 +++++++------- .../materialized_view/add_column_popover.tsx | 4 ++-- .../materialized_view/column_expression.tsx | 4 ++-- .../group_by_tumble_expression.tsx | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/public/components/acceleration/selectors/define_index_options.tsx b/public/components/acceleration/selectors/define_index_options.tsx index 2bfd7adc..f80e3170 100644 --- a/public/components/acceleration/selectors/define_index_options.tsx +++ b/public/components/acceleration/selectors/define_index_options.tsx @@ -5,7 +5,7 @@ import { EuiSmallButton, - EuiFieldText, + EuiCompressedFieldText, EuiFlexGroup, EuiFlexItem, EuiCompressedFormRow, @@ -105,7 +105,7 @@ export const DefineIndexOptions = ({ } > - - - - - - - + diff --git a/public/components/acceleration/visual_editors/materialized_view/column_expression.tsx b/public/components/acceleration/visual_editors/materialized_view/column_expression.tsx index 37c33d55..499f6327 100644 --- a/public/components/acceleration/visual_editors/materialized_view/column_expression.tsx +++ b/public/components/acceleration/visual_editors/materialized_view/column_expression.tsx @@ -7,7 +7,7 @@ import { EuiSmallButtonIcon, EuiComboBox, EuiExpression, - EuiFieldText, + EuiCompressedFieldText, EuiFlexGroup, EuiFlexItem, EuiCompressedFormRow, @@ -162,7 +162,7 @@ export const ColumnExpression = ({ anchorPosition="downLeft" > - diff --git a/public/components/acceleration/visual_editors/materialized_view/group_by_tumble_expression.tsx b/public/components/acceleration/visual_editors/materialized_view/group_by_tumble_expression.tsx index ab910607..44f9f903 100644 --- a/public/components/acceleration/visual_editors/materialized_view/group_by_tumble_expression.tsx +++ b/public/components/acceleration/visual_editors/materialized_view/group_by_tumble_expression.tsx @@ -7,7 +7,7 @@ import { EuiComboBox, EuiComboBoxOptionOption, EuiExpression, - EuiFieldNumber, + EuiCompressedFieldNumber, EuiFlexGroup, EuiFlexItem, EuiCompressedFormRow, @@ -103,7 +103,7 @@ export const GroupByTumbleExpression = ({ - Date: Thu, 11 Jul 2024 13:25:03 -0700 Subject: [PATCH 06/11] Use EuiCompressedSelect and EuiCompressedSuperSelect Signed-off-by: Miki --- .../acceleration/selectors/index_setting_options.tsx | 6 +++--- .../materialized_view/group_by_tumble_expression.tsx | 4 ++-- .../skipping_index/skipping_index_builder.tsx | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/public/components/acceleration/selectors/index_setting_options.tsx b/public/components/acceleration/selectors/index_setting_options.tsx index 12c994ab..9eb1e148 100644 --- a/public/components/acceleration/selectors/index_setting_options.tsx +++ b/public/components/acceleration/selectors/index_setting_options.tsx @@ -8,7 +8,7 @@ import { EuiCompressedFieldText, EuiCompressedFormRow, EuiRadioGroup, - EuiSelect, + EuiCompressedSelect, EuiSpacer, EuiText, } from '@elastic/eui'; @@ -236,7 +236,7 @@ export const IndexSettingOptions = ({ ); }} append={ - - ( - Date: Thu, 11 Jul 2024 14:19:13 -0700 Subject: [PATCH 07/11] Use EuiCompressedRadio and EuiCompressedRadioGroup Signed-off-by: Miki --- .../acceleration/selectors/index_setting_options.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/components/acceleration/selectors/index_setting_options.tsx b/public/components/acceleration/selectors/index_setting_options.tsx index 9eb1e148..604d1074 100644 --- a/public/components/acceleration/selectors/index_setting_options.tsx +++ b/public/components/acceleration/selectors/index_setting_options.tsx @@ -7,7 +7,7 @@ import { EuiCompressedFieldNumber, EuiCompressedFieldText, EuiCompressedFormRow, - EuiRadioGroup, + EuiCompressedRadioGroup, EuiCompressedSelect, EuiSpacer, EuiText, @@ -204,7 +204,7 @@ export const IndexSettingOptions = ({ label="Refresh type" helpText="Specify how often the index should refresh, which publishes the most recent changes and make them available for search." > - Date: Thu, 11 Jul 2024 16:55:21 -0700 Subject: [PATCH 08/11] Use EuiCompressedComboBox Signed-off-by: Miki --- public/components/SQLPage/DataSelect.tsx | 6 +++--- .../acceleration/selectors/index_type_selector.tsx | 4 ++-- .../components/acceleration/selectors/source_selector.tsx | 8 ++++---- .../covering_index/covering_index_builder.tsx | 4 ++-- .../materialized_view/add_column_popover.tsx | 6 +++--- .../materialized_view/column_expression.tsx | 6 +++--- .../materialized_view/group_by_tumble_expression.tsx | 4 ++-- 7 files changed, 19 insertions(+), 19 deletions(-) diff --git a/public/components/SQLPage/DataSelect.tsx b/public/components/SQLPage/DataSelect.tsx index 8af7be70..484c74c1 100644 --- a/public/components/SQLPage/DataSelect.tsx +++ b/public/components/SQLPage/DataSelect.tsx @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { EuiComboBox, EuiComboBoxOptionOption } from '@elastic/eui'; +import { EuiCompressedComboBox, EuiComboBoxOptionOption } from '@elastic/eui'; import React, { useEffect, useState } from 'react'; import { CoreStart } from '../../../../../src/core/public'; import { fetchDataSources } from '../../../common/utils/fetch_datasources'; @@ -38,10 +38,10 @@ export const DataSelect = ({ http, onSelect, urlDataSource, asyncLoading, dataSo onSelect(selectedItems); } }; - + return ( options.length > 0 && ( - } > - - - - <> Columns - ({ label: x.fieldName }))} selectedOptions={selectedOptions} diff --git a/public/components/acceleration/visual_editors/materialized_view/add_column_popover.tsx b/public/components/acceleration/visual_editors/materialized_view/add_column_popover.tsx index df474bda..e9f25526 100644 --- a/public/components/acceleration/visual_editors/materialized_view/add_column_popover.tsx +++ b/public/components/acceleration/visual_editors/materialized_view/add_column_popover.tsx @@ -6,7 +6,7 @@ import { EuiSmallButton, EuiSmallButtonEmpty, - EuiComboBox, + EuiCompressedComboBox, EuiComboBoxOptionOption, EuiCompressedFieldText, EuiFlexGroup, @@ -116,7 +116,7 @@ export const AddColumnPopOver = ({ - - - - - Date: Thu, 18 Jul 2024 01:43:14 -0700 Subject: [PATCH 09/11] Undo unnecessary EuiSmallButton* uses Signed-off-by: Miki --- .../materialized_view/add_column_popover.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/components/acceleration/visual_editors/materialized_view/add_column_popover.tsx b/public/components/acceleration/visual_editors/materialized_view/add_column_popover.tsx index e9f25526..6bb1a3eb 100644 --- a/public/components/acceleration/visual_editors/materialized_view/add_column_popover.tsx +++ b/public/components/acceleration/visual_editors/materialized_view/add_column_popover.tsx @@ -4,8 +4,8 @@ */ import { - EuiSmallButton, - EuiSmallButtonEmpty, + EuiButton, + EuiButtonEmpty, EuiCompressedComboBox, EuiComboBoxOptionOption, EuiCompressedFieldText, @@ -96,7 +96,7 @@ export const AddColumnPopOver = ({ { @@ -106,7 +106,7 @@ export const AddColumnPopOver = ({ size="xs" > Add Column - + } isOpen={isColumnPopOverOpen} closePopover={() => setIsColumnPopOverOpen(false)} From 4fa3cd8d4151af74b2ff222e8db4282e4504deaa Mon Sep 17 00:00:00 2001 From: Miki Date: Fri, 2 Aug 2024 12:31:58 -0700 Subject: [PATCH 10/11] Update snapshots and tests Signed-off-by: Miki --- .../Main/__snapshots__/main.test.tsx.snap | 72 ++++---- .../__snapshots__/PPLPage.test.tsx.snap | 30 ++-- .../__snapshots__/QueryResults.test.tsx.snap | 64 +++---- .../QueryResultsBody.test.tsx.snap | 76 ++++----- .../__snapshots__/SQLPage.test.tsx.snap | 12 +- .../__snapshots__/CreateButton.test.tsx.snap | 4 +- .../acceleration_index_flyout.test.tsx.snap | 12 +- .../create_acceleration.test.tsx.snap | 160 +++++++++--------- .../define_index_options.test.tsx.snap | 18 +- .../index_setting_options.test.tsx.snap | 108 ++++++------ .../index_type_selector.test.tsx.snap | 20 +-- .../source_selector.test.tsx.snap | 60 +++---- .../query_visual_editor.test.tsx.snap | 24 +-- .../column_expression.test.tsx.snap | 4 +- .../add_fields_modal.test.tsx.snap | 16 +- .../delete_fields_modal.test.tsx.snap | 16 +- .../skipping_index_builder.test.tsx.snap | 24 +-- 17 files changed, 360 insertions(+), 360 deletions(-) diff --git a/public/components/Main/__snapshots__/main.test.tsx.snap b/public/components/Main/__snapshots__/main.test.tsx.snap index a0635e7c..6217ec1d 100644 --- a/public/components/Main/__snapshots__/main.test.tsx.snap +++ b/public/components/Main/__snapshots__/main.test.tsx.snap @@ -142,7 +142,7 @@ exports[`
spec click clear button 1`] = ` class="euiFlexItem euiFlexItem--flexGrowZero" > spec click clear button 1`] = ` class="euiFlexItem euiFlexItem--flexGrowZero" >