Skip to content

Commit

Permalink
[Metrics UI] Add aws.dimensions prefix to AWS metrics in Metrics Expl…
Browse files Browse the repository at this point in the history
…orer (#56216)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
simianhacker and elasticmachine committed Jan 29, 2020
1 parent 02e92e5 commit 180d4da
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions x-pack/legacy/plugins/infra/common/ecs_allowed_list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const DOCKER_ALLOWED_LIST = [
];

export const AWS_S3_ALLOWED_LIST = ['aws.s3'];
export const AWS_METRICS_ALLOWED_LIST = ['aws.cloudwatch'];
export const AWS_METRICS_ALLOWED_LIST = ['aws.dimensions'];

export const getAllowedListForPrefix = memoize((prefix: string) => {
const firstPart = first(prefix.split(/\./));
Expand All @@ -60,11 +60,9 @@ export const getAllowedListForPrefix = memoize((prefix: string) => {
return [...defaultAllowedList, ...K8S_ALLOWED_LIST];
case 'aws':
if (prefix === 'aws.s3_daily_storage') {
return [...defaultAllowedList, ...AWS_S3_ALLOWED_LIST];
}
if (prefix === 'aws.metrics') {
return [...defaultAllowedList, ...AWS_METRICS_ALLOWED_LIST];
return [...defaultAllowedList, ...AWS_S3_ALLOWED_LIST, ...AWS_METRICS_ALLOWED_LIST];
}
return [...defaultAllowedList, ...AWS_METRICS_ALLOWED_LIST];
default:
return defaultAllowedList;
}
Expand Down

0 comments on commit 180d4da

Please sign in to comment.