Skip to content

Commit

Permalink
hide annotations from observability overview
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed May 31, 2022
1 parent 3db5890 commit b35ae1b
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export function UXSection({ bucketSize }: Props) {
breakdown: SERVICE_NAME,
dataType: 'ux' as AppDataType,
selectedMetricField: TRANSACTION_DURATION,
showPercentileAnnotations: false,
},
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export enum URL_KEYS {
HIDDEN = 'h',
NAME = 'n',
COLOR = 'c',
SHOW_PERCENTILE_ANNOTATIONS = 'spa',
}

export const ALL_VALUES_SELECTED = 'ALL_VALUES';
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ export interface LayerConfig {
selectedMetricField: string;
color: string;
name: string;
showPercentileAnnotations?: boolean;
}

export class LensAttributes {
Expand Down Expand Up @@ -600,7 +601,8 @@ export class LensAttributes {
columnFilters,
timeScale,
paramFilters,
showPercentileAnnotations,
showPercentileAnnotations:
layerConfig.showPercentileAnnotations ?? showPercentileAnnotations,
};
} else {
const fieldMeta = layerConfig.indexPattern.getFieldByName(sourceField);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export function getSyntheticsDistributionConfig({ series, dataView }: ConfigProp
label: MONITORS_DURATION_LABEL,
id: MONITOR_DURATION_US,
field: MONITOR_DURATION_US,
showPercentileAnnotations: true,
},
{
label: LCP_LABEL,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export function getLayerConfigs(
reportDefinitions: series.reportDefinitions ?? {},
selectedMetricField: series.selectedMetricField,
color: series.color ?? (theme.eui as unknown as Record<string, string>)[color],
showPercentileAnnotations: series.showPercentileAnnotations,
});
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export function useSeriesStorage() {
}

function convertFromShortUrl(newValue: ShortUrlSeries): SeriesUrl {
const { dt, op, st, bd, ft, time, rdf, mt, h, n, c, ...restSeries } = newValue;
const { dt, op, st, bd, ft, time, rdf, mt, h, n, c, spa, ...restSeries } = newValue;
return {
operationType: op,
seriesType: st,
Expand All @@ -165,6 +165,7 @@ function convertFromShortUrl(newValue: ShortUrlSeries): SeriesUrl {
hidden: h,
name: n,
color: c,
showPercentileAnnotations: spa,
...restSeries,
};
}
Expand All @@ -180,6 +181,7 @@ interface ShortUrlSeries {
[URL_KEYS.HIDDEN]?: boolean;
[URL_KEYS.NAME]: string;
[URL_KEYS.COLOR]?: string;
[URL_KEYS.SHOW_PERCENTILE_ANNOTATIONS]?: boolean;
time?: {
to: string;
from: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export interface SeriesUrl {
textReportDefinitions?: URLTextReportDefinition;
selectedMetricField?: string;
hidden?: boolean;
showPercentileAnnotations?: boolean;
color?: string;
}

Expand Down

0 comments on commit b35ae1b

Please sign in to comment.