-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
36 changed files
with
1,019 additions
and
380 deletions.
There are no files selected for viewing
58 changes: 0 additions & 58 deletions
58
x-pack/plugins/apm/public/components/app/RumDashboard/CoreVitals/index.tsx
This file was deleted.
Oops, something went wrong.
92 changes: 0 additions & 92 deletions
92
x-pack/plugins/apm/public/components/app/RumDashboard/CoreVitals/translations.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
x-pack/plugins/apm/public/components/app/RumDashboard/UXMetrics/translations.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
|
||
export const FCP_LABEL = i18n.translate('xpack.apm.rum.coreVitals.fcp', { | ||
defaultMessage: 'First contentful paint', | ||
}); | ||
|
||
export const TBT_LABEL = i18n.translate('xpack.apm.rum.coreVitals.tbt', { | ||
defaultMessage: 'Total blocking time', | ||
}); | ||
|
||
export const NO_OF_LONG_TASK = i18n.translate( | ||
'xpack.apm.rum.uxMetrics.noOfLongTasks', | ||
{ | ||
defaultMessage: 'No. of long tasks', | ||
} | ||
); | ||
|
||
export const LONGEST_LONG_TASK = i18n.translate( | ||
'xpack.apm.rum.uxMetrics.longestLongTasks', | ||
{ | ||
defaultMessage: 'Longest long task duration', | ||
} | ||
); | ||
|
||
export const SUM_LONG_TASKS = i18n.translate( | ||
'xpack.apm.rum.uxMetrics.sumLongTasks', | ||
{ | ||
defaultMessage: 'Total long tasks duration', | ||
} | ||
); |
49 changes: 49 additions & 0 deletions
49
x-pack/plugins/apm/public/components/app/RumDashboard/ux_overview_fetchers.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { | ||
FetchDataParams, | ||
HasDataParams, | ||
UxFetchDataResponse, | ||
} from '../../../../../observability/public/'; | ||
import { callApmApi } from '../../../services/rest/createCallApmApi'; | ||
|
||
export { createCallApmApi } from '../../../services/rest/createCallApmApi'; | ||
|
||
export const fetchUxOverviewDate = async ({ | ||
absoluteTime, | ||
relativeTime, | ||
serviceName, | ||
}: FetchDataParams): Promise<UxFetchDataResponse> => { | ||
const data = await callApmApi({ | ||
pathname: '/api/apm/rum-client/web-core-vitals', | ||
params: { | ||
query: { | ||
start: new Date(absoluteTime.start).toISOString(), | ||
end: new Date(absoluteTime.end).toISOString(), | ||
uiFilters: `{"serviceName":["${serviceName}"]}`, | ||
}, | ||
}, | ||
}); | ||
|
||
return { | ||
coreWebVitals: data, | ||
appLink: `/app/ux?rangeFrom=${relativeTime.start}&rangeTo=${relativeTime.end}`, | ||
}; | ||
}; | ||
|
||
export async function hasRumData({ absoluteTime }: HasDataParams) { | ||
return await callApmApi({ | ||
pathname: '/api/apm/observability_overview/has_rum_data', | ||
params: { | ||
query: { | ||
start: new Date(absoluteTime.start).toISOString(), | ||
end: new Date(absoluteTime.end).toISOString(), | ||
uiFilters: '', | ||
}, | ||
}, | ||
}); | ||
} |
Oops, something went wrong.