mirror of
https://github.com/portainer/portainer.git
synced 2025-08-08 15:25:22 +02:00
feat(ui): renovate the Docker volume creation page EE-3514 (#7380)
This commit is contained in:
parent
1e78234f04
commit
ff32e87b97
5 changed files with 30 additions and 20 deletions
|
@ -38,6 +38,24 @@ angular.module('portainer.docker').controller('CreateVolumeController', [
|
|||
$scope.formValues.DriverOptions.splice(index, 1);
|
||||
};
|
||||
|
||||
$scope.onUseNFSChange = onUseNFSChange;
|
||||
|
||||
function onUseNFSChange(checked) {
|
||||
return $scope.$evalAsync(() => {
|
||||
$scope.formValues.NFSData.useNFS = checked;
|
||||
$scope.formValues.CIFSData.useCIFS = false;
|
||||
});
|
||||
}
|
||||
|
||||
$scope.onUseCIFSChange = onUseCIFSChange;
|
||||
|
||||
function onUseCIFSChange(checked) {
|
||||
return $scope.$evalAsync(() => {
|
||||
$scope.formValues.CIFSData.useCIFS = checked;
|
||||
$scope.formValues.NFSData.useNFS = false;
|
||||
});
|
||||
}
|
||||
|
||||
function validateForm(accessControlData, isAdmin) {
|
||||
$scope.state.formValidationError = '';
|
||||
var error = '';
|
||||
|
|
|
@ -57,22 +57,14 @@
|
|||
<!-- !driver-options -->
|
||||
<!-- nfs-management -->
|
||||
<div class="form-group col-md-12">
|
||||
<label for="useNFS" class="control-label text-left"> Use NFS volume </label>
|
||||
<label class="switch" style="margin-left: 20px">
|
||||
<input type="checkbox" name="useNFS" ng-model="formValues.NFSData.useNFS" ng-click="formValues.CIFSData.useCIFS = false" />
|
||||
<i></i>
|
||||
</label>
|
||||
<por-switch-field checked="formValues.NFSData.useNFS" label="'Use NFS volume'" on-change="(onUseNFSChange)"></por-switch-field>
|
||||
<div ng-if="formValues.NFSData.useNFS" class="small text-muted" style="margin-top: 10px"> Ensure <code>nfs-utils</code> are installed on your hosts. </div>
|
||||
</div>
|
||||
<volumes-nfs-form data="formValues.NFSData" ng-show="formValues.Driver === 'local'"></volumes-nfs-form>
|
||||
<!-- !nfs-management -->
|
||||
<!-- cifs-management -->
|
||||
<div class="form-group col-md-12">
|
||||
<label for="useCIFS" class="control-label text-left"> Use CIFS volume </label>
|
||||
<label class="switch" style="margin-left: 20px">
|
||||
<input type="checkbox" name="useCIFS" ng-model="formValues.CIFSData.useCIFS" ng-click="formValues.NFSData.useNFS = false" />
|
||||
<i></i>
|
||||
</label>
|
||||
<por-switch-field checked="formValues.CIFSData.useCIFS" label="'Use CIFS volume'" on-change="(onUseCIFSChange)"></por-switch-field>
|
||||
<div ng-if="formValues.CIFSData.useCIFS" class="small text-muted" style="margin-top: 10px"> Ensure <code>cifs-utils</code> are installed on your hosts. </div>
|
||||
</div>
|
||||
<volumes-cifs-form data="formValues.CIFSData" ng-show="formValues.Driver === 'local'"></volumes-cifs-form>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue