]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: ingress backend service should list all supported services
authorAvan Thakkar <athakkar@redhat.com>
Wed, 6 Jul 2022 09:24:26 +0000 (14:54 +0530)
committerKen Dreyer <kdreyer@redhat.com>
Mon, 1 Aug 2022 20:29:34 +0000 (20:29 +0000)
Resolves: rhbz#2102776

Fixes: https://tracker.ceph.com/issues/56478
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
(cherry picked from commit 32118522cb71722c3cc20a1e1a9ca9ffdf7897e4)

src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.ts

index a3e19ee3112c3d28a3ec630ada446adca026d0a7..35f61965710e446507bffb0b23b133a1c6ca6e2f 100644 (file)
@@ -52,7 +52,7 @@
                         i18n>-- No service available --</option>
                 <option *ngIf="services !== null && services.length > 0"
                         [ngValue]="null"
-                        i18n>-- Select an existing RGW service --</option>
+                        i18n>-- Select an existing service --</option>
                 <option *ngFor="let service of services"
                         [value]="service.service_name">{{ service.service_name }}</option>
               </select>
index 4d964575eec1811aa0ad9a574c0448eec95aad0a..652464bbc875609a235ef53ebe3e21761dbd706e 100644 (file)
@@ -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) {