Merge pull request #1160 from wknet123/master-handle-rep-err

Updates for handling 404 response text.
NMT
This commit is contained in:
yhua123 2016-11-28 10:55:59 +08:00 committed by GitHub
commit e99d4b8466
2 changed files with 11 additions and 2 deletions

View File

@ -325,7 +325,12 @@
}
function pingDestinationFailed(data, status) {
vm.pingAvailable = true;
vm.pingMessage = $filter('tr')('failed_to_ping_target', []) + (data && data.length > 0 ? ':' + data : '');
if(status === 404) {
data = '';
}
vm.pingMessage = $filter('tr')('failed_to_ping_target', []) + data;
console.log("Failed to ping target:" + data);
vm.pingTIP = false;
}
}

View File

@ -163,7 +163,11 @@
}
function pingDestinationFailed(data, status) {
vm.pingTIP = false;
vm.pingMessage = $filter('tr')('failed_to_ping_target', []) + (data && data.length > 0 ? ':' + data : '');
if(status === 404) {
data = '';
}
vm.pingMessage = $filter('tr')('failed_to_ping_target', []) + data;
console.log("Failed to ping target:" + data);
}
}