From ea770fd858cae9a8b52c60b293f48cc4dbc925f8 Mon Sep 17 00:00:00 2001 From: Avan Thakkar Date: Mon, 25 Jul 2022 16:04:00 +0530 Subject: [PATCH] mgr/dashboard: add required validation for frontend and monitor port Fixes: https://tracker.ceph.com/issues/56688 Signed-off-by: Avan Thakkar --- .../service-form/service-form.component.ts | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) 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 652464bbc87..994b5ff8b33 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],