From: anurag Date: Wed, 11 Mar 2020 14:17:05 +0000 (+0530) Subject: mgr/dashboard: Pool read/write OPS shows too many decimal places X-Git-Tag: v14.2.10~165^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F34039%2Fhead;p=ceph.git 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 --- 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 f5b2397bd454..c0e719d87ecb 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 2998a686ed6d..88c72b34a3f2 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(() => {