fix(k8s/application): allow app name to start with alphabetic character [EE-2596] (#6603)

fixes [EE-2596]
pull/6607/head
Chaim Lev-Ari 2022-02-28 07:15:49 +02:00 committed by GitHub
parent eaffde39f6
commit aefa34d6d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 8 deletions

View File

@ -110,7 +110,7 @@
ng-model="ctrl.formValues.Name" ng-model="ctrl.formValues.Name"
ng-change="ctrl.onChangeName()" ng-change="ctrl.onChangeName()"
placeholder="my-app" placeholder="my-app"
ng-pattern="/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/" ng-pattern="/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/"
auto-focus auto-focus
required required
ng-disabled="ctrl.state.isEdit" ng-disabled="ctrl.state.isEdit"
@ -122,14 +122,16 @@
<div class="col-sm-12 small text-warning"> <div class="col-sm-12 small text-warning">
<div ng-messages="kubernetesApplicationCreationForm.application_name.$error"> <div ng-messages="kubernetesApplicationCreationForm.application_name.$error">
<p ng-message="required"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field is required.</p> <p ng-message="required"><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field is required.</p>
<p ng-message="pattern" <p ng-message="pattern">
><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> This field must consist of lower case alphanumeric characters or '-', and contain at most 63 <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
characters, and must start and end with an alphanumeric character (e.g. 'my-name', or 'abc-123').</p This field must consist of lower case alphanumeric characters or '-', contain at most 63 characters, start with an alphabetic character, and end with an
> alphanumeric character (e.g. 'my-name', or 'abc-123').
</p>
</div> </div>
<p ng-if="ctrl.state.alreadyExists" <p ng-if="ctrl.state.alreadyExists">
><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> An application with the same name already exists inside the selected namespace.</p <i class="fa fa-exclamation-triangle" aria-hidden="true"></i>
> An application with the same name already exists inside the selected namespace.
</p>
</div> </div>
</div> </div>
<!-- #endregion --> <!-- #endregion -->