From ce341cfba931468fb64ee069817832c5dee5eee3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stephan=20M=C3=BCller?= Date: Fri, 21 Sep 2018 10:08:19 +0200 Subject: [PATCH] mgr/dashboard: Unset any compression setting for pools in UI MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The dashboard API now can delete all compression options if the compression mode is set to 'unset' during edit. Other dismissed options will be overwritten with the reset value on submit, which will cause the deletion of the previously set settings. Fixes: https://tracker.ceph.com/issues/36355 Signed-off-by: Stephan Müller --- .../app/ceph/pool/pool-form/pool-form-info.ts | 1 + .../pool/pool-form/pool-form.component.html | 10 --- .../pool-form/pool-form.component.spec.ts | 84 +++++++++++++++---- .../pool/pool-form/pool-form.component.ts | 57 ++++++++----- 4 files changed, 104 insertions(+), 48 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form-info.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form-info.ts index 931083b0f6d..e1e56eadfce 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form-info.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form-info.ts @@ -4,6 +4,7 @@ export class PoolFormInfo { pool_names: string[]; osd_count: number; is_all_bluestore: boolean; + bluestore_compression_algorithm: string; compression_algorithms: string[]; compression_modes: string[]; crush_rules_replicated: CrushRule[]; diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.html index 7299a5c5676..f67bbdbba72 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-form/pool-form.component.html @@ -317,10 +317,6 @@ id="mode" name="mode" formControlName="mode"> - -