mirror of
https://gitee.com/dromara/Jpom.git
synced 2024-11-29 18:38:32 +08:00
fix 查看文件发布详情节点名称未显示
This commit is contained in:
parent
d70b88a67b
commit
d1a80293e6
@ -1,5 +1,14 @@
|
||||
# 🚀 版本日志
|
||||
|
||||
### 2.10.39.4-beta
|
||||
|
||||
### 🐞 解决BUG、优化功能
|
||||
|
||||
1. 【server】修复 查看文件发布详情节点名称未显示
|
||||
2. 【server】优化 发布记录重建不能选中节点
|
||||
|
||||
------
|
||||
|
||||
### 2.10.39.3-beta (2023-04-03)
|
||||
|
||||
### 🐞 解决BUG、优化功能
|
||||
|
@ -53,6 +53,7 @@ export default {
|
||||
}
|
||||
// button recover
|
||||
this.submitAble = false;
|
||||
this.$emit("cancel");
|
||||
});
|
||||
},
|
||||
},
|
||||
|
@ -42,6 +42,22 @@
|
||||
</a-form-model-item>
|
||||
|
||||
<a-form-model-item prop="releasePathParent" label="发布目录">
|
||||
<template slot="help">
|
||||
<a-tooltip title="需要配置授权目录(白名单才能正常使用发布),授权目录主要是用于确定可以发布到哪些目录中"
|
||||
><a-button
|
||||
icon="info-circle"
|
||||
size="small"
|
||||
type="link"
|
||||
@click="
|
||||
() => {
|
||||
this.configDir = true;
|
||||
}
|
||||
"
|
||||
>
|
||||
配置目录
|
||||
</a-button>
|
||||
</a-tooltip></template
|
||||
>
|
||||
<a-input-group compact>
|
||||
<a-select show-search allowClear style="width: 30%" v-model="temp.releasePathParent" placeholder="请选择发布的一级目录">
|
||||
<a-select-option v-for="item in accessList" :key="item">
|
||||
@ -71,6 +87,29 @@
|
||||
</a-tabs>
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
|
||||
<a-modal
|
||||
destroyOnClose
|
||||
v-model="configDir"
|
||||
:title="`配置授权目录`"
|
||||
:footer="null"
|
||||
:maskClosable="false"
|
||||
@cancel="
|
||||
() => {
|
||||
this.configDir = false;
|
||||
}
|
||||
"
|
||||
>
|
||||
<whiteList
|
||||
v-if="configDir"
|
||||
@cancel="
|
||||
() => {
|
||||
this.configDir = false;
|
||||
this.loadAccesList();
|
||||
}
|
||||
"
|
||||
></whiteList>
|
||||
</a-modal>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -78,9 +117,11 @@ import { getSshListAll } from "@/api/ssh";
|
||||
import { getDispatchWhiteList } from "@/api/dispatch";
|
||||
import { getNodeListAll } from "@/api/node";
|
||||
import codeEditor from "@/components/codeEditor";
|
||||
import whiteList from "@/pages/dispatch/white-list.vue";
|
||||
export default {
|
||||
components: {
|
||||
codeEditor,
|
||||
whiteList,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -94,6 +135,7 @@ export default {
|
||||
sshList: [],
|
||||
accessList: [],
|
||||
nodeList: [],
|
||||
configDir: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
@ -12,21 +12,6 @@
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
|
||||
<a-form-model-item prop="taskDataIds" label="发布的SSH" v-if="temp.taskType === 0">
|
||||
<a-row>
|
||||
<a-col :span="22">
|
||||
<a-select show-search option-filter-prop="children" mode="multiple" v-model="temp.taskDataIds" placeholder="请选择SSH">
|
||||
<a-select-option v-for="ssh in sshList" :key="ssh.id">
|
||||
<a-tooltip :title="ssh.name"> {{ ssh.name }}</a-tooltip>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-col>
|
||||
<a-col :span="1" style="margin-left: 10px">
|
||||
<a-icon type="reload" @click="loadSshList" />
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model-item>
|
||||
|
||||
<a-form-model-item prop="releasePath" label="发布目录">
|
||||
<a-input placeholder="请输入任务名" :disabled="true" :value="temp.taskData && temp.taskData.releasePath" />
|
||||
</a-form-model-item>
|
||||
@ -39,14 +24,26 @@
|
||||
<a-tab-pane v-for="item in temp.taskList" :key="item.id">
|
||||
<template slot="tab">
|
||||
<a-icon v-if="!logMap[item.id] || logMap[item.id].run" type="loading" />
|
||||
{{
|
||||
sshList.filter((sshItem) => {
|
||||
return sshItem.id === item.taskDataId;
|
||||
})[0] &&
|
||||
sshList.filter((sshItem) => {
|
||||
return sshItem.id === item.taskDataId;
|
||||
})[0].name
|
||||
}}
|
||||
<template v-if="temp.taskData && temp.taskData.taskType === 0">
|
||||
{{
|
||||
sshList.filter((item2) => {
|
||||
return item2.id === item.taskDataId;
|
||||
})[0] &&
|
||||
sshList.filter((item2) => {
|
||||
return item2.id === item.taskDataId;
|
||||
})[0].name
|
||||
}}
|
||||
</template>
|
||||
<template v-else-if="temp.taskData && temp.taskData.taskType === 1">
|
||||
{{
|
||||
nodeList.filter((item2) => {
|
||||
return item2.id === item.taskDataId;
|
||||
})[0] &&
|
||||
nodeList.filter((item2) => {
|
||||
return item2.id === item.taskDataId;
|
||||
})[0].name
|
||||
}}
|
||||
</template>
|
||||
<template>
|
||||
<a-tooltip v-if="item.statusMsg" :title="item.statusMsg"><a-icon type="info-circle" /></a-tooltip>
|
||||
</template>
|
||||
@ -83,6 +80,7 @@ import { taskDetails, statusMap, taskLogInfoList } from "@/api/file-manager/rele
|
||||
import LogView from "@/components/logView";
|
||||
import codeEditor from "@/components/codeEditor";
|
||||
import { getSshListAll } from "@/api/ssh";
|
||||
import { getNodeListAll } from "@/api/node";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -103,6 +101,7 @@ export default {
|
||||
logMap: {},
|
||||
temp: {},
|
||||
sshList: [],
|
||||
nodeList: [],
|
||||
};
|
||||
},
|
||||
beforeDestroy() {
|
||||
@ -126,6 +125,8 @@ export default {
|
||||
this.temp = res.data;
|
||||
if (this.temp.taskData?.taskType === 0) {
|
||||
this.loadSshList();
|
||||
} else if (this.temp.taskData?.taskType === 1) {
|
||||
this.loadNodeList();
|
||||
}
|
||||
|
||||
if (!this.activeKey) {
|
||||
@ -147,6 +148,14 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
// 加载节点
|
||||
loadNodeList() {
|
||||
getNodeListAll().then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.nodeList = res.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
initItemTimer(item) {
|
||||
if (!item) {
|
||||
return;
|
||||
|
@ -99,6 +99,20 @@
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item prop="taskDataIds" label="发布的节点" v-else-if="temp.taskType === 1">
|
||||
<a-row>
|
||||
<a-col :span="22">
|
||||
<a-select show-search option-filter-prop="children" mode="multiple" v-model="temp.taskDataIds" placeholder="请选择节点">
|
||||
<a-select-option v-for="ssh in nodeList" :key="ssh.id">
|
||||
<a-tooltip :title="ssh.name"> {{ ssh.name }}</a-tooltip>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-col>
|
||||
<a-col :span="1" style="margin-left: 10px">
|
||||
<a-icon type="reload" @click="loadNodeList" />
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model-item>
|
||||
|
||||
<a-form-model-item prop="releasePathParent" label="发布目录">
|
||||
<a-input placeholder="请输入发布目录" :disabled="true" v-model="temp.releasePath" />
|
||||
@ -159,6 +173,7 @@ import taskDetailsPage from "./details.vue";
|
||||
import { getSshListAll } from "@/api/ssh";
|
||||
import codeEditor from "@/components/codeEditor";
|
||||
import { hasFile } from "@/api/file-manager/file-storage";
|
||||
import { getNodeListAll } from "@/api/node";
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -209,6 +224,7 @@ export default {
|
||||
{ title: "操作", dataIndex: "operation", align: "center", scopedSlots: { customRender: "operation" }, fixed: "right", width: "230px" },
|
||||
],
|
||||
sshList: [],
|
||||
nodeList: [],
|
||||
releaseFileVisible: false,
|
||||
releaseFileRules: {
|
||||
name: [{ required: true, message: "请输入文件任务名", trigger: "blur" }],
|
||||
@ -282,6 +298,14 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
// 加载节点
|
||||
loadNodeList() {
|
||||
getNodeListAll().then((res) => {
|
||||
if (res.code === 200) {
|
||||
this.nodeList = res.data;
|
||||
}
|
||||
});
|
||||
},
|
||||
// 重建任务
|
||||
handleRetask(row) {
|
||||
taskDetails({
|
||||
@ -294,6 +318,8 @@ export default {
|
||||
delete this.temp.id;
|
||||
if (taskData?.taskType === 0) {
|
||||
this.loadSshList();
|
||||
} else if (taskData?.taskType === 1) {
|
||||
this.loadNodeList();
|
||||
}
|
||||
const taskList = res.data?.taskList || [];
|
||||
this.temp = {
|
||||
|
Loading…
Reference in New Issue
Block a user