network: ipv6 better display of error
This commit is contained in:
@@ -78,10 +78,14 @@ angular.module('Application').controller('NetworkController', ['$scope', '$locat
|
||||
$scope.ipv6Configure.error = '';
|
||||
|
||||
Client.setIPv6Config($scope.ipv6Configure.enabled, function (error) {
|
||||
if (error) $scope.ipv6Configure.error = error.message;
|
||||
else $scope.ipv6Configure.currentState = $scope.ipv6Configure.enabled;
|
||||
|
||||
$scope.ipv6Configure.busy = false;
|
||||
|
||||
if (error) {
|
||||
$scope.ipv6Configure.error = error.message;
|
||||
$scope.ipv6Configure.enabled = !$scope.ipv6Configure.enabled; // restore old state
|
||||
return;
|
||||
}
|
||||
$scope.ipv6Configure.currentState = $scope.ipv6Configure.enabled;
|
||||
$scope.ipv6Configure.success = true;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user