From cb8637988eeef449b8f04abce028e3b347708221 Mon Sep 17 00:00:00 2001 From: anurag Date: Wed, 11 Mar 2020 19:47:05 +0530 Subject: [PATCH] mgr/dashboard: Pool read/write OPS shows too many decimal places Fixes: https://tracker.ceph.com/issues/39714 Signed-off-by: anurag (cherry picked from commit 27a2bbb12614b7aba0561c027346d9b5427f2405) Signed-off-by: Ernesto Puerta Conflicts: src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.spec.ts, src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table-key-value/table-key-value.component.spec.ts: added import of PipesModule to Angular unit tests Signed-off-by: Ernesto Puerta --- .../table-key-value/table-key-value.component.spec.ts | 3 ++- .../src/app/shared/datatable/table/table.component.html | 2 +- .../src/app/shared/datatable/table/table.component.spec.ts | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-key-value/table-key-value.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-key-value/table-key-value.component.spec.ts index f5b2397bd454d..c0e719d87ecb2 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-key-value/table-key-value.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table-key-value/table-key-value.component.spec.ts @@ -9,6 +9,7 @@ import { ComponentsModule } from '../../components/components.module'; import { CellTemplate } from '../../enum/cell-template.enum'; import { CdTableColumn } from '../../models/cd-table-column'; import { CdDatePipe } from '../../pipes/cd-date.pipe'; +import { PipesModule } from '../../pipes/pipes.module'; import { TableComponent } from '../table/table.component'; import { TableKeyValueComponent } from './table-key-value.component'; @@ -18,7 +19,7 @@ describe('TableKeyValueComponent', () => { configureTestBed({ declarations: [TableComponent, TableKeyValueComponent], - imports: [FormsModule, NgxDatatableModule, ComponentsModule, RouterTestingModule] + imports: [FormsModule, NgxDatatableModule, ComponentsModule, PipesModule, RouterTestingModule] }); beforeEach(() => { diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html index 2998a686ed6d6..88c72b34a3f25 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/datatable/table/table.component.html @@ -165,7 +165,7 @@ - {{ value }} /s + {{ value | dimless }} /s { @@ -33,7 +34,7 @@ describe('TableComponent', () => { configureTestBed({ declarations: [TableComponent], - imports: [NgxDatatableModule, FormsModule, ComponentsModule, RouterTestingModule] + imports: [NgxDatatableModule, FormsModule, ComponentsModule, PipesModule, RouterTestingModule] }); beforeEach(() => { -- 2.39.5