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.6~21^2~91^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c460c29bca9a274ff7a9ff46c6be8fa0ad4d68fb;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 652464bbc8756..994b5ff8b3357 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],