Skip to content

Commit

Permalink
mgr/dashboard: ingress backend service should list all supported serv…
Browse files Browse the repository at this point in the history
…ices

Fixes: https://tracker.ceph.com/issues/56478
Signed-off-by: Avan Thakkar <[email protected]>
  • Loading branch information
avanthakkar committed Jul 7, 2022
1 parent 74f6ce7 commit 3211852
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 3211852

Please sign in to comment.