mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[8.7] [Synthetics] Do not navigate away from cru before saving or cancelling changes (#152610) (#152965)
# Backport This will backport the following commits from `main` to `8.7`: - [[Synthetics] Do not navigate away from cru before saving or cancelling changes (#152610)](https://github.com/elastic/kibana/pull/152610) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Justin Kambic","email":"jk@elastic.co"},"sourceCommit":{"committedDate":"2023-03-08T21:03:52Z","message":"[Synthetics] Do not navigate away from cru before saving or cancelling changes (#152610)\n\n## Summary\r\n\r\nResolves #152608.\r\n\r\nOpens run once stats in a new tab when we're on the create/edit page.\r\nThis way if the user clicks through, they don't lose their config inputs\r\nfrom the form.\r\n\r\n## Testing\r\n\r\n### Create\r\n\r\n1. Add Monitor\r\n2. Define a step\r\n3. Test the step using the test button at the bottom\r\n4. Click the detail link in your step's row of the table\r\n5. See that a separate tab/window opens instead of navigating from the\r\nexisting page\r\n6. Close the detail page, save your monitor\r\n\r\n### Edit\r\n\r\n1. Edit the monitor you created above\r\n2. Ensure the same flow from _Create_ works\r\n\r\nRefer to the GIF below for more info\r\n\r\n\r\n","sha":"9409550b0a35b3ba179657db76324b8facb6fb19","branchLabelMapping":{"^v8.8.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["bug","Team:uptime","release_note:skip","v8.7.0","v8.8.0"],"number":152610,"url":"https://github.com/elastic/kibana/pull/152610","mergeCommit":{"message":"[Synthetics] Do not navigate away from cru before saving or cancelling changes (#152610)\n\n## Summary\r\n\r\nResolves #152608.\r\n\r\nOpens run once stats in a new tab when we're on the create/edit page.\r\nThis way if the user clicks through, they don't lose their config inputs\r\nfrom the form.\r\n\r\n## Testing\r\n\r\n### Create\r\n\r\n1. Add Monitor\r\n2. Define a step\r\n3. Test the step using the test button at the bottom\r\n4. Click the detail link in your step's row of the table\r\n5. See that a separate tab/window opens instead of navigating from the\r\nexisting page\r\n6. Close the detail page, save your monitor\r\n\r\n### Edit\r\n\r\n1. Edit the monitor you created above\r\n2. Ensure the same flow from _Create_ works\r\n\r\nRefer to the GIF below for more info\r\n\r\n\r\n","sha":"9409550b0a35b3ba179657db76324b8facb6fb19"}},"sourceBranch":"main","suggestedTargetBranches":["8.7"],"targetPullRequestStates":[{"branch":"8.7","label":"v8.7.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.8.0","labelRegex":"^v8.8.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/152610","number":152610,"mergeCommit":{"message":"[Synthetics] Do not navigate away from cru before saving or cancelling changes (#152610)\n\n## Summary\r\n\r\nResolves #152608.\r\n\r\nOpens run once stats in a new tab when we're on the create/edit page.\r\nThis way if the user clicks through, they don't lose their config inputs\r\nfrom the form.\r\n\r\n## Testing\r\n\r\n### Create\r\n\r\n1. Add Monitor\r\n2. Define a step\r\n3. Test the step using the test button at the bottom\r\n4. Click the detail link in your step's row of the table\r\n5. See that a separate tab/window opens instead of navigating from the\r\nexisting page\r\n6. Close the detail page, save your monitor\r\n\r\n### Edit\r\n\r\n1. Edit the monitor you created above\r\n2. Ensure the same flow from _Create_ works\r\n\r\nRefer to the GIF below for more info\r\n\r\n\r\n","sha":"9409550b0a35b3ba179657db76324b8facb6fb19"}}]}] BACKPORT--> Co-authored-by: Justin Kambic <jk@elastic.co>
This commit is contained in:
parent
e339cb85f5
commit
8addcf4e37
2 changed files with 4 additions and 1 deletions
|
@ -17,12 +17,14 @@ export const StepDetailsLinkIcon = ({
|
|||
configId,
|
||||
asButton,
|
||||
label,
|
||||
target = '_self',
|
||||
}: {
|
||||
checkGroup: string;
|
||||
label?: string;
|
||||
configId: string;
|
||||
stepIndex?: number;
|
||||
asButton?: boolean;
|
||||
target?: '_self' | '_blank';
|
||||
}) => {
|
||||
const { basePath } = useSyntheticsSettingsContext();
|
||||
const selectedLocation = useSelectedLocation();
|
||||
|
@ -45,7 +47,7 @@ export const StepDetailsLinkIcon = ({
|
|||
title={VIEW_DETAILS}
|
||||
size="s"
|
||||
href={`${basePath}/app/synthetics/monitor/${configId}/test-run/${checkGroup}/step/${stepIndex}?locationId=${selectedLocation?.id}`}
|
||||
target="_self"
|
||||
target={target}
|
||||
iconType="apmTrace"
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -214,6 +214,7 @@ export const BrowserStepsList = ({
|
|||
checkGroup={item.monitor.check_group}
|
||||
stepIndex={item.synthetics?.step?.index}
|
||||
configId={item.config_id!}
|
||||
target="_blank"
|
||||
/>
|
||||
),
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue