From 240b13fac0a92027629172dcc6958d186193c174 Mon Sep 17 00:00:00 2001 From: Timothy Sullivan <tsullivan@elastic.co> Date: Thu, 23 Apr 2020 12:23:34 -0700 Subject: [PATCH] fix the comments and type keys to reflect the data model --- .../plugins/reporting/server/usage/get_reporting_usage.ts | 2 +- x-pack/legacy/plugins/reporting/server/usage/types.d.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/legacy/plugins/reporting/server/usage/get_reporting_usage.ts b/x-pack/legacy/plugins/reporting/server/usage/get_reporting_usage.ts index 1ee2e2e2d6844..2c3bb8f4bf71c 100644 --- a/x-pack/legacy/plugins/reporting/server/usage/get_reporting_usage.ts +++ b/x-pack/legacy/plugins/reporting/server/usage/get_reporting_usage.ts @@ -39,7 +39,7 @@ const PRINTABLE_PDF_JOBTYPE = 'printable_pdf'; const getKeyCount = (buckets: KeyCountBucket[]): { [key: string]: number } => buckets.reduce((accum, { key, doc_count: count }) => ({ ...accum, [key]: count }), {}); -// indexes some key/count buckets by statusType > appName > jobType: statusCount +// indexes some key/count buckets by statusType > jobType > appName: statusCount const getAppStatuses = (buckets: StatusByAppBucket[]) => buckets.reduce((statuses, statusBucket) => { return { diff --git a/x-pack/legacy/plugins/reporting/server/usage/types.d.ts b/x-pack/legacy/plugins/reporting/server/usage/types.d.ts index 91a12bfb2799d..83f1701863355 100644 --- a/x-pack/legacy/plugins/reporting/server/usage/types.d.ts +++ b/x-pack/legacy/plugins/reporting/server/usage/types.d.ts @@ -79,8 +79,8 @@ interface StatusCounts { interface StatusByAppCounts { [statusType: string]: { - [appType: string]: { - [jobType: string]: number; + [jobType: string]: { + [appName: string]: number; }; }; }