Merge branch 'v1.5' into master

This commit is contained in:
BugKing 2020-12-08 17:05:11 +08:00
commit 7a0004cb5a
2 changed files with 12 additions and 17 deletions

View File

@ -15,7 +15,7 @@
</delete>
<select id="selectAll" resultType="io.metersphere.api.dto.ApiMonitorSearch">
select distinct url from api_data_view;
select distinct url from api_data_view order by url;
</select>
<select id="selectResponseTimeByUrl" parameterType="java.lang.String"
@ -56,7 +56,7 @@
</select>
<select id="selectReportIdByUrlAndStartTime" resultType="java.lang.String">
select report_id from api_data_view where response_code != 200 and url=#{apiUrl} and start_time=#{startTime};
select report_id from api_data_view where url=#{apiUrl} and start_time=#{startTime};
</select>
<insert id="insertListApiData" parameterType="java.util.List">

View File

@ -2,7 +2,7 @@
<common-monitor-chart>
<template>
<div id="response-time-chart" :style="{ width:'100%',height:'100%' }">
<chart :options="getOptions()" :style="{ width:'100%' }"></chart>
<chart :options="getOptions()" :style="{ width:'100%' }" v-on:click="click"></chart>
</div>
</template>
</common-monitor-chart>
@ -27,20 +27,15 @@ export default {
},
methods: {
click(params) {
//2
if (params.value.substr(0, 1) !== '2') {
let startTime = params.name;
this.result = this.$$get('/api/monitor/getReportId', {'startTime': startTime}, {
'apiUrl': this.apiUrl
}, response => {
this.reportId = response.data;
let reportId = this.reportId
let url = '#/api/report/view/' + reportId;
let target = '_blank';
window.open(url, target);
});
}
let startTime = params.name;
this.result = this.$$get('/api/monitor/getReportId', {'startTime': startTime}, {
'apiUrl': this.apiUrl
}, response => {
this.reportId = response.data;
let reportId = this.reportId
let url = '#/api/report/view/' + reportId;
window.open(url, '_blank');
});
},
getOptions() {
return {