Commit a460cb17 authored by 皮倩雯's avatar 皮倩雯

fix: '宿主管理中台配置跳转开启网关'

parent de445182
Pipeline #67151 canceled with stages
/* eslint-disable global-require */
import React, { useEffect, useState } from 'react';
import { Form, Divider, Button, Input, message } from 'antd';
import { SaveETLConfig, GetETLConfig } from '@/services/hostmanager/hostmanager';
import { Form, Divider, Button, Input, message, Modal, Space } from 'antd';
import { InfoCircleFilled } from '@ant-design/icons';
import { SaveETLConfig, GetETLConfig, GetGateWay } from '@/services/hostmanager/hostmanager';
import styles from './index.less';
const ETCConfig = () => {
const ETCConfig = props => {
const { setActiveKey } = props;
const [form] = Form.useForm();
const [flag, setFlag] = useState(0);
const [getWayVisible, setGetWayVisible] = useState(false);
useEffect(() => {
GetGateWay().then(res => {
if (res.code === 0) {
if (res.data === false) {
setGetWayVisible(true);
}
}
});
GetETLConfig().then(res => {
if (res.code === 0) {
console.log(res.data, 'res.data');
......@@ -99,6 +109,34 @@ const ETCConfig = () => {
</Button>
</Form.Item>
</Form>
<Modal
visible={getWayVisible}
title="提示"
width="350px"
closable={false}
footer={
<Space>
<Button
onClick={() => {
setGetWayVisible(false);
setActiveKey('5');
}}
type="primary"
>
好的,去开启
</Button>
</Space>
}
>
<InfoCircleFilled
style={{
color: '#faad14',
fontSize: '18px',
marginRight: '10px',
}}
/>
<span>当前网关暂未打开,请前往开启!</span>
</Modal>
</div>
);
};
......
......@@ -33,7 +33,7 @@ const HostManager = () => {
<ProxyConfig />
</TabPane> */}
<TabPane tab="中台配置" key="6">
<ETLConfig />
<ETLConfig setActiveKey={setActiveKey} />
</TabPane>
<TabPane tab="网关配置" key="5">
<GateConfig />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment