修复编辑计划任务的问题

This commit is contained in:
dushixiang 2022-05-21 15:49:45 +08:00
parent f611f9dadc
commit 4ff4d37442

View File

@ -148,7 +148,15 @@ class Job extends Component {
});
};
showModal(title, obj = null) {
showModal = async (title, obj = null) => {
if (obj['id']) {
let result = await request.get(`/jobs/${obj['id']}`);
if (result.code !== 1) {
message.error(result.message);
return;
}
obj = result.data;
}
if (obj['func'] === 'shell-job') {
obj['shell'] = JSON.parse(obj['metadata'])['shell'];
}