Skip to content

Commit

Permalink
[Uptime] Added step duraion in step list (#116266)
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 authored Dec 6, 2021
1 parent 55e132b commit 27d0b90
Show file tree
Hide file tree
Showing 24 changed files with 8,291 additions and 166 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface ExploratoryEmbeddableProps {
showCalculationMethod?: boolean;
axisTitlesVisibility?: XYState['axisTitlesVisibilitySettings'];
legendIsVisible?: boolean;
dataTypesIndexPatterns?: Record<AppDataType, string>;
dataTypesIndexPatterns?: Partial<Record<AppDataType, string>>;
reportConfigMap?: ReportConfigMap;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ const buildOrCondition = (values: string[]) => {
}
return `(${values.join(' or ')})`;
};

function addSlashes(str: string) {
return (str + '').replace(/[\\"']/g, '\\$&').replace(/\u0000/g, '\\0');
}

export const urlFiltersToKueryString = (urlFilters: UrlFilter[]): string => {
let kueryString = '';
urlFilters.forEach(({ field, values, notValues, wildcards, notWildcards }) => {
const valuesT = values?.map((val) => `"${val}"`);
const notValuesT = notValues?.map((val) => `"${val}"`);
const valuesT = values?.map((val) => `"${addSlashes(val)}"`);
const notValuesT = notValues?.map((val) => `"${addSlashes(val)}"`);
const wildcardsT = wildcards?.map((val) => `*${val}*`);
const notWildcardsT = notWildcards?.map((val) => `*${val}*`);

Expand Down
4 changes: 4 additions & 0 deletions x-pack/plugins/uptime/common/runtime_types/ping/synthetics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ export const JourneyStepType = t.intersection([
text: t.string,
}),
step: t.type({
status: t.string,
index: t.number,
name: t.string,
duration: t.type({
us: t.number,
}),
}),
isFullScreenshot: t.boolean,
isScreenshotRef: t.boolean,
Expand Down
Binary file not shown.
Loading

0 comments on commit 27d0b90

Please sign in to comment.