mirror of https://github.com/portainer/portainer
fix(service-details): clear volume source when changing type (#4671)
parent
c705c04d65
commit
6c8276c65c
|
@ -28,7 +28,7 @@
|
|||
name="mountType"
|
||||
class="form-control"
|
||||
ng-model="mount.Type"
|
||||
ng-change="updateMount(service, mount)"
|
||||
ng-change="onChangeMountType(service, mount)"
|
||||
ng-disabled="isUpdating"
|
||||
disable-authorization="DockerServiceUpdate"
|
||||
>
|
||||
|
|
|
@ -209,6 +209,12 @@ angular.module('portainer.docker').controller('ServiceController', [
|
|||
updateServiceArray(service, 'ServiceMounts', service.ServiceMounts);
|
||||
}
|
||||
};
|
||||
|
||||
$scope.onChangeMountType = function onChangeMountType(service, mount) {
|
||||
mount.Source = null;
|
||||
$scope.updateMount(service, mount);
|
||||
};
|
||||
|
||||
$scope.updateMount = function updateMount(service) {
|
||||
updateServiceArray(service, 'ServiceMounts', service.ServiceMounts);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue