mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 05:45:22 +02:00
feat(application): Add the ability to use existing volumes when creating an application (#4044)
* feat(applications): update UI to use existing volumes * feat(application): Add the ability to use existing volumes when creating an application * feat(application): Existing persisted folders should default to associated volumes * feat(application): add form validation to existing volume * feat(application): remove the ability to use an existing volume with statefulset application * feat(k8s/applications): minor UI update * feat(k8s/application): minor UI update * feat(volume): allow to increase volume size and few other things * feat(volumes): add the ability to allow volume expansion * fix(storage): fix the storage patch request * fix(k8s/applications): remove conflict leftover * feat(k8s/configure): minor UI update * feat(k8s/volume): minor UI update * fix(storage): change few things Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com>
This commit is contained in:
parent
b9c2bf487b
commit
61f97469ab
16 changed files with 436 additions and 40 deletions
|
@ -41,14 +41,66 @@
|
|||
<td>Provisioner</td>
|
||||
<td>{{ ctrl.volume.PersistentVolumeClaim.StorageClass.Provisioner ? ctrl.volume.PersistentVolumeClaim.StorageClass.Provisioner : '-' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Size</td>
|
||||
<td>{{ ctrl.volume.PersistentVolumeClaim.Storage }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Creation date</td>
|
||||
<td>{{ ctrl.volume.PersistentVolumeClaim.CreationDate | getisodate }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Size</td>
|
||||
<td ng-if="!ctrl.state.increaseSize">
|
||||
{{ ctrl.volume.PersistentVolumeClaim.Storage }}
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm btn-primary"
|
||||
ng-click="ctrl.state.increaseSize = true"
|
||||
ng-if="ctrl.volume.PersistentVolumeClaim.StorageClass.AllowVolumeExpansion"
|
||||
>Increase size</button
|
||||
>
|
||||
</td>
|
||||
<td ng-if="ctrl.state.increaseSize">
|
||||
<form name="kubernetesVolumeUpdateForm">
|
||||
<div class="form-inline">
|
||||
<div class="input-group input-group-sm">
|
||||
<input
|
||||
type="number"
|
||||
class="form-control"
|
||||
name="size"
|
||||
ng-model="ctrl.state.volumeSize"
|
||||
placeholder="20"
|
||||
ng-min="0"
|
||||
ng-change="ctrl.onChangeSize()"
|
||||
required
|
||||
/>
|
||||
<span class="input-group-addon" style="padding: 0;">
|
||||
<select
|
||||
ng-model="ctrl.state.volumeSizeUnit"
|
||||
ng-change="ctrl.onChangeSize()"
|
||||
ng-options="unit for unit in ctrl.state.availableSizeUnits"
|
||||
style="width: 100%; height: 100%;"
|
||||
></select>
|
||||
</span>
|
||||
</div>
|
||||
<button type="button" class="btn btn-sm btn-primary" ng-disabled="!ctrl.sizeIsValid()" ng-click="ctrl.updateVolume()">
|
||||
Update size
|
||||
</button>
|
||||
<button type="button" class="btn btn-sm btn-default" ng-click="ctrl.state.increaseSize = false">
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="form-inline">
|
||||
<div class="small text-warning" style="margin-top: 5px;" ng-show="ctrl.state.volumeSizeError || kubernetesVolumeUpdateForm.size.$invalid">
|
||||
<div ng-messages="kubernetesVolumeUpdateForm.size.$error">
|
||||
<p ng-message="required"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field is required.</p>
|
||||
</div>
|
||||
<p ng-show="ctrl.state.volumeSizeError && !kubernetesVolumeUpdateForm.size.$invalid"
|
||||
><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> The new size must be greater than the actual size.</p
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue