From a33419c40ffeb3ef2618c5d1599a517dd4a71911 Mon Sep 17 00:00:00 2001 From: Miki Date: Wed, 10 Jul 2024 17:22:16 -0700 Subject: [PATCH 01/13] Use EuiSmallButton Signed-off-by: Miki --- .../components/context_menu/context_menu.js | 2 +- .../main/loading_modal/loading_modal.tsx | 2 +- public/components/main/main.tsx | 14 ++++++------- .../report_definition_details.tsx | 20 +++++++++---------- .../main/report_definitions_table.tsx | 6 +++--- public/components/main/reports_table.tsx | 2 +- .../create/create_report_definition.tsx | 6 +++--- .../report_definitions/delivery/delivery.tsx | 6 +++--- .../edit/edit_report_definition.tsx | 6 +++--- 9 files changed, 32 insertions(+), 32 deletions(-) diff --git a/public/components/context_menu/context_menu.js b/public/components/context_menu/context_menu.js index ff178260..af587ed6 100644 --- a/public/components/context_menu/context_menu.js +++ b/public/components/context_menu/context_menu.js @@ -211,7 +211,7 @@ $(function () { $('#reportGenerationProgressModal').remove(); }); - // close modal with the close EuiButton + // close modal with the close EuiSmallButton $(document).on('click', '#closeReportGenerationModalButton', function () { $('#reportGenerationProgressModal').remove(); }); diff --git a/public/components/main/loading_modal/loading_modal.tsx b/public/components/main/loading_modal/loading_modal.tsx index 61c53968..d70fb12c 100644 --- a/public/components/main/loading_modal/loading_modal.tsx +++ b/public/components/main/loading_modal/loading_modal.tsx @@ -14,7 +14,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner, - EuiButton, + EuiSmallButton, } from '@elastic/eui'; import { i18n } from '@osd/i18n'; import React, { useState } from 'react'; diff --git a/public/components/main/main.tsx b/public/components/main/main.tsx index bfbb8cb9..8d1f4471 100644 --- a/public/components/main/main.tsx +++ b/public/components/main/main.tsx @@ -8,7 +8,7 @@ import { i18n } from '@osd/i18n'; import { EuiFlexGroup, EuiFlexItem, - EuiButton, + EuiSmallButton, EuiTitle, // @ts-ignore EuiHorizontalRule, @@ -285,7 +285,7 @@ export function Main(props) { - + @@ -325,7 +325,7 @@ export function Main(props) { - + - { window.location.assign('reports-dashboards#/create'); @@ -348,7 +348,7 @@ export function Main(props) { 'opensearch.reports.main.reportDefinitions.button.create', { defaultMessage: 'Create' } )} - + diff --git a/public/components/main/report_definition_details/report_definition_details.tsx b/public/components/main/report_definition_details/report_definition_details.tsx index 2d44dfd2..531b42a8 100644 --- a/public/components/main/report_definition_details/report_definition_details.tsx +++ b/public/components/main/report_definition_details/report_definition_details.tsx @@ -16,7 +16,7 @@ import { EuiHorizontalRule, EuiSpacer, EuiPageHeaderSection, - EuiButton, + EuiSmallButton, EuiIcon, EuiLink, EuiGlobalToastList, @@ -562,12 +562,12 @@ export function ReportDefinitionDetails(props: { match?: any; setBreadcrumbs?: a reportDefinitionDetails.status === 'Active' ? 'Disable' : 'Enable'; return ( - changeScheduledReportDefinitionStatus(status)} id={'changeStatusFromDetailsButton'} > {status} - + ); }; @@ -609,12 +609,12 @@ export function ReportDefinitionDetails(props: { match?: any; setBreadcrumbs?: a const showActionButton = reportDefinitionDetails.triggerType === ON_DEMAND ? ( - generateReportFromDetails()} id={'generateReportFromDetailsButton'} > Generate report - + ) : ( ); @@ -653,7 +653,7 @@ export function ReportDefinitionDetails(props: { match?: any; setBreadcrumbs?: a )} reportDetailsComponentContent={reportDefinitionDetails.status} /> - @@ -697,7 +697,7 @@ export function ReportDefinitionDetails(props: { match?: any; setBreadcrumbs?: a gutterSize="l" > - handleShowDeleteModal(show)} id={'deleteReportDefinitionButton'} @@ -706,11 +706,11 @@ export function ReportDefinitionDetails(props: { match?: any; setBreadcrumbs?: a 'opensearch.reports.reportDefinitionsDetails.deleteReportDefinitionButton', { defaultMessage: 'Delete' } )} - + {showActionButton} - { window.location.assign( @@ -723,7 +723,7 @@ export function ReportDefinitionDetails(props: { match?: any; setBreadcrumbs?: a 'opensearch.reports.reportDefinitionsDetails.editReportDefinitionButton', { defaultMessage: 'Edit' } )} - + diff --git a/public/components/main/report_definitions_table.tsx b/public/components/main/report_definitions_table.tsx index b0d255b3..3f0c3b98 100644 --- a/public/components/main/report_definitions_table.tsx +++ b/public/components/main/report_definitions_table.tsx @@ -7,7 +7,7 @@ import React, { useState } from 'react'; import { EuiLink, EuiInMemoryTable, - EuiButton, + EuiSmallButton, EuiEmptyPrompt, EuiText, EuiIcon, @@ -57,7 +57,7 @@ const emptyMessageReportDefinitions = ( } actions={
- { window.location.assign('reports-dashboards#/create'); }} @@ -66,7 +66,7 @@ const emptyMessageReportDefinitions = ( 'opensearch.reports.reportDefinitionsTable.emptyMessageReports.createReportDefinition', { defaultMessage: 'Create report definition' } )} - +
} /> diff --git a/public/components/main/reports_table.tsx b/public/components/main/reports_table.tsx index 90b85563..d910ceb6 100644 --- a/public/components/main/reports_table.tsx +++ b/public/components/main/reports_table.tsx @@ -6,7 +6,7 @@ import React, { Fragment, useState } from 'react'; import { i18n } from '@osd/i18n'; import { - EuiButton, + EuiSmallButton, // @ts-ignore EuiLink, EuiText, diff --git a/public/components/report_definitions/create/create_report_definition.tsx b/public/components/report_definitions/create/create_report_definition.tsx index 5c14cfda..b1bbc1a7 100644 --- a/public/components/report_definitions/create/create_report_definition.tsx +++ b/public/components/report_definitions/create/create_report_definition.tsx @@ -10,7 +10,7 @@ import { EuiFlexGroup, EuiFlexItem, EuiGlobalToastList, - EuiButton, + EuiSmallButton, EuiTitle, EuiPageBody, EuiSpacer, @@ -336,7 +336,7 @@ export function CreateReport(props: { [x: string]: any; setBreadcrumbs?: any; ht - createNewReportDefinition( @@ -350,7 +350,7 @@ export function CreateReport(props: { [x: string]: any; setBreadcrumbs?: any; ht 'opensearch.reports.createReportDefinition.create', { defaultMessage: 'Create' } )} - + - + Send test message - + ) : null; diff --git a/public/components/report_definitions/edit/edit_report_definition.tsx b/public/components/report_definitions/edit/edit_report_definition.tsx index 3e876931..94a591aa 100644 --- a/public/components/report_definitions/edit/edit_report_definition.tsx +++ b/public/components/report_definitions/edit/edit_report_definition.tsx @@ -9,7 +9,7 @@ import { EuiButtonEmpty, EuiFlexGroup, EuiFlexItem, - EuiButton, + EuiSmallButton, EuiPage, EuiTitle, EuiPageBody, @@ -330,7 +330,7 @@ export function EditReportDefinition(props: { [x: string]: any; setBreadcrumbs?: - editReportDefinition(editReportDefinitionRequest)} id={'editReportDefinitionButton'} @@ -338,7 +338,7 @@ export function EditReportDefinition(props: { [x: string]: any; setBreadcrumbs?: {i18n.translate('opensearch.reports.editReportDefinition.save', { defaultMessage: 'Save Changes', })} - + Date: Thu, 11 Jul 2024 08:11:33 -0700 Subject: [PATCH 02/13] Use EuiSmallButtonEmpty Signed-off-by: Miki --- .../report_definitions/create/create_report_definition.tsx | 6 +++--- .../report_definitions/edit/edit_report_definition.tsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/components/report_definitions/create/create_report_definition.tsx b/public/components/report_definitions/create/create_report_definition.tsx index b1bbc1a7..3d0f2f59 100644 --- a/public/components/report_definitions/create/create_report_definition.tsx +++ b/public/components/report_definitions/create/create_report_definition.tsx @@ -6,7 +6,7 @@ import React, { useEffect, useState } from 'react'; import { i18n } from '@osd/i18n'; import { - EuiButtonEmpty, + EuiSmallButtonEmpty, EuiFlexGroup, EuiFlexItem, EuiGlobalToastList, @@ -324,7 +324,7 @@ export function CreateReport(props: { [x: string]: any; setBreadcrumbs?: any; ht - { window.location.assign(`reports-dashboards#/`); }} @@ -333,7 +333,7 @@ export function CreateReport(props: { [x: string]: any; setBreadcrumbs?: any; ht 'opensearch.reports.createReportDefinition.cancel', { defaultMessage: 'Cancel' } )} - + - { window.location.assign('reports-dashboards#/'); }} @@ -327,7 +327,7 @@ export function EditReportDefinition(props: { [x: string]: any; setBreadcrumbs?: 'opensearch.reports.editReportDefinition.cancel', { defaultMessage: 'Cancel' } )} - + Date: Thu, 11 Jul 2024 08:48:14 -0700 Subject: [PATCH 03/13] Use EuiCompressedFormRow Signed-off-by: Miki --- .../report_definitions/delivery/delivery.tsx | 18 ++++---- .../report_settings/report_settings.tsx | 46 +++++++++---------- .../report_settings/time_range.tsx | 6 +-- .../report_trigger/report_trigger.tsx | 46 +++++++++---------- .../report_trigger/timezone.tsx | 6 +-- 5 files changed, 61 insertions(+), 61 deletions(-) diff --git a/public/components/report_definitions/delivery/delivery.tsx b/public/components/report_definitions/delivery/delivery.tsx index f71c4fa5..1841fdbf 100644 --- a/public/components/report_definitions/delivery/delivery.tsx +++ b/public/components/report_definitions/delivery/delivery.tsx @@ -5,7 +5,7 @@ import React, { useEffect, useState } from 'react'; import { - EuiFormRow, + EuiCompressedFormRow, EuiPageHeader, EuiTitle, EuiPageContent, @@ -276,7 +276,7 @@ export function ReportDelivery(props: ReportDeliveryProps) { const showNotificationsBody = sendNotification ? (
- - + - - + - - + - + Send test message - +
) : null; diff --git a/public/components/report_definitions/report_settings/report_settings.tsx b/public/components/report_definitions/report_settings/report_settings.tsx index 9bde1a18..6921c44d 100644 --- a/public/components/report_definitions/report_settings/report_settings.tsx +++ b/public/components/report_definitions/report_settings/report_settings.tsx @@ -9,7 +9,7 @@ import { EuiFieldText, EuiFlexGroup, EuiFlexItem, - EuiFormRow, + EuiCompressedFormRow, EuiPageHeader, EuiTitle, EuiPageContent, @@ -255,7 +255,7 @@ export function ReportSettings(props: ReportSettingProps) { const PDFandPNGFileFormats = () => { return (
- - +
); }; @@ -276,7 +276,7 @@ export function ReportSettings(props: ReportSettingProps) { const CSVandXLSXFileFormats = () => { return (
- - +
); }; @@ -331,7 +331,7 @@ export function ReportSettings(props: ReportSettingProps) { }; const showFooter = checkboxIdSelectHeaderFooter.footer ? ( - - + ) : null; const showHeader = checkboxIdSelectHeaderFooter.header ? ( - - + ) : null; useEffect(() => { @@ -703,7 +703,7 @@ export function ReportSettings(props: ReportSettingProps) { const displayDashboardSelect = reportSourceId === 'dashboardReportSource' ? (
- - +
) : null; @@ -731,7 +731,7 @@ export function ReportSettings(props: ReportSettingProps) { const displayVisualizationSelect = reportSourceId === 'visualizationReportSource' ? (
- - +
) : null; @@ -758,7 +758,7 @@ export function ReportSettings(props: ReportSettingProps) { const displaySavedSearchSelect = reportSourceId === 'savedSearchReportSource' ? (
- - +
) : null; @@ -795,7 +795,7 @@ export function ReportSettings(props: ReportSettingProps) { const displayNotebooksSelect = reportSourceId === 'notebooksReportSource' ? (
- - +
) : null; @@ -844,7 +844,7 @@ export function ReportSettings(props: ReportSettingProps) { - - + - - + - - + {displayDashboardSelect} {displayVisualizationSelect} diff --git a/public/components/report_definitions/report_settings/time_range.tsx b/public/components/report_definitions/report_settings/time_range.tsx index f27630c6..eb682b81 100644 --- a/public/components/report_definitions/report_settings/time_range.tsx +++ b/public/components/report_definitions/report_settings/time_range.tsx @@ -9,7 +9,7 @@ import { i18n } from '@osd/i18n'; import { parseInContextUrl } from './report_settings_helpers'; import dateMath from '@elastic/datemath'; import { - EuiFormRow, + EuiCompressedFormRow, EuiGlobalToastList, EuiSuperDatePicker, } from '@elastic/eui'; @@ -188,7 +188,7 @@ export function TimeRangeSelect(props) { return (
- - +
- - +
); @@ -227,7 +227,7 @@ export function ReportTrigger(props: ReportTriggerProps) { return (
- - +
); @@ -323,7 +323,7 @@ export function ReportTrigger(props: ReportTriggerProps) { return (
- - + - + - - + - +
); }; @@ -380,7 +380,7 @@ export function ReportTrigger(props: ReportTriggerProps) { const RecurringWeekly = () => { return (
- - +
@@ -409,7 +409,7 @@ export function ReportTrigger(props: ReportTriggerProps) { return (
- - +
@@ -496,7 +496,7 @@ export function ReportTrigger(props: ReportTriggerProps) { return (
- - +
); @@ -551,7 +551,7 @@ export function ReportTrigger(props: ReportTriggerProps) { return (
- - + {display_daily} {display_interval} @@ -613,7 +613,7 @@ export function ReportTrigger(props: ReportTriggerProps) { return (
- - + {display_recurring} {display_cron} @@ -700,7 +700,7 @@ export function ReportTrigger(props: ReportTriggerProps) { return (
- - + {schedule}
diff --git a/public/components/report_definitions/report_trigger/timezone.tsx b/public/components/report_definitions/report_trigger/timezone.tsx index aee4ceca..f4a28caa 100644 --- a/public/components/report_definitions/report_trigger/timezone.tsx +++ b/public/components/report_definitions/report_trigger/timezone.tsx @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { EuiFormRow, EuiSelect } from '@elastic/eui'; +import { EuiCompressedFormRow, EuiSelect } from '@elastic/eui'; import React, { useState, useEffect } from 'react'; import { i18n } from '@osd/i18n'; import { TIMEZONE_OPTIONS } from './report_trigger_constants'; @@ -53,7 +53,7 @@ export function TimezoneSelect(props: { reportDefinitionRequest: any; httpClient return (
- - +
); } From 9865e5c0672045bf1e8a4073f059a3e762b8b3cf Mon Sep 17 00:00:00 2001 From: Miki Date: Thu, 11 Jul 2024 10:50:07 -0700 Subject: [PATCH 04/13] Use EuiCompressedField* Signed-off-by: Miki --- .../report_definitions/delivery/delivery.tsx | 4 ++-- .../report_settings/report_settings.tsx | 4 ++-- .../report_trigger/report_trigger.tsx | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/public/components/report_definitions/delivery/delivery.tsx b/public/components/report_definitions/delivery/delivery.tsx index 1841fdbf..dc1a01ae 100644 --- a/public/components/report_definitions/delivery/delivery.tsx +++ b/public/components/report_definitions/delivery/delivery.tsx @@ -14,7 +14,7 @@ import { EuiSpacer, EuiCheckbox, EuiComboBox, - EuiFieldText, + EuiCompressedFieldText, EuiSmallButton, } from '@elastic/eui'; import CSS from 'csstype'; @@ -298,7 +298,7 @@ export function ReportDelivery(props: ReportDeliveryProps) { error={deliverySubjectError} style={styles} > - - - - } > - Date: Thu, 11 Jul 2024 13:25:34 -0700 Subject: [PATCH 05/13] Use EuiCompressedSelect and EuiCompressedSuperSelect Signed-off-by: Miki --- .../report_definitions/report_trigger/report_trigger.tsx | 8 ++++---- .../report_definitions/report_trigger/timezone.tsx | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/components/report_definitions/report_trigger/report_trigger.tsx b/public/components/report_definitions/report_trigger/report_trigger.tsx index 9063c919..e2facc19 100644 --- a/public/components/report_definitions/report_trigger/report_trigger.tsx +++ b/public/components/report_definitions/report_trigger/report_trigger.tsx @@ -9,7 +9,7 @@ import { EuiCompressedFormRow, EuiRadioGroup, EuiDatePicker, - EuiSelect, + EuiCompressedSelect, EuiSpacer, EuiFlexGroup, EuiFlexItem, @@ -348,7 +348,7 @@ export function ReportTrigger(props: ReportTriggerProps) { - - - - Date: Thu, 11 Jul 2024 13:57:21 -0700 Subject: [PATCH 06/13] Use EuiCompressedCheckbox and EuiCompressedCheckboxGroup Signed-off-by: Miki --- public/components/report_definitions/delivery/delivery.tsx | 4 ++-- .../report_definitions/report_settings/report_settings.tsx | 4 ++-- .../report_definitions/report_trigger/report_trigger.tsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/components/report_definitions/delivery/delivery.tsx b/public/components/report_definitions/delivery/delivery.tsx index dc1a01ae..3d5bbaac 100644 --- a/public/components/report_definitions/delivery/delivery.tsx +++ b/public/components/report_definitions/delivery/delivery.tsx @@ -12,7 +12,7 @@ import { EuiPageContentBody, EuiHorizontalRule, EuiSpacer, - EuiCheckbox, + EuiCompressedCheckbox, EuiComboBox, EuiCompressedFieldText, EuiSmallButton, @@ -345,7 +345,7 @@ export function ReportDelivery(props: ReportDeliveryProps) { - - - Date: Thu, 11 Jul 2024 14:19:46 -0700 Subject: [PATCH 07/13] Use EuiCompressedRadio and EuiCompressedRadioGroup Signed-off-by: Miki --- .../report_settings/report_settings.tsx | 8 ++++---- .../report_definitions/report_trigger/report_trigger.tsx | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/public/components/report_definitions/report_settings/report_settings.tsx b/public/components/report_definitions/report_settings/report_settings.tsx index 853bc761..4a5c2946 100644 --- a/public/components/report_definitions/report_settings/report_settings.tsx +++ b/public/components/report_definitions/report_settings/report_settings.tsx @@ -16,7 +16,7 @@ import { EuiPageContentBody, EuiHorizontalRule, EuiSpacer, - EuiRadioGroup, + EuiCompressedRadioGroup, EuiTextArea, EuiCompressedCheckboxGroup, EuiComboBox, @@ -263,7 +263,7 @@ export function ReportSettings(props: ReportSettingProps) { } )} > - - - - - Date: Thu, 11 Jul 2024 14:31:40 -0700 Subject: [PATCH 08/13] Use EuiCompressedEuiTextArea Signed-off-by: Miki --- .../report_definitions/report_settings/report_settings.tsx | 4 ++-- .../report_definitions/report_trigger/report_trigger.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/components/report_definitions/report_settings/report_settings.tsx b/public/components/report_definitions/report_settings/report_settings.tsx index 4a5c2946..f153aecc 100644 --- a/public/components/report_definitions/report_settings/report_settings.tsx +++ b/public/components/report_definitions/report_settings/report_settings.tsx @@ -17,7 +17,7 @@ import { EuiHorizontalRule, EuiSpacer, EuiCompressedRadioGroup, - EuiTextArea, + EuiCompressedTextArea, EuiCompressedCheckboxGroup, EuiComboBox, } from '@elastic/eui'; @@ -883,7 +883,7 @@ export function ReportSettings(props: ReportSettingProps) { )} id={'reportSettingsDescription'} > - Date: Thu, 11 Jul 2024 16:56:02 -0700 Subject: [PATCH 09/13] Use EuiCompressedComboBox Signed-off-by: Miki --- .../report_definitions/delivery/delivery.tsx | 4 ++-- .../report_settings/report_settings.tsx | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/public/components/report_definitions/delivery/delivery.tsx b/public/components/report_definitions/delivery/delivery.tsx index 3d5bbaac..18bef26a 100644 --- a/public/components/report_definitions/delivery/delivery.tsx +++ b/public/components/report_definitions/delivery/delivery.tsx @@ -13,7 +13,7 @@ import { EuiHorizontalRule, EuiSpacer, EuiCompressedCheckbox, - EuiComboBox, + EuiCompressedComboBox, EuiCompressedFieldText, EuiSmallButton, } from '@elastic/eui'; @@ -281,7 +281,7 @@ export function ReportDelivery(props: ReportDeliveryProps) { isInvalid={showDeliveryChannelError} error={deliveryChannelError} > - - - - - Date: Mon, 22 Jul 2024 10:48:06 -0700 Subject: [PATCH 10/13] Use EuiCompressedSuperDatePicker Signed-off-by: Miki --- .../report_definitions/report_settings/time_range.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/components/report_definitions/report_settings/time_range.tsx b/public/components/report_definitions/report_settings/time_range.tsx index eb682b81..0852b985 100644 --- a/public/components/report_definitions/report_settings/time_range.tsx +++ b/public/components/report_definitions/report_settings/time_range.tsx @@ -11,7 +11,7 @@ import dateMath from '@elastic/datemath'; import { EuiCompressedFormRow, EuiGlobalToastList, - EuiSuperDatePicker, + EuiCompressedSuperDatePicker, } from '@elastic/eui'; import { commonTimeRanges } from './report_settings_constants'; @@ -206,7 +206,7 @@ export function TimeRangeSelect(props) { { defaultMessage: 'Invalid time range selected.' } )} > - Date: Fri, 2 Aug 2024 12:20:27 -0700 Subject: [PATCH 11/13] Update snapshots and tests Signed-off-by: Miki --- .../__snapshots__/main.test.tsx.snap | 32 ++++++++--------- .../report_definitions_table.test.tsx.snap | 2 +- .../main/loading_modal/loading_modal.tsx | 1 - .../report_definition_details.test.tsx.snap | 18 +++++----- public/components/main/reports_table.tsx | 1 - .../report_trigger.test.tsx.snap | 36 +++++++++---------- 6 files changed, 44 insertions(+), 46 deletions(-) diff --git a/public/components/main/__tests__/__snapshots__/main.test.tsx.snap b/public/components/main/__tests__/__snapshots__/main.test.tsx.snap index 3916766d..fb5284a8 100644 --- a/public/components/main/__tests__/__snapshots__/main.test.tsx.snap +++ b/public/components/main/__tests__/__snapshots__/main.test.tsx.snap @@ -29,7 +29,7 @@ exports[`
panel render component 1`] = ` class="euiFlexItem euiFlexItem--flexGrowZero" >