Skip to content

Commit

Permalink
Merge pull request #1160 from wknet123/master-handle-rep-err
Browse files Browse the repository at this point in the history
Updates for handling 404 response text.
NMT
  • Loading branch information
yhua123 authored Nov 28, 2016
2 parents 32f9fb6 + 50a0579 commit e99d4b8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit e99d4b8

Please sign in to comment.