Skip to content

Commit

Permalink
added UI component for the MDS support in integrations
Browse files Browse the repository at this point in the history
Signed-off-by: sumukhswamy <[email protected]>
  • Loading branch information
sumukhswamy committed Jul 24, 2024
1 parent 196dd35 commit 1b64020
Show file tree
Hide file tree
Showing 8 changed files with 273 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,30 @@
* SPDX-License-Identifier: Apache-2.0
*/

import React, { useState, CSSProperties, useEffect } from 'react';
import {
EuiSpacer,
EuiPanel,
EuiInMemoryTable,
EuiTitle,
EuiLink,
EuiButton,
EuiFieldSearch,
EuiFlexGroup,
EuiFlexItem,
EuiFieldSearch,
EuiButton,
EuiFlyout,
EuiIcon,
EuiInMemoryTable,
EuiLink,
EuiPanel,
EuiSpacer,
EuiText,
EuiFlyout,
EuiTitle,
} from '@elastic/eui';
import escapeRegExp from 'lodash/escapeRegExp';
import { IntegrationHealthBadge } from '../../../../integrations/components/added_integration';
import { SetupIntegrationForm } from '../../../../integrations/components/setup_integration';
import { coreRefs } from '../../../../../framework/core_refs';
import { basePathLink } from '../../../../../../common/utils/shared';
import { AvailableIntegrationsTable } from '../../../../integrations/components/available_integration_table';
import React, { CSSProperties, useEffect, useState } from 'react';
import { INTEGRATIONS_BASE } from '../../../../../../common/constants/shared';
import { AvailableIntegrationsList } from '../../../../integrations/components/available_integration_overview_page';
import { DatasourceType } from '../../../../../../common/types/data_connections';
import { basePathLink } from '../../../../../../common/utils/shared';
import { coreRefs } from '../../../../../framework/core_refs';
import { IntegrationHealthBadge } from '../../../../integrations/components/added_integration';
import { AvailableIntegrationsList } from '../../../../integrations/components/available_integration_overview_page';
import { AvailableIntegrationsTable } from '../../../../integrations/components/available_integration_table';
import { SetupIntegrationForm } from '../../../../integrations/components/setup_integration';
import { isS3Connection } from '../../../utils/helpers';

interface IntegrationInstanceTableEntry {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,13 @@ exports[`Added Integration Table View Test Renders added integration table view
"sortable": true,
"truncateText": true,
},
Object {
"field": "dataSourceName",
"name": "Date Source Name",
"render": [Function],
"sortable": true,
"truncateText": true,
},
Object {
"field": "source",
"name": "Source",
Expand Down Expand Up @@ -563,6 +570,13 @@ exports[`Added Integration Table View Test Renders added integration table view
"sortable": true,
"truncateText": true,
},
Object {
"field": "dataSourceName",
"name": "Date Source Name",
"render": [Function],
"sortable": true,
"truncateText": true,
},
Object {
"field": "source",
"name": "Source",
Expand Down Expand Up @@ -725,12 +739,58 @@ exports[`Added Integration Table View Test Renders added integration table view
</EuiTableHeaderCell>
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_source_1"
key="_data_h_source_1"
data-test-subj="tableHeaderCell_dataSourceName_1"
key="_data_h_dataSourceName_1"
>
<th
className="euiTableHeaderCell"
data-test-subj="tableHeaderCell_dataSourceName_1"
role="columnheader"
scope="col"
style={
Object {
"width": undefined,
}
}
>
<CellContents
className="euiTableCellContent"
showSortMsg={false}
>
<span
className="euiTableCellContent"
>
<EuiInnerText>
<EuiI18n
default="{innerText}; {description}"
token="euiTableHeaderCell.titleTextWithDesc"
values={
Object {
"description": undefined,
"innerText": "Date Source Name",
}
}
>
<span
className="euiTableCellContent__text"
title="Date Source Name"
>
Date Source Name
</span>
</EuiI18n>
</EuiInnerText>
</span>
</CellContents>
</th>
</EuiTableHeaderCell>
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_source_2"
key="_data_h_source_2"
>
<th
className="euiTableHeaderCell"
data-test-subj="tableHeaderCell_source_1"
data-test-subj="tableHeaderCell_source_2"
role="columnheader"
scope="col"
style={
Expand Down Expand Up @@ -771,12 +831,12 @@ exports[`Added Integration Table View Test Renders added integration table view
</EuiTableHeaderCell>
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_dateAdded_2"
key="_data_h_dateAdded_2"
data-test-subj="tableHeaderCell_dateAdded_3"
key="_data_h_dateAdded_3"
>
<th
className="euiTableHeaderCell"
data-test-subj="tableHeaderCell_dateAdded_2"
data-test-subj="tableHeaderCell_dateAdded_3"
role="columnheader"
scope="col"
style={
Expand Down Expand Up @@ -817,12 +877,12 @@ exports[`Added Integration Table View Test Renders added integration table view
</EuiTableHeaderCell>
<EuiTableHeaderCell
align="left"
data-test-subj="tableHeaderCell_actions_3"
key="_data_h_actions_3"
data-test-subj="tableHeaderCell_actions_4"
key="_data_h_actions_4"
>
<th
className="euiTableHeaderCell"
data-test-subj="tableHeaderCell_actions_3"
data-test-subj="tableHeaderCell_actions_4"
role="columnheader"
scope="col"
style={
Expand Down Expand Up @@ -924,7 +984,51 @@ exports[`Added Integration Table View Test Renders added integration table view
</EuiTableRowCell>
<EuiTableRowCell
align="left"
key="_data_column_source_ad7e6e30-0b99-11ee-b27c-c9863222e9bf_1"
key="_data_column_dataSourceName_ad7e6e30-0b99-11ee-b27c-c9863222e9bf_1"
mobileOptions={
Object {
"header": "Date Source Name",
"render": undefined,
}
}
setScopeRow={false}
textOnly={false}
truncateText={true}
>
<td
className="euiTableRowCell"
style={
Object {
"width": undefined,
}
}
>
<div
className="euiTableRowCell__mobileHeader euiTableRowCell--hideForDesktop"
>
Date Source Name
</div>
<div
className="euiTableCellContent euiTableCellContent--truncateText euiTableCellContent--overflowingContent"
>
<EuiText
className=""
data-test-subj="nginxIntegrationDescription"
key=".0"
>
<div
className="euiText euiText--medium"
data-test-subj="nginxIntegrationDescription"
>
- -
</div>
</EuiText>
</div>
</td>
</EuiTableRowCell>
<EuiTableRowCell
align="left"
key="_data_column_source_ad7e6e30-0b99-11ee-b27c-c9863222e9bf_2"
mobileOptions={
Object {
"header": "Source",
Expand Down Expand Up @@ -971,7 +1075,7 @@ exports[`Added Integration Table View Test Renders added integration table view
</EuiTableRowCell>
<EuiTableRowCell
align="left"
key="_data_column_dateAdded_ad7e6e30-0b99-11ee-b27c-c9863222e9bf_2"
key="_data_column_dateAdded_ad7e6e30-0b99-11ee-b27c-c9863222e9bf_3"
mobileOptions={
Object {
"header": "Date Added",
Expand Down Expand Up @@ -1015,7 +1119,7 @@ exports[`Added Integration Table View Test Renders added integration table view
</EuiTableRowCell>
<EuiTableRowCell
align="left"
key="_data_column_actions_ad7e6e30-0b99-11ee-b27c-c9863222e9bf_3"
key="_data_column_actions_ad7e6e30-0b99-11ee-b27c-c9863222e9bf_4"
mobileOptions={
Object {
"header": "Actions",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ exports[`Integration Setup Page Renders integration setup page as expected 1`] =
lockConnectionType={false}
updateConfig={[Function]}
>
<EuiSpacer>
<div
className="euiSpacer euiSpacer--l"
/>
</EuiSpacer>
<EuiFormRow
describedByIds={Array []}
display="row"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,11 @@ exports[`Integration Setup Inputs Renders the connection inputs 1`] = `
}
updateConfig={[Function]}
>
<EuiSpacer>
<div
className="euiSpacer euiSpacer--l"
/>
</EuiSpacer>
<EuiFormRow
describedByIds={Array []}
display="row"
Expand Down Expand Up @@ -1081,6 +1086,11 @@ exports[`Integration Setup Inputs Renders the connection inputs with a locked co
lockConnectionType={true}
updateConfig={[Function]}
>
<EuiSpacer>
<div
className="euiSpacer euiSpacer--l"
/>
</EuiSpacer>
<EuiFormRow
describedByIds={Array []}
display="row"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ import {
} from '@elastic/eui';
import truncate from 'lodash/truncate';
import React, { useState } from 'react';
import { INTEGRATIONS_BASE } from '../../../../common/constants/shared';
import { DeleteModal } from '../../../../public/components/common/helpers/delete_modal';
import { useToast } from '../../../../public/components/common/toast';
import {
AddedIntegrationType,
AddedIntegrationsTableProps,
} from './added_integration_overview_page';
import { DeleteModal } from '../../../../public/components/common/helpers/delete_modal';
import { INTEGRATIONS_BASE } from '../../../../common/constants/shared';
import { useToast } from '../../../../public/components/common/toast';

export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) {
const { http } = props;
Expand All @@ -45,6 +45,15 @@ export function AddedIntegrationsTable(props: AddedIntegrationsTableProps) {
</EuiLink>
),
},
{
field: 'dataSourceName',
name: 'Date Source Name',
sortable: true,
truncateText: true,
render: (value, record) => (
<EuiText data-test-subj={`${record.templateName}IntegrationDescription`}>- -</EuiText>
),
},
{
field: 'source',
name: 'Source',
Expand Down
Loading

0 comments on commit 1b64020

Please sign in to comment.