diff --git a/src/core/server/status/get_summary_status.test.ts b/src/core/server/status/get_summary_status.test.ts index 0aee718d333cd3..33b2e6f7913a1f 100644 --- a/src/core/server/status/get_summary_status.test.ts +++ b/src/core/server/status/get_summary_status.test.ts @@ -101,15 +101,7 @@ describe('getSummaryStatus', () => { summary: '[s2]: Lorem ipsum', detail: 'See the status page for more information', meta: { - affectedServices: { - s2: { - level: ServiceStatusLevels.unavailable, - summary: 'Lorem ipsum', - meta: { - custom: { data: 'here' }, - }, - }, - }, + affectedServices: ['s2'], }, }); }); @@ -136,17 +128,7 @@ describe('getSummaryStatus', () => { detail: 'Vivamus pulvinar sem ac luctus ultrices.', documentationUrl: 'http://helpmenow.com/problem1', meta: { - affectedServices: { - s2: { - level: ServiceStatusLevels.unavailable, - summary: 'Lorem ipsum', - detail: 'Vivamus pulvinar sem ac luctus ultrices.', - documentationUrl: 'http://helpmenow.com/problem1', - meta: { - custom: { data: 'here' }, - }, - }, - }, + affectedServices: ['s2'], }, }); }); @@ -183,26 +165,7 @@ describe('getSummaryStatus', () => { summary: '[2] services are unavailable', detail: 'See the status page for more information', meta: { - affectedServices: { - s2: { - level: ServiceStatusLevels.unavailable, - summary: 'Lorem ipsum', - detail: 'Vivamus pulvinar sem ac luctus ultrices.', - documentationUrl: 'http://helpmenow.com/problem1', - meta: { - custom: { data: 'here' }, - }, - }, - s3: { - level: ServiceStatusLevels.unavailable, - summary: 'Proin mattis', - detail: 'Nunc quis nulla at mi lobortis pretium.', - documentationUrl: 'http://helpmenow.com/problem2', - meta: { - other: { data: 'over there' }, - }, - }, - }, + affectedServices: ['s2', 's3'], }, }); }); diff --git a/src/core/server/status/get_summary_status.ts b/src/core/server/status/get_summary_status.ts index 627319d3cd4337..9124023148dd16 100644 --- a/src/core/server/status/get_summary_status.ts +++ b/src/core/server/status/get_summary_status.ts @@ -31,7 +31,7 @@ export const getSummaryStatus = ( // TODO: include URL to status page detail: status.detail ?? `See the status page for more information`, meta: { - affectedServices: { [serviceName]: status }, + affectedServices: [serviceName], }, }; } else { @@ -41,7 +41,7 @@ export const getSummaryStatus = ( // TODO: include URL to status page detail: `See the status page for more information`, meta: { - affectedServices: Object.fromEntries(highestStatuses), + affectedServices: highestStatuses.map(([serviceName]) => serviceName), }, }; } diff --git a/src/core/server/status/plugins_status.test.ts b/src/core/server/status/plugins_status.test.ts index 9dc1ddcddca3e8..a6579069acbc0b 100644 --- a/src/core/server/status/plugins_status.test.ts +++ b/src/core/server/status/plugins_status.test.ts @@ -303,12 +303,7 @@ describe('PluginStatusService', () => { summary: '[a]: Status check timed out after 30s', detail: 'See the status page for more information', meta: { - affectedServices: { - a: { - level: ServiceStatusLevels.unavailable, - summary: 'Status check timed out after 30s', - }, - }, + affectedServices: ['a'], }, }, }); diff --git a/src/core/server/status/status_service.test.ts b/src/core/server/status/status_service.test.ts index c7ed1845674489..5559ec9fe2b1ef 100644 --- a/src/core/server/status/status_service.test.ts +++ b/src/core/server/status/status_service.test.ts @@ -252,12 +252,9 @@ describe('StatusService', () => { "detail": "See the status page for more information", "level": degraded, "meta": Object { - "affectedServices": Object { - "savedObjects": Object { - "level": degraded, - "summary": "This is degraded!", - }, - }, + "affectedServices": Array [ + "savedObjects", + ], }, "summary": "[savedObjects]: This is degraded!", }, @@ -305,12 +302,9 @@ describe('StatusService', () => { "detail": "See the status page for more information", "level": degraded, "meta": Object { - "affectedServices": Object { - "savedObjects": Object { - "level": degraded, - "summary": "This is degraded!", - }, - }, + "affectedServices": Array [ + "savedObjects", + ], }, "summary": "[savedObjects]: This is degraded!", },