Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Commit 3efeda8

Browse files
committed
DBZ-5326: UI fixes
1 parent 0772500 commit 3efeda8

File tree

5 files changed

+509
-4
lines changed

5 files changed

+509
-4
lines changed

ui/packages/ui/src/app/pages/connectorDetails/ConnectorDetailsPage.tsx

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { CONNECTOR_DETAILS_TABS } from '../../constants/constants';
22
import './ConnectorDetailsPage.css';
33
import { EditConnectorComponent } from './EditConnectorComponent';
4+
import { IncrementalSnapshot } from './incrementalSnapshot/IncrementalSnapshot';
5+
import { Services } from '@debezium/ui-services';
46
import {
57
Stack,
68
StackItem,
@@ -17,8 +19,11 @@ import {
1719
TabTitleText,
1820
Tabs,
1921
} from '@patternfly/react-core';
22+
import { ConnectorIcon } from 'components';
23+
import { AppLayoutContext } from 'layout';
2024
import React, { useEffect, useState } from 'react';
2125
import { useHistory, useLocation } from 'react-router-dom';
26+
import { ConnectorTypeId, fetch_retry } from 'shared';
2227

2328
export const ConnectorDetailsPage = () => {
2429
const { hash, pathname } = useLocation();
@@ -28,6 +33,9 @@ export const ConnectorDetailsPage = () => {
2833
const [activeTabKey, setActiveTabKey] = useState<string | number>(
2934
getTab(hash)
3035
);
36+
const [connectorConfig, setConnectorConfig] = React.useState<
37+
Map<string, string>
38+
>(new Map<string, string>());
3139

3240
/**
3341
* Toggle currently active tab
@@ -46,6 +54,21 @@ export const ConnectorDetailsPage = () => {
4654
setActiveTabKey(getTab(hash));
4755
}, [hash]);
4856

57+
const connectorService = Services.getConnectorService();
58+
const appLayoutContext = React.useContext(AppLayoutContext);
59+
const clusterID = appLayoutContext.clusterId;
60+
61+
useEffect(() => {
62+
fetch_retry(connectorService.getConnectorConfig, connectorService, [
63+
clusterID,
64+
actionConnectorName,
65+
])
66+
.then((cConnector) => {
67+
setConnectorConfig(cConnector);
68+
})
69+
.catch((err: Error) => console.error('danger', err?.message));
70+
}, [clusterID, actionConnectorName]);
71+
4972
return (
5073
<Stack>
5174
<StackItem>
@@ -62,7 +85,21 @@ export const ConnectorDetailsPage = () => {
6285
<Level hasGutter={true}>
6386
<LevelItem>
6487
<TextContent>
88+
6589
<Title headingLevel="h3" size={TitleSizes['2xl']}>
90+
{/* {connectorConfig['connector.id'] && (
91+
<ConnectorIcon
92+
connectorType={
93+
connectorConfig['connector.id'] === 'PostgreSQL'
94+
? ConnectorTypeId.POSTGRES
95+
: connectorConfig['connector.id']
96+
}
97+
alt={actionConnectorName}
98+
width={30}
99+
height={30}
100+
/>
101+
)}
102+
{` ${actionConnectorName}`} */}
66103
{actionConnectorName}
67104
</Title>
68105
</TextContent>
@@ -73,6 +110,7 @@ export const ConnectorDetailsPage = () => {
73110
<StackItem isFilled>
74111
<PageSection
75112
variant={PageSectionVariants.light}
113+
className="connector-details-content"
76114
style={{ padding: '5px 5px 0 5px' }}
77115
>
78116
<Tabs activeKey={activeTabKey} onSelect={handleTabClick}>
@@ -99,7 +137,12 @@ export const ConnectorDetailsPage = () => {
99137
eventKey={CONNECTOR_DETAILS_TABS.IncrementalSnapshot}
100138
title={<TabTitleText>Incremental snapshot</TabTitleText>}
101139
>
102-
Incremental snapshot
140+
{actionConnectorName && connectorConfig['connector.id'] && (
141+
<IncrementalSnapshot
142+
actionConnectorName={actionConnectorName}
143+
connectorConfig={connectorConfig}
144+
/>
145+
)}
103146
</Tab>
104147
</Tabs>
105148
</PageSection>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.incremental-snapshot-wizard{
2+
.pf-c-wizard__nav-list{
3+
padding-right: 5px;
4+
}
5+
}

0 commit comments

Comments
 (0)