mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Fix navigation when creating inline policy from integrations screen (#124835)
This commit is contained in:
parent
3c15a5d44b
commit
93315ba23a
1 changed files with 9 additions and 2 deletions
|
@ -24,7 +24,7 @@ import {
|
|||
import type { EuiStepProps } from '@elastic/eui/src/components/steps/step';
|
||||
import { safeLoad } from 'js-yaml';
|
||||
|
||||
import { splitPkgKey } from '../../../../../../common';
|
||||
import { PLUGIN_ID, splitPkgKey } from '../../../../../../common';
|
||||
import type {
|
||||
AgentPolicy,
|
||||
NewPackagePolicy,
|
||||
|
@ -317,7 +317,14 @@ export const CreatePackagePolicyPage: React.FunctionComponent = () => {
|
|||
mappingOptions: routeState.onSaveQueryParams,
|
||||
paramsToApply,
|
||||
});
|
||||
navigateToApp(appId, { ...options, path: pathWithQueryString });
|
||||
|
||||
// In the case of a new policy creation, we always navigate to the Fleet agent policy details page
|
||||
// for the newly-created policy
|
||||
if (wasNewAgentPolicyCreated) {
|
||||
navigateToApp(PLUGIN_ID, { ...options, path: pathWithQueryString });
|
||||
} else {
|
||||
navigateToApp(appId, { ...options, path: pathWithQueryString });
|
||||
}
|
||||
} else {
|
||||
navigateToApp(...routeState.onSaveNavigateTo);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue