|
|
@@ -84,7 +84,7 @@
|
|
|
</ElTable>
|
|
|
<ElDialog v-model="showPipelineDetailModal" destroy-on-close>
|
|
|
<template #title>历史执行结果详情</template>
|
|
|
- <pre class="pipeline-detail" v-loading="dialogLoading" >{{detail}}</pre>
|
|
|
+ <pre class="log" v-loading="dialogLoading" >{{detail}}</pre>
|
|
|
</ElDialog>
|
|
|
<ElDialog v-model="showPipelineHistoryModal" destroy-on-close>
|
|
|
<template #title>流水线构建历史</template>
|
|
|
@@ -291,6 +291,15 @@
|
|
|
<ElTag :type="scope.row.status.indexOf('正常') > -1 ? 'success' : 'danger'">{{scope.row.status}}</ElTag>
|
|
|
</template>
|
|
|
</ElTableColumn>
|
|
|
+ <ElTableColumn
|
|
|
+ label="运行状态"
|
|
|
+ align="center"
|
|
|
+ width="100"
|
|
|
+ >
|
|
|
+ <template #default="scope">
|
|
|
+ <ElButton type="text" @click="showLog(scope.row.pipelineId)">查看日志</ElButton>
|
|
|
+ </template>
|
|
|
+ </ElTableColumn>
|
|
|
<ElTableColumn width="60">
|
|
|
<template #default="scope">
|
|
|
<ElButton type="text" @click="deleteProduction(scope.row.pipelineId)">
|
|
|
@@ -299,6 +308,15 @@
|
|
|
</template>
|
|
|
</ElTableColumn>
|
|
|
</ElTable>
|
|
|
+ <ElDialog v-model="showProductionLogModal" destroy-on-close>
|
|
|
+ <template #title>
|
|
|
+ 产物日志
|
|
|
+ </template>
|
|
|
+ <pre class="log" v-loading="dialogLoading" >{{currentLog}}</pre>
|
|
|
+ <template #footer>
|
|
|
+ <ElButton @click="refreshLog">刷新</ElButton>
|
|
|
+ </template>
|
|
|
+ </ElDialog>
|
|
|
</ElTabPane>
|
|
|
</ElTabs>
|
|
|
</template>
|
|
|
@@ -333,6 +351,9 @@ export default {
|
|
|
},
|
|
|
stages: [],
|
|
|
activeStep: 0,
|
|
|
+ showProductionLogModal: false,
|
|
|
+ currentLogId: -1,
|
|
|
+ currentLog: '',
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -474,6 +495,24 @@ export default {
|
|
|
getStage(stageName) {
|
|
|
return this.stages.find((stage) => stage.name === stageName);
|
|
|
},
|
|
|
+ async showLog(pipelineId) {
|
|
|
+ this.currentLogId = pipelineId;
|
|
|
+ this.showProductionLogModal = true;
|
|
|
+ this.dialogLoading = true;
|
|
|
+ this.currentLog = await PipelineAPI.getDeploymentLog({
|
|
|
+ projectId: this.$store.state.workspace.currentProjectId,
|
|
|
+ pipelineId,
|
|
|
+ });
|
|
|
+ this.dialogLoading = false;
|
|
|
+ },
|
|
|
+ async refreshLog() {
|
|
|
+ this.dialogLoading = true;
|
|
|
+ this.currentLog = await PipelineAPI.getDeploymentLog({
|
|
|
+ projectId: this.$store.state.workspace.currentProjectId,
|
|
|
+ pipelineId: this.currentLogId,
|
|
|
+ });
|
|
|
+ this.dialogLoading = false;
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
@@ -486,7 +525,7 @@ export default {
|
|
|
.add-button {
|
|
|
margin-left: 14px;
|
|
|
}
|
|
|
-.pipeline-detail {
|
|
|
+.log {
|
|
|
width: 100%;
|
|
|
word-break: break-word;
|
|
|
white-space: pre-wrap;
|