[backend/frontend] feat(integrations): add ability to update multiple images, demo and datasheet url (#1404)#1826
[backend/frontend] feat(integrations): add ability to update multiple images, demo and datasheet url (#1404)#1826Kroustille wants to merge 25 commits intodevelopmentfrom
Conversation
Summary
Insights
Suites35 passed, 0 failed, and 0 other
🎉 No failed tests in this run. | 🍂 No flaky tests in this run. Github Test Reporter by CTRF 💚 🔄 This comment has been updated |
2a5ba16 to
bd6f9b3
Compare
There was a problem hiding this comment.
Pull request overview
This PR extends the integration and connector service forms to support updating multiple images, and adds datasheet_url and demo_url fields to all integration types. It refactors shared form field logic into a centralized useServiceFormFields hook (renamed from useSimpleServiceFormField), adds a new ConnectorForm for editing connectors, introduces the DocumentSourceType enum to distinguish internal vs. external images, and adds a carousel to connector slug views.
Changes:
- Added
datasheet_urlanddemo_urlfields across all integration types (schema, resolvers, metadata, forms, detail views, i18n) - Refactored image handling to differentiate between
internalandexternalsource types, including a migration to mark existing connector images as external - Created a
ConnectorFormcomponent and enabled connector editing/updating in the UI, previously restricted
Reviewed changes
Copilot reviewed 56 out of 58 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
apps/portal-api/src/modules/services/document/opencti/integrations/integrations.graphql |
Added datasheet_url and demo_url to all integration GraphQL types |
apps/portal-api/src/modules/services/document/opencti/integrations/integrations.model.ts |
Added datasheet_url/demo_url metadata keys and typed Integration |
apps/portal-api/src/modules/services/document/document.graphql |
Added DocumentSourceType enum and source_type to ShareableResource |
apps/portal-api/src/modules/services/document/document.app.ts |
Added boolean metadata conversion, renamed upsertDocument to upsertDocumentWithExternalImage |
apps/portal-api/src/modules/services/document/document.helper.ts |
Added BOOLEAN_METADATA, INTEGRATION_CONNECTOR_METADATA, fixed file.name → file.filename |
apps/portal-api/src/modules/services/document/domain/document.children.domain.ts |
Refactored to support sourceType param, renamed methods for external image handling |
apps/portal-api/src/modules/services/document/document.resolver.ts |
Added ShareableResource type cast for children_documents |
apps/portal-api/src/modules/ingest-manifest/ingest-manifest.helper.ts |
Use DocumentSourceType.External enum value |
apps/portal-api/src/modules/ingest-manifest/ingest-manifest.domain.ts |
Use renamed upsertDocumentWithExternalImage |
apps/portal-api/src/modules/services/public_roadmap/epic.app.ts |
Use DocumentSourceType.Internal enum value |
apps/portal-api/src/migrations/20260305082651_mark-connector-pictures-external.js |
Migration to mark connector child images as external |
apps/portal-api/src/__generated__/resolvers-types.ts |
Generated types with new fields |
apps/portal-api/package.json |
Added @types/graphql-upload |
apps/portal-front/schema.graphql |
Frontend schema with new enum and fields |
apps/portal-front/src/components/service/form/use-service-form-fields.tsx |
Centralized form fields hook with disabled fields support |
apps/portal-front/src/components/service/form/multiple-images-field.tsx |
Added source_type support, disable delete for external images |
apps/portal-front/src/components/service/form/description-field.tsx |
Added disabled prop |
apps/portal-front/src/components/service/form/uploader-id-field.tsx |
Added disabled prop |
apps/portal-front/src/components/service/form/uploader-organization-id-field.tsx |
Added disabled prop |
apps/portal-front/src/components/service/form/use-cases-field.tsx |
Added disabled prop |
apps/portal-front/src/components/service/form/integration-subtype-field.tsx |
Added disabled prop |
apps/portal-front/src/components/service/integrations/forms/connector-form.tsx |
New connector editing form |
apps/portal-front/src/components/service/integrations/forms/csv-feed-form.tsx |
Refactored to use useServiceFormFields, added new URL fields |
apps/portal-front/src/components/service/integrations/forms/stream-form.tsx |
Refactored to use useServiceFormFields, added new URL fields |
apps/portal-front/src/components/service/integrations/forms/taxii-feed-form.tsx |
Refactored to use useServiceFormFields, added new URL fields |
apps/portal-front/src/components/service/integrations/forms/third-party-integration-form.tsx |
Refactored to use useServiceFormFields, added new URL fields |
apps/portal-front/src/components/service/document/shareable-resource-slug.tsx |
Moved carousel inside, added carouselImages logic |
apps/portal-front/src/components/service/document/ui/shareable-resource-carousel-view.tsx |
Refactored to accept images prop instead of documentData |
apps/portal-front/src/components/service/document/shareable-resouce-details.tsx |
Added datasheet/demo URL display |
apps/portal-front/src/components/service/document/connector/shareable-resource-connector-slug.tsx |
Added carousel, manage sheet, serviceInstance prop |
apps/portal-front/src/components/service/document/connector/shareable-resource-connector-slug-public.tsx |
Added carousel, serviceInstance prop |
apps/portal-front/src/components/service/document/connector/shareable-resource-connector-details.tsx |
Added datasheet/demo URL display |
apps/portal-front/src/components/service/document/document.graphql.ts |
Added source_type, datasheet_url, demo_url to fragments |
apps/portal-front/src/components/service/document/public-document.graphql.ts |
Added datasheet_url, demo_url |
apps/portal-front/src/components/service/document/use-document-context.ts |
Added ConnectorForm mapping |
apps/portal-front/src/components/service/components/service-card.tsx |
Simplified update capability check |
apps/portal-front/src/components/service/components/service-list.tsx |
Fixed React key warning with Fragment |
apps/portal-front/src/components/service/components/subscribable-services.types.ts |
Added ConnectorForm types |
apps/portal-front/src/components/service/custom-dashboards/ |
Refactored to use centralized form hook |
apps/portal-front/src/components/service/openaev-scenarios/ |
Refactored to use centralized form hook |
apps/portal-front/src/components/ui/MarkdownInput.tsx |
Added disabled prop |
apps/portal-front/src/components/ui/select-users.tsx |
Added disabled prop |
apps/portal-front/messages/en.json |
Added English translations |
apps/portal-front/messages/fr.json |
Added French translations |
apps/portal-front/package.json |
Updated @filigran/ui to 0.44.8 |
apps/portal-e2e-tests/tests/model/integration.pageModel.ts |
Updated label text for URL fields |
apps/portal-api/src/modules/services/document/domain/document.children.domain.test.ts |
New tests for external image handling |
apps/portal-api/src/modules/services/document/document.app.test.ts |
Tests for boolean metadata and upsert |
.github/agents/api-test-writer.agent.md |
New agent definition |
yarn.lock |
Updated dependencies |
Files not reviewed (1)
- apps/portal-api/src/generated/resolvers-types.ts: Language not supported
You can also share your feedback on Copilot code review. Take the survey.
Context
This PR extends the integration and connector service forms to support updating multiple images, and adds
datasheet_urlanddemo_urlfields to all integration types. It refactors shared form field logic into a centralizeduseServiceFormFieldshook (renamed fromuseSimpleServiceFormField), adds a newConnectorFormfor editing connectors, introduces theDocumentSourceTypeenum to distinguish internal vs. external images, and adds a carousel to connector slug views.Changes:
datasheet_urlanddemo_urlfields across all integration types (schema, resolvers, metadata, forms, detail views, i18n)internalandexternalsource types, including a migration to mark existing connector images as externalConnectorFormcomponent and enabled connector editing/updating in the UI, previously restrictedHow to test
Related issues
Checklist
Quality
Testing
What tests have been made
Additional information