mirror of
https://github.com/whyour/qinglong.git
synced 2026-06-30 20:35:09 +08:00
环境变量值超出显示...
This commit is contained in:
@@ -36,6 +36,17 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
.ant-table-cell-ellipsis {
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
.ant-tooltip {
|
||||
max-width: 500px;
|
||||
.ant-tooltip-inner {
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
|
||||
.env-wrapper {
|
||||
th {
|
||||
white-space: nowrap;
|
||||
|
||||
+33
-30
@@ -137,42 +137,45 @@ const Crontab = () => {
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
align: 'center' as const,
|
||||
render: (text: string, record: any, index: number) => (
|
||||
<Space size="middle">
|
||||
{record.status === CrontabStatus.idle && (
|
||||
<Tooltip title="运行">
|
||||
render: (text: string, record: any, index: number) => {
|
||||
const isPc = width === '100%';
|
||||
return (
|
||||
<Space size="middle">
|
||||
{record.status === CrontabStatus.idle && (
|
||||
<Tooltip title={isPc ? '运行' : ''}>
|
||||
<a
|
||||
onClick={() => {
|
||||
runCron(record, index);
|
||||
}}
|
||||
>
|
||||
<PlayCircleOutlined />
|
||||
</a>
|
||||
</Tooltip>
|
||||
)}
|
||||
{record.status !== CrontabStatus.idle && (
|
||||
<Tooltip title={isPc ? '停止' : ''}>
|
||||
<a
|
||||
onClick={() => {
|
||||
stopCron(record, index);
|
||||
}}
|
||||
>
|
||||
<PauseCircleOutlined />
|
||||
</a>
|
||||
</Tooltip>
|
||||
)}
|
||||
<Tooltip title={isPc ? '日志' : ''}>
|
||||
<a
|
||||
onClick={() => {
|
||||
runCron(record, index);
|
||||
setLogCron({ ...record, timestamp: Date.now() });
|
||||
}}
|
||||
>
|
||||
<PlayCircleOutlined />
|
||||
<FileTextOutlined />
|
||||
</a>
|
||||
</Tooltip>
|
||||
)}
|
||||
{record.status !== CrontabStatus.idle && (
|
||||
<Tooltip title="停止">
|
||||
<a
|
||||
onClick={() => {
|
||||
stopCron(record, index);
|
||||
}}
|
||||
>
|
||||
<PauseCircleOutlined />
|
||||
</a>
|
||||
</Tooltip>
|
||||
)}
|
||||
<Tooltip title="日志">
|
||||
<a
|
||||
onClick={() => {
|
||||
setLogCron({ ...record, timestamp: Date.now() });
|
||||
}}
|
||||
>
|
||||
<FileTextOutlined />
|
||||
</a>
|
||||
</Tooltip>
|
||||
<MoreBtn key="more" record={record} index={index} />
|
||||
</Space>
|
||||
),
|
||||
<MoreBtn key="more" record={record} index={index} />
|
||||
</Space>
|
||||
);
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
Vendored
+36
-34
@@ -124,19 +124,14 @@ const Env = () => {
|
||||
key: 'value',
|
||||
align: 'center' as const,
|
||||
width: '45%',
|
||||
ellipsis: {
|
||||
showTitle: false,
|
||||
},
|
||||
render: (text: string, record: any) => {
|
||||
return (
|
||||
<span
|
||||
style={{
|
||||
textAlign: 'left',
|
||||
display: 'inline-block',
|
||||
wordBreak: 'break-all',
|
||||
cursor: 'text',
|
||||
width: '100%',
|
||||
}}
|
||||
>
|
||||
{text}
|
||||
</span>
|
||||
<Tooltip placement="topLeft" title={text}>
|
||||
<span>{text}</span>
|
||||
</Tooltip>
|
||||
);
|
||||
},
|
||||
},
|
||||
@@ -166,29 +161,36 @@ const Env = () => {
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
align: 'center' as const,
|
||||
render: (text: string, record: any, index: number) => (
|
||||
<Space size="middle">
|
||||
<Tooltip title="编辑">
|
||||
<a onClick={() => editEnv(record, index)}>
|
||||
<EditOutlined />
|
||||
</a>
|
||||
</Tooltip>
|
||||
<Tooltip title={record.status === Status.已禁用 ? '启用' : '禁用'}>
|
||||
<a onClick={() => enabledOrDisabledEnv(record, index)}>
|
||||
{record.status === Status.已禁用 ? (
|
||||
<CheckCircleOutlined />
|
||||
) : (
|
||||
<StopOutlined />
|
||||
)}
|
||||
</a>
|
||||
</Tooltip>
|
||||
<Tooltip title="删除">
|
||||
<a onClick={() => deleteEnv(record, index)}>
|
||||
<DeleteOutlined />
|
||||
</a>
|
||||
</Tooltip>
|
||||
</Space>
|
||||
),
|
||||
render: (text: string, record: any, index: number) => {
|
||||
const isPc = width === '100%';
|
||||
return (
|
||||
<Space size="middle">
|
||||
<Tooltip title={isPc ? '编辑' : ''}>
|
||||
<a onClick={() => editEnv(record, index)}>
|
||||
<EditOutlined />
|
||||
</a>
|
||||
</Tooltip>
|
||||
<Tooltip
|
||||
title={
|
||||
isPc ? (record.status === Status.已禁用 ? '启用' : '禁用') : ''
|
||||
}
|
||||
>
|
||||
<a onClick={() => enabledOrDisabledEnv(record, index)}>
|
||||
{record.status === Status.已禁用 ? (
|
||||
<CheckCircleOutlined />
|
||||
) : (
|
||||
<StopOutlined />
|
||||
)}
|
||||
</a>
|
||||
</Tooltip>
|
||||
<Tooltip title={isPc ? '删除' : ''}>
|
||||
<a onClick={() => deleteEnv(record, index)}>
|
||||
<DeleteOutlined />
|
||||
</a>
|
||||
</Tooltip>
|
||||
</Space>
|
||||
);
|
||||
},
|
||||
},
|
||||
];
|
||||
const [width, setWidth] = useState('100%');
|
||||
|
||||
Reference in New Issue
Block a user