fix(endpoint-details): fix an issue when updating the local endpoint (#1226)

pull/1227/head
Anthony Lapenna 2017-09-22 07:34:17 +02:00 committed by GitHub
parent 8413b79fa9
commit f5749f82d8
1 changed files with 2 additions and 3 deletions

View File

@ -54,14 +54,13 @@ function ($scope, $state, $transition$, $filter, EndpointService, Notifications)
EndpointService.endpoint($transition$.params().id)
.then(function success(data) {
var endpoint = data;
endpoint.URL = $filter('stripprotocol')(endpoint.URL);
$scope.endpoint = endpoint;
if (endpoint.URL.indexOf('unix://') === 0) {
$scope.endpointType = 'local';
} else {
$scope.endpointType = 'remote';
}
endpoint.URL = $filter('stripprotocol')(endpoint.URL);
$scope.endpoint = endpoint;
})
.catch(function error(err) {
Notifications.error('Failure', err, 'Unable to retrieve endpoint details');