Skip to content

Commit

Permalink
Revert security lake changes (opensearch-project#2091)
Browse files Browse the repository at this point in the history
* reverted commit 19d68b2

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* reverted commit 5e80c1a

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* updated snapshots

Signed-off-by: Amardeepsingh Siglani <[email protected]>

* fix conflicts in setup_integration_inputs

Signed-off-by: Shenoy Pratik <[email protected]>

---------

Signed-off-by: Amardeepsingh Siglani <[email protected]>
Signed-off-by: Shenoy Pratik <[email protected]>
Co-authored-by: Shenoy Pratik <[email protected]>
  • Loading branch information
amsiglan and ps48 authored Aug 27, 2024
1 parent 59100ac commit 1e484c6
Show file tree
Hide file tree
Showing 46 changed files with 981 additions and 1,765 deletions.
1 change: 0 additions & 1 deletion common/constants/data_connections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export const QUERY_ALL = 'query-all';
export const DatasourceTypeToDisplayName: { [key in DatasourceType]: string } = {
PROMETHEUS: 'Prometheus',
S3GLUE: 'Amazon S3',
SECURITYLAKE: 'Amazon Security Lake',
};

export const PrometheusURL = 'Prometheus';
Expand Down
5 changes: 1 addition & 4 deletions common/types/data_connections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export interface AssociatedObject {

export type Role = EuiComboBoxOptionOption;

export type DatasourceType = 'S3GLUE' | 'PROMETHEUS' | 'SECURITYLAKE';
export type DatasourceType = 'S3GLUE' | 'PROMETHEUS';

export interface S3GlueProperties {
'glue.indexstore.opensearch.uri': string;
Expand Down Expand Up @@ -251,12 +251,10 @@ export interface StartLoadingParams {
dataSourceMDSId?: string;
databaseName?: string;
tableName?: string;
dataSourceType?: DatasourceType;
}

export interface RenderAccelerationFlyoutParams {
dataSource: string;
dataSourceType: DatasourceType;
dataSourceMDSId?: string;
databaseName?: string;
tableName?: string;
Expand All @@ -266,7 +264,6 @@ export interface RenderAccelerationFlyoutParams {
export interface RenderAssociatedObjectsDetailsFlyoutParams {
tableDetail: AssociatedObject;
dataSourceName: string;
dataSourceType: DatasourceType;
handleRefresh?: () => void;
dataSourceMDSId?: string;
}
Expand Down
6 changes: 0 additions & 6 deletions common/types/integrations.ts

This file was deleted.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,99 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Data Connection Page test Renders Prometheus data connection page with data 1`] = `
<div>
<div
class="euiPage euiPage--paddingMedium euiPage--grow"
>
<div
class="euiPageBody euiPageBody--borderRadiusNone"
>
<header
class="euiPageHeader euiPageHeader--responsive euiPageHeader--center"
style="justify-content: spaceBetween;"
>
<div
class="euiPageHeaderSection"
style="width: 100%; justify-content: space-between;"
>
<div
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--directionRow euiFlexGroup--responsive"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero"
>
<h1
class="euiTitle euiTitle--large"
data-test-subj="dataspirceTitle"
>
prom
</h1>
</div>
</div>
</div>
</header>
<div
class="euiSpacer euiSpacer--l"
/>
<div
class="euiCallOut euiCallOut--warning"
>
<div
class="euiCallOutHeader"
>
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium euiIcon--inherit euiIcon-isLoading euiCallOutHeader__icon"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M5.277 10.088c.02.014.04.03.057.047.582.55 1.134.812 1.666.812.586 0 1.84-.293 3.713-.88L9 6.212V2H7v4.212l-1.723 3.876Zm-.438.987L3.539 14h8.922l-1.32-2.969C9.096 11.677 7.733 12 7 12c-.74 0-1.463-.315-2.161-.925ZM6 2H5V1h6v1h-1v4l3.375 7.594A1 1 0 0 1 12.461 15H3.54a1 1 0 0 1-.914-1.406L6 6V2Z"
/>
</svg>
<span
class="euiCallOutHeader__title"
>
This data source connection is inactive
</span>
</div>
<div
class="euiText euiText--small"
>
<div
class="euiTextColor euiTextColor--default"
>
<p>
Associated objects and accelerations are not available while this connection is inactive.
</p>
<button
class="euiButton euiButton--warning euiButton--small"
type="button"
>
<span
class="euiButtonContent euiButton__content"
>
<span
class="euiButton__text"
>
Enable connection
</span>
</span>
</button>
</div>
</div>
</div>
<div
class="euiSpacer euiSpacer--l"
/>
</div>
</div>
</div>
`;
exports[`Data Connection Page test Renders Prometheus data connection page with data 1`] = `<div />`;

exports[`Data Connection Page test Renders S3 data connection page with data 1`] = `
<div>
Expand Down Expand Up @@ -159,54 +66,22 @@ exports[`Data Connection Page test Renders S3 data connection page with data 1`]
class="euiFlexItem"
>
<div
class="euiText euiText--medium overview-title"
>
Query Access
</div>
<div
class="euiFlexGroup euiFlexGroup--gutterExtraSmall euiFlexGroup--alignItemsCenter euiFlexGroup--directionRow euiFlexGroup--responsive"
class="euiFlexGroup euiFlexGroup--gutterLarge euiFlexGroup--directionColumn euiFlexGroup--responsive"
>
<div
class="euiFlexItem euiFlexItem--flexGrowZero"
>
<div
class="euiText euiText--medium overview-title"
>
Query Access
</div>
<div
class="euiText euiText--small overview-content"
>
Admin only
</div>
</div>
<div
class="euiFlexItem euiFlexItem--flexGrowZero"
>
<button
class="euiButtonEmpty euiButtonEmpty--primary euiButtonEmpty--small"
type="button"
>
<span
class="euiButtonContent euiButtonEmpty__content"
>
<svg
aria-hidden="true"
class="euiIcon euiIcon--medium euiIcon--inherit euiIcon-isLoading euiButtonContent__icon"
focusable="false"
height="16"
role="img"
viewBox="0 0 16 16"
width="16"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M5.277 10.088c.02.014.04.03.057.047.582.55 1.134.812 1.666.812.586 0 1.84-.293 3.713-.88L9 6.212V2H7v4.212l-1.723 3.876Zm-.438.987L3.539 14h8.922l-1.32-2.969C9.096 11.677 7.733 12 7 12c-.74 0-1.463-.315-2.161-.925ZM6 2H5V1h6v1h-1v4l3.375 7.594A1 1 0 0 1 12.461 15H3.54a1 1 0 0 1-.914-1.406L6 6V2Z"
/>
</svg>
<span
class="euiButtonEmpty__text"
>
Edit
</span>
</span>
</button>
</div>
</div>
</div>
</div>
Expand Down Expand Up @@ -466,7 +341,7 @@ exports[`Data Connection Page test Renders S3 data connection page with data 1`]
<span
class="euiButtonEmpty__text"
>
Query in Log Explorer
Query in Observability Logs
</span>
</span>
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,6 @@ exports[`Installed Integrations Table test Renders the installed integrations ta
Array [
Object {
"assets": 3,
"id": "d5b55c60-e08c-11ee-9c80-ff3b93498fea",
"locator": Object {
"id": "d5b55c60-e08c-11ee-9c80-ff3b93498fea",
"name": "aws_waf-sample",
Expand Down Expand Up @@ -460,7 +459,6 @@ exports[`Installed Integrations Table test Renders the installed integrations ta
Array [
Object {
"assets": 3,
"id": "d5b55c60-e08c-11ee-9c80-ff3b93498fea",
"locator": Object {
"id": "d5b55c60-e08c-11ee-9c80-ff3b93498fea",
"name": "aws_waf-sample",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ exports[`Manage Data Connections Table test Renders manage data connections tabl
</th>
<th
class="euiTableHeaderCell"
data-test-subj="tableHeaderCell_Type_1"
data-test-subj="tableHeaderCell_status_1"
role="columnheader"
scope="col"
>
Expand All @@ -277,26 +277,9 @@ exports[`Manage Data Connections Table test Renders manage data connections tabl
>
<span
class="euiTableCellContent__text"
title="Type"
title="Status"
>
Type
</span>
</span>
</th>
<th
class="euiTableHeaderCell"
data-test-subj="tableHeaderCell_status_2"
role="columnheader"
scope="col"
>
<span
class="euiTableCellContent"
>
<span
class="euiTableCellContent__text"
title="Connection status"
>
Connection status
Status
</span>
</span>
</th>
Expand Down Expand Up @@ -324,7 +307,7 @@ exports[`Manage Data Connections Table test Renders manage data connections tabl
>
<td
class="euiTableRowCell euiTableRowCell--isMobileFullWidth"
colspan="4"
colspan="3"
>
<div
class="euiTableCellContent euiTableCellContent--alignCenter"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,7 @@ describe('AccelerationTable Component', () => {

it('renders without crashing', () => {
const wrapper = mount(
<AccelerationTable
dataSourceName="testDataSource"
cacheLoadingHooks={cacheLoadingHooks}
dataSourceType="S3GLUE"
/>
<AccelerationTable dataSourceName="testDataSource" cacheLoadingHooks={cacheLoadingHooks} />
);
expect(wrapper).toBeDefined();
});
Expand All @@ -115,11 +111,7 @@ describe('AccelerationTable Component', () => {
let wrapper: ReactWrapper;
await act(async () => {
wrapper = mount(
<AccelerationTable
dataSourceName="testDataSource"
cacheLoadingHooks={cacheLoadingHooks}
dataSourceType="S3GLUE"
/>
<AccelerationTable dataSourceName="testDataSource" cacheLoadingHooks={cacheLoadingHooks} />
);
});

Expand All @@ -140,11 +132,7 @@ describe('AccelerationTable Component', () => {
let wrapper: ReactWrapper;
await act(async () => {
wrapper = mount(
<AccelerationTable
dataSourceName="testDataSource"
cacheLoadingHooks={cacheLoadingHooks}
dataSourceType="S3GLUE"
/>
<AccelerationTable dataSourceName="testDataSource" cacheLoadingHooks={cacheLoadingHooks} />
);
});
wrapper!.update();
Expand All @@ -164,11 +152,7 @@ describe('AccelerationTable Component', () => {
let wrapper: ReactWrapper;
await act(async () => {
wrapper = mount(
<AccelerationTable
dataSourceName="testDataSource"
cacheLoadingHooks={cacheLoadingHooks}
dataSourceType="S3GLUE"
/>
<AccelerationTable dataSourceName="testDataSource" cacheLoadingHooks={cacheLoadingHooks} />
);
await new Promise((resolve) => setTimeout(resolve, 0));
wrapper!.update();
Expand All @@ -188,11 +172,7 @@ describe('AccelerationTable Component', () => {
let wrapper: ReactWrapper;
await act(async () => {
wrapper = mount(
<AccelerationTable
dataSourceName="testDataSource"
cacheLoadingHooks={cacheLoadingHooks}
dataSourceType="S3GLUE"
/>
<AccelerationTable dataSourceName="testDataSource" cacheLoadingHooks={cacheLoadingHooks} />
);
});
wrapper!.update();
Expand Down
Loading

0 comments on commit 1e484c6

Please sign in to comment.