File tree Expand file tree Collapse file tree
x-pack/platform/plugins/shared/fleet/public/applications/integrations/sections/epm/screens/detail/components Expand file tree Collapse file tree Original file line number Diff line number Diff 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 [ ] ;
You can’t perform that action at this time.
0 commit comments