feat(性能测试): 性能测试报告页面数据自动更新时间可动态调整
This commit is contained in:
parent
f8822370ad
commit
034b464a65
|
@ -65,7 +65,7 @@ public class ReportWebSocket {
|
|||
}
|
||||
refreshTimes.put(session, refreshTime);
|
||||
try {
|
||||
session.getBasicRemote().sendText("refresh-" + 0);
|
||||
session.getBasicRemote().sendText("refresh-" + Math.random());
|
||||
} catch (IOException e) {
|
||||
LogUtil.error(e.getMessage(), e);
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ export default {
|
|||
dialogFormVisible: false,
|
||||
reportExportVisible: false,
|
||||
testPlan: {testResourcePoolId: null},
|
||||
refreshTime: '20',
|
||||
refreshTime: localStorage.getItem("reportRefreshTime") || "20",
|
||||
refreshTimes: [
|
||||
{value: '1', label: '1s'},
|
||||
{value: '3', label: '3s'},
|
||||
|
@ -273,6 +273,7 @@ export default {
|
|||
});
|
||||
},
|
||||
onOpen() {
|
||||
this.refresh();
|
||||
// window.console.log("socket opening.");
|
||||
},
|
||||
onError(e) {
|
||||
|
@ -375,9 +376,12 @@ export default {
|
|||
},
|
||||
refresh() {
|
||||
if (this.status === 'Running') {
|
||||
if (this.websocket && this.websocket.readyState === 1) {
|
||||
this.websocket.send(this.refreshTime);
|
||||
}
|
||||
}
|
||||
localStorage.setItem("reportRefreshTime", this.refreshTime);
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.isReadOnly = false;
|
||||
|
@ -397,8 +401,6 @@ export default {
|
|||
this.reportId = to.path.split('/')[4];
|
||||
this.getReport(this.reportId);
|
||||
this.initBreadcrumb((response) => {
|
||||
let data = response.data;
|
||||
this.checkReportStatus(data.status);
|
||||
this.initReportTimeInfo();
|
||||
});
|
||||
this.initWebSocket();
|
||||
|
|
Loading…
Reference in New Issue