初始化3.0.0版本

This commit is contained in:
zengqiao
2022-08-18 17:04:05 +08:00
parent 462303fca0
commit 51832385b1
2446 changed files with 93177 additions and 127211 deletions

View File

@@ -0,0 +1,42 @@
import { AppContainer } from 'knowdesign';
import * as React from 'react';
import ProduceClientTest from './Produce';
import './index.less';
import TaskTabs from '../TestingConsumer/component/TaskTabs';
import DBreadcrumb from 'knowdesign/lib/extend/d-breadcrumb';
import { useParams } from 'react-router-dom';
const Produce = () => {
const initial = {
label: '生产',
key: 'tab-1',
closable: false,
tabpane: <ProduceClientTest />,
};
const { clusterId } = useParams<{ clusterId: string }>();
const [global] = AppContainer.useGlobalValue();
const ref: any = React.useRef();
React.useEffect(() => {
AppContainer.eventBus.on('ProduceTopicChange', (args: string) => {
ref.current && ref.current.setTabsTitle && ref.current.setTabsTitle(`生产 ${args}`);
});
}, []);
return (
<>
<div className="breadcrumb">
<DBreadcrumb
breadcrumbs={[
{ label: '多集群管理', aHref: '/' },
{ label: global?.clusterInfo?.name, aHref: `/cluster/${global?.clusterInfo?.id}` },
{ label: 'Produce', aHref: '' },
]}
/>
</div>
<TaskTabs initial={initial} ref={ref} />
</>
);
};
export default Produce;