Skip to content

Commit

Permalink
增加构建详情的查看配置项,在构建详情界面点击插件时,默认进入的是 日志 or 配置 Tab页面。 TencentBlueKing#10808
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 16458
  • Loading branch information
useryuyu committed Aug 26, 2024
1 parent 5fd8da8 commit 83abdc5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
27 changes: 25 additions & 2 deletions src/frontend/devops-pipeline/src/components/ExecDetail/plugin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@
editingElementPos: {
type: Object,
required: true
},
properties: {
type: Array,
default: () => ['LOG', 'ARTIFACT', 'CONFIG']
}
},
data () {
Expand Down Expand Up @@ -150,7 +154,12 @@
},
showTab () {
return this.tabList[1].completeLoading && this.tabList[2].completeLoading
const artifactoryTab = this.tabList.find(tab => tab.name === 'artifactory')
const reportTab = this.tabList.find(tab => tab.name === 'report')
if (artifactoryTab && reportTab) {
return artifactoryTab.completeLoading && reportTab.completeLoading
}
return false
}
},
Expand All @@ -167,10 +176,24 @@
handler (val) {
const tab = val.find(tab => tab.name === this.currentTab)
if (!tab.show) {
this.currentTab = 'log'
this.currentTab = val[0].name
}
},
deep: true
},
properties: {
handler (newValue) {
if (JSON.stringify(newValue) === JSON.stringify(['CONFIG', 'LOG', 'ARTIFACT'])) {
this.tabList = [
{ name: 'setting', show: true },
{ name: 'log', show: true },
{ name: 'artifactory', show: false, completeLoading: false },
{ name: 'report', show: false, completeLoading: false }
]
this.currentTab = 'setting'
}
},
immediate: true
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
<plugin
:exec-detail="execDetail"
:editing-element-pos="editingElementPos"
:properties="curProject.properties.pluginDetailsDisplayOrder"
@close="hideSidePanel"
/>
</template>
Expand Down

0 comments on commit 83abdc5

Please sign in to comment.