Skip to content

Commit

Permalink
feat:流水线支持归档目录 TencentBlueKing#9320
Browse files Browse the repository at this point in the history
  • Loading branch information
vhwweng committed Nov 4, 2023
1 parent 44177c7 commit 911353b
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,37 @@
</div>
</template>
</bk-table-column>
<bk-table-column :label="$t('details.path')" prop="fullName" show-overflow-tooltip></bk-table-column>
<bk-table-column :label="$t('details.filesize')" width="150" prop="size" show-overflow-tooltip>
<bk-table-column
:label="$t('details.path')"
prop="fullName"
show-overflow-tooltip
>
</bk-table-column>
<bk-table-column
:label="$t('details.filesize')"
width="150"
prop="size"
show-overflow-tooltip
>
<template slot-scope="props">
{{ !props.row.folder ? sizeFormatter(props.row.size) : sizeFormatter(getFolderSize(props.row)) }}
</template>
</bk-table-column>
<bk-table-column :label="$t('details.repoType')" width="150" prop="artifactoryType" :formatter="repoTypeFormatter" show-overflow-tooltip></bk-table-column>
<bk-table-column
:label="$t('details.repoType')"
width="150"
prop="artifactoryType"
:formatter="repoTypeFormatter"
show-overflow-tooltip
>
</bk-table-column>
<bk-table-column :label="$t('operate')" width="150">
<template slot-scope="props">
<artifact-download-button
:output="props.row"
:has-permission="hasPermission"
v-bind="props.row"
:artifactory-type="props.row.artifactoryType"
/>
</template>
</bk-table-column>
Expand Down Expand Up @@ -109,7 +128,10 @@
this.artifactories
= res.records.map((item) => ({
...item,
icon: item.folder ? 'folder' : extForFile(item.name)
icon: item.folder ? 'folder' : extForFile(item.name),
size: item.folder ? this.sizeFormatter(this.getFolderSize(item)) : this.sizeFormatter(item.size),
disabled: item.folder && this.sizeFormatter(this.getFolderSize(item)).includes('GB') && this.sizeFormatter(this.getFolderSize(item)).split(' ')[0] > 10,
disabledTips: this.$t('downloadDisabledTips')
})) || []
this.hasPermission = permission
if (this.artifactories.length <= 0) {
Expand Down
2 changes: 2 additions & 0 deletions src/frontend/devops-pipeline/src/components/Outputs/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
/>
<artifact-download-button
v-if="output.downloadable"
:output="output"
icon
:has-permission="hasPermission"
:path="output.fullPath"
Expand Down Expand Up @@ -81,6 +82,7 @@
<p class="pipeline-exec-output-actions">
<artifact-download-button
v-if="activeOutput.downloadable"
:output="activeOutput"
:has-permission="hasPermission"
:path="activeOutput.fullPath"
:name="activeOutput.name"
Expand Down
3 changes: 2 additions & 1 deletion src/frontend/locale/pipeline/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1218,5 +1218,6 @@
"needSignTips": "{0} is an internal test version and is being downloaded, please wait",
"apkSignDurationTips": "Only the first download needs to wait. The preparation time is related to the package size. A 500MB package takes about 1 minute.",
"apkSignSuccess": "{0} is ready, start downloading",
"downloadLater": "Download later"
"downloadLater": "Download later",
"downloadDisabledTips": "Exceeds 10 GB. Please download in batches from the artifact repository."
}
3 changes: 2 additions & 1 deletion src/frontend/locale/pipeline/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1223,5 +1223,6 @@
"needSignTips": "{0} 为内部测试版本,正在准备下载,请稍等",
"apkSignDurationTips": "仅首次下载需等待,准备时长和包大小有关,500MB的包大概需要1分钟",
"apkSignSuccess": "{0} 已经准备完成,开始下载",
"downloadLater": "稍后再下载"
"downloadLater": "稍后再下载",
"downloadDisabledTips": "目录下的文件大小超过 10 G,请到制品库分批下载"
}

0 comments on commit 911353b

Please sign in to comment.