diff --git a/backend/src/main/java/io/metersphere/api/service/APITestService.java b/backend/src/main/java/io/metersphere/api/service/APITestService.java
index c20dff7e18..f1fc146c74 100644
--- a/backend/src/main/java/io/metersphere/api/service/APITestService.java
+++ b/backend/src/main/java/io/metersphere/api/service/APITestService.java
@@ -119,13 +119,15 @@ public class APITestService {
out = new FileOutputStream(file);
FileUtil.copyStream(in, out);
} catch (IOException e) {
- e.printStackTrace();
+ LogUtil.error(e);
+ MSException.throwException(Translator.get("upload_fail"));
} finally {
try {
in.close();
out.close();
} catch (IOException e) {
- e.printStackTrace();
+ LogUtil.error(e);
+ MSException.throwException(Translator.get("upload_fail"));
}
}
}
@@ -168,7 +170,8 @@ public class APITestService {
try {
FileUtil.copyDir(sourceFile, new File(targetDir));
} catch (IOException e) {
- e.printStackTrace();
+ LogUtil.error(e);
+ MSException.throwException(Translator.get("upload_fail"));
}
}
}
diff --git a/backend/src/main/resources/i18n/messages_en_US.properties b/backend/src/main/resources/i18n/messages_en_US.properties
index ad8e75d10e..9c23fec9f8 100644
--- a/backend/src/main/resources/i18n/messages_en_US.properties
+++ b/backend/src/main/resources/i18n/messages_en_US.properties
@@ -8,6 +8,7 @@ error=error
connection_failed=Connection failed
delete_fail=Delete fail
start_engine_fail=Start fail
+upload_fail=Upload fail
#user related
user_email_already_exists=User email already exists
user_id_is_null=User ID cannot be null
diff --git a/backend/src/main/resources/i18n/messages_zh_CN.properties b/backend/src/main/resources/i18n/messages_zh_CN.properties
index b5692dfbc2..d3f9107900 100644
--- a/backend/src/main/resources/i18n/messages_zh_CN.properties
+++ b/backend/src/main/resources/i18n/messages_zh_CN.properties
@@ -7,6 +7,7 @@ row=行
error=出错
delete_fail=删除失败
start_engine_fail=启动失败
+upload_fail=文件上传失败
#user related
user_email_already_exists=用户邮箱已存在
user_id_is_null=用户ID不能为空
diff --git a/backend/src/main/resources/i18n/messages_zh_TW.properties b/backend/src/main/resources/i18n/messages_zh_TW.properties
index 37f780699d..6c39d397cf 100644
--- a/backend/src/main/resources/i18n/messages_zh_TW.properties
+++ b/backend/src/main/resources/i18n/messages_zh_TW.properties
@@ -8,6 +8,7 @@ error=出錯
connection_failed=連接失敗
delete_fail=刪除失敗
start_engine_fail=啟動失敗
+upload_fail=文件上傳失敗
#user related
user_email_already_exists=用戶郵箱已存在
user_id_is_null=用戶ID不能為空
diff --git a/frontend/src/business/components/common/components/MsPieChart.vue b/frontend/src/business/components/common/components/MsPieChart.vue
index 4c1505bda7..483f62a208 100644
--- a/frontend/src/business/components/common/components/MsPieChart.vue
+++ b/frontend/src/business/components/common/components/MsPieChart.vue
@@ -32,7 +32,7 @@ export default {
},
tooltip: {
trigger: 'item',
- formatter: '{a}
{b} : {c} ({d}%)'
+ formatter: '{a}
({d}%)'
},
legend: {
orient: 'vertical',
@@ -46,7 +46,15 @@ export default {
radius: ['40%', '70%'],
// roseType: 'angle',
data: this.data,
- animation: false
+ animation: false,
+ label: {
+ normal: {
+ show: true,
+ position: 'outside',
+ formatter: '{b}:{c}'
+
+ }
+ }
}
]
},