Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
shahzad31 committed Aug 1, 2023
1 parent ca2647a commit a5d96ed
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { EuiButton, EuiCallOut } from '@elastic/eui';
import type { PackagePolicyEditExtensionComponentProps } from '@kbn/fleet-plugin/public';
import { useKibana } from '@kbn/kibana-react-plugin/public';
import { useEditMonitorLocator } from './use_edit_monitor_locator';
import { ConfigKey, DataStream } from '../../../../common/runtime_types';
import { DataStream } from '../../../../common/runtime_types';
import { DeprecateNoticeModal } from './deprecate_notice_modal';

/**
Expand All @@ -37,7 +37,12 @@ export const SyntheticsPolicyEditExtensionWrapper = memo<PackagePolicyEditExtens
Object.values(DataStream).includes(stream.data_stream.dataset as DataStream)
)?.vars;

const configId: string = vars?.[ConfigKey.CONFIG_ID]?.value as DataStream;
let configId: string = '';
try {
configId = JSON.parse(vars?.processors.value)[0].add_fields.fields.config_id;
} catch (e) {
// ignore
}

const url = useEditMonitorLocator({ configId, locators });

Expand Down

0 comments on commit a5d96ed

Please sign in to comment.