diff --git a/frontend/src/business/components/common/components/MsDialogFooter.vue b/frontend/src/business/components/common/components/MsDialogFooter.vue index db7413f088..bcd271add2 100644 --- a/frontend/src/business/components/common/components/MsDialogFooter.vue +++ b/frontend/src/business/components/common/components/MsDialogFooter.vue @@ -2,7 +2,7 @@ diff --git a/frontend/src/business/components/performance/report/components/LogDetails.vue b/frontend/src/business/components/performance/report/components/LogDetails.vue index a6a6a59f54..405d8bc567 100644 --- a/frontend/src/business/components/performance/report/components/LogDetails.vue +++ b/frontend/src/business/components/performance/report/components/LogDetails.vue @@ -2,7 +2,8 @@
- {{item}} + {{item.substring(0, 2048) }}... + {{$t('load_test.download_log_file')}}
@@ -23,6 +24,22 @@ this.result = this.$get("/performance/report/log/" + this.id, res => { this.logContent = res.data; }) + }, + downloadLogFile(content) { + const filename = 'jmeter.log' + const blob = new Blob([content]); + if ("download" in document.createElement("a")) { + // 非IE下载 + // chrome/firefox + let aTag = document.createElement('a'); + aTag.download = filename; + aTag.href = URL.createObjectURL(blob); + aTag.click(); + URL.revokeObjectURL(aTag.href) + } else { + // IE10+下载 + navigator.msSaveBlob(blob, filename); + } } }, watch: { diff --git a/frontend/src/business/components/performance/test/components/PerformanceAdvancedConfig.vue b/frontend/src/business/components/performance/test/components/PerformanceAdvancedConfig.vue index 85d36b88aa..9bd3a408d4 100644 --- a/frontend/src/business/components/performance/test/components/PerformanceAdvancedConfig.vue +++ b/frontend/src/business/components/performance/test/components/PerformanceAdvancedConfig.vue @@ -1,28 +1,35 @@