mirror of https://github.com/certd/certd
fix: 修复刷新流水线页面后,日志不自动更新的bug
parent
c7f2ead696
commit
0b2e28b62d
|
@ -3,6 +3,8 @@ services:
|
|||
certd:
|
||||
# 镜像 # ↓↓↓↓↓ ---- 镜像版本号,建议改成固定版本号,例如:certd:1.29.0
|
||||
image: registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest
|
||||
# image: ghcr.io/certd/certd:latest # --------- 如果 报镜像not found,可以尝试其他镜像源
|
||||
# image: greper/certd:latest
|
||||
container_name: certd # 容器名
|
||||
restart: unless-stopped # 自动重启
|
||||
volumes:
|
||||
|
|
|
@ -255,7 +255,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, onMounted, provide, Ref, ref, watch } from "vue";
|
||||
import {defineComponent, onMounted, onUnmounted, provide, Ref, ref, watch} from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import PiTaskForm from "./component/task-form/index.vue";
|
||||
import PiTriggerForm from "./component/trigger-form/index.vue";
|
||||
|
@ -274,6 +274,7 @@ import { useSettingStore } from "/@/store/settings";
|
|||
import { useUserStore } from "/@/store/user";
|
||||
import TaskShortcuts from "./component/shortcut/task-shortcuts.vue";
|
||||
import { eachSteps, findStep } from "../utils";
|
||||
import { PluginGroups } from "/@/store/plugin";
|
||||
|
||||
export default defineComponent({
|
||||
name: "PipelineEdit",
|
||||
|
@ -365,9 +366,14 @@ export default defineComponent({
|
|||
return true;
|
||||
}
|
||||
const intervalLoadHistoryRef = ref();
|
||||
const isLoadingHistory = ref(false);
|
||||
function watchNewHistoryList() {
|
||||
intervalLoadHistoryRef.value = setTimeout(async () => {
|
||||
intervalLoadHistoryRef.value = setInterval(async () => {
|
||||
if (isLoadingHistory.value) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
isLoadingHistory.value = true;
|
||||
if (currentHistory.value == null) {
|
||||
await loadHistoryList();
|
||||
}
|
||||
|
@ -381,10 +387,17 @@ export default defineComponent({
|
|||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
} finally {
|
||||
isLoadingHistory.value = false;
|
||||
}
|
||||
watchNewHistoryList();
|
||||
}, 3000);
|
||||
}
|
||||
onMounted(() => {
|
||||
watchNewHistoryList();
|
||||
});
|
||||
onUnmounted(() => {
|
||||
clearInterval(intervalLoadHistoryRef.value);
|
||||
});
|
||||
|
||||
watch(
|
||||
() => {
|
||||
|
@ -632,7 +645,6 @@ export default defineComponent({
|
|||
async onOk() {
|
||||
//@ts-ignore
|
||||
await changeCurrentHistory(null);
|
||||
watchNewHistoryList();
|
||||
await props.options.doTrigger({ pipelineId: pipeline.value.id, stepId: stepId });
|
||||
notification.success({ message: "管道已经开始运行" });
|
||||
},
|
||||
|
@ -1081,7 +1093,7 @@ export default defineComponent({
|
|||
}
|
||||
|
||||
.layout-right {
|
||||
position: "relative";
|
||||
position: relative;
|
||||
&.collapsed {
|
||||
margin-right: -350px;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue