🔨 上传任务使用用户连接配置.

This commit is contained in:
lijiahangmax
2024-12-14 12:41:06 +08:00
parent 885446dc58
commit 985091f42b
23 changed files with 266 additions and 147 deletions

View File

@@ -89,6 +89,7 @@ export interface UploadTaskFile {
filePath: string;
fileSize: number;
status: string;
errorMessage: string;
startTime: number;
endTime: number;
current: number;

View File

@@ -10,15 +10,15 @@ const fieldConfig = {
label: 'id',
dataIndex: 'id',
slotName: 'id',
}, {
label: '类型',
dataIndex: 'type',
slotName: 'type',
}, {
label: '用户名',
dataIndex: 'username',
slotName: 'username',
ellipsis: true,
}, {
label: '类型',
dataIndex: 'type',
slotName: 'type',
}, {
label: '主机密钥',
dataIndex: 'keyId',

View File

@@ -15,15 +15,15 @@ const columns = [
slotName: 'name',
ellipsis: true,
tooltip: true
}, {
title: '用户名',
dataIndex: 'username',
slotName: 'username',
}, {
title: '类型',
dataIndex: 'type',
slotName: 'type',
width: 138,
}, {
title: '用户名',
dataIndex: 'username',
slotName: 'username',
}, {
title: '主机密钥',
dataIndex: 'keyId',

View File

@@ -31,7 +31,11 @@
</div>
<!-- 进度 -->
<a-tooltip position="left"
:content="file.fileSize ? ((file.current || 0) / file.fileSize * 100).toFixed(2) + '%' : '0%'"
:content="(
file.status === UploadTaskFileStatus.FAILED
? (file.errorMessage || '')
: (file.fileSize ? ((file.current || 0) / file.fileSize * 100).toFixed(2) + '%' : '0%')
)"
mini>
<a-progress type="circle"
size="mini"

View File

@@ -240,8 +240,9 @@
for (let file of host.files) {
const fileStatus = taskStatusData.files.find(s => s.id === file.id);
if (fileStatus) {
file.status = fileStatus.status;
file.current = fileStatus.current;
file.status = fileStatus.status;
file.errorMessage = fileStatus.errorMessage;
}
}
}

View File

@@ -46,9 +46,9 @@
<a-descriptions-item label="脚本执行">
{{ record.scriptExec === EnabledStatus.ENABLED ? '是' : '否' }}
</a-descriptions-item>
<!-- 创建时间 -->
<a-descriptions-item label="创建时间">
{{ dateFormat(new Date(record.createTime)) }}
<!-- 执行用户 -->
<a-descriptions-item label="执行用户">
{{ record.execUsername }}
</a-descriptions-item>
<!-- 修改时间 -->
<a-descriptions-item label="修改时间">

View File

@@ -12,6 +12,8 @@
:on-before-ok="handlerOk"
@close="handleClose">
<a-spin class="full" :loading="loading">
<!-- 提示 -->
<a-alert class="mb16">修改后将使用此用户的权限以及主机配置执行此任务</a-alert>
<a-form :model="formModel"
label-align="right"
:auto-label-width="true">