From 774dab48f3974a6b8f48fd848f191864650ea763 Mon Sep 17 00:00:00 2001 From: Avan Thakkar Date: Wed, 6 Jul 2022 14:54:26 +0530 Subject: [PATCH] mgr/dashboard: ingress backend service should list all supported services Resolves: rhbz#2102776 Fixes: https://tracker.ceph.com/issues/56478 Signed-off-by: Avan Thakkar (cherry picked from commit 32118522cb71722c3cc20a1e1a9ca9ffdf7897e4) --- .../services/service-form/service-form.component.html | 2 +- .../cluster/services/service-form/service-form.component.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git 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 index a3e19ee3112c3..35f61965710e4 100644 --- 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 @@ -52,7 +52,7 @@ i18n>-- No service available -- + i18n>-- Select an existing service -- diff --git 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 index 4d964575eec18..652464bbc8756 100644 --- 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 @@ -30,6 +30,7 @@ export class ServiceFormComponent extends CdForm implements OnInit { readonly RGW_SVC_ID_PATTERN = /^([^.]+)(\.([^.]+)\.([^.]+))?$/; 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; @@ -343,7 +344,9 @@ export class ServiceFormComponent extends CdForm implements OnInit { this.pools = resp; }); this.cephServiceService.list().subscribe((services: CephServiceSpec[]) => { - this.services = services.filter((service: any) => service.service_type === 'rgw'); + this.services = services.filter((service: any) => + this.INGRESS_SUPPORTED_SERVICE_TYPES.includes(service.service_type) + ); }); if (this.editing) { -- 2.39.5