From 960c17aa1b4cc3c7470437ccb295b8b43a3b946f Mon Sep 17 00:00:00 2001 From: Tatjana Dehler Date: Wed, 22 Aug 2018 15:18:57 +0200 Subject: [PATCH] mgr/dashboard: add create functionality to the frontend Add the missing functionality to create config options and related tests to the frontend. Fixes: http://tracker.ceph.com/issues/24455 Signed-off-by: Tatjana Dehler --- .../frontend/src/app/app-routing.module.ts | 2 +- ...configuration-form-create-request.model.ts | 4 ++ .../configuration-form.component.html | 5 ++ .../configuration-form.component.spec.ts | 10 +++- .../configuration-form.component.ts | 50 ++++++++++++++++++- .../navigation/navigation.component.html | 2 +- .../shared/api/configuration.service.spec.ts | 14 ++++++ .../app/shared/api/configuration.service.ts | 5 ++ 8 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-form/configuration-form-create-request.model.ts diff --git a/src/pybind/mgr/dashboard/frontend/src/app/app-routing.module.ts b/src/pybind/mgr/dashboard/frontend/src/app/app-routing.module.ts index 84af029ac4c0d..8347dfae39022 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/app-routing.module.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/app-routing.module.ts @@ -78,7 +78,7 @@ const routes: Routes = [ }, { path: 'configuration', - data: { breadcrumbs: 'Cluster/Configuration Documentation' }, + data: { breadcrumbs: 'Cluster/Configuration' }, children: [ { path: '', component: ConfigurationComponent }, { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-form/configuration-form-create-request.model.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-form/configuration-form-create-request.model.ts new file mode 100644 index 0000000000000..bca65a887c5d0 --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-form/configuration-form-create-request.model.ts @@ -0,0 +1,4 @@ +export class ConfigFormCreateRequestModel { + name: string; + value: Array = []; +} diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-form/configuration-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-form/configuration-form.component.html index 74edf15e8d680..ea467161a3089 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-form/configuration-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/configuration/configuration-form/configuration-form.component.html @@ -154,6 +154,11 @@