mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 05:45:22 +02:00
feat(volumes): add a switch to use CIFS volumes (#3823)
* feat(volumes): add a switch to use CIFS volumes * feat(volumes): switch between nfs and cifs * feat(volumes): autofix sharepoint, hide driveroptions and allow to create unnammed volume * feat(volumes): change cifs version select options * feat(volumes): change few things
This commit is contained in:
parent
8eac1d2221
commit
ebac85b462
8 changed files with 220 additions and 79 deletions
|
@ -1,86 +1,72 @@
|
|||
<div>
|
||||
<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="$ctrl.data.useNFS" />
|
||||
<i></i>
|
||||
</label>
|
||||
<div ng-if="$ctrl.data.useNFS" class="small text-muted" style="margin-top: 10px;">
|
||||
Ensure <code>nfs-utils</code> are installed on your hosts.
|
||||
<!-- NFS-settings -->
|
||||
<div ng-show="$ctrl.data.useNFS">
|
||||
<ng-form class="form-horizontal" name="nfsInformationForm">
|
||||
<div class="col-sm-12 form-section-title">
|
||||
NFS Settings
|
||||
</div>
|
||||
</div>
|
||||
<!-- NFS-settings -->
|
||||
<div ng-show="$ctrl.data.useNFS">
|
||||
<ng-form class="form-horizontal" name="nfsInformationForm">
|
||||
<div class="col-sm-12 form-section-title">
|
||||
NFS Settings
|
||||
<!-- address-input -->
|
||||
<div class="form-group col-md-12">
|
||||
<label for="nfs_address" class="col-sm-2 col-md-1 control-label text-left">Address</label>
|
||||
<div class="col-sm-10 col-md-11">
|
||||
<input type="text" class="form-control" ng-model="$ctrl.data.serverAddress" name="nfs_address" placeholder="e.g. my.nfs-server.com OR xxx.xxx.xxx.xxx" required />
|
||||
</div>
|
||||
<!-- address-input -->
|
||||
<div class="form-group col-md-12">
|
||||
<label for="nfs_address" class="col-sm-2 col-md-1 control-label text-left">Address</label>
|
||||
<div class="col-sm-10 col-md-11">
|
||||
<input type="text" class="form-control" ng-model="$ctrl.data.serverAddress" name="nfs_address" placeholder="e.g. my.nfs-server.com OR xxx.xxx.xxx.xxx" required />
|
||||
</div>
|
||||
<div class="form-group col-md-12" ng-show="nfsInformationForm.nfs_address.$invalid">
|
||||
<div class="small text-warning">
|
||||
<div ng-messages="nfsInformationForm.nfs_address.$error">
|
||||
<p ng-message="required"> <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field is required.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12" ng-show="nfsInformationForm.nfs_address.$invalid">
|
||||
<div class="small text-warning">
|
||||
<div ng-messages="nfsInformationForm.nfs_address.$error">
|
||||
<p ng-message="required"> <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field is required.</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- !address-input -->
|
||||
<!-- version-input -->
|
||||
<div class="form-group col-md-12">
|
||||
<label for="nfs_version" class="col-sm-2 col-md-1 control-label text-left">NFS Version</label>
|
||||
<div class="col-sm-10 col-md-11">
|
||||
<select class="form-control" ng-model="$ctrl.data.version" name="nfs_version" ng-options="version for version in $ctrl.data.versions" required></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12" ng-show="nfsInformationForm.nfs_version.$invalid">
|
||||
<div class="small text-warning">
|
||||
<div ng-messages="nfsInformationForm.nfs_version.$error">
|
||||
<p ng-message="required"> <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field is required.</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- !address-input -->
|
||||
<!-- version-input -->
|
||||
<div class="form-group col-md-12">
|
||||
<label for="nfs_version" class="col-sm-2 col-md-1 control-label text-left">NFS Version</label>
|
||||
<div class="col-sm-10 col-md-11">
|
||||
<select class="form-control" ng-model="$ctrl.data.version" name="nfs_version" ng-options="version for version in $ctrl.data.versions" required></select>
|
||||
</div>
|
||||
<!-- !version-input -->
|
||||
<!-- mount-point-input -->
|
||||
<div class="form-group col-md-12">
|
||||
<label for="nfs_mountpoint" class="col-sm-2 col-md-1 control-label text-left">Mount point</label>
|
||||
<div class="col-sm-10 col-md-11">
|
||||
<input type="text" class="form-control" ng-model="$ctrl.data.mountPoint" name="nfs_mountpoint" placeholder="e.g. /export/share, :/export/share, /share or :/share" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12" ng-show="nfsInformationForm.nfs_mountpoint.$invalid">
|
||||
<div class="small text-warning">
|
||||
<div ng-messages="nfsInformationForm.nfs_mountpoint.$error">
|
||||
<p ng-message="required"> <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field is required.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12" ng-show="nfsInformationForm.nfs_version.$invalid">
|
||||
<div class="small text-warning">
|
||||
<div ng-messages="nfsInformationForm.nfs_version.$error">
|
||||
<p ng-message="required"> <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field is required.</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- !mount-point-input -->
|
||||
<!-- options-input -->
|
||||
<div class="form-group col-md-12">
|
||||
<label for="nfs_options" class="col-sm-2 col-md-1 control-label text-left"
|
||||
>Options
|
||||
<portainer-tooltip position="bottom" message="Comma separated list of options"></portainer-tooltip>
|
||||
</label>
|
||||
<div class="col-sm-10 col-md-11">
|
||||
<input type="text" class="form-control" ng-model="$ctrl.data.options" name="nfs_options" placeholder="e.g. rw,noatime,tcp ..." required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12" ng-show="nfsInformationForm.nfs_options.$invalid">
|
||||
<div class="small text-warning">
|
||||
<div ng-messages="nfsInformationForm.nfs_options.$error">
|
||||
<p ng-message="required"> <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field is required.</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- !version-input -->
|
||||
<!-- mount-point-input -->
|
||||
<div class="form-group col-md-12">
|
||||
<label for="nfs_mountpoint" class="col-sm-2 col-md-1 control-label text-left">Mount point</label>
|
||||
<div class="col-sm-10 col-md-11">
|
||||
<input type="text" class="form-control" ng-model="$ctrl.data.mountPoint" name="nfs_mountpoint" placeholder="e.g. /export/share, :/export/share, /share or :/share" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12" ng-show="nfsInformationForm.nfs_mountpoint.$invalid">
|
||||
<div class="small text-warning">
|
||||
<div ng-messages="nfsInformationForm.nfs_mountpoint.$error">
|
||||
<p ng-message="required"> <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field is required.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- !mount-point-input -->
|
||||
<!-- options-input -->
|
||||
<div class="form-group col-md-12">
|
||||
<label for="nfs_options" class="col-sm-2 col-md-1 control-label text-left"
|
||||
>Options
|
||||
<portainer-tooltip position="bottom" message="Comma separated list of options"></portainer-tooltip>
|
||||
</label>
|
||||
<div class="col-sm-10 col-md-11">
|
||||
<input type="text" class="form-control" ng-model="$ctrl.data.options" name="nfs_options" placeholder="e.g. rw,noatime,tcp ..." required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12" ng-show="nfsInformationForm.nfs_options.$invalid">
|
||||
<div class="small text-warning">
|
||||
<div ng-messages="nfsInformationForm.nfs_options.$error">
|
||||
<p ng-message="required"> <i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field is required.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- !options-input -->
|
||||
</ng-form>
|
||||
</div>
|
||||
<!-- !NFS-settings -->
|
||||
</div>
|
||||
<!-- !options-input -->
|
||||
</ng-form>
|
||||
</div>
|
||||
<!-- !NFS-settings -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue