From: Ernesto Puerta Date: Fri, 11 Mar 2022 16:29:07 +0000 (+0100) Subject: mgr/dashboard: fix wrong pg status processing X-Git-Tag: v16.2.11~573^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F46228%2Fhead;p=ceph.git mgr/dashboard: fix wrong pg status processing Fixes: https://tracker.ceph.com/issues/54481 Signed-off-by: Ernesto Puerta (cherry picked from commit 206dd9d4a71a70c46972597a838fda05ceec03da) --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/pg-category.service.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/pg-category.service.spec.ts index 302c3e202c6f..2b3e2975c4f8 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/pg-category.service.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/pg-category.service.spec.ts @@ -35,6 +35,7 @@ describe('PgCategoryService', () => { it(PgCategory.CATEGORY_WORKING, () => { testMethod('clean+scrubbing', PgCategory.CATEGORY_WORKING); + testMethod('active+clean+snaptrim_wait', PgCategory.CATEGORY_WORKING); testMethod( ' 8 active+clean+scrubbing+deep, 255 active+clean ', PgCategory.CATEGORY_WORKING diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/pg-category.service.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/pg-category.service.ts index d9c90e8b24e9..ae178ded2769 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/pg-category.service.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/pg-category.service.ts @@ -54,7 +54,7 @@ export class PgCategoryService { private getPgStatesFromText(pgStatesText: string) { const pgStates = pgStatesText - .replace(/[^a-z]+/g, ' ') + .replace(/[^a-z_]+/g, ' ') .trim() .split(' ');