Skip to content

Commit b7a8104

Browse files
authored
Remove the informational text about allowing only 2 categories in upload integrations (elastic#270427)
This pr removes the informational and incorrect text about allowing only 2 categories on upload integrations.
1 parent 5a1023d commit b7a8104

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

  • x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/detail/components

x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/detail/components/edit_integration_flyout.tsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ export const EditIntegrationFlyout: React.FunctionComponent<{
6767
}) => {
6868
const updateCustomIntegration = useUpdateCustomIntegration;
6969

70+
const isUploadedIntegration =
71+
packageInfo != null &&
72+
'installationInfo' in packageInfo &&
73+
packageInfo.installationInfo?.install_source === 'upload';
74+
7075
// Get all the possible categories
7176
const { data: categoriesData } = useGetCategoriesQuery({
7277
prerelease: false,
@@ -187,10 +192,12 @@ export const EditIntegrationFlyout: React.FunctionComponent<{
187192
/>
188193
}
189194
helpText={
190-
<FormattedMessage
191-
id="xpack.fleet.epm.editIntegrationFlyout.categoriesHelpText"
192-
defaultMessage="You can assign up to two categories to your integration."
193-
/>
195+
!isUploadedIntegration && (
196+
<FormattedMessage
197+
id="xpack.fleet.epm.editIntegrationFlyout.categoriesHelpText"
198+
defaultMessage="You can assign up to two categories to your integration."
199+
/>
200+
)
194201
}
195202
>
196203
<EuiComboBox
@@ -202,7 +209,7 @@ export const EditIntegrationFlyout: React.FunctionComponent<{
202209
options={parentCategories?.map((category) => ({
203210
label: category.title,
204211
value: category.id,
205-
disabled: selectedCategories.length >= 2,
212+
disabled: !isUploadedIntegration && selectedCategories.length >= 2,
206213
}))}
207214
onChange={(selectedOptions) => {
208215
const selectedValues = selectedOptions as SelectOption[];

0 commit comments

Comments
 (0)