From: Pere Diaz Bou <30913090+pereman2@users.noreply.github.com> Date: Wed, 10 Aug 2022 08:39:38 +0000 (+0200) Subject: Merge pull request #47179 from rhcs-dashboard/service-id-info X-Git-Tag: v18.0.0~304 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2e03b798bf41df752650445cd08864ba48f36f2d;p=ceph.git Merge pull request #47179 from rhcs-dashboard/service-id-info mgr/dashboard: validate mds service_id and helper text for service_id Reviewed-by: Pegonzal Reviewed-by: Aashish Sharma Reviewed-by: Nizamudeen A Reviewed-by: Pere Diaz Bou --- 2e03b798bf41df752650445cd08864ba48f36f2d diff --cc src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.html index c9cdc70b0ccec,658932c527348..875b73edca15d --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.html @@@ -79,11 -80,11 +81,14 @@@ *ngIf="serviceForm.showError('service_id', frm, 'required')" i18n>This field is required. This service id is already in use. + The value does not match the pattern <service_id>[.<realm_name>.<zone_name>]. + MDS service id must start with a letter and contain alphanumeric characters or '.', '-', and '_' diff --cc src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.ts index cfe2bb5b28dcb,4c400a01861ca..83bb099fb4151 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.ts @@@ -28,9 -28,9 +28,10 @@@ import { TaskWrapperService } from '~/a }) export class ServiceFormComponent extends CdForm implements OnInit { readonly RGW_SVC_ID_PATTERN = /^([^.]+)(\.([^.]+)\.([^.]+))?$/; + readonly MDS_SVC_ID_PATTERN = /^[a-zA-Z_.-][a-zA-Z0-9_.-]*$/; readonly SNMP_DESTINATION_PATTERN = /^[^\:]+:[0-9]/; readonly SNMP_ENGINE_ID_PATTERN = /^[0-9A-Fa-f]{10,64}/g; + readonly INGRESS_SUPPORTED_SERVICE_TYPES = ['rgw', 'nfs']; @ViewChild(NgbTypeahead, { static: false }) typeahead: NgbTypeahead;