From 55efded0a95c0c0944bc3c4f8d2e051815080c13 Mon Sep 17 00:00:00 2001 From: Pedro Gonzalez Gomez Date: Tue, 30 Sep 2025 21:00:35 +0200 Subject: [PATCH] mgr/dashboard: carbonize smb service custom_dns input Fixes: https://tracker.ceph.com/issues/73319 Signed-off-by: Pedro Gonzalez Gomez --- .../src/app/ceph/cluster/cluster.module.ts | 4 ++- .../service-form/service-form.component.html | 24 ++++----------- .../service-form.component.spec.ts | 5 +++- .../service-form/service-form.component.ts | 2 +- .../text-label-list.component.html | 30 +++++++++---------- .../text-label-list.component.ts | 12 ++++---- 6 files changed, 35 insertions(+), 42 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/cluster.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/cluster.module.ts index 2ccf7a4e4894a..75d1fa15155e7 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/cluster.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/cluster.module.ts @@ -84,6 +84,7 @@ import { MultiClusterFormComponent } from './multi-cluster/multi-cluster-form/mu import { MultiClusterListComponent } from './multi-cluster/multi-cluster-list/multi-cluster-list.component'; import { DashboardV3Module } from '../dashboard-v3/dashboard-v3.module'; import { MultiClusterDetailsComponent } from './multi-cluster/multi-cluster-details/multi-cluster-details.component'; +import { TextLabelListComponent } from '~/app/shared/components/text-label-list/text-label-list.component'; @NgModule({ imports: [ @@ -117,7 +118,8 @@ import { MultiClusterDetailsComponent } from './multi-cluster/multi-cluster-deta ListModule, ToggletipModule, IconModule, - TagModule + TagModule, + TextLabelListComponent ], declarations: [ MonitorComponent, diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.html index 654f6d858bd93..4625f2850259a 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.html @@ -556,24 +556,12 @@ -
- -
- -
+
+ +
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.spec.ts index c6bd579489b2b..b7aaea30aca2c 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/services/service-form/service-form.component.spec.ts @@ -539,7 +539,10 @@ x4Ea7kGVgx9kWh5XjWz9wjZvY49UKIT5ppIAWPMbLl3UpfckiuNhTA== unmanaged: false, service_id: 'foo', cluster_id: 'cluster_foo', - config_uri: 'rados://.smb/foo/scc.toml' + config_uri: 'rados://.smb/foo/scc.toml', + custom_dns: null, + join_sources: undefined, + user_sources: undefined }); }); }); 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 e1228f5ef90ac..147dd0c8f256b 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 @@ -1213,7 +1213,7 @@ export class ServiceFormComponent extends CdForm implements OnInit { (serviceSpec['features'] = serviceSpec['features'] || []).push(feature); } } - serviceSpec['custom_dns'] = values['custom_dns']?.trim(); + serviceSpec['custom_dns'] = values['custom_dns']; serviceSpec['join_sources'] = values['join_sources']?.trim(); serviceSpec['user_sources'] = values['user_sources']?.trim(); serviceSpec['include_ceph_users'] = values['include_ceph_users']?.trim(); diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/text-label-list/text-label-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/text-label-list/text-label-list.component.html index bebe032b40e30..0a3a2016a78b8 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/text-label-list/text-label-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/text-label-list/text-label-list.component.html @@ -2,20 +2,20 @@ -
- - @if ($index > 0 ) { - - - - } -
- {{$index === 0 ? label : ''}} +
+ + @if ($index > 0 ) { + + + + } +
+ {{$index === 0 ? label : ''}}
} diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/text-label-list/text-label-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/text-label-list/text-label-list.component.ts index 7e66739648419..2d1680dfe7194 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/components/text-label-list/text-label-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/components/text-label-list/text-label-list.component.ts @@ -27,12 +27,12 @@ import { ComponentsModule } from '../components.module'; ] }) export class TextLabelListComponent implements ControlValueAccessor { - @Input() - label: string = ''; - @Input() - helperText: string = ''; - @Input() - placeholder: string = ''; + // Label for the text list. + @Input() label: string = ''; + // Optional helper text that appears under the label. + @Input() helperText: string = ''; + // Value displayed if no item is present. + @Input() placeholder: string = ''; values: string[] = ['']; disabled: boolean = false; -- 2.39.5