Skip to content

Commit fdfee52

Browse files
[9.1] [Security Solution] Update Related Interations input placeholder and validation message (#225775) (#226392)
# Backport This will backport the following commits from `main` to `9.1`: - [[Security Solution] Update Related Interations input placeholder and validation message (#225775)](#225775) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Nikita Indik","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-07-03T10:58:25Z","message":"[Security Solution] Update Related Interations input placeholder and validation message (#225775)\n\n**Resolves: https://github.com/elastic/kibana/issues/200079**\n\n## Summary\nThis PR updates a placeholder and a validation message in the edit\ncomponent for Related Integration.\n\n## Changes\n- Changed the placeholder text from \"Semver\" to \"Enter version.\"\n- Updated the \"required field\" validation message to include an example\ninput.\n- Removed the placeholder for disabled fields, as users cannot enter\nanything there until they choose the integration.\n\n## Screenshots\n**Before**\n<img width=\"925\" alt=\"ri_before\"\nsrc=\"https://github.com/user-attachments/assets/0a3b18da-1e03-4b8c-a6b0-8bd6e5b005b5\"\n/>\n\n**After**\n<img width=\"926\" alt=\"ri_after\"\nsrc=\"https://github.com/user-attachments/assets/e335bbcd-6f95-4862-9444-d1d2cb2ffabb\"\n/>","sha":"3215660d08b09eaea2ab95b46404a098bb961a18","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Detections and Resp","Team: SecuritySolution","Team:Detection Rule Management","Feature:Related Integrations","backport:version","v9.1.0","v8.19.0","v9.2.0","v8.18.4","v9.0.4"],"title":"[Security Solution] Update Related Interations input placeholder and validation message","number":225775,"url":"https://github.com/elastic/kibana/pull/225775","mergeCommit":{"message":"[Security Solution] Update Related Interations input placeholder and validation message (#225775)\n\n**Resolves: https://github.com/elastic/kibana/issues/200079**\n\n## Summary\nThis PR updates a placeholder and a validation message in the edit\ncomponent for Related Integration.\n\n## Changes\n- Changed the placeholder text from \"Semver\" to \"Enter version.\"\n- Updated the \"required field\" validation message to include an example\ninput.\n- Removed the placeholder for disabled fields, as users cannot enter\nanything there until they choose the integration.\n\n## Screenshots\n**Before**\n<img width=\"925\" alt=\"ri_before\"\nsrc=\"https://github.com/user-attachments/assets/0a3b18da-1e03-4b8c-a6b0-8bd6e5b005b5\"\n/>\n\n**After**\n<img width=\"926\" alt=\"ri_after\"\nsrc=\"https://github.com/user-attachments/assets/e335bbcd-6f95-4862-9444-d1d2cb2ffabb\"\n/>","sha":"3215660d08b09eaea2ab95b46404a098bb961a18"}},"sourceBranch":"main","suggestedTargetBranches":["9.1","8.19","8.18","9.0"],"targetPullRequestStates":[{"branch":"9.1","label":"v9.1.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/225775","number":225775,"mergeCommit":{"message":"[Security Solution] Update Related Interations input placeholder and validation message (#225775)\n\n**Resolves: https://github.com/elastic/kibana/issues/200079**\n\n## Summary\nThis PR updates a placeholder and a validation message in the edit\ncomponent for Related Integration.\n\n## Changes\n- Changed the placeholder text from \"Semver\" to \"Enter version.\"\n- Updated the \"required field\" validation message to include an example\ninput.\n- Removed the placeholder for disabled fields, as users cannot enter\nanything there until they choose the integration.\n\n## Screenshots\n**Before**\n<img width=\"925\" alt=\"ri_before\"\nsrc=\"https://github.com/user-attachments/assets/0a3b18da-1e03-4b8c-a6b0-8bd6e5b005b5\"\n/>\n\n**After**\n<img width=\"926\" alt=\"ri_after\"\nsrc=\"https://github.com/user-attachments/assets/e335bbcd-6f95-4862-9444-d1d2cb2ffabb\"\n/>","sha":"3215660d08b09eaea2ab95b46404a098bb961a18"}},{"branch":"8.18","label":"v8.18.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"9.0","label":"v9.0.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Nikita Indik <[email protected]>
1 parent 47a652a commit fdfee52

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/related_integrations/related_integration_field.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export function RelatedIntegrationField({
9797
);
9898

9999
const hasError = Boolean(packageErrorMessage) || Boolean(versionErrorMessage);
100+
const isVersionInputDisabled = !field.value.package || !integrations;
100101

101102
return (
102103
<EuiFormRow
@@ -123,10 +124,12 @@ export function RelatedIntegrationField({
123124
</EuiFlexItem>
124125
<EuiFlexItem grow={3} className={MIN_WIDTH_VERSION_CONSTRAIN_STYLE}>
125126
<EuiFieldText
126-
placeholder={i18n.RELATED_INTEGRATION_VERSION_DEPENDENCY_PLACEHOLDER}
127+
placeholder={
128+
isVersionInputDisabled ? '' : i18n.RELATED_INTEGRATION_VERSION_DEPENDENCY_PLACEHOLDER
129+
}
127130
prepend={i18n.INTEGRATION_VERSION}
128131
isLoading={isInitialLoading}
129-
disabled={!field.value.package || !integrations}
132+
disabled={isVersionInputDisabled}
130133
aria-label={i18n.RELATED_INTEGRATION_VERSION_DEPENDENCY_ARIA_LABEL}
131134
value={field.value.version}
132135
onChange={handleVersionChange}

x-pack/solutions/security/plugins/security_solution/public/detection_engine/rule_creation/components/related_integrations/translations.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export const RELATED_INTEGRATION_VERSION_DEPENDENCY_ARIA_LABEL = i18n.translate(
3838
export const RELATED_INTEGRATION_VERSION_DEPENDENCY_PLACEHOLDER = i18n.translate(
3939
'xpack.securitySolution.detectionEngine.ruleDescription.relatedIntegrations.relatedIntegrationVersionDependencyPlaceholder',
4040
{
41-
defaultMessage: 'Semver',
41+
defaultMessage: 'Enter version',
4242
}
4343
);
4444

@@ -73,7 +73,7 @@ export const INTEGRATION_REQUIRED = i18n.translate(
7373
export const VERSION_DEPENDENCY_REQUIRED = i18n.translate(
7474
'xpack.securitySolution.detectionEngine.ruleDescription.relatedIntegrations.validation.versionRequired',
7575
{
76-
defaultMessage: 'Version constraint must be specified',
76+
defaultMessage: 'Version constraint must be specified. For example, ^1.2.3.',
7777
}
7878
);
7979

0 commit comments

Comments
 (0)