-
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.
Merge branch 'main' into support-prerelease-detection-rules
- Loading branch information
Showing
28 changed files
with
494 additions
and
644 deletions.
There are no files selected for viewing
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
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
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
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
50 changes: 50 additions & 0 deletions
50
...k/plugins/synthetics/public/apps/synthetics/components/step_details_page/route_config.tsx
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,50 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
import React from 'react'; | ||
import { useHistory } from 'react-router-dom'; | ||
import { OutPortal } from 'react-reverse-portal'; | ||
import { StepRunDate } from './step_page_nav'; | ||
import { StepDetailPageStepNav } from './step_number_nav'; | ||
import { StepDetailsStatus } from './step_details_status'; | ||
import { MonitorDetailsLocation } from '../monitor_details/monitor_details_location'; | ||
import { StepDetailPage } from './step_detail_page'; | ||
import { RouteProps } from '../../routes'; | ||
import { SYNTHETICS_STEP_DETAIL_ROUTE } from '../../../../../common/constants'; | ||
import { MonitorDetailsLinkPortalNode } from '../monitor_add_edit/portals'; | ||
import { StepTitle } from './step_title'; | ||
|
||
export const getStepDetailsRoute = ( | ||
history: ReturnType<typeof useHistory>, | ||
syntheticsPath: string, | ||
baseTitle: string | ||
): RouteProps => { | ||
return { | ||
title: i18n.translate('xpack.synthetics.stepDetailsRoute.title', { | ||
defaultMessage: 'Step details | {baseTitle}', | ||
values: { baseTitle }, | ||
}), | ||
path: SYNTHETICS_STEP_DETAIL_ROUTE, | ||
component: StepDetailPage, | ||
dataTestSubj: 'syntheticsMonitorEditPage', | ||
pageHeader: { | ||
pageTitle: <StepTitle />, | ||
rightSideItems: [ | ||
<StepRunDate />, | ||
<MonitorDetailsLocation isDisabled={true} />, | ||
<StepDetailsStatus />, | ||
<StepDetailPageStepNav />, | ||
], | ||
breadcrumbs: [ | ||
{ | ||
text: <OutPortal node={MonitorDetailsLinkPortalNode} />, | ||
}, | ||
], | ||
}, | ||
}; | ||
}; |
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
30 changes: 30 additions & 0 deletions
30
...ns/synthetics/public/apps/synthetics/components/step_details_page/step_details_status.tsx
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,30 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
import React from 'react'; | ||
|
||
import { EuiDescriptionList, EuiLoadingContent } from '@elastic/eui'; | ||
import { parseBadgeStatus, StatusBadge } from '../common/monitor_test_result/status_badge'; | ||
import { useJourneySteps } from '../monitor_details/hooks/use_journey_steps'; | ||
import { STATUS_LABEL } from '../common/components/monitor_status'; | ||
|
||
export const StepDetailsStatus = () => { | ||
const { currentStep } = useJourneySteps(); | ||
|
||
let content = <EuiLoadingContent lines={1} />; | ||
|
||
if (currentStep?.synthetics.step?.status) { | ||
content = <StatusBadge status={parseBadgeStatus(currentStep.synthetics.step?.status)} />; | ||
} | ||
|
||
return ( | ||
<EuiDescriptionList | ||
align="left" | ||
compressed={false} | ||
listItems={[{ title: STATUS_LABEL, description: content }]} | ||
/> | ||
); | ||
}; |
Oops, something went wrong.