mirror of https://github.com/portainer/portainer
fix(endpoint-details): fix an issue when updating the local endpoint (#1226)
parent
8413b79fa9
commit
f5749f82d8
|
@ -54,14 +54,13 @@ function ($scope, $state, $transition$, $filter, EndpointService, Notifications)
|
||||||
EndpointService.endpoint($transition$.params().id)
|
EndpointService.endpoint($transition$.params().id)
|
||||||
.then(function success(data) {
|
.then(function success(data) {
|
||||||
var endpoint = data;
|
var endpoint = data;
|
||||||
endpoint.URL = $filter('stripprotocol')(endpoint.URL);
|
|
||||||
$scope.endpoint = endpoint;
|
|
||||||
|
|
||||||
if (endpoint.URL.indexOf('unix://') === 0) {
|
if (endpoint.URL.indexOf('unix://') === 0) {
|
||||||
$scope.endpointType = 'local';
|
$scope.endpointType = 'local';
|
||||||
} else {
|
} else {
|
||||||
$scope.endpointType = 'remote';
|
$scope.endpointType = 'remote';
|
||||||
}
|
}
|
||||||
|
endpoint.URL = $filter('stripprotocol')(endpoint.URL);
|
||||||
|
$scope.endpoint = endpoint;
|
||||||
})
|
})
|
||||||
.catch(function error(err) {
|
.catch(function error(err) {
|
||||||
Notifications.error('Failure', err, 'Unable to retrieve endpoint details');
|
Notifications.error('Failure', err, 'Unable to retrieve endpoint details');
|
||||||
|
|
Loading…
Reference in New Issue