mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-04 03:42:08 +08:00
fix: 优化全局 Message & Notification 展示效果
This commit is contained in:
@@ -0,0 +1,54 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { IconFont } from '@knowdesign/icons';
|
||||||
|
import { message } from 'knowdesign';
|
||||||
|
import { ArgsProps, ConfigOnClose } from 'knowdesign/es/basic/message';
|
||||||
|
|
||||||
|
type ConfigContent = React.ReactNode;
|
||||||
|
type ConfigDuration = number | (() => void);
|
||||||
|
type JointContent = ConfigContent | ArgsProps;
|
||||||
|
|
||||||
|
message.config({
|
||||||
|
top: 16,
|
||||||
|
});
|
||||||
|
|
||||||
|
function isArgsProps(content: JointContent): content is ArgsProps {
|
||||||
|
return Object.prototype.toString.call(content) === '[object Object]' && !!(content as ArgsProps).content;
|
||||||
|
}
|
||||||
|
|
||||||
|
const openMessage = (
|
||||||
|
type: 'info' | 'success' | 'warning' | 'error',
|
||||||
|
content: JointContent,
|
||||||
|
duration?: ConfigDuration,
|
||||||
|
onClose?: ConfigOnClose
|
||||||
|
) => {
|
||||||
|
if (isArgsProps(content)) {
|
||||||
|
message[type]({
|
||||||
|
icon: <IconFont type={`icon-${type}-circle`} />,
|
||||||
|
...content,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
message[type]({
|
||||||
|
icon: <IconFont type={`icon-${type}-circle`} />,
|
||||||
|
content,
|
||||||
|
duration,
|
||||||
|
onClose,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const customMessage = {
|
||||||
|
info(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose) {
|
||||||
|
openMessage('info', content, duration, onClose);
|
||||||
|
},
|
||||||
|
success(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose) {
|
||||||
|
openMessage('success', content, duration, onClose);
|
||||||
|
},
|
||||||
|
warning(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose) {
|
||||||
|
openMessage('warning', content, duration, onClose);
|
||||||
|
},
|
||||||
|
error(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose) {
|
||||||
|
openMessage('error', content, duration, onClose);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default customMessage;
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { notification } from 'knowdesign';
|
||||||
|
import { ArgsProps } from 'knowdesign/es/basic/notification';
|
||||||
|
import { IconFont } from '@knowdesign/icons';
|
||||||
|
|
||||||
|
notification.config({
|
||||||
|
top: 16,
|
||||||
|
duration: 3,
|
||||||
|
});
|
||||||
|
|
||||||
|
const open = (type: 'info' | 'success' | 'warning' | 'error', content: ArgsProps) => {
|
||||||
|
notification[type]({
|
||||||
|
icon: <IconFont type={`icon-${type}-circle`} />,
|
||||||
|
...content,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const customNotification = {
|
||||||
|
info(content: ArgsProps) {
|
||||||
|
open('info', content);
|
||||||
|
},
|
||||||
|
success(content: ArgsProps) {
|
||||||
|
open('success', content);
|
||||||
|
},
|
||||||
|
warning(content: ArgsProps) {
|
||||||
|
open('warning', content);
|
||||||
|
},
|
||||||
|
error(content: ArgsProps) {
|
||||||
|
open('error', content);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default customNotification;
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
|
|
||||||
import { notification, Utils } from 'knowdesign';
|
import { Utils } from 'knowdesign';
|
||||||
|
import notification from '@src/components/Notification';
|
||||||
|
|
||||||
export const goLogin = () => {
|
export const goLogin = () => {
|
||||||
if (!window.location.pathname.toLowerCase().startsWith('/login')) {
|
if (!window.location.pathname.toLowerCase().startsWith('/login')) {
|
||||||
@@ -37,10 +38,9 @@ serviceInstance.interceptors.response.use(
|
|||||||
(config: any) => {
|
(config: any) => {
|
||||||
const res: { code: number; message: string; data: any } = config.data;
|
const res: { code: number; message: string; data: any } = config.data;
|
||||||
if (res.code !== 0 && res.code !== 200) {
|
if (res.code !== 0 && res.code !== 200) {
|
||||||
const desc = res.message;
|
|
||||||
notification.error({
|
notification.error({
|
||||||
message: desc,
|
message: '错误信息',
|
||||||
duration: 3,
|
description: res.message,
|
||||||
});
|
});
|
||||||
throw res;
|
throw res;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,6 @@
|
|||||||
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
||||||
import {
|
import { Button, Form, Input, Select, Switch, Modal, ProTable, Drawer, Space, Divider, Tooltip, AppContainer, Utils } from 'knowdesign';
|
||||||
Button,
|
import message from '@src/components/Message';
|
||||||
Form,
|
|
||||||
Input,
|
|
||||||
Select,
|
|
||||||
Switch,
|
|
||||||
Modal,
|
|
||||||
message,
|
|
||||||
ProTable,
|
|
||||||
Drawer,
|
|
||||||
Space,
|
|
||||||
Divider,
|
|
||||||
Tooltip,
|
|
||||||
AppContainer,
|
|
||||||
Utils,
|
|
||||||
} from 'knowdesign';
|
|
||||||
import { IconFont } from '@knowdesign/icons';
|
import { IconFont } from '@knowdesign/icons';
|
||||||
import { PlusOutlined } from '@ant-design/icons';
|
import { PlusOutlined } from '@ant-design/icons';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
@@ -81,7 +67,7 @@ const EditConfigDrawer = forwardRef((_, ref) => {
|
|||||||
// 如果内容可以格式化为 JSON,进行处理
|
// 如果内容可以格式化为 JSON,进行处理
|
||||||
config.value = JSON.stringify(JSON.parse(config.value), null, 2);
|
config.value = JSON.stringify(JSON.parse(config.value), null, 2);
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
return;
|
//
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
form.setFieldsValue({ ...config, status: config.status === 1 });
|
form.setFieldsValue({ ...config, status: config.status === 1 });
|
||||||
@@ -476,7 +462,7 @@ export default () => {
|
|||||||
rowKey: 'id',
|
rowKey: 'id',
|
||||||
dataSource: data,
|
dataSource: data,
|
||||||
paginationProps: pagination,
|
paginationProps: pagination,
|
||||||
columns,
|
columns: columns as any,
|
||||||
lineFillColor: true,
|
lineFillColor: true,
|
||||||
attrs: {
|
attrs: {
|
||||||
onChange: onTableChange,
|
onChange: onTableChange,
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import {
|
|||||||
Transfer,
|
Transfer,
|
||||||
Row,
|
Row,
|
||||||
Col,
|
Col,
|
||||||
message,
|
|
||||||
Tooltip,
|
Tooltip,
|
||||||
Spin,
|
Spin,
|
||||||
AppContainer,
|
AppContainer,
|
||||||
@@ -19,6 +18,7 @@ import {
|
|||||||
Popover,
|
Popover,
|
||||||
IconFont,
|
IconFont,
|
||||||
} from 'knowdesign';
|
} from 'knowdesign';
|
||||||
|
import message from '@src/components/Message';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { LoadingOutlined, PlusOutlined } from '@ant-design/icons';
|
import { LoadingOutlined, PlusOutlined } from '@ant-design/icons';
|
||||||
import { defaultPagination } from '@src/constants/common';
|
import { defaultPagination } from '@src/constants/common';
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
||||||
import { Form, ProTable, Select, Button, Input, Modal, message, Drawer, Space, Divider, AppContainer, Utils } from 'knowdesign';
|
import { Form, ProTable, Select, Button, Input, Modal, Drawer, Space, Divider, AppContainer, Utils } from 'knowdesign';
|
||||||
|
import message from '@src/components/Message';
|
||||||
import { IconFont } from '@knowdesign/icons';
|
import { IconFont } from '@knowdesign/icons';
|
||||||
import { PlusOutlined, QuestionCircleOutlined } from '@ant-design/icons';
|
import { PlusOutlined, QuestionCircleOutlined } from '@ant-design/icons';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { IconFont } from '@knowdesign/icons';
|
||||||
|
import { message } from 'knowdesign';
|
||||||
|
import { ArgsProps, ConfigOnClose } from 'knowdesign/es/basic/message';
|
||||||
|
|
||||||
|
type ConfigContent = React.ReactNode;
|
||||||
|
type ConfigDuration = number | (() => void);
|
||||||
|
type JointContent = ConfigContent | ArgsProps;
|
||||||
|
|
||||||
|
message.config({
|
||||||
|
top: 16,
|
||||||
|
});
|
||||||
|
|
||||||
|
function isArgsProps(content: JointContent): content is ArgsProps {
|
||||||
|
return Object.prototype.toString.call(content) === '[object Object]' && !!(content as ArgsProps).content;
|
||||||
|
}
|
||||||
|
|
||||||
|
const openMessage = (
|
||||||
|
type: 'info' | 'success' | 'warning' | 'error',
|
||||||
|
content: JointContent,
|
||||||
|
duration?: ConfigDuration,
|
||||||
|
onClose?: ConfigOnClose
|
||||||
|
) => {
|
||||||
|
if (isArgsProps(content)) {
|
||||||
|
message[type]({
|
||||||
|
icon: <IconFont type={`icon-${type}-circle`} />,
|
||||||
|
...content,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
message[type]({
|
||||||
|
icon: <IconFont type={`icon-${type}-circle`} />,
|
||||||
|
content,
|
||||||
|
duration,
|
||||||
|
onClose,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const customMessage = {
|
||||||
|
info(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose) {
|
||||||
|
openMessage('info', content, duration, onClose);
|
||||||
|
},
|
||||||
|
success(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose) {
|
||||||
|
openMessage('success', content, duration, onClose);
|
||||||
|
},
|
||||||
|
warning(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose) {
|
||||||
|
openMessage('warning', content, duration, onClose);
|
||||||
|
},
|
||||||
|
error(content: JointContent, duration?: ConfigDuration, onClose?: ConfigOnClose) {
|
||||||
|
openMessage('error', content, duration, onClose);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default customMessage;
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { notification } from 'knowdesign';
|
||||||
|
import { ArgsProps } from 'knowdesign/es/basic/notification';
|
||||||
|
import { IconFont } from '@knowdesign/icons';
|
||||||
|
|
||||||
|
notification.config({
|
||||||
|
top: 16,
|
||||||
|
duration: 3,
|
||||||
|
});
|
||||||
|
|
||||||
|
const open = (type: 'info' | 'success' | 'warning' | 'error', content: ArgsProps) => {
|
||||||
|
notification[type]({
|
||||||
|
icon: <IconFont type={`icon-${type}-circle`} />,
|
||||||
|
...content,
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const customNotification = {
|
||||||
|
info(content: ArgsProps) {
|
||||||
|
open('info', content);
|
||||||
|
},
|
||||||
|
success(content: ArgsProps) {
|
||||||
|
open('success', content);
|
||||||
|
},
|
||||||
|
warning(content: ArgsProps) {
|
||||||
|
open('warning', content);
|
||||||
|
},
|
||||||
|
error(content: ArgsProps) {
|
||||||
|
open('error', content);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default customNotification;
|
||||||
@@ -15,10 +15,10 @@ import {
|
|||||||
Tag,
|
Tag,
|
||||||
Utils,
|
Utils,
|
||||||
AppContainer,
|
AppContainer,
|
||||||
message,
|
|
||||||
Divider,
|
Divider,
|
||||||
Space,
|
Space,
|
||||||
} from 'knowdesign';
|
} from 'knowdesign';
|
||||||
|
import message from '@src/components/Message';
|
||||||
import './index.less';
|
import './index.less';
|
||||||
import Api, { MetricType } from '@src/api/index';
|
import Api, { MetricType } from '@src/api/index';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ import {
|
|||||||
Table,
|
Table,
|
||||||
Utils,
|
Utils,
|
||||||
AppContainer,
|
AppContainer,
|
||||||
message,
|
|
||||||
Space,
|
Space,
|
||||||
Divider,
|
Divider,
|
||||||
Transfer,
|
Transfer,
|
||||||
Tooltip,
|
Tooltip,
|
||||||
} from 'knowdesign';
|
} from 'knowdesign';
|
||||||
|
import message from '@src/components/Message';
|
||||||
import { IconFont } from '@knowdesign/icons';
|
import { IconFont } from '@knowdesign/icons';
|
||||||
import './index.less';
|
import './index.less';
|
||||||
import Api, { MetricType } from '@src/api/index';
|
import Api, { MetricType } from '@src/api/index';
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import { notification, Utils } from 'knowdesign';
|
import { Utils } from 'knowdesign';
|
||||||
|
import notification from '@src/components/Notification';
|
||||||
|
|
||||||
const { EventBus } = Utils;
|
const { EventBus } = Utils;
|
||||||
export const licenseEventBus = new EventBus();
|
export const licenseEventBus = new EventBus();
|
||||||
|
|
||||||
@@ -42,8 +44,8 @@ serviceInstance.interceptors.response.use(
|
|||||||
licenseEventBus.emit('licenseError', desc);
|
licenseEventBus.emit('licenseError', desc);
|
||||||
} else {
|
} else {
|
||||||
notification.error({
|
notification.error({
|
||||||
message: desc,
|
message: '错误信息',
|
||||||
duration: 3,
|
description: desc,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
throw res;
|
throw res;
|
||||||
@@ -83,36 +85,31 @@ const dealResponse = (error: any) => {
|
|||||||
case 405:
|
case 405:
|
||||||
notification.error({
|
notification.error({
|
||||||
message: '错误',
|
message: '错误',
|
||||||
duration: 3,
|
|
||||||
description: `${error.response.data.message || '请求方式错误'}`,
|
description: `${error.response.data.message || '请求方式错误'}`,
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 500:
|
case 500:
|
||||||
notification.error({
|
notification.error({
|
||||||
message: '错误',
|
message: '错误',
|
||||||
duration: 3,
|
|
||||||
description: '服务错误,请重试!',
|
description: '服务错误,请重试!',
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 502:
|
case 502:
|
||||||
notification.error({
|
notification.error({
|
||||||
message: '错误',
|
message: '错误',
|
||||||
duration: 3,
|
|
||||||
description: '网络错误,请重试!',
|
description: '网络错误,请重试!',
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
notification.error({
|
notification.error({
|
||||||
message: '连接出错',
|
message: '连接出错',
|
||||||
duration: 3,
|
|
||||||
description: `${error.response.status}`,
|
description: `${error.response.status}`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
notification.error({
|
notification.error({
|
||||||
description: '请重试或检查服务',
|
|
||||||
message: '连接超时!',
|
message: '连接超时!',
|
||||||
duration: 3,
|
description: '请重试或检查服务',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import { Drawer, Form, Input, Space, Button, Checkbox, Utils, Row, Col, Divider, message } from 'knowdesign';
|
import { Drawer, Form, Input, Space, Button, Checkbox, Utils, Row, Col, Divider } from 'knowdesign';
|
||||||
|
import message from '@src/components/Message';
|
||||||
import { IconFont } from '@knowdesign/icons';
|
import { IconFont } from '@knowdesign/icons';
|
||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
import Api from '@src/api';
|
import Api from '@src/api';
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { Button, DatePicker, Drawer, Form, notification, Radio, Utils, Space, Divider, message } from 'knowdesign';
|
import { Button, DatePicker, Drawer, Form, Radio, Utils, Space, Divider } from 'knowdesign';
|
||||||
|
import notification from '@src/components/Notification';
|
||||||
|
|
||||||
|
import message from '@src/components/Message';
|
||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
import EditTable from '../TestingProduce/component/EditTable';
|
import EditTable from '../TestingProduce/component/EditTable';
|
||||||
import Api from '@src/api/index';
|
import Api from '@src/api/index';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|
||||||
const CustomSelectResetTime = (props: { value?: string; onChange?: (val: Number | String) => void }) => {
|
const CustomSelectResetTime = (props: { value?: string; onChange?: (val: number | string) => void }) => {
|
||||||
const { value, onChange } = props;
|
const { value, onChange } = props;
|
||||||
const [timeSetMode, setTimeSetMode] = useState('newest');
|
const [timeSetMode, setTimeSetMode] = useState('newest');
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -81,7 +84,7 @@ export default (props: any) => {
|
|||||||
tableData = customFormRef.current.getTableData();
|
tableData = customFormRef.current.getTableData();
|
||||||
}
|
}
|
||||||
const formData = form.getFieldsValue();
|
const formData = form.getFieldsValue();
|
||||||
let resetParams: any = {
|
const resetParams: any = {
|
||||||
clusterId: clusterPhyId,
|
clusterId: clusterPhyId,
|
||||||
createIfNotExist: false,
|
createIfNotExist: false,
|
||||||
groupName: record.groupName,
|
groupName: record.groupName,
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
import { Button, Drawer, Utils, Descriptions, Tabs, Input, message, Spin, InputNumber } from 'knowdesign';
|
import { Button, Drawer, Utils, Descriptions, Tabs, Input, Spin, InputNumber } from 'knowdesign';
|
||||||
|
import message from '@src/components/Message';
|
||||||
import { IconFont } from '@knowdesign/icons';
|
import { IconFont } from '@knowdesign/icons';
|
||||||
import TaskDetails from './TeskDetails';
|
import TaskDetails from './TeskDetails';
|
||||||
import NodeTraffic from './NodeTraffic';
|
import NodeTraffic from './NodeTraffic';
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React, { useState, useEffect, memo } from 'react';
|
import React, { useState, useEffect, memo } from 'react';
|
||||||
import { useParams, useHistory, useLocation } from 'react-router-dom';
|
import { useParams, useHistory, useLocation } from 'react-router-dom';
|
||||||
import { ProTable, Drawer, Utils, AppContainer, Form, Select, Input, Button, message, Modal, Divider } from 'knowdesign';
|
import { ProTable, Drawer, Utils, AppContainer, Form, Select, Input, Button, Modal, Divider } from 'knowdesign';
|
||||||
|
import message from '@src/components/Message';
|
||||||
import { IconFont } from '@knowdesign/icons';
|
import { IconFont } from '@knowdesign/icons';
|
||||||
import API from '../../api';
|
import API from '../../api';
|
||||||
import { getJobsListColumns, defaultPagination, runningStatus, jobType } from './config';
|
import { getJobsListColumns, defaultPagination, runningStatus, jobType } from './config';
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
import React, { useState, useEffect, useRef } from 'react';
|
import React, { useState, useEffect, useRef } from 'react';
|
||||||
import {
|
import { Utils, Drawer, Button, Form, Space, Divider, AppContainer, Radio, InputNumber, Transfer, Select, Tooltip } from 'knowdesign';
|
||||||
Utils,
|
import message from '@src/components/Message';
|
||||||
Drawer,
|
|
||||||
Button,
|
|
||||||
Form,
|
|
||||||
Space,
|
|
||||||
Divider,
|
|
||||||
AppContainer,
|
|
||||||
Radio,
|
|
||||||
InputNumber,
|
|
||||||
Transfer,
|
|
||||||
Select,
|
|
||||||
message,
|
|
||||||
Tooltip,
|
|
||||||
} from 'knowdesign';
|
|
||||||
import { IconFont } from '@knowdesign/icons';
|
import { IconFont } from '@knowdesign/icons';
|
||||||
import CronInput from './CronInput';
|
import CronInput from './CronInput';
|
||||||
import BalanceEditTable from './BalanceEditTable';
|
import BalanceEditTable from './BalanceEditTable';
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { useState, useEffect, useRef } from 'react';
|
import React, { useState, useEffect, useRef } from 'react';
|
||||||
import { Utils, Drawer, Button, Form, Space, Divider, AppContainer, Input, Transfer, message, InputNumber } from 'knowdesign';
|
import { Utils, Drawer, Button, Form, Space, Divider, AppContainer, Input, Transfer, InputNumber } from 'knowdesign';
|
||||||
|
import message from '@src/components/Message';
|
||||||
import { IconFont } from '@knowdesign/icons';
|
import { IconFont } from '@knowdesign/icons';
|
||||||
import { CloseOutlined } from '@ant-design/icons';
|
import { CloseOutlined } from '@ant-design/icons';
|
||||||
import api from '../../api';
|
import api from '../../api';
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Form, Button, Input, Row, InputNumber, Utils, message } from 'knowdesign';
|
import { Form, Button, Input, Row, InputNumber, Utils } from 'knowdesign';
|
||||||
|
import message from '@src/components/Message';
|
||||||
import { FormMap } from './config';
|
import { FormMap } from './config';
|
||||||
import Api from '../../api';
|
import Api from '../../api';
|
||||||
import { useHistory } from 'react-router-dom';
|
import { useHistory } from 'react-router-dom';
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { Button, Divider, Drawer, Form, Input, InputNumber, message, Radio, Select, Spin, Space, Utils } from 'knowdesign';
|
import { Button, Divider, Drawer, Form, Input, InputNumber, Radio, Select, Spin, Space, Utils } from 'knowdesign';
|
||||||
|
import message from '@src/components/Message';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { useIntl } from 'react-intl';
|
import { useIntl } from 'react-intl';
|
||||||
import api from '@src/api';
|
import api from '@src/api';
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
import React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } from 'react';
|
||||||
import { Button, Form, Input, Select, message, Drawer, Space, Divider, Utils, Radio, AutoComplete, Alert } from 'knowdesign';
|
import { Button, Form, Input, Select, Drawer, Space, Divider, Utils, Radio, AutoComplete, Alert } from 'knowdesign';
|
||||||
|
import message from '@src/components/Message';
|
||||||
import api from '@src/api';
|
import api from '@src/api';
|
||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
import { UsersProps } from '../SecurityUsers';
|
import { UsersProps } from '../SecurityUsers';
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React, { useEffect, useRef, useState } from 'react';
|
import React, { useEffect, useRef, useState } from 'react';
|
||||||
import { Button, Form, Input, Select, Modal, message, ProTable, AppContainer, DKSBreadcrumb, Utils, Divider } from 'knowdesign';
|
import { Button, Form, Input, Select, Modal, ProTable, AppContainer, DKSBreadcrumb, Utils, Divider } from 'knowdesign';
|
||||||
|
import message from '@src/components/Message';
|
||||||
import { IconFont } from '@knowdesign/icons';
|
import { IconFont } from '@knowdesign/icons';
|
||||||
import ACLsCardBar from '@src/components/CardBar/ACLsCardBar';
|
import ACLsCardBar from '@src/components/CardBar/ACLsCardBar';
|
||||||
import api from '@src/api';
|
import api from '@src/api';
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import {
|
|||||||
Form,
|
Form,
|
||||||
Input,
|
Input,
|
||||||
Modal,
|
Modal,
|
||||||
message,
|
|
||||||
ProTable,
|
ProTable,
|
||||||
Drawer,
|
Drawer,
|
||||||
Space,
|
Space,
|
||||||
@@ -16,6 +15,7 @@ import {
|
|||||||
Tooltip,
|
Tooltip,
|
||||||
Alert,
|
Alert,
|
||||||
} from 'knowdesign';
|
} from 'knowdesign';
|
||||||
|
import message from '@src/components/Message';
|
||||||
import { IconFont } from '@knowdesign/icons';
|
import { IconFont } from '@knowdesign/icons';
|
||||||
import { CloseOutlined, EyeInvisibleOutlined, EyeOutlined, LoadingOutlined } from '@ant-design/icons';
|
import { CloseOutlined, EyeInvisibleOutlined, EyeOutlined, LoadingOutlined } from '@ant-design/icons';
|
||||||
import './index.less';
|
import './index.less';
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/* eslint-disable no-case-declarations */
|
/* eslint-disable no-case-declarations */
|
||||||
import { DownloadOutlined } from '@ant-design/icons';
|
import { DownloadOutlined } from '@ant-design/icons';
|
||||||
import { AppContainer, Divider, message, Tooltip, Utils } from 'knowdesign';
|
import { AppContainer, Divider, Tooltip, Utils } from 'knowdesign';
|
||||||
|
import message from '@src/components/Message';
|
||||||
import { IconFont } from '@knowdesign/icons';
|
import { IconFont } from '@knowdesign/icons';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { AppContainer, Form, message, Tabs, Utils } from 'knowdesign';
|
import { AppContainer, Form, Tabs, Utils } from 'knowdesign';
|
||||||
|
import message from '@src/components/Message';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import ConfigForm from './component/ConfigFrom';
|
import ConfigForm from './component/ConfigFrom';
|
||||||
import TestResult from '../TestingConsumer/component/Result';
|
import TestResult from '../TestingConsumer/component/Result';
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/* eslint-disable react/display-name */
|
/* eslint-disable react/display-name */
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { Table, Input, InputNumber, Popconfirm, Form, Typography, Button, message, Select } from 'knowdesign';
|
import { Table, Input, InputNumber, Popconfirm, Form, Typography, Button, Select } from 'knowdesign';
|
||||||
|
import message from '@src/components/Message';
|
||||||
import { IconFont } from '@knowdesign/icons';
|
import { IconFont } from '@knowdesign/icons';
|
||||||
import './style/edit-table.less';
|
import './style/edit-table.less';
|
||||||
import { CheckOutlined, CloseOutlined, PlusSquareOutlined } from '@ant-design/icons';
|
import { CheckOutlined, CloseOutlined, PlusSquareOutlined } from '@ant-design/icons';
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Drawer, Form, Input, Space, Button, Utils, Row, Col, Divider, message } from 'knowdesign';
|
import { Drawer, Form, Input, Space, Button, Utils, Row, Col, Divider } from 'knowdesign';
|
||||||
|
import message from '@src/components/Message';
|
||||||
import { IconFont } from '@knowdesign/icons';
|
import { IconFont } from '@knowdesign/icons';
|
||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
import Api from '@src/api';
|
import Api from '@src/api';
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
import { Alert, Button, Checkbox, Divider, Drawer, Form, Input, InputNumber, Modal, notification, Select, Utils } from 'knowdesign';
|
import { Alert, Button, Checkbox, Divider, Drawer, Form, Input, InputNumber, Modal, Select, Utils } from 'knowdesign';
|
||||||
|
import notification from '@src/components/Notification';
|
||||||
import { PlusOutlined, DownOutlined, UpOutlined } from '@ant-design/icons';
|
import { PlusOutlined, DownOutlined, UpOutlined } from '@ant-design/icons';
|
||||||
import Api from '@src/api/index';
|
import Api from '@src/api/index';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
import { Button, Form, Input, Modal, notification, Utils } from 'knowdesign';
|
import { Button, Form, Input, Modal, Utils } from 'knowdesign';
|
||||||
|
import notification from '@src/components/Notification';
|
||||||
import { IconFont } from '@knowdesign/icons';
|
import { IconFont } from '@knowdesign/icons';
|
||||||
import Api from '@src/api/index';
|
import Api from '@src/api/index';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React, { useState, useEffect, useCallback } from 'react';
|
import React, { useState, useEffect, useCallback } from 'react';
|
||||||
import { Redirect, useHistory, useLocation } from 'react-router-dom';
|
import { Redirect, useHistory, useLocation } from 'react-router-dom';
|
||||||
import { DProLayout, AppContainer, RouteGuard, notification, Spin } from 'knowdesign';
|
import { DProLayout, AppContainer, RouteGuard, Spin } from 'knowdesign';
|
||||||
|
import notification from '@src/components/Notification';
|
||||||
import { pageRoutes } from './pageRoutes';
|
import { pageRoutes } from './pageRoutes';
|
||||||
import { leftMenus, systemKey } from '@src/constants/menu';
|
import { leftMenus, systemKey } from '@src/constants/menu';
|
||||||
import { ClustersPermissionMap } from './CommonConfig';
|
import { ClustersPermissionMap } from './CommonConfig';
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
@select-item-selected-font-weight: normal;
|
@select-item-selected-font-weight: normal;
|
||||||
@btn-danger-bg: #F5483B;
|
@btn-danger-bg: #F5483B;
|
||||||
@btn-danger-border: #F5483B;
|
@btn-danger-border: #F5483B;
|
||||||
|
@notification-icon-size: 20px;
|
||||||
// 自定义变量
|
// 自定义变量
|
||||||
// Input
|
// Input
|
||||||
@input-bg: rgba(33, 37, 41, 0.06);
|
@input-bg: rgba(33, 37, 41, 0.06);
|
||||||
@@ -656,3 +657,109 @@
|
|||||||
.@{ant-prefix}-empty-img-default{
|
.@{ant-prefix}-empty-img-default{
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// message 样式覆盖
|
||||||
|
.@{message-prefix-cls} {
|
||||||
|
&-notice-content {
|
||||||
|
padding: 8px 12px;
|
||||||
|
font-size: 14px;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
&-success,
|
||||||
|
&-info,
|
||||||
|
&-warning,
|
||||||
|
&-error,
|
||||||
|
&-loading {
|
||||||
|
margin: unset;
|
||||||
|
padding: unset;
|
||||||
|
color: #000;
|
||||||
|
border-style: unset;
|
||||||
|
border-width: unset;
|
||||||
|
border-radius: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-success {
|
||||||
|
background-color: unset;
|
||||||
|
border-color: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-info,
|
||||||
|
&-loading {
|
||||||
|
background-color: unset;
|
||||||
|
border-color: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-warning {
|
||||||
|
background-color: unset;
|
||||||
|
border-color: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-error {
|
||||||
|
background-color: unset;
|
||||||
|
border-color: unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
.@{iconfont-css-prefix} {
|
||||||
|
top: 2px;
|
||||||
|
color: unset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Notification 样式覆盖
|
||||||
|
.@{notification-prefix-cls} {
|
||||||
|
&-notice {
|
||||||
|
width: 348px;
|
||||||
|
color: #000;
|
||||||
|
background-color: #fff;
|
||||||
|
border: unset;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-shadow: 0 2px 4px 0 rgba(0,0,0,0.02), 0 4px 6px 6px rgba(0,0,0,0.02), 0 4px 6px 0 rgba(0,0,0,0.06);
|
||||||
|
&-message {
|
||||||
|
font-family: @font-family-bold;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
&-description {
|
||||||
|
font-size: 14px;
|
||||||
|
color: rgba(0,0,0,0.60);
|
||||||
|
}
|
||||||
|
&-with-icon &-message {
|
||||||
|
font-size: 16px;
|
||||||
|
margin-left: 26px;
|
||||||
|
}
|
||||||
|
&-with-icon &-description {
|
||||||
|
font-size: 14px;
|
||||||
|
margin-left: 26px;
|
||||||
|
}
|
||||||
|
&-icon {
|
||||||
|
top: 18px;
|
||||||
|
font-size: @notification-icon-size;
|
||||||
|
line-height: @notification-icon-size;
|
||||||
|
}
|
||||||
|
.@{iconfont-css-prefix}&-icon {
|
||||||
|
color: @notification-content-color !important;
|
||||||
|
}
|
||||||
|
&-success {
|
||||||
|
background-color: #fff;
|
||||||
|
border: unset;
|
||||||
|
}
|
||||||
|
&-warning {
|
||||||
|
background-color: #fff;
|
||||||
|
border: unset;
|
||||||
|
}
|
||||||
|
&-error {
|
||||||
|
background-color: #fff;
|
||||||
|
border: unset;
|
||||||
|
}
|
||||||
|
&-close {
|
||||||
|
color: rgba(0,0,0,0.60);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
& when not (@theme = dark) {
|
||||||
|
color: shade(@white, 30%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user