[FIX] #2 Issue: Display status-code and status-message

This commit is contained in:
XiCoN-Luan- 2019-12-07 10:40:59 +01:00
parent a72f5a7158
commit ca991a705b
2 changed files with 18 additions and 3 deletions

4
dist/main.js vendored

File diff suppressed because one or more lines are too long

View File

@ -214,7 +214,22 @@ export default {
this.tableDataHistoryObject.push(xtrData);
})
.catch(e => {
this.executionTime = 'Check request'
if(e.response !== undefined) {
// JSON responses are automatically parsed.
this.tableData = {0 : {
0: "Status-Code: HTTP/" + e.response.status,
1: "Message: " + e.response.statusText,
2: "",
3: "",
4: ""
}};
this.setLastExecutionTime();
this.tableDataHistory.push(this.tableData);
this.tick = this.tableDataHistory.length -1;
var xtrData = new XtrData();
xtrData.initObjectByElements(this.selectedServerData, this.executionTime , this.tableData ,this.target);
this.tableDataHistoryObject.push(xtrData);
}
}).finally(ee => {
var position = this.jobList.indexOf(jobId);