diff --git a/performance-test/frontend/src/business/report/PerformanceReportView.vue b/performance-test/frontend/src/business/report/PerformanceReportView.vue index 232e010a59..6e32593e37 100644 --- a/performance-test/frontend/src/business/report/PerformanceReportView.vue +++ b/performance-test/frontend/src/business/report/PerformanceReportView.vue @@ -64,7 +64,7 @@
- {{ $t('report.test_duration', [this.minutes, this.seconds]) }} + {{ $t('performance_test.report.test_duration_tips', [hours, minutes, seconds]) }} {{ $t('report.test_start_time') }}:{{ startTime | datetimeFormat }} @@ -218,6 +218,7 @@ export default { projectName: '', startTime: '0', endTime: '0', + hours: '0', minutes: '0', seconds: '0', title: 'Logging', @@ -290,7 +291,8 @@ export default { this.startTime = data.startTime; this.endTime = data.endTime; let duration = data.duration; - this.minutes = Math.floor(duration / 60); + this.hours = Math.floor(duration / 60 / 60); + this.minutes = Math.floor(duration / 60 % 60); this.seconds = duration % 60; } }) diff --git a/performance-test/frontend/src/business/report/PerformanceTestReportList.vue b/performance-test/frontend/src/business/report/PerformanceTestReportList.vue index d1aa717d12..597003d9ba 100644 --- a/performance-test/frontend/src/business/report/PerformanceTestReportList.vue +++ b/performance-test/frontend/src/business/report/PerformanceTestReportList.vue @@ -121,8 +121,7 @@ :label="$t('report.test_execute_time')"> @@ -307,8 +306,10 @@ export default { handleTimeInfo(report) { if (report.testStartTime) { let duration = report.testDuration; - let minutes = Math.floor(duration / 60); + let hours = Math.floor(duration / 60 / 60); + let minutes = Math.floor(duration / 60 % 60); let seconds = duration % 60; + this.$set(report, 'hours', hours); this.$set(report, 'minutes', minutes); this.$set(report, 'seconds', seconds); } @@ -318,10 +319,12 @@ export default { let data = res.data.data; if (data) { let duration = data.duration; - let minutes = Math.floor(duration / 60); + let hours = Math.floor(duration / 60 / 60); + let minutes = Math.floor(duration / 60 % 60); let seconds = duration % 60; this.$set(report, 'testStartTime', data.startTime); this.$set(report, 'testEndTime', data.endTime); + this.$set(report, 'hours', hours); this.$set(report, 'minutes', minutes); this.$set(report, 'seconds', seconds); } diff --git a/performance-test/frontend/src/i18n/lang/en-US.js b/performance-test/frontend/src/i18n/lang/en-US.js index 238edaf241..5d436b7357 100644 --- a/performance-test/frontend/src/i18n/lang/en-US.js +++ b/performance-test/frontend/src/i18n/lang/en-US.js @@ -2,7 +2,14 @@ import el from "element-ui/lib/locale/lang/en"; import fu from "fit2cloud-ui/src/locale/lang/en_US"; // 加载fit2cloud的内容 import mf from "metersphere-frontend/src/i18n/lang/en-US" -const message = {} +const message = { + performance_test: { + report: { + test_duration: '{0} hours {1} minutes {2} seconds', + test_duration_tips: 'Execution Time:{0} hours {1} minutes {2} seconds', + } + } +} export default { ...el, ...fu, diff --git a/performance-test/frontend/src/i18n/lang/zh-CN.js b/performance-test/frontend/src/i18n/lang/zh-CN.js index 5bba75500a..6ef7a0d631 100644 --- a/performance-test/frontend/src/i18n/lang/zh-CN.js +++ b/performance-test/frontend/src/i18n/lang/zh-CN.js @@ -2,7 +2,14 @@ import el from "element-ui/lib/locale/lang/zh-CN"; // 加载element的内容 import fu from "fit2cloud-ui/src/locale/lang/zh-CN"; // 加载fit2cloud的内容 import mf from "metersphere-frontend/src/i18n/lang/zh-CN" -const message = {} +const message = { + performance_test: { + report: { + test_duration: '{0}时{1}分{2}秒', + test_duration_tips: '执行时长:{0}时{1}分{2}秒', + } + } +} export default { ...el, diff --git a/performance-test/frontend/src/i18n/lang/zh-TW.js b/performance-test/frontend/src/i18n/lang/zh-TW.js index 285da59e62..5384d15238 100644 --- a/performance-test/frontend/src/i18n/lang/zh-TW.js +++ b/performance-test/frontend/src/i18n/lang/zh-TW.js @@ -2,7 +2,14 @@ import el from "element-ui/lib/locale/lang/zh-TW"; import fu from "fit2cloud-ui/src/locale/lang/zh-TW"; // 加载fit2cloud的内容 import mf from "metersphere-frontend/src/i18n/lang/zh-TW" -const message = {} +const message = { + performance_test: { + report: { + test_duration: '{0}時{1}分{2}秒', + test_duration_tips: '執行時長:{0}時{1}分{2}秒', + } + } +} export default { ...el,