From: Avan Thakkar Date: Mon, 25 Jul 2022 10:34:00 +0000 (+0530) Subject: mgr/dashboard: add required validation for frontend and monitor port X-Git-Tag: v17.2.4~143^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F47356%2Fhead;p=ceph.git mgr/dashboard: add required validation for frontend and monitor port Fixes: https://tracker.ceph.com/issues/56688 Signed-off-by: Avan Thakkar (cherry picked from commit ea770fd858cae9a8b52c60b293f48cc4dbc925f8) --- 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 652464bbc875..994b5ff8b335 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 @@ -177,8 +177,26 @@ export class ServiceFormComponent extends CdForm implements OnInit { }) ] ], - frontend_port: [null, [CdValidators.number(false)]], - monitor_port: [null, [CdValidators.number(false)]], + frontend_port: [ + null, + [ + CdValidators.number(false), + CdValidators.requiredIf({ + service_type: 'ingress', + unmanaged: false + }) + ] + ], + monitor_port: [ + null, + [ + CdValidators.number(false), + CdValidators.requiredIf({ + service_type: 'ingress', + unmanaged: false + }) + ] + ], virtual_interface_networks: [null], // RGW, Ingress & iSCSI ssl: [false],