From 177e2df47e6ad1d0e942d6d3657007b6a8111792 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stephan=20M=C3=BCller?= Date: Fri, 29 Jun 2018 14:08:49 +0200 Subject: [PATCH] mgr/dashboard: Add pool type definition MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Adds pool type definition which is used in pool listing. Fixes: https://tracker.ceph.com/issues/36355 Signed-off-by: Stephan Müller --- .../pool/pool-list/pool-list.component.html | 7 ++- .../pool/pool-list/pool-list.component.ts | 5 +- .../frontend/src/app/ceph/pool/pool.ts | 59 +++++++++++++++++++ 3 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool.ts diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.html index c3595fdaa6726..1f3f5f2d284ca 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.html @@ -2,12 +2,15 @@ - + diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.ts index 0adbe9c19b65e..6da0a6bfb6fad 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool-list/pool-list.component.ts @@ -4,6 +4,7 @@ import { PoolService } from '../../../shared/api/pool.service'; import { CdTableColumn } from '../../../shared/models/cd-table-column'; import { CdTableFetchDataContext } from '../../../shared/models/cd-table-fetch-data-context'; import { CdTableSelection } from '../../../shared/models/cd-table-selection'; +import { Pool } from '../pool'; @Component({ selector: 'cd-pool-list', @@ -11,7 +12,7 @@ import { CdTableSelection } from '../../../shared/models/cd-table-selection'; styleUrls: ['./pool-list.component.scss'] }) export class PoolListComponent { - pools = []; + pools: Pool[] = []; columns: CdTableColumn[]; selection = new CdTableSelection(); @@ -69,7 +70,7 @@ export class PoolListComponent { getPoolList(context: CdTableFetchDataContext) { this.poolService.getList().subscribe( - (pools: any[]) => { + (pools: Pool[]) => { this.pools = pools; }, () => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool.ts new file mode 100644 index 0000000000000..28a5bfd3a3d44 --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/pool/pool.ts @@ -0,0 +1,59 @@ +export class Pool { + cache_target_full_ratio_micro: number; + fast_read: boolean; + stripe_width: number; + flags_names: string; + tier_of: number; + hit_set_grade_decay_rate: number; + pg_placement_num: number; + use_gmt_hitset: boolean; + last_force_op_resend_preluminous: string; + quota_max_bytes: number; + erasure_code_profile: string; + expected_num_objects: number; + size: number; + snap_seq: number; + auid: number; + cache_min_flush_age: number; + hit_set_period: number; + min_read_recency_for_promote: number; + target_max_objects: number; + pg_num: number; + type: string; + grade_table: any[]; + pool_name: string; + cache_min_evict_age: number; + snap_mode: string; + cache_mode: string; + min_size: number; + cache_target_dirty_high_ratio_micro: number; + object_hash: number; + application_metadata: string[]; + write_tier: number; + cache_target_dirty_ratio_micro: number; + pool: number; + removed_snaps: string; + crush_rule: string; + tiers: any[]; + hit_set_params: { + type: string; + }; + last_force_op_resend: string; + pool_snaps: any[]; + quota_max_objects: number; + options: { + compression_algorithm?: string; + compression_max_blob_size?: number; + compression_min_blob_size?: number; + compression_mode?: string; + compression_required_ratio?: number; + }; + hit_set_count: number; + flags: number; + target_max_bytes: number; + snap_epoch: number; + hit_set_search_last_n: number; + last_change: string; + min_write_recency_for_promote: number; + read_tier: number; +} -- 2.39.5