Skip to content

Commit

Permalink
[Security Solution] remove unused flyoutSize property (#167096)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeOberti authored Oct 6, 2023
1 parent d05349b commit d381848
Show file tree
Hide file tree
Showing 14 changed files with 2 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ describe('CaseUI View Page activity tab', () => {
values: ['alert-id-1'],
},
},
flyoutSize: 'm',
showExpandToDetails: true,
showAlertStatusWithFlapping: false,
});
Expand Down Expand Up @@ -83,7 +82,6 @@ describe('CaseUI View Page activity tab', () => {
values: ['alert-id-1'],
},
},
flyoutSize: 's',
showExpandToDetails: false,
showAlertStatusWithFlapping: true,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import React, { useMemo } from 'react';

import type { EuiFlyoutSize } from '@elastic/eui';
import { EuiFlexItem, EuiFlexGroup, EuiProgress } from '@elastic/eui';
import { SECURITY_SOLUTION_OWNER } from '../../../../common/constants';
import type { CaseUI } from '../../../../common';
Expand Down Expand Up @@ -47,7 +46,6 @@ export const CaseViewAlerts = ({ caseData }: CaseViewAlertsProps) => {
alertsTableConfigurationRegistry: triggersActionsUi.alertsTableConfigurationRegistry,
configurationId: configId,
id: `case-details-alerts-${caseData.owner}`,
flyoutSize: (alertFeatureIds?.includes('siem') ? 'm' : 's') as EuiFlyoutSize,
featureIds: alertFeatureIds ?? [],
query: alertIdsQuery,
showExpandToDetails: Boolean(alertFeatureIds?.includes('siem')),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ export const AlertsTabContent = () => {
alertsTableConfigurationRegistry={alertsTableConfigurationRegistry}
configurationId={AlertConsumers.OBSERVABILITY}
featureIds={infraAlertFeatureIds}
flyoutSize="s"
id={ALERTS_TABLE_ID}
pageSize={ALERTS_PER_PAGE}
query={alertsEsQueryByStatus}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ function InternalAlertsPage() {
alertsTableConfigurationRegistry={alertsTableConfigurationRegistry}
configurationId={AlertConsumers.OBSERVABILITY}
id={ALERTS_TABLE_ID}
flyoutSize="s"
featureIds={observabilityAlertFeatureIds}
query={esQuery}
showExpandToDetails={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ export function OverviewPage() {
<AlertsStateTable
alertsTableConfigurationRegistry={alertsTableConfigurationRegistry}
configurationId={AlertConsumers.OBSERVABILITY}
flyoutSize="s"
featureIds={observabilityAlertFeatureIds}
hideLazyLoader
id={ALERTS_TABLE_ID}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ export function RuleDetailsTabs({
configurationId={observabilityFeatureId}
id={RULE_DETAILS_PAGE_ID}
featureIds={featureIds}
flyoutSize="s"
query={esQuery}
showAlertStatusWithFlapping
showExpandToDetails={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export function SloDetailsAlerts({ slo }: Props) {
alertsTableConfigurationRegistry={alertsTableConfigurationRegistry}
configurationId={AlertConsumers.OBSERVABILITY}
id={ALERTS_TABLE_ID}
flyoutSize="s"
data-test-subj="alertTable"
featureIds={[AlertConsumers.SLO]}
query={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,6 @@ const RuleDetailsPageComponent: React.FC<DetectionEngineComponentProps> = ({
return (
<AlertsTableComponent
configId={ALERTS_TABLE_REGISTRY_CONFIG_IDS.RULE_DETAILS}
flyoutSize="m"
inputFilters={[...alertMergedFilters, ...groupingFilters]}
tableId={TableId.alertsOnRuleDetailsPage}
onRuleChange={refreshRule}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import type { EuiDataGridRowHeightsOptions, EuiDataGridStyle, EuiFlyoutSize } from '@elastic/eui';
import type { EuiDataGridRowHeightsOptions, EuiDataGridStyle } from '@elastic/eui';
import { EuiFlexGroup } from '@elastic/eui';
import type { Filter } from '@kbn/es-query';
import type { FC } from 'react';
Expand Down Expand Up @@ -86,7 +86,6 @@ const EuiDataGridContainer = styled.div<GridContainerProps>`
`;
interface DetectionEngineAlertTableProps {
configId: string;
flyoutSize: EuiFlyoutSize;
inputFilters: Filter[];
tableId: TableId;
sourcererScope?: SourcererScopeName;
Expand All @@ -96,7 +95,6 @@ interface DetectionEngineAlertTableProps {

export const AlertsTableComponent: FC<DetectionEngineAlertTableProps> = ({
configId,
flyoutSize,
inputFilters,
tableId = TableId.alertsOnAlertsPage,
sourcererScope = SourcererScopeName.detections,
Expand Down Expand Up @@ -258,7 +256,6 @@ export const AlertsTableComponent: FC<DetectionEngineAlertTableProps> = ({
configurationId: configId,
// stores saperate configuration based on the view of the table
id: `detection-engine-alert-table-${configId}-${tableView}`,
flyoutSize,
featureIds: ['siem'],
query: finalBoolQuery,
showExpandToDetails: false,
Expand All @@ -278,7 +275,6 @@ export const AlertsTableComponent: FC<DetectionEngineAlertTableProps> = ({
triggersActionsUi.alertsTableConfigurationRegistry,
configId,
tableView,
flyoutSize,
finalBoolQuery,
gridStyle,
rowHeightsOptions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ const DetectionEnginePageComponent: React.FC<DetectionEngineComponentProps> = ({
return (
<AlertsTableComponent
configId={ALERTS_TABLE_REGISTRY_CONFIG_IDS.ALERTS_PAGE}
flyoutSize="m"
inputFilters={[...alertsTableDefaultFilters, ...groupingFilters]}
tableId={TableId.alertsOnAlertsPage}
isLoading={isAlertTableLoading}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ export const TopRiskScoreContributorsAlerts: React.FC<TopRiskScoreContributorsAl
return (
<AlertsTableComponent
configId={ALERTS_TABLE_REGISTRY_CONFIG_IDS.RISK_INPUTS}
flyoutSize="m"
inputFilters={[...inputFilters, ...filters, ...groupingFilters]}
tableId={TableId.alertsRiskInputs}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
EuiFlexItem,
EuiPagination,
EuiProgress,
EuiFlyoutSize,
} from '@elastic/eui';
import type { Alert, AlertsTableConfigurationRegistry } from '../../../../types';

Expand All @@ -40,7 +39,6 @@ interface AlertsFlyoutProps {
alert: Alert;
alertsTableConfiguration: AlertsTableConfigurationRegistry;
flyoutIndex: number;
flyoutSize?: EuiFlyoutSize;
alertsCount: number;
isLoading: boolean;
onClose: () => void;
Expand All @@ -51,7 +49,6 @@ export const AlertsFlyout: React.FunctionComponent<AlertsFlyoutProps> = ({
alert,
alertsTableConfiguration,
flyoutIndex,
flyoutSize = 'm',
alertsCount,
isLoading,
onClose,
Expand Down Expand Up @@ -109,7 +106,7 @@ export const AlertsFlyout: React.FunctionComponent<AlertsFlyoutProps> = ({
);

return (
<EuiFlyout onClose={onClose} size={flyoutSize} data-test-subj="alertsFlyout" ownFocus={false}>
<EuiFlyout onClose={onClose} size="m" data-test-subj="alertsFlyout" ownFocus={false}>
{isLoading && <EuiProgress size="xs" color="accent" data-test-subj="alertsFlyoutLoading" />}
<EuiFlyoutHeader hasBorder>
<Suspense fallback={null}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
EuiProgress,
EuiDataGridSorting,
EuiEmptyPrompt,
EuiFlyoutSize,
EuiDataGridProps,
EuiDataGridToolBarVisibilityOptions,
} from '@elastic/eui';
Expand Down Expand Up @@ -64,7 +63,6 @@ export type AlertsTableStateProps = {
configurationId: string;
id: string;
featureIds: ValidFeatureId[];
flyoutSize?: EuiFlyoutSize;
query: Pick<QueryDslQueryContainer, 'bool' | 'ids'>;
pageSize?: number;
showExpandToDetails: boolean;
Expand Down Expand Up @@ -148,7 +146,6 @@ const AlertsTableStateWithQueryProvider = ({
configurationId,
id,
featureIds,
flyoutSize,
query,
pageSize,
showExpandToDetails,
Expand Down Expand Up @@ -378,7 +375,6 @@ const AlertsTableStateWithQueryProvider = ({
bulkActions: [],
deletedEventIds: [],
disabledCellActions: [],
flyoutSize,
pageSize: pagination.pageSize,
pageSizeOptions: [10, 20, 50, 100],
id,
Expand Down Expand Up @@ -409,7 +405,6 @@ const AlertsTableStateWithQueryProvider = ({
memoizedCases,
memoizedMaintenanceWindows,
columns,
flyoutSize,
pagination.pageSize,
id,
leadingControlColumns,
Expand Down
2 changes: 0 additions & 2 deletions x-pack/plugins/triggers_actions_ui/public/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import type { DataViewsPublicPluginStart } from '@kbn/data-views-plugin/public';
import type { UnifiedSearchPublicPluginStart } from '@kbn/unified-search-plugin/public';
import type {
IconType,
EuiFlyoutSize,
RecursivePartial,
EuiDataGridCellValueElementProps,
EuiDataGridToolBarAdditionalControlsOptions,
Expand Down Expand Up @@ -538,7 +537,6 @@ export type AlertsTableProps = {
// defaultCellActions: TGridCellAction[];
deletedEventIds: string[];
disabledCellActions: string[];
flyoutSize?: EuiFlyoutSize;
pageSize: number;
pageSizeOptions: number[];
id?: string;
Expand Down

0 comments on commit d381848

Please sign in to comment.