Skip to content

Commit

Permalink
adding redirection to datasources (#1063)
Browse files Browse the repository at this point in the history
Signed-off-by: Shenoy Pratik <[email protected]>
  • Loading branch information
ps48 authored Oct 4, 2023
1 parent af822a5 commit 8982b40
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
3 changes: 2 additions & 1 deletion common/constants/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* SPDX-License-Identifier: Apache-2.0
*/
import CSS from 'csstype';
import { IField } from '../../common/types/explorer';

// Client route
export const PPL_BASE = '/api/ppl';
Expand Down Expand Up @@ -63,6 +62,8 @@ export const observabilityDataConnectionsID = 'datasources';
export const observabilityDataConnectionsTitle = 'Data sources';
export const observabilityDataConnectionsPluginOrder = 9030;

export const queryWorkbenchPluginID = 'opensearch-query-workbench';

// Shared Constants
export const SQL_DOCUMENTATION_URL = 'https://opensearch.org/docs/latest/search-plugins/sql/index/';
export const PPL_DOCUMENTATION_URL =
Expand Down
31 changes: 20 additions & 11 deletions public/components/datasources/components/manage/data_connection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,32 @@
*/

import {
EuiAccordion,
EuiCard,
EuiFlexGroup,
EuiFlexItem,
EuiIcon,
EuiPage,
EuiPageBody,
EuiSpacer,
EuiTitle,
EuiText,
EuiPanel,
EuiPageHeader,
EuiPageHeaderSection,
EuiAccordion,
EuiIcon,
EuiCard,
EuiPanel,
EuiSpacer,
EuiTabbedContent,
EuiText,
EuiTitle,
} from '@elastic/eui';
import React, { useEffect, useState } from 'react';
import { AccessControlTab } from './access_control_tab';
import { NoAccess } from '../no_access';
import {
DATACONNECTIONS_BASE,
observabilityIntegrationsID,
observabilityLogsID,
observabilityMetricsID,
queryWorkbenchPluginID,
} from '../../../../../common/constants/shared';
import { coreRefs } from '../../../../framework/core_refs';
import { NoAccess } from '../no_access';
import { AccessControlTab } from './access_control_tab';
import { ConnectionDetails } from './connection_details';
import { DatasourceType } from '../../../../../common/types/data_connections';

Expand Down Expand Up @@ -77,15 +78,23 @@ export const DataConnection = (props: any) => {
icon={<EuiIcon size="xxl" type="bolt" />}
title={'Accelerate performance'}
description="Accelerate performance through OpenSearch indexing."
onClick={() => {}}
onClick={() =>
application!.navigateToApp(queryWorkbenchPluginID, {
path: `#/accelerate/${dataSource}`,
})
}
/>
</EuiFlexItem>
<EuiFlexItem>
<EuiCard
icon={<EuiIcon size="xxl" type="database" />}
title={'Tables'}
description="Manually Define Tables"
onClick={() => application!.navigateToApp('opensearch-query-workbench')}
onClick={() =>
application!.navigateToApp(queryWorkbenchPluginID, {
path: `#/${dataSource}`,
})
}
/>
</EuiFlexItem>
<EuiFlexItem>
Expand Down

0 comments on commit 8982b40

Please sign in to comment.