diff --git a/src/frontend/devops-repository/src/store/actions/nodeManage.js b/src/frontend/devops-repository/src/store/actions/nodeManage.js index 3930d64727..3d2196ac91 100644 --- a/src/frontend/devops-repository/src/store/actions/nodeManage.js +++ b/src/frontend/devops-repository/src/store/actions/nodeManage.js @@ -129,7 +129,7 @@ export default { ) }, // 计划执行日志制品详情 - getPlanLogPackageList (_, { id, status, packageName, repoName, clusterName, path, current = 1, limit = 10 }) { + getPlanLogPackageList (_, { id, status, artifactName, repoName, clusterName, current = 1, limit = 10 }) { return Vue.prototype.$ajax.get( `${prefix}/task/record/detail/page/${id}`, { @@ -137,12 +137,17 @@ export default { pageNumber: current, pageSize: limit, status: status || undefined, - packageName: packageName || undefined, + artifactName: artifactName || undefined, repoName: repoName || undefined, - clusterName: clusterName || undefined, - path: path || undefined + clusterName: clusterName || undefined } } ) + }, + // 计划执行任务总览 + getPlanLogDetailOverview (_, { id }) { + return Vue.prototype.$ajax.get( + `${prefix}/task/record/overview/${id}` + ) } } diff --git a/src/frontend/devops-repository/src/store/publicEnum.js b/src/frontend/devops-repository/src/store/publicEnum.js index c576bc722e..bafa7a59f3 100644 --- a/src/frontend/devops-repository/src/store/publicEnum.js +++ b/src/frontend/devops-repository/src/store/publicEnum.js @@ -153,3 +153,18 @@ export const specialRepoEnum = [ 'report', 'custom' ] + +// 分发计划的任务日志详情页数量显示 +export const planLogEnum = { + total: '同步总数量', + success: '成功数量', + failed: '失败数量', + conflict: '冲突数量' +} + +// 分发计划冲突策略 +export const conflictStrategyEnum = { + SKIP: '跳过冲突', + OVERWRITE: '替换制品', + FAST_FAIL: '终止同步' +} diff --git a/src/frontend/devops-repository/src/views/planManage/createPlan/index.vue b/src/frontend/devops-repository/src/views/planManage/createPlan/index.vue index 7decf1060a..73d480b9f9 100644 --- a/src/frontend/devops-repository/src/views/planManage/createPlan/index.vue +++ b/src/frontend/devops-repository/src/views/planManage/createPlan/index.vue @@ -119,6 +119,21 @@ :disabled="disabled"> + + {{ $t('planRecordAllLog') }} + + + {{ $t('planLogReserveDays') }} + + + {{$t('cancel')}} {{$t('confirm')}} @@ -168,7 +183,9 @@ remoteClusterIds: [], creator: '', created_time: '', - description: '' + description: '', + record: true, + recordReserveDays: 30 }, rules: { name: [ @@ -218,6 +235,23 @@ message: this.$t('pleaseSelect') + this.$t('space') + this.$t('targetNode'), trigger: 'blur' } + ], + recordReserveDays: [ + { + required: true, + message: this.$t('planRecordReserveDaysInfo'), + trigger: 'blur' + }, + { + validator: (value) => { + if (!Number(value) && isNaN(value)) { + this.planForm.recordReserveDays = '' + } + return !isNaN(value) + }, + message: this.$t('planRecordReserveDaysInfo'), + trigger: 'blur' + } ] }, replicaTaskObjects: [] @@ -289,7 +323,9 @@ conflictStrategy, executionStrategy, executionPlan: { executeTime, cronExpression } - } + }, + record, + recordReserveDays }, objects }) => { @@ -312,7 +348,9 @@ remoteClusterIds: this.checkClusterExist(remoteClusters.map(v => v.id)), description, createdBy, - createdDate + createdDate, + record: record || true, + recordReserveDays: recordReserveDays || 60 } this.replicaTaskObjects = objects }).finally(() => { @@ -376,7 +414,9 @@ }, remoteClusterIds: this.planForm.remoteClusterIds, enabled: true, - description: this.planForm.description + description: this.planForm.description, + record: this.planForm.record, + recordReserveDays: Number(this.planForm.recordReserveDays) } const request = this.routeName === 'createPlan' ? this.createPlan({ body }) diff --git a/src/frontend/devops-repository/src/views/planManage/logDetail.vue b/src/frontend/devops-repository/src/views/planManage/logDetail.vue index e53a15edce..0f8ee3dd87 100644 --- a/src/frontend/devops-repository/src/views/planManage/logDetail.vue +++ b/src/frontend/devops-repository/src/views/planManage/logDetail.vue @@ -1,6 +1,22 @@ + + + + + + + + + + + + - + + + - - - + + @@ -82,13 +110,14 @@