fix: distributed servers info
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
:local(.delete-modal-content) {
|
||||
display: flex;
|
||||
font-size: var(--font-size-middle);
|
||||
|
||||
:global {
|
||||
.anticon {
|
||||
font-size: 20px;
|
||||
margin-right: 10px;
|
||||
color: var(--ant-color-warning);
|
||||
}
|
||||
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:local(.content) {
|
||||
padding-top: 15px;
|
||||
padding-left: 30px;
|
||||
}
|
||||
@@ -9,9 +9,35 @@ import {
|
||||
message,
|
||||
type ModalFuncProps
|
||||
} from 'antd';
|
||||
import { FC, forwardRef, useImperativeHandle, useState } from 'react';
|
||||
import { createStyles } from 'antd-style';
|
||||
import { useState } from 'react';
|
||||
import styled from 'styled-components';
|
||||
import Styles from './index.less';
|
||||
|
||||
const useStyles = createStyles(({ css }) => ({
|
||||
'delete-modal-content': css`
|
||||
display: flex;
|
||||
font-size: var(--font-size-middle);
|
||||
.anticon {
|
||||
font-size: 20px;
|
||||
margin-right: 10px;
|
||||
color: var(--ant-color-warning);
|
||||
}
|
||||
.title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: var(--font-weight-500);
|
||||
}
|
||||
`,
|
||||
content: css`
|
||||
padding-top: 15px;
|
||||
padding-left: 30px;
|
||||
color: var(--ant-color-text-secondary);
|
||||
white-space: pre-line;
|
||||
span {
|
||||
color: var(--ant-color-text);
|
||||
}
|
||||
`
|
||||
}));
|
||||
|
||||
const CheckboxWrapper = styled.div`
|
||||
margin-top: 20px;
|
||||
@@ -25,12 +51,8 @@ const CheckboxWrapper = styled.div`
|
||||
}
|
||||
`;
|
||||
|
||||
interface DeleteModalProps {
|
||||
ref: any;
|
||||
}
|
||||
|
||||
interface DataOptions {
|
||||
content: string;
|
||||
content?: string;
|
||||
selection?: boolean;
|
||||
name?: string;
|
||||
okText?: string;
|
||||
@@ -43,28 +65,33 @@ interface DataOptions {
|
||||
};
|
||||
}
|
||||
|
||||
const DeleteModal: FC<DeleteModalProps> = forwardRef((props, ref) => {
|
||||
interface Configuration {
|
||||
checked: boolean;
|
||||
}
|
||||
|
||||
export default function useDeleteModel() {
|
||||
const intl = useIntl();
|
||||
const { styles } = useStyles();
|
||||
const { saveScrollHeight, restoreScrollHeight } = useBodyScroll();
|
||||
const [visible, setVisible] = useState(false);
|
||||
const [checked, setChecked] = useState(false);
|
||||
const [configuration, setConfiguration] = useState<Configuration>({
|
||||
checked: false
|
||||
});
|
||||
const [config, setConfig] = useState<ModalFuncProps & DataOptions>({} as any);
|
||||
|
||||
useImperativeHandle(ref, () => ({
|
||||
show: (data: ModalFuncProps & DataOptions) => {
|
||||
saveScrollHeight();
|
||||
setConfig(data);
|
||||
setChecked(data.checkConfig?.defautlChecked || false);
|
||||
setVisible(true);
|
||||
},
|
||||
hide: () => {
|
||||
setVisible(false);
|
||||
restoreScrollHeight();
|
||||
},
|
||||
configuration: {
|
||||
checked: checked
|
||||
}
|
||||
}));
|
||||
const show = (data: ModalFuncProps & DataOptions) => {
|
||||
saveScrollHeight();
|
||||
setConfig(data);
|
||||
setConfiguration({
|
||||
checked: data.checkConfig?.defautlChecked || false
|
||||
});
|
||||
setVisible(true);
|
||||
};
|
||||
|
||||
const hide = () => {
|
||||
setVisible(false);
|
||||
restoreScrollHeight();
|
||||
};
|
||||
|
||||
const handleCancel = () => {
|
||||
setVisible(false);
|
||||
@@ -94,75 +121,89 @@ const DeleteModal: FC<DeleteModalProps> = forwardRef((props, ref) => {
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal
|
||||
style={{
|
||||
top: '20%'
|
||||
}}
|
||||
open={visible}
|
||||
onOk={handleOk}
|
||||
onCancel={handleCancel}
|
||||
destroyOnClose={true}
|
||||
closeIcon={false}
|
||||
maskClosable={false}
|
||||
keyboard={false}
|
||||
width={460}
|
||||
styles={{}}
|
||||
footer={
|
||||
<Space size={20}>
|
||||
<Button onClick={handleCancel} size="middle">
|
||||
{config.cancelText
|
||||
? intl.formatMessage({ id: config.cancelText })
|
||||
: intl.formatMessage({ id: 'common.button.cancel' })}
|
||||
</Button>
|
||||
<Button type="primary" onClick={handleOk} size="middle">
|
||||
{config.okText
|
||||
? intl.formatMessage({ id: config.okText })
|
||||
: intl.formatMessage({ id: 'common.button.delete' })}
|
||||
</Button>
|
||||
</Space>
|
||||
}
|
||||
>
|
||||
<div className={Styles['delete-modal-content']}>
|
||||
<span className="title">
|
||||
<ExclamationCircleFilled />
|
||||
<span>
|
||||
{config.title
|
||||
? intl.formatMessage({ id: config.title })
|
||||
: intl.formatMessage({ id: 'common.title.delete.confirm' })}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
className={Styles['content']}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html:
|
||||
config.content &&
|
||||
intl.formatMessage(
|
||||
{
|
||||
id: config.operation || ''
|
||||
},
|
||||
{
|
||||
type: intl.formatMessage({ id: config.content }),
|
||||
name: config.name
|
||||
}
|
||||
)
|
||||
const DeleteModal = () => {
|
||||
return (
|
||||
<Modal
|
||||
style={{
|
||||
top: '20%'
|
||||
}}
|
||||
></div>
|
||||
{config.checkConfig && (
|
||||
<CheckboxWrapper>
|
||||
<Checkbox
|
||||
checked={checked}
|
||||
onChange={(e) => setChecked(e.target.checked)}
|
||||
>
|
||||
<span className="check-text">
|
||||
{intl.formatMessage({ id: config.checkConfig?.checkText })}
|
||||
open={visible}
|
||||
onOk={handleOk}
|
||||
onCancel={handleCancel}
|
||||
destroyOnClose={false}
|
||||
closeIcon={false}
|
||||
maskClosable={false}
|
||||
keyboard={false}
|
||||
width={460}
|
||||
styles={{
|
||||
footer: {
|
||||
marginTop: '20px'
|
||||
}
|
||||
}}
|
||||
footer={
|
||||
<Space size={20}>
|
||||
<Button onClick={handleCancel} size="middle">
|
||||
{config.cancelText
|
||||
? intl.formatMessage({ id: config.cancelText })
|
||||
: intl.formatMessage({ id: 'common.button.cancel' })}
|
||||
</Button>
|
||||
<Button type="primary" onClick={handleOk} size="middle">
|
||||
{config.okText
|
||||
? intl.formatMessage({ id: config.okText })
|
||||
: intl.formatMessage({ id: 'common.button.delete' })}
|
||||
</Button>
|
||||
</Space>
|
||||
}
|
||||
>
|
||||
<div className={styles['delete-modal-content']}>
|
||||
<span className="title">
|
||||
<ExclamationCircleFilled />
|
||||
<span>
|
||||
{config.title
|
||||
? intl.formatMessage({ id: config.title })
|
||||
: intl.formatMessage({ id: 'common.title.delete.confirm' })}
|
||||
</span>
|
||||
</Checkbox>
|
||||
</CheckboxWrapper>
|
||||
)}
|
||||
</Modal>
|
||||
);
|
||||
});
|
||||
|
||||
export default DeleteModal;
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
className={styles['content']}
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: config.content
|
||||
? intl.formatMessage(
|
||||
{
|
||||
id: config.operation || ''
|
||||
},
|
||||
{
|
||||
type: intl.formatMessage({ id: config.content }),
|
||||
name: config.name
|
||||
}
|
||||
)
|
||||
: ''
|
||||
}}
|
||||
></div>
|
||||
{config.checkConfig && (
|
||||
<CheckboxWrapper>
|
||||
<Checkbox
|
||||
checked={configuration.checked}
|
||||
onChange={(e) =>
|
||||
setConfiguration({
|
||||
checked: e.target.checked
|
||||
})
|
||||
}
|
||||
>
|
||||
<span className="check-text">
|
||||
{intl.formatMessage({ id: config.checkConfig?.checkText })}
|
||||
</span>
|
||||
</Checkbox>
|
||||
</CheckboxWrapper>
|
||||
)}
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
return {
|
||||
DeleteModal,
|
||||
show,
|
||||
hide,
|
||||
configuration
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
@font-face {
|
||||
font-family: iconfont; /* Project id 4613488 */
|
||||
src: url('iconfont.woff2?t=1747231573342') format('woff2'),
|
||||
url('iconfont.woff?t=1747231573342') format('woff'),
|
||||
url('iconfont.ttf?t=1747231573342') format('truetype');
|
||||
src: url('iconfont.woff2?t=1750854031026') format('woff2'),
|
||||
url('iconfont.woff?t=1750854031026') format('woff'),
|
||||
url('iconfont.ttf?t=1750854031026') format('truetype');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
@@ -13,6 +13,130 @@
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-language::before {
|
||||
content: "\e679";
|
||||
}
|
||||
|
||||
.icon-help::before {
|
||||
content: "\e67a";
|
||||
}
|
||||
|
||||
.icon-key-filled::before {
|
||||
content: "\e67b";
|
||||
}
|
||||
|
||||
.icon-key::before {
|
||||
content: "\e67d";
|
||||
}
|
||||
|
||||
.icon-resources::before {
|
||||
content: "\e67e";
|
||||
}
|
||||
|
||||
.icon-users::before {
|
||||
content: "\e67f";
|
||||
}
|
||||
|
||||
.icon-resources-filled::before {
|
||||
content: "\e680";
|
||||
}
|
||||
|
||||
.icon-users-filled::before {
|
||||
content: "\e681";
|
||||
}
|
||||
|
||||
.icon-model::before {
|
||||
content: "\e676";
|
||||
}
|
||||
|
||||
.icon-model-filled::before {
|
||||
content: "\e678";
|
||||
}
|
||||
|
||||
.icon-layers-filled::before {
|
||||
content: "\e671";
|
||||
}
|
||||
|
||||
.icon-layers::before {
|
||||
content: "\e673";
|
||||
}
|
||||
|
||||
.icon-experiment::before {
|
||||
content: "\e674";
|
||||
}
|
||||
|
||||
.icon-experiment-filled::before {
|
||||
content: "\e675";
|
||||
}
|
||||
|
||||
.icon-dashboard::before {
|
||||
content: "\e66d";
|
||||
}
|
||||
|
||||
.icon-dashboard-filled::before {
|
||||
content: "\e66e";
|
||||
}
|
||||
|
||||
.icon-expand-left::before {
|
||||
content: "\ea48";
|
||||
}
|
||||
|
||||
.icon-expand-right::before {
|
||||
content: "\ea49";
|
||||
}
|
||||
|
||||
.icon-users-fill::before {
|
||||
content: "\e677";
|
||||
}
|
||||
|
||||
.icon-layers-fill::before {
|
||||
content: "\e89d";
|
||||
}
|
||||
|
||||
.icon-key-fill::before {
|
||||
content: "\e80e";
|
||||
}
|
||||
|
||||
.icon-server-fill::before {
|
||||
content: "\e7a3";
|
||||
}
|
||||
|
||||
.icon-model-fill::before {
|
||||
content: "\e7b7";
|
||||
}
|
||||
|
||||
.icon-left_panel_close::before {
|
||||
content: "\e668";
|
||||
}
|
||||
|
||||
.icon-left_panel_open::before {
|
||||
content: "\e669";
|
||||
}
|
||||
|
||||
.icon-playcircle-fill::before {
|
||||
content: "\e665";
|
||||
}
|
||||
|
||||
.icon-stopcircle-fill::before {
|
||||
content: "\e666";
|
||||
}
|
||||
|
||||
.icon-play-speed::before {
|
||||
content: "\e856";
|
||||
}
|
||||
|
||||
.icon-more::before {
|
||||
content: "\e62e";
|
||||
}
|
||||
|
||||
.icon-play::before {
|
||||
content: "\e9f9";
|
||||
}
|
||||
|
||||
.icon-pause::before {
|
||||
content: "\e713";
|
||||
}
|
||||
|
||||
.icon-dark_theme::before {
|
||||
content: "\e646";
|
||||
}
|
||||
@@ -237,14 +361,6 @@
|
||||
content: "\e62c";
|
||||
}
|
||||
|
||||
.icon-stopcircle-fill::before {
|
||||
content: "\e7cc";
|
||||
}
|
||||
|
||||
.icon-playcircle-fill::before {
|
||||
content: "\e7cd";
|
||||
}
|
||||
|
||||
.icon-SpeakerSlash::before {
|
||||
content: "\e661";
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -5,6 +5,223 @@
|
||||
"css_prefix_text": "icon-",
|
||||
"description": "",
|
||||
"glyphs": [
|
||||
{
|
||||
"icon_id": "44685190",
|
||||
"name": "language",
|
||||
"font_class": "language",
|
||||
"unicode": "e679",
|
||||
"unicode_decimal": 59001
|
||||
},
|
||||
{
|
||||
"icon_id": "44685189",
|
||||
"name": "help",
|
||||
"font_class": "help",
|
||||
"unicode": "e67a",
|
||||
"unicode_decimal": 59002
|
||||
},
|
||||
{
|
||||
"icon_id": "44684306",
|
||||
"name": "key-filled",
|
||||
"font_class": "key-filled",
|
||||
"unicode": "e67b",
|
||||
"unicode_decimal": 59003
|
||||
},
|
||||
{
|
||||
"icon_id": "44684302",
|
||||
"name": "key",
|
||||
"font_class": "key",
|
||||
"unicode": "e67d",
|
||||
"unicode_decimal": 59005
|
||||
},
|
||||
{
|
||||
"icon_id": "44684304",
|
||||
"name": "resources",
|
||||
"font_class": "resources",
|
||||
"unicode": "e67e",
|
||||
"unicode_decimal": 59006
|
||||
},
|
||||
{
|
||||
"icon_id": "44684305",
|
||||
"name": "users",
|
||||
"font_class": "users",
|
||||
"unicode": "e67f",
|
||||
"unicode_decimal": 59007
|
||||
},
|
||||
{
|
||||
"icon_id": "44684303",
|
||||
"name": "resources-filled",
|
||||
"font_class": "resources-filled",
|
||||
"unicode": "e680",
|
||||
"unicode_decimal": 59008
|
||||
},
|
||||
{
|
||||
"icon_id": "44684301",
|
||||
"name": "users-filled",
|
||||
"font_class": "users-filled",
|
||||
"unicode": "e681",
|
||||
"unicode_decimal": 59009
|
||||
},
|
||||
{
|
||||
"icon_id": "44684150",
|
||||
"name": "model",
|
||||
"font_class": "model",
|
||||
"unicode": "e676",
|
||||
"unicode_decimal": 58998
|
||||
},
|
||||
{
|
||||
"icon_id": "44684149",
|
||||
"name": "model-filled",
|
||||
"font_class": "model-filled",
|
||||
"unicode": "e678",
|
||||
"unicode_decimal": 59000
|
||||
},
|
||||
{
|
||||
"icon_id": "44684090",
|
||||
"name": "layers-filled",
|
||||
"font_class": "layers-filled",
|
||||
"unicode": "e671",
|
||||
"unicode_decimal": 58993
|
||||
},
|
||||
{
|
||||
"icon_id": "44684091",
|
||||
"name": "layers",
|
||||
"font_class": "layers",
|
||||
"unicode": "e673",
|
||||
"unicode_decimal": 58995
|
||||
},
|
||||
{
|
||||
"icon_id": "44684086",
|
||||
"name": "experiment",
|
||||
"font_class": "experiment",
|
||||
"unicode": "e674",
|
||||
"unicode_decimal": 58996
|
||||
},
|
||||
{
|
||||
"icon_id": "44684085",
|
||||
"name": "experiment",
|
||||
"font_class": "experiment-filled",
|
||||
"unicode": "e675",
|
||||
"unicode_decimal": 58997
|
||||
},
|
||||
{
|
||||
"icon_id": "44684021",
|
||||
"name": "dashboard",
|
||||
"font_class": "dashboard",
|
||||
"unicode": "e66d",
|
||||
"unicode_decimal": 58989
|
||||
},
|
||||
{
|
||||
"icon_id": "44684020",
|
||||
"name": "dashboard-filled",
|
||||
"font_class": "dashboard-filled",
|
||||
"unicode": "e66e",
|
||||
"unicode_decimal": 58990
|
||||
},
|
||||
{
|
||||
"icon_id": "40068272",
|
||||
"name": "expand-left",
|
||||
"font_class": "expand-left",
|
||||
"unicode": "ea48",
|
||||
"unicode_decimal": 59976
|
||||
},
|
||||
{
|
||||
"icon_id": "40068278",
|
||||
"name": "expand-right",
|
||||
"font_class": "expand-right",
|
||||
"unicode": "ea49",
|
||||
"unicode_decimal": 59977
|
||||
},
|
||||
{
|
||||
"icon_id": "1350497",
|
||||
"name": "sq-users",
|
||||
"font_class": "users-fill",
|
||||
"unicode": "e677",
|
||||
"unicode_decimal": 58999
|
||||
},
|
||||
{
|
||||
"icon_id": "13691715",
|
||||
"name": "layers",
|
||||
"font_class": "layers-fill",
|
||||
"unicode": "e89d",
|
||||
"unicode_decimal": 59549
|
||||
},
|
||||
{
|
||||
"icon_id": "14267903",
|
||||
"name": "key-skeleton-alt",
|
||||
"font_class": "key-fill",
|
||||
"unicode": "e80e",
|
||||
"unicode_decimal": 59406
|
||||
},
|
||||
{
|
||||
"icon_id": "14341823",
|
||||
"name": "cloud-server-solid",
|
||||
"font_class": "server-fill",
|
||||
"unicode": "e7a3",
|
||||
"unicode_decimal": 59299
|
||||
},
|
||||
{
|
||||
"icon_id": "40764011",
|
||||
"name": "icon-model-selected",
|
||||
"font_class": "model-fill",
|
||||
"unicode": "e7b7",
|
||||
"unicode_decimal": 59319
|
||||
},
|
||||
{
|
||||
"icon_id": "44668359",
|
||||
"name": "left_panel_close_36dp_1F1F1F_FILL0_wght400_GRAD0_o",
|
||||
"font_class": "left_panel_close",
|
||||
"unicode": "e668",
|
||||
"unicode_decimal": 58984
|
||||
},
|
||||
{
|
||||
"icon_id": "44668360",
|
||||
"name": "left_panel_open_36dp_1F1F1F_FILL0_wght400_GRAD0_op",
|
||||
"font_class": "left_panel_open",
|
||||
"unicode": "e669",
|
||||
"unicode_decimal": 58985
|
||||
},
|
||||
{
|
||||
"icon_id": "44650419",
|
||||
"name": "play circle-fill",
|
||||
"font_class": "playcircle-fill",
|
||||
"unicode": "e665",
|
||||
"unicode_decimal": 58981
|
||||
},
|
||||
{
|
||||
"icon_id": "44650418",
|
||||
"name": "stop circle-fill",
|
||||
"font_class": "stopcircle-fill",
|
||||
"unicode": "e666",
|
||||
"unicode_decimal": 58982
|
||||
},
|
||||
{
|
||||
"icon_id": "8592899",
|
||||
"name": "play-speed",
|
||||
"font_class": "play-speed",
|
||||
"unicode": "e856",
|
||||
"unicode_decimal": 59478
|
||||
},
|
||||
{
|
||||
"icon_id": "10941162",
|
||||
"name": "more",
|
||||
"font_class": "more",
|
||||
"unicode": "e62e",
|
||||
"unicode_decimal": 58926
|
||||
},
|
||||
{
|
||||
"icon_id": "703373",
|
||||
"name": "play",
|
||||
"font_class": "play",
|
||||
"unicode": "e9f9",
|
||||
"unicode_decimal": 59897
|
||||
},
|
||||
{
|
||||
"icon_id": "736882",
|
||||
"name": "pause",
|
||||
"font_class": "pause",
|
||||
"unicode": "e713",
|
||||
"unicode_decimal": 59155
|
||||
},
|
||||
{
|
||||
"icon_id": "44028047",
|
||||
"name": "dark_theme",
|
||||
@@ -397,20 +614,6 @@
|
||||
"unicode": "e62c",
|
||||
"unicode_decimal": 58924
|
||||
},
|
||||
{
|
||||
"icon_id": "6151140",
|
||||
"name": "stop circle-fill",
|
||||
"font_class": "stopcircle-fill",
|
||||
"unicode": "e7cc",
|
||||
"unicode_decimal": 59340
|
||||
},
|
||||
{
|
||||
"icon_id": "6151141",
|
||||
"name": "play circle-fill",
|
||||
"font_class": "playcircle-fill",
|
||||
"unicode": "e7cd",
|
||||
"unicode_decimal": 59341
|
||||
},
|
||||
{
|
||||
"icon_id": "23563264",
|
||||
"name": "SpeakerSlash",
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,8 +1,8 @@
|
||||
import { createFromIconfontCN } from '@ant-design/icons';
|
||||
// import './iconfont/iconfont.js';
|
||||
import './iconfont/iconfont.js';
|
||||
|
||||
const IconFont = createFromIconfontCN({
|
||||
scriptUrl: '//at.alicdn.com/t/c/font_4613488_w50kuuord8o.js'
|
||||
scriptUrl: ''
|
||||
});
|
||||
|
||||
export default IconFont;
|
||||
|
||||
Reference in New Issue
Block a user