From fe8093f69fb4292281da4da79919ed751c447c09 Mon Sep 17 00:00:00 2001
From: vhwweng <1010382269@qq.com>
Date: Tue, 12 Sep 2023 11:00:09 +0800
Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=B5=81=E6=B0=B4=E7=BA=BF?=
=?UTF-8?q?=E6=94=AF=E6=8C=81=E5=BD=92=E6=A1=A3=E7=9B=AE=E5=BD=95=20#9320?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/ExecDetail/Artifactory.vue | 28 +++++++++++++------
1 file changed, 19 insertions(+), 9 deletions(-)
diff --git a/src/frontend/devops-pipeline/src/components/ExecDetail/Artifactory.vue b/src/frontend/devops-pipeline/src/components/ExecDetail/Artifactory.vue
index 0e64f515ce8..a773bbf8788 100644
--- a/src/frontend/devops-pipeline/src/components/ExecDetail/Artifactory.vue
+++ b/src/frontend/devops-pipeline/src/components/ExecDetail/Artifactory.vue
@@ -15,20 +15,27 @@
-
-
- {{ !props.row.folder ? sizeFormatter(props.row.size) : sizeFormatter(getFolderSize(props.row)) }}
-
-
+
{{ $t('download') }}
+ :disabled="props.row.disabled"
+ >
+
+ {{ $t('download') }}
+
+
+
+
+ {{ $t('download') }}
+
+
@@ -95,7 +102,10 @@
]).then(([res, permission]) => {
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: 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) {