Skip to content

Commit

Permalink
Change back type
Browse files Browse the repository at this point in the history
Signed-off-by: Lin Wang <[email protected]>
  • Loading branch information
wanglam committed Aug 30, 2024
1 parent b29e3f7 commit 49517b8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import {
import { i18n } from '@osd/i18n';
import { DataSourceConnection, DataSourceConnectionType } from '../../../common/types';
import { AssociationDataSourceModalMode } from '../../../common/constants';
import { DatasourceTypeToDisplayName } from '../../../../data_source_management/public';
import { DirectQueryConnectionIcon } from '../workspace_form';

interface DataSourceConnectionTableProps {
Expand Down Expand Up @@ -181,7 +180,6 @@ export const DataSourceConnectionTable = ({
defaultMessage: 'Type',
}),
truncateText: true,
render: (type: string) => (DatasourceTypeToDisplayName as { [key: string]: string })[type],
},
{
width: '35%',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const dataSourceConnectionsMock = [
name: 'dqc1',
parentId: 'ds1',
connectionType: DataSourceConnectionType.DirectQueryConnection,
type: 'S3',
type: 'Amazon S3',
},
],
},
Expand All @@ -62,7 +62,7 @@ const dataSourceConnectionsMock = [
name: 'dqc1',
parentId: 'ds1',
connectionType: DataSourceConnectionType.DirectQueryConnection,
type: 'S3',
type: 'Amazon S3',
},
{
id: 'ds2',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import s3Logo from '../../assets/s3_logo.svg';

export const DirectQueryConnectionIcon = ({ type }: { type?: string }) => {
switch (type) {
case 'S3GLUE':
case 'Amazon S3':
return <EuiIcon type={s3Logo} />;
case 'PROMETHEUS':
case 'Prometheus':
return <EuiIcon type={prometheusLogo} />;
default:
return null;
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/workspace/public/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { SigV4ServiceName } from '../../../plugins/data_source/common/data_sourc
import {
DirectQueryDatasourceDetails,
DATACONNECTIONS_BASE,
DatasourceTypeToDisplayName,
} from '../../data_source_management/public';
import { DataSource, DataSourceConnection, DataSourceConnectionType } from '../common/types';
import {
Expand Down Expand Up @@ -252,7 +253,7 @@ export const getDirectQueryConnections = async (dataSourceId: string, http: Http
(dataConnection: DirectQueryDatasourceDetails) => ({
id: `${dataSourceId}-${dataConnection.name}`,
name: dataConnection.name,
type: dataConnection.connector,
type: DatasourceTypeToDisplayName[dataConnection.connector],
connectionType: DataSourceConnectionType.DirectQueryConnection,
description: dataConnection.description,
parentId: dataSourceId,
Expand Down

0 comments on commit 49517b8

Please sign in to comment.