Skip to content

Commit

Permalink
Updates for handling 404 response text.
Browse files Browse the repository at this point in the history
  • Loading branch information
wknet123 committed Nov 24, 2016
1 parent 7e0305e commit 50a0579
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 50a0579

Please sign in to comment.