mirror of
https://github.com/portainer/portainer.git
synced 2025-07-28 17:59:45 +02:00
fix(endpoint-details): fix an issue when updating the local endpoint (#1226)
This commit is contained in:
parent
8413b79fa9
commit
f5749f82d8
1 changed files with 2 additions and 3 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue