🐛 修复计划命令执行报错.

This commit is contained in:
lijiahangmax
2024-05-29 00:41:57 +08:00
parent 16dd34ef58
commit 06a45c9cf2
5 changed files with 27 additions and 6 deletions

View File

@@ -16,9 +16,11 @@
### v2.0.3 ### v2.0.3
`2024-05-2` `release` `2024-05-29` `release`
* 🐞 修复 抽屉 ui 显示错误 * 🐞 修复 部分 ui 显示错误
* 🐞 修复 计划任务编辑时报错
* 🐞 修复 计划任务手动触发时报错
* 🩰 修改 logo * 🩰 修改 logo
* 🔨 修改 docker 时区 * 🔨 修改 docker 时区

View File

@@ -330,7 +330,16 @@ public class ExecCommandServiceImpl implements ExecCommandService {
// 解析参数 // 解析参数
return schemaList.stream() return schemaList.stream()
.collect(Collectors.toMap(ExecParameterSchemaDTO::getName, .collect(Collectors.toMap(ExecParameterSchemaDTO::getName,
ExecParameterSchemaDTO::getValue, s -> {
Object value = s.getValue();
if (value == null) {
value = s.getDefaultValue();
}
if (value == null) {
value = Const.EMPTY;
}
return value;
},
Functions.right())); Functions.right()));
} }

View File

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.orion.lang.define.wrapper.DataGrid; import com.orion.lang.define.wrapper.DataGrid;
import com.orion.lang.utils.Booleans; import com.orion.lang.utils.Booleans;
import com.orion.lang.utils.Strings; import com.orion.lang.utils.Strings;
import com.orion.lang.utils.collect.Lists;
import com.orion.lang.utils.time.cron.Cron; import com.orion.lang.utils.time.cron.Cron;
import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogs; import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogs;
import com.orion.visor.framework.common.constant.ErrorMessage; import com.orion.visor.framework.common.constant.ErrorMessage;
@@ -163,8 +164,12 @@ public class ExecJobServiceImpl implements ExecJobService {
List<Long> hostIdList = execJobHostService.getHostIdByJobId(id); List<Long> hostIdList = execJobHostService.getHostIdByJobId(id);
vo.setHostIdList(hostIdList); vo.setHostIdList(hostIdList);
// 查询主机列表 // 查询主机列表
List<HostDO> hostList = hostDAO.selectBatchIds(hostIdList); if (!Lists.isEmpty(hostIdList)) {
vo.setHostList(HostConvert.MAPPER.toList(hostList)); List<HostDO> hostList = hostDAO.selectBatchIds(hostIdList);
vo.setHostList(HostConvert.MAPPER.toList(hostList));
} else {
vo.setHostList(Lists.empty());
}
return vo; return vo;
} }

View File

@@ -142,8 +142,10 @@
} }
&-desc { &-desc {
color: var(--color-text-2);
width: calc(100% - 36px); width: calc(100% - 36px);
height: 24px;
padding-top: 3px;
color: var(--color-text-2);
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-align: end; text-align: end;

View File

@@ -25,6 +25,9 @@
<template #option="{ data }"> <template #option="{ data }">
<span :style="{ fontFamily: data.value }">{{ data.label }}</span> <span :style="{ fontFamily: data.value }">{{ data.label }}</span>
</template> </template>
<template #label="{ data }">
<span :style="{ fontFamily: data.value }">{{ data.label }}</span>
</template>
</a-select> </a-select>
</a-form-item> </a-form-item>
<!-- 字体大小 --> <!-- 字体大小 -->