Skip to content

Commit

Permalink
synthetics - preserve id field on monitor attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
dominiqueclarke committed Oct 3, 2022
1 parent 6f3613b commit eee8593
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
11 changes: 8 additions & 3 deletions x-pack/plugins/synthetics/common/constants/monitor_defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export const DEFAULT_COMMON_FIELDS: CommonFields = {
[ConfigKey.NAMESPACE]: DEFAULT_NAMESPACE_STRING,
[ConfigKey.MONITOR_SOURCE_TYPE]: SourceType.UI,
[ConfigKey.JOURNEY_ID]: '',

// Deprecated, slated to be removed in a future version
[ConfigKey.ID]: '',
};

export const DEFAULT_BROWSER_ADVANCED_FIELDS: BrowserAdvancedFields = {
Expand Down Expand Up @@ -88,15 +91,17 @@ export const DEFAULT_BROWSER_SIMPLE_FIELDS: BrowserSimpleFields = {
[ConfigKey.SOURCE_ZIP_FOLDER]: '',
[ConfigKey.SOURCE_ZIP_PROXY_URL]: '',
[ConfigKey.TEXT_ASSERTION]: '',
[ConfigKey.URLS]: '',
[ConfigKey.FORM_MONITOR_TYPE]: FormMonitorType.MULTISTEP,
[ConfigKey.TIMEOUT]: null,

// Deprecated, slated to be removed in a future version
[ConfigKey.ZIP_URL_TLS_CERTIFICATE_AUTHORITIES]: undefined,
[ConfigKey.ZIP_URL_TLS_CERTIFICATE]: undefined,
[ConfigKey.ZIP_URL_TLS_KEY]: undefined,
[ConfigKey.ZIP_URL_TLS_KEY_PASSPHRASE]: undefined,
[ConfigKey.ZIP_URL_TLS_VERIFICATION_MODE]: undefined,
[ConfigKey.ZIP_URL_TLS_VERSION]: undefined,
[ConfigKey.URLS]: '',
[ConfigKey.FORM_MONITOR_TYPE]: FormMonitorType.MULTISTEP,
[ConfigKey.TIMEOUT]: null,
};

export const DEFAULT_HTTP_SIMPLE_FIELDS: HTTPSimpleFields = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ export enum ConfigKey {
ZIP_URL_TLS_KEY_PASSPHRASE = 'source.zip_url.ssl.key_passphrase',
ZIP_URL_TLS_VERIFICATION_MODE = 'source.zip_url.ssl.verification_mode',
ZIP_URL_TLS_VERSION = 'source.zip_url.ssl.supported_protocols',

// deprecated, slated to be removed in a future version
ID = 'id',
}

export const secretKeys = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export const CommonFieldsCodec = t.intersection([
[ConfigKey.PROJECT_ID]: t.string,
[ConfigKey.ORIGINAL_SPACE]: t.string,
[ConfigKey.CUSTOM_HEARTBEAT_ID]: t.string,
[ConfigKey.ID]: t.string,
}),
]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,5 @@ export const commonNormalizers: CommonNormalizerMap = {
[ConfigKey.PROJECT_ID]: getCommonNormalizer(ConfigKey.PROJECT_ID),
[ConfigKey.CUSTOM_HEARTBEAT_ID]: getCommonNormalizer(ConfigKey.CUSTOM_HEARTBEAT_ID),
[ConfigKey.ORIGINAL_SPACE]: getCommonNormalizer(ConfigKey.ORIGINAL_SPACE),
[ConfigKey.ID]: getCommonNormalizer(ConfigKey.ID),
};

0 comments on commit eee8593

Please sign in to comment.