1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 15:29:42 +02:00

feat(k8s/applications): reorder placement policies and select mandatory by default (#5063)

This commit is contained in:
Alice Groux 2021-06-03 13:42:44 +02:00 committed by GitHub
parent 9ec1f2ed6d
commit b8660ed2a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 11 deletions

View file

@ -23,7 +23,7 @@ const _KubernetesApplicationFormValues = Object.freeze({
Configurations: [], // KubernetesApplicationConfigurationFormValue list Configurations: [], // KubernetesApplicationConfigurationFormValue list
PublishingType: KubernetesApplicationPublishingTypes.INTERNAL, PublishingType: KubernetesApplicationPublishingTypes.INTERNAL,
PublishedPorts: [], // KubernetesApplicationPublishedPortFormValue list PublishedPorts: [], // KubernetesApplicationPublishedPortFormValue list
PlacementType: KubernetesApplicationPlacementTypes.PREFERRED, PlacementType: KubernetesApplicationPlacementTypes.MANDATORY,
Placements: [], // KubernetesApplicationPlacementFormValue list Placements: [], // KubernetesApplicationPlacementFormValue list
OriginalIngresses: undefined, OriginalIngresses: undefined,
}); });

View file

@ -1037,16 +1037,6 @@
<!-- placement policy options --> <!-- placement policy options -->
<div class="form-group" style="margin-bottom: 0;" ng-if="ctrl.formValues.Placements.length"> <div class="form-group" style="margin-bottom: 0;" ng-if="ctrl.formValues.Placements.length">
<div class="boxselector_wrapper"> <div class="boxselector_wrapper">
<div>
<input type="radio" id="placement_soft" ng-value="ctrl.ApplicationPlacementTypes.PREFERRED" ng-model="ctrl.formValues.PlacementType" />
<label for="placement_soft">
<div class="boxselector_header">
<i class="fa fa-list" aria-hidden="true" style="margin-right: 2px;"></i>
Preferred
</div>
<p>Schedule this application on nodes that match the rules if possible</p>
</label>
</div>
<div> <div>
<input type="radio" id="placement_hard" ng-value="ctrl.ApplicationPlacementTypes.MANDATORY" ng-model="ctrl.formValues.PlacementType" /> <input type="radio" id="placement_hard" ng-value="ctrl.ApplicationPlacementTypes.MANDATORY" ng-model="ctrl.formValues.PlacementType" />
<label for="placement_hard"> <label for="placement_hard">
@ -1057,6 +1047,16 @@
<p>Schedule this application <b>ONLY</b> on nodes that match <b>ALL</b> Rules</p> <p>Schedule this application <b>ONLY</b> on nodes that match <b>ALL</b> Rules</p>
</label> </label>
</div> </div>
<div>
<input type="radio" id="placement_soft" ng-value="ctrl.ApplicationPlacementTypes.PREFERRED" ng-model="ctrl.formValues.PlacementType" />
<label for="placement_soft">
<div class="boxselector_header">
<i class="fa fa-list" aria-hidden="true" style="margin-right: 2px;"></i>
Preferred
</div>
<p>Schedule this application on nodes that match the rules if possible</p>
</label>
</div>
</div> </div>
</div> </div>
<!-- !placement policy options --> <!-- !placement policy options -->