├── .asf.yaml ├── .github ├── DISCUSSION_TEMPLATE │ └── q-a.yml ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ └── feature_request.yml └── workflows │ ├── app-oidc.yml │ ├── app.yml │ ├── docker-devmode.yml │ └── vscode.yml ├── .gitignore ├── LICENSE.txt ├── README.md ├── change_version.sh ├── docs ├── DEV.md ├── README.md ├── ROADMAP.md ├── VSCODE_HOWTO.md ├── VSCODE_INSTALL.md ├── WEB_DOCKER.md ├── WEB_HOWTO.md ├── WEB_KUBERNETES.md └── install │ ├── karavan-docker │ └── docker-compose.yaml │ └── karavan-kubernetes │ ├── deployment.yaml │ ├── kustomization.yaml │ ├── nodePort.yaml │ ├── role-binding.yaml │ ├── role.yaml │ ├── secret.yaml │ ├── service-account.yaml │ └── service.yaml ├── images ├── architecture.png ├── create.png ├── designer-rest.png ├── designer-routes.png ├── export.png ├── install.png ├── introduction.png ├── karavan-architecture.png ├── karavan-clouds-large.png ├── karavan-clouds.png ├── karavan-dashboard.png ├── karavan-ipaas-1.png ├── karavan-ipaas-2.png ├── karavan-ipaas-3.png ├── karavan-ipaas-4.png ├── karavan-logo-dark.png ├── karavan-logo-dark.svg ├── karavan-logo-light.png ├── karavan-logo-light.svg ├── karavan-right.png ├── karavan-vscode.png ├── karavan-web.png ├── karavan.png ├── open.png ├── run.png └── topology.png ├── karavan-app ├── .dockerignore ├── .mvn │ └── wrapper │ │ └── maven-wrapper.properties ├── Dockerfile.dockerignore ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ └── main │ ├── docker │ └── Dockerfile │ ├── java │ └── org │ │ └── apache │ │ └── camel │ │ └── karavan │ │ ├── KaravanCache.java │ │ ├── KaravanConstants.java │ │ ├── KaravanEvents.java │ │ ├── KaravanStartupLoader.java │ │ ├── api │ │ ├── AbstractApiResource.java │ │ ├── ConfigurationResource.java │ │ ├── ContainerResource.java │ │ ├── DevModeResource.java │ │ ├── ImagesResource.java │ │ ├── InfrastructureResource.java │ │ ├── LogWatchResource.java │ │ ├── MetadataResources.java │ │ ├── NotificationResource.java │ │ ├── ProjectFileResource.java │ │ ├── ProjectGitResource.java │ │ ├── ProjectResource.java │ │ ├── PublicResource.java │ │ ├── StatusResource.java │ │ └── UsersResource.java │ │ ├── docker │ │ ├── DockerComposeConverter.java │ │ ├── DockerEventHandler.java │ │ ├── DockerForKaravan.java │ │ ├── DockerLogCallback.java │ │ ├── DockerPullCallback.java │ │ ├── DockerService.java │ │ └── DockerUtils.java │ │ ├── kubernetes │ │ ├── DeploymentEventHandler.java │ │ ├── KubernetesService.java │ │ ├── KubernetesStatusService.java │ │ ├── PodEventHandler.java │ │ └── ServiceEventHandler.java │ │ ├── listener │ │ ├── CamelReloadListener.java │ │ ├── CamelStatusListener.java │ │ ├── CommitListener.java │ │ ├── ConfigListener.java │ │ ├── DeploymentStatusListener.java │ │ ├── DockerListener.java │ │ ├── DockerStatusListener.java │ │ ├── KubernetesCommandListener.java │ │ ├── NotificationListener.java │ │ ├── PodContainerCommandListener.java │ │ ├── PodContainerStatusListener.java │ │ └── ServiceStatusListener.java │ │ ├── model │ │ ├── CamelStatus.java │ │ ├── CamelStatusRequest.java │ │ ├── CamelStatusValue.java │ │ ├── Configuration.java │ │ ├── ContainerImage.java │ │ ├── ContainerPort.java │ │ ├── ContainerType.java │ │ ├── DeploymentStatus.java │ │ ├── DockerCompose.java │ │ ├── DockerComposeHealthCheck.java │ │ ├── DockerComposeNetwork.java │ │ ├── DockerComposeService.java │ │ ├── DockerComposeVolume.java │ │ ├── GitConfig.java │ │ ├── GitRepo.java │ │ ├── GitRepoFile.java │ │ ├── GroupedKey.java │ │ ├── KubernetesConfigMap.java │ │ ├── KubernetesSecret.java │ │ ├── PodContainerStatus.java │ │ ├── Project.java │ │ ├── ProjectCommit.java │ │ ├── ProjectFile.java │ │ ├── ProjectFileCommitDiff.java │ │ ├── RegistryConfig.java │ │ └── ServiceStatus.java │ │ ├── scheduler │ │ ├── CamelStatusScheduler.java │ │ ├── DockerStatusScheduler.java │ │ └── NotificationPingScheduler.java │ │ └── service │ │ ├── CodeService.java │ │ ├── ConfigService.java │ │ ├── GitService.java │ │ ├── NotificationService.java │ │ ├── ProjectService.java │ │ └── RegistryService.java │ ├── resources │ ├── application.properties │ ├── configuration │ │ ├── docker │ │ │ ├── build.sh │ │ │ ├── builder.docker-compose.yaml │ │ │ ├── components-blocklist.txt │ │ │ └── kamelets-blocklist.txt │ │ └── kubernetes │ │ │ ├── build.sh │ │ │ ├── builder.pod.jkube.yaml │ │ │ ├── components-blocklist.txt │ │ │ └── kamelets-blocklist.txt │ ├── metadata │ │ ├── .gitignore │ │ ├── components.json │ │ ├── kamelets.yaml │ │ └── spiBeans.json │ ├── services │ │ └── docker │ │ │ └── docker-compose.yaml │ └── templates │ │ ├── docker │ │ ├── application.properties │ │ ├── database-bean-template.camel.yaml │ │ ├── docker-compose.yaml │ │ ├── messaging-bean-template.camel.yaml │ │ ├── org.apache.camel.AggregationStrategy.java │ │ └── org.apache.camel.Processor.java │ │ └── kubernetes │ │ ├── application.properties │ │ ├── configmap.jkube.yaml │ │ ├── database-bean-template.camel.yaml │ │ ├── deployment.jkube.yaml │ │ ├── ingress.jkube.yaml │ │ ├── messaging-bean-template.camel.yaml │ │ ├── org.apache.camel.AggregationStrategy.java │ │ └── org.apache.camel.Processor.java │ └── webui │ ├── .gitignore │ ├── index.html │ ├── package-lock.json │ ├── package.json │ ├── public │ ├── favicon.ico │ ├── karavan-logo-light.png │ ├── manifest.json │ └── robots.txt │ ├── src │ ├── api │ │ ├── ErrorEventBus.ts │ │ ├── KaravanApi.tsx │ │ ├── LogWatchApi.tsx │ │ ├── NotificationApi.tsx │ │ ├── NotificationService.ts │ │ ├── ProjectEventBus.ts │ │ ├── ProjectModels.ts │ │ ├── ProjectService.ts │ │ ├── ProjectStore.ts │ │ ├── ServiceModels.ts │ │ └── SsoApi.tsx │ ├── config │ │ └── SystemPage.tsx │ ├── containers │ │ ├── ContainerPage.css │ │ ├── ContainerTableRow.tsx │ │ └── ContainersPage.tsx │ ├── designer │ │ ├── DesignerStore.ts │ │ ├── ErrorBoundaryWrapper.tsx │ │ ├── KaravanDesigner.tsx │ │ ├── MainToolbar.tsx │ │ ├── beans │ │ │ ├── BeanCard.tsx │ │ │ ├── BeansDesigner.tsx │ │ │ └── bean.css │ │ ├── editor │ │ │ └── CodeEditor.tsx │ │ ├── icons │ │ │ ├── ComponentIcons.tsx │ │ │ ├── EipIcons.tsx │ │ │ ├── KaravanIcons.tsx │ │ │ └── OtherIcons.tsx │ │ ├── kamelet │ │ │ ├── KameletAnnotationsPanel.tsx │ │ │ ├── KameletDefinitionPropertyCard.tsx │ │ │ ├── KameletDefinitionsPanel.tsx │ │ │ ├── KameletDependenciesCard.tsx │ │ │ ├── KameletDesigner.tsx │ │ │ ├── KameletInput.tsx │ │ │ ├── KameletProperties.tsx │ │ │ ├── KameletTypesOutCard.tsx │ │ │ └── kamelet.css │ │ ├── karavan.css │ │ ├── property │ │ │ ├── DslProperties.css │ │ │ ├── DslProperties.tsx │ │ │ ├── MainPropertiesPanel.tsx │ │ │ ├── PropertiesHeader.tsx │ │ │ ├── PropertyStore.ts │ │ │ ├── expression │ │ │ │ ├── ExpressionBottomPanel.tsx │ │ │ │ ├── ExpressionContextModel.tsx │ │ │ │ ├── ExpressionEditor.css │ │ │ │ └── ExpressionEditor.tsx │ │ │ ├── property │ │ │ │ ├── BeanProperties.css │ │ │ │ ├── BeanProperties.tsx │ │ │ │ ├── ComponentPropertyField.css │ │ │ │ ├── ComponentPropertyField.tsx │ │ │ │ ├── ConfigurationSelectorModal.tsx │ │ │ │ ├── DataFormatField.tsx │ │ │ │ ├── DslPropertyField.css │ │ │ │ ├── DslPropertyField.tsx │ │ │ │ ├── ExpressionField.tsx │ │ │ │ ├── InfrastructureSelector.tsx │ │ │ │ ├── KameletPropertyField.css │ │ │ │ ├── KameletPropertyField.tsx │ │ │ │ ├── ObjectField.tsx │ │ │ │ ├── PropertyPlaceholderDropdown.css │ │ │ │ ├── PropertyPlaceholderDropdown.tsx │ │ │ │ ├── PropertyUtil.tsx │ │ │ │ ├── SelectField.tsx │ │ │ │ ├── VariablesDropdown.css │ │ │ │ └── VariablesDropdown.tsx │ │ │ └── usePropertiesHook.tsx │ │ ├── rest │ │ │ ├── RestCard.tsx │ │ │ ├── RestConfigurationCard.tsx │ │ │ ├── RestDesigner.tsx │ │ │ ├── RestMethodCard.tsx │ │ │ ├── RestMethodSelector.tsx │ │ │ └── rest.css │ │ ├── route │ │ │ ├── DeleteConfirmation.tsx │ │ │ ├── DslConnections.css │ │ │ ├── DslConnections.tsx │ │ │ ├── RouteDesigner.tsx │ │ │ ├── element │ │ │ │ ├── DslElement.css │ │ │ │ ├── DslElement.tsx │ │ │ │ ├── DslElementHeader.tsx │ │ │ │ ├── DslElementMoveModal.tsx │ │ │ │ ├── RouteTemplateElement.css │ │ │ │ └── RouteTemplateElement.tsx │ │ │ ├── useDrawerMutationsObserver.tsx │ │ │ ├── useResizeObserver.tsx │ │ │ └── useRouteDesignerHook.tsx │ │ ├── selector │ │ │ ├── DslCard.tsx │ │ │ ├── DslFastCard.tsx │ │ │ ├── DslPreferences.tsx │ │ │ ├── DslSelector.css │ │ │ └── DslSelector.tsx │ │ ├── ui │ │ │ └── TypeaheadSelect.tsx │ │ └── utils │ │ │ ├── CamelUi.tsx │ │ │ ├── DslMetaModel.ts │ │ │ ├── ElementIcon.css │ │ │ ├── ElementIcons.tsx │ │ │ ├── EventBus.ts │ │ │ ├── InfrastructureAPI.ts │ │ │ ├── IntegrationHeader.tsx │ │ │ ├── MediaTypes.ts │ │ │ ├── Notification.tsx │ │ │ └── ValidatorUtils.ts │ ├── editor │ │ ├── CodeEditor.tsx │ │ ├── DesignerEditor.tsx │ │ ├── EditorToolbar.tsx │ │ └── FileEditor.tsx │ ├── index.css │ ├── index.tsx │ ├── knowledgebase │ │ ├── KnowledgebasePage.tsx │ │ ├── KnowledgebaseStore.ts │ │ ├── components │ │ │ ├── ComponentCard.tsx │ │ │ ├── ComponentModal.tsx │ │ │ └── ComponentsTab.tsx │ │ ├── eip │ │ │ ├── EipCard.tsx │ │ │ ├── EipModal.tsx │ │ │ └── EipTab.tsx │ │ ├── kamelets │ │ │ ├── KameletCard.tsx │ │ │ ├── KameletModal.tsx │ │ │ └── KameletsTab.tsx │ │ └── knowledgebase.css │ ├── log │ │ ├── InfoTabContainer.tsx │ │ ├── InfoTabContext.tsx │ │ ├── InfoTabMemory.tsx │ │ ├── InformationLog.tsx │ │ ├── ProjectLog.css │ │ ├── ProjectLog.tsx │ │ └── ProjectLogPanel.tsx │ ├── main │ │ ├── HelpWrapper.tsx │ │ ├── Logo.tsx │ │ ├── Main.tsx │ │ ├── MainLoader.tsx │ │ ├── MainRoutes.tsx │ │ ├── PageNavigation.tsx │ │ ├── main.css │ │ └── useMainHook.tsx │ ├── project │ │ ├── DevModeToolbar.css │ │ ├── DevModeToolbar.tsx │ │ ├── ImageDownloadToolbar.tsx │ │ ├── ProjectPage.css │ │ ├── ProjectPage.tsx │ │ ├── ProjectPanel.tsx │ │ ├── ProjectTitle.tsx │ │ ├── ProjectToolbar.tsx │ │ ├── ResourceToolbar.tsx │ │ ├── beans │ │ │ ├── BeanFilesDropdown.css │ │ │ ├── BeanFilesDropdown.tsx │ │ │ └── BeanWizard.tsx │ │ ├── devmode.css │ │ ├── files │ │ │ ├── CreateFileModal.tsx │ │ │ ├── CreateIntegrationModal.tsx │ │ │ ├── DeleteFileModal.tsx │ │ │ ├── DiffFileModal.css │ │ │ ├── DiffFileModal.tsx │ │ │ ├── FilesTab.tsx │ │ │ ├── FilesToolbar.tsx │ │ │ └── UploadFileModal.tsx │ │ ├── package │ │ │ ├── BuildPanel.tsx │ │ │ ├── ContainerButtons.tsx │ │ │ ├── ContainerEnvironmentPanel.tsx │ │ │ ├── ContainerPanel.tsx │ │ │ ├── DeploymentButtons.tsx │ │ │ ├── DeploymentPanel.tsx │ │ │ ├── ImagesPanel.tsx │ │ │ ├── Package.css │ │ │ └── PackageTab.tsx │ │ ├── readme │ │ │ └── ReadmeTab.tsx │ │ └── trace │ │ │ ├── RunnerInfoTraceMessage.tsx │ │ │ ├── RunnerInfoTraceModal.tsx │ │ │ ├── RunnerInfoTraceNode.tsx │ │ │ ├── TraceTab.tsx │ │ │ ├── TraceTable.tsx │ │ │ └── trace.css │ ├── projects │ │ ├── CreateProjectModal.tsx │ │ ├── DeleteProjectModal.tsx │ │ ├── ProjectsPage.css │ │ ├── ProjectsPage.tsx │ │ ├── ProjectsTableRow.tsx │ │ └── ProjectsToolbar.tsx │ ├── resources │ │ ├── ResourcesPage.tsx │ │ └── ResourcesTableRow.tsx │ ├── services │ │ ├── ServicesPage.tsx │ │ └── ServicesTableRow.tsx │ ├── topology │ │ ├── CustomComponentFactory.tsx │ │ ├── CustomEdge.tsx │ │ ├── CustomGroup.tsx │ │ ├── CustomNode.tsx │ │ ├── TopologyApi.tsx │ │ ├── TopologyBeans.css │ │ ├── TopologyBeans.tsx │ │ ├── TopologyLegend.css │ │ ├── TopologyLegend.tsx │ │ ├── TopologyStore.ts │ │ ├── TopologyTab.tsx │ │ ├── TopologyToolbar.tsx │ │ ├── topology.css │ │ └── useTopologyHook.tsx │ └── util │ │ ├── CodeUtils.ts │ │ ├── ModalConfirmation.tsx │ │ ├── StringUtils.ts │ │ ├── form-util.css │ │ └── useFormUtil.tsx │ ├── tsconfig.json │ ├── vite-env.d.ts │ └── vite.config.ts ├── karavan-core ├── .mocharc.json ├── .prettierignore ├── .prettierrc ├── package-lock.json ├── package.json ├── src │ └── core │ │ ├── api │ │ ├── CamelDefinitionApi.ts │ │ ├── CamelDefinitionApiExt.ts │ │ ├── CamelDefinitionYaml.ts │ │ ├── CamelDefinitionYamlStep.ts │ │ ├── CamelDisplayUtil.ts │ │ ├── CamelUtil.ts │ │ ├── ComponentApi.ts │ │ ├── KameletApi.ts │ │ ├── MainConfigurationApi.ts │ │ ├── ProjectModelApi.ts │ │ ├── SpiBeanApi.ts │ │ ├── TemplateApi.ts │ │ ├── TopologyUtils.ts │ │ └── VariableUtil.ts │ │ └── model │ │ ├── CamelDefinition.ts │ │ ├── CamelMetadata.ts │ │ ├── ComponentModels.ts │ │ ├── IntegrationDefinition.ts │ │ ├── KameletModels.ts │ │ ├── MainConfigurationModel.ts │ │ ├── ProjectModel.ts │ │ ├── SpiBeanModels.ts │ │ └── TopologyDefinition.ts ├── test │ ├── addStep.spec.ts │ ├── addStep1.yaml │ ├── allowableValues.camel.yaml │ ├── allowableValues.spec.ts │ ├── avro-serialize-action.kamelet.yaml │ ├── beans.spec.ts │ ├── beans1.yaml │ ├── beans2.yaml │ ├── beans3.yaml │ ├── checkRequired.spec.ts │ ├── circuitBreaker.spec.ts │ ├── circuitBreaker.yaml │ ├── cloneDefinition.spec.ts │ ├── createKamelet.spec.ts │ ├── cxf.json │ ├── cxf.spec.ts │ ├── cxf.yaml │ ├── deleteStep.spec.ts │ ├── demo.spec.ts │ ├── demo.yaml │ ├── doCatchOnWhen.camel.yaml │ ├── doCatchOnWhen.spec.ts │ ├── errorHandler.spec.ts │ ├── errorHandler1.yaml │ ├── expression.spec.ts │ ├── findStep.spec.ts │ ├── findStep.yaml │ ├── getElementProperties.spec.ts │ ├── getElementPropertiesByName.spec.ts │ ├── getExpressionLanguage.spec.ts │ ├── hasElementWithId.camel.yaml │ ├── hasElementWithId.spec.ts │ ├── hasElementWithId1.camel.yaml │ ├── hasElementWithIdError.camel.yaml │ ├── integration.spec.ts │ ├── integration1.yaml │ ├── integration2.yaml │ ├── integrationToYaml.spec.ts │ ├── intercept.spec.ts │ ├── intercept.yaml │ ├── is-not-integration.yaml │ ├── isIntegration.spec.ts │ ├── kamelet.spec.ts │ ├── metadata │ │ ├── components.json │ │ ├── kamelets.yaml │ │ └── spiBeans.json │ ├── multiObjectProperties.spec.ts │ ├── multiObjectProperties1.yaml │ ├── multiple.spec.ts │ ├── multiple.yaml │ ├── openapi.spec.ts │ ├── openapi.yaml │ ├── placeholder.spec.ts │ ├── placeholder.yaml │ ├── plain-try-catch.yaml │ ├── plain.spec.ts │ ├── plain1.yaml │ ├── plain2.yaml │ ├── plain3.yaml │ ├── plain4.yaml │ ├── postgresql-source.kamelet.yaml │ ├── restConfigDsl.yaml │ ├── restDsl.spec.ts │ ├── restDsl.yaml │ ├── routeTemplate.spec.ts │ ├── routeTemplate1.camel.yaml │ ├── routeTemplate2.camel.yaml │ ├── routes.spec.ts │ ├── routes1.yaml │ ├── supported-components.json │ ├── supportedComponents.spec.ts │ ├── template1.AggregationStrategy.java │ ├── template1.Processor.java │ ├── template2.AggregationStrategy.java │ ├── template2.Processor.java │ ├── templateApi.spec.ts │ ├── timer-source.kamelet.yaml │ ├── tod.spec.ts │ ├── tod.yaml │ ├── topology.spec.ts │ ├── topology1.camel.yaml │ ├── topology2.camel.yaml │ ├── topology3.camel.yaml │ ├── tsconfig.testing.json │ ├── updateStep.spec.ts │ ├── variable1.camel.yaml │ ├── variable2.camel.yaml │ ├── variables.spec.ts │ ├── yamDataFormat.camel.yaml │ ├── yamDataFormat.spec.ts │ ├── yamDataFormat1.camel.yaml │ └── yamDataFormat2.camel.yaml └── tsconfig.json ├── karavan-designer ├── index.html ├── package-lock.json ├── package.json ├── public │ ├── example │ │ ├── avro-serialize-action.kamelet.yaml │ │ ├── aws-cloudwatch-sink.kamelet.yaml │ │ ├── aws-s3-cdc-source.kamelet.yaml │ │ ├── aws-s3-source.kamelet.yaml │ │ ├── demo.camel.yaml │ │ ├── plc4x-ads-source.kamelet.yaml │ │ └── postgresql-source.kamelet.yaml │ ├── favicon.ico │ ├── manifest.json │ ├── metadata │ │ ├── components.json │ │ ├── kamelets.yaml │ │ └── spiBeans.json │ ├── robots.txt │ └── snippets │ │ ├── org.apache.camel.AggregationStrategy │ │ └── org.apache.camel.Processor ├── src │ ├── App.css │ ├── App.tsx │ ├── DesignerPage.tsx │ ├── KnowledgebaseHome.tsx │ ├── designer │ │ ├── DesignerStore.ts │ │ ├── ErrorBoundaryWrapper.tsx │ │ ├── KaravanDesigner.tsx │ │ ├── MainToolbar.tsx │ │ ├── beans │ │ │ ├── BeanCard.tsx │ │ │ ├── BeansDesigner.tsx │ │ │ └── bean.css │ │ ├── editor │ │ │ └── CodeEditor.tsx │ │ ├── icons │ │ │ ├── ComponentIcons.tsx │ │ │ ├── EipIcons.tsx │ │ │ ├── KaravanIcons.tsx │ │ │ └── OtherIcons.tsx │ │ ├── kamelet │ │ │ ├── KameletAnnotationsPanel.tsx │ │ │ ├── KameletDefinitionPropertyCard.tsx │ │ │ ├── KameletDefinitionsPanel.tsx │ │ │ ├── KameletDependenciesCard.tsx │ │ │ ├── KameletDesigner.tsx │ │ │ ├── KameletInput.tsx │ │ │ ├── KameletProperties.tsx │ │ │ ├── KameletTypesOutCard.tsx │ │ │ └── kamelet.css │ │ ├── karavan.css │ │ ├── property │ │ │ ├── DslProperties.css │ │ │ ├── DslProperties.tsx │ │ │ ├── MainPropertiesPanel.tsx │ │ │ ├── PropertiesHeader.tsx │ │ │ ├── PropertyStore.ts │ │ │ ├── property │ │ │ │ ├── BeanProperties.tsx │ │ │ │ ├── ComponentPropertyField.tsx │ │ │ │ ├── DataFormatField.tsx │ │ │ │ ├── DslPropertyField.css │ │ │ │ ├── DslPropertyField.tsx │ │ │ │ ├── ExpressionField.tsx │ │ │ │ ├── InfrastructureSelector.tsx │ │ │ │ ├── KameletPropertyField.tsx │ │ │ │ ├── ObjectField.tsx │ │ │ │ ├── PropertyPlaceholderDropdown.css │ │ │ │ ├── PropertyPlaceholderDropdown.tsx │ │ │ │ ├── PropertyUtil.tsx │ │ │ │ ├── SelectField.tsx │ │ │ │ ├── VariablesDropdown.css │ │ │ │ └── VariablesDropdown.tsx │ │ │ └── usePropertiesHook.tsx │ │ ├── rest │ │ │ ├── RestCard.tsx │ │ │ ├── RestConfigurationCard.tsx │ │ │ ├── RestDesigner.tsx │ │ │ ├── RestMethodCard.tsx │ │ │ ├── RestMethodSelector.tsx │ │ │ └── rest.css │ │ ├── route │ │ │ ├── DeleteConfirmation.tsx │ │ │ ├── DslConnections.css │ │ │ ├── DslConnections.tsx │ │ │ ├── RouteDesigner.tsx │ │ │ ├── element │ │ │ │ ├── DslElement.css │ │ │ │ ├── DslElement.tsx │ │ │ │ ├── DslElementHeader.tsx │ │ │ │ ├── DslElementMoveModal.tsx │ │ │ │ ├── RouteTemplateElement.css │ │ │ │ └── RouteTemplateElement.tsx │ │ │ ├── useDrawerMutationsObserver.tsx │ │ │ ├── useResizeObserver.tsx │ │ │ └── useRouteDesignerHook.tsx │ │ ├── selector │ │ │ ├── DslCard.tsx │ │ │ ├── DslFastCard.tsx │ │ │ ├── DslPreferences.tsx │ │ │ ├── DslSelector.css │ │ │ └── DslSelector.tsx │ │ ├── ui │ │ │ └── TypeaheadSelect.tsx │ │ └── utils │ │ │ ├── CamelUi.tsx │ │ │ ├── DslMetaModel.ts │ │ │ ├── ElementIcon.css │ │ │ ├── ElementIcons.tsx │ │ │ ├── EventBus.ts │ │ │ ├── InfrastructureAPI.ts │ │ │ ├── IntegrationHeader.tsx │ │ │ ├── MediaTypes.ts │ │ │ ├── Notification.tsx │ │ │ └── ValidatorUtils.ts │ ├── index.css │ ├── index.tsx │ ├── knowledgebase │ │ ├── KnowledgebasePage.tsx │ │ ├── KnowledgebaseStore.ts │ │ ├── components │ │ │ ├── ComponentCard.tsx │ │ │ ├── ComponentModal.tsx │ │ │ └── ComponentsTab.tsx │ │ ├── eip │ │ │ ├── EipCard.tsx │ │ │ ├── EipModal.tsx │ │ │ └── EipTab.tsx │ │ ├── kamelets │ │ │ ├── KameletCard.tsx │ │ │ ├── KameletModal.tsx │ │ │ └── KameletsTab.tsx │ │ └── knowledgebase.css │ └── topology │ │ ├── CustomEdge.tsx │ │ ├── CustomGroup.tsx │ │ ├── CustomNode.tsx │ │ ├── TopologyApi.tsx │ │ ├── TopologyLegend.tsx │ │ ├── TopologyPropertiesPanel.tsx │ │ ├── TopologyStore.ts │ │ ├── TopologyTab.tsx │ │ ├── TopologyToolbar.tsx │ │ └── topology.css ├── tsconfig.json ├── vite-env.d.ts └── vite.config.ts ├── karavan-devmode └── Dockerfile ├── karavan-generator ├── .mvn │ └── wrapper │ │ └── maven-wrapper.properties ├── dependency-reduced-pom.xml ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── apache │ │ └── camel │ │ └── karavan │ │ └── generator │ │ ├── AbstractGenerator.java │ │ ├── CamelComponentsGenerator.java │ │ ├── CamelDefinitionApiGenerator.java │ │ ├── CamelDefinitionGenerator.java │ │ ├── CamelDefinitionYamlStepGenerator.java │ │ ├── CamelMetadataGenerator.java │ │ ├── CamelSpiBeanGenerator.java │ │ ├── ElementProp.java │ │ ├── KameletGenerator.java │ │ └── KaravanGenerator.java │ └── resources │ ├── CamelDefinition.header.ts │ ├── CamelDefinition.ts │ ├── CamelDefinitionApi.footer.ts │ ├── CamelDefinitionApi.header.ts │ ├── CamelDefinitionApi.ts │ ├── CamelDefinitionYamlStep.footer.ts │ ├── CamelDefinitionYamlStep.header.ts │ ├── CamelDefinitionYamlStep.ts │ ├── CamelMetadata.header.ts │ ├── TraitDefinition.header.ts │ └── application.properties ├── karavan-space ├── index.html ├── package-lock.json ├── package.json ├── public │ ├── favicon.ico │ ├── manifest.json │ ├── metadata │ │ ├── components.json │ │ ├── components.properties │ │ ├── kamelets.properties │ │ ├── kamelets.yaml │ │ └── spiBeans.json │ ├── robots.txt │ └── snippets │ │ ├── org.apache.camel.AggregationStrategy │ │ └── org.apache.camel.Processor ├── src │ ├── App.css │ ├── App.tsx │ ├── api │ │ ├── GeneratorApi.tsx │ │ ├── GithubApi.tsx │ │ └── StorageApi.tsx │ ├── designer │ │ ├── DesignerStore.ts │ │ ├── ErrorBoundaryWrapper.tsx │ │ ├── KaravanDesigner.tsx │ │ ├── MainToolbar.tsx │ │ ├── beans │ │ │ ├── BeanCard.tsx │ │ │ ├── BeansDesigner.tsx │ │ │ └── bean.css │ │ ├── editor │ │ │ └── CodeEditor.tsx │ │ ├── icons │ │ │ ├── ComponentIcons.tsx │ │ │ ├── EipIcons.tsx │ │ │ ├── KaravanIcons.tsx │ │ │ └── OtherIcons.tsx │ │ ├── kamelet │ │ │ ├── KameletAnnotationsPanel.tsx │ │ │ ├── KameletDefinitionPropertyCard.tsx │ │ │ ├── KameletDefinitionsPanel.tsx │ │ │ ├── KameletDependenciesCard.tsx │ │ │ ├── KameletDesigner.tsx │ │ │ ├── KameletInput.tsx │ │ │ ├── KameletProperties.tsx │ │ │ ├── KameletTypesOutCard.tsx │ │ │ └── kamelet.css │ │ ├── karavan.css │ │ ├── property │ │ │ ├── DslProperties.css │ │ │ ├── DslProperties.tsx │ │ │ ├── MainPropertiesPanel.tsx │ │ │ ├── PropertiesHeader.tsx │ │ │ ├── PropertyStore.ts │ │ │ ├── property │ │ │ │ ├── BeanProperties.tsx │ │ │ │ ├── ComponentPropertyField.tsx │ │ │ │ ├── DataFormatField.tsx │ │ │ │ ├── DslPropertyField.css │ │ │ │ ├── DslPropertyField.tsx │ │ │ │ ├── ExpressionField.tsx │ │ │ │ ├── InfrastructureSelector.tsx │ │ │ │ ├── KameletPropertyField.tsx │ │ │ │ ├── ObjectField.tsx │ │ │ │ ├── PropertyPlaceholderDropdown.css │ │ │ │ ├── PropertyPlaceholderDropdown.tsx │ │ │ │ ├── PropertyUtil.tsx │ │ │ │ ├── SelectField.tsx │ │ │ │ ├── VariablesDropdown.css │ │ │ │ └── VariablesDropdown.tsx │ │ │ └── usePropertiesHook.tsx │ │ ├── rest │ │ │ ├── RestCard.tsx │ │ │ ├── RestConfigurationCard.tsx │ │ │ ├── RestDesigner.tsx │ │ │ ├── RestMethodCard.tsx │ │ │ ├── RestMethodSelector.tsx │ │ │ └── rest.css │ │ ├── route │ │ │ ├── DeleteConfirmation.tsx │ │ │ ├── DslConnections.css │ │ │ ├── DslConnections.tsx │ │ │ ├── RouteDesigner.tsx │ │ │ ├── element │ │ │ │ ├── DslElement.css │ │ │ │ ├── DslElement.tsx │ │ │ │ ├── DslElementHeader.tsx │ │ │ │ ├── DslElementMoveModal.tsx │ │ │ │ ├── RouteTemplateElement.css │ │ │ │ └── RouteTemplateElement.tsx │ │ │ ├── useDrawerMutationsObserver.tsx │ │ │ ├── useResizeObserver.tsx │ │ │ └── useRouteDesignerHook.tsx │ │ ├── selector │ │ │ ├── DslCard.tsx │ │ │ ├── DslFastCard.tsx │ │ │ ├── DslPreferences.tsx │ │ │ ├── DslSelector.css │ │ │ └── DslSelector.tsx │ │ ├── ui │ │ │ └── TypeaheadSelect.tsx │ │ └── utils │ │ │ ├── CamelUi.tsx │ │ │ ├── DslMetaModel.ts │ │ │ ├── ElementIcon.css │ │ │ ├── ElementIcons.tsx │ │ │ ├── EventBus.ts │ │ │ ├── InfrastructureAPI.ts │ │ │ ├── IntegrationHeader.tsx │ │ │ ├── MediaTypes.ts │ │ │ ├── Notification.tsx │ │ │ └── ValidatorUtils.ts │ ├── expression │ │ ├── ExpressionBottomPanel.tsx │ │ ├── ExpressionContextModel.tsx │ │ ├── ExpressionModalEditor.css │ │ └── ExpressionModalEditor.tsx │ ├── index.css │ ├── index.tsx │ ├── knowledgebase │ │ ├── KnowledgebasePage.tsx │ │ ├── KnowledgebaseStore.ts │ │ ├── components │ │ │ ├── ComponentCard.tsx │ │ │ ├── ComponentModal.tsx │ │ │ └── ComponentsTab.tsx │ │ ├── eip │ │ │ ├── EipCard.tsx │ │ │ ├── EipModal.tsx │ │ │ └── EipTab.tsx │ │ ├── kamelets │ │ │ ├── KameletCard.tsx │ │ │ ├── KameletModal.tsx │ │ │ └── KameletsTab.tsx │ │ └── knowledgebase.css │ ├── space │ │ ├── GithubModal.tsx │ │ ├── SpacePage.tsx │ │ └── UploadModal.tsx │ └── topology │ │ ├── CustomEdge.tsx │ │ ├── CustomGroup.tsx │ │ ├── CustomNode.tsx │ │ ├── TopologyApi.tsx │ │ ├── TopologyLegend.tsx │ │ ├── TopologyPropertiesPanel.tsx │ │ ├── TopologyStore.ts │ │ ├── TopologyTab.tsx │ │ ├── TopologyToolbar.tsx │ │ └── topology.css ├── tsconfig.json ├── vite-env.d.ts └── vite.config.ts ├── karavan-vscode ├── .eslintrc.json ├── .gitignore ├── .prettierignore ├── .vscode │ ├── launch.json │ └── tasks.json ├── .vscodeignore ├── CHANGELOG.md ├── LICENSE.txt ├── README.md ├── icons │ ├── dark │ │ ├── crd.svg │ │ └── karavan.svg │ ├── karavan-mono-24x24.svg │ ├── karavan.png │ ├── karavan.svg │ ├── light │ │ ├── crd.svg │ │ └── karavan.svg │ ├── run-jbang.png │ └── run.svg ├── images │ ├── create.png │ ├── export.png │ ├── install.png │ ├── karavan-vscode.png │ ├── open.png │ └── run.png ├── metadata │ ├── components.json │ ├── kamelets.yaml │ └── spiBeans.json ├── package-lock.json ├── package.json ├── snippets │ ├── camel-main-org.apache.camel.AggregationStrategy.java │ ├── camel-main-org.apache.camel.Processor.java │ ├── quarkus-org.apache.camel.AggregationStrategy.java │ ├── quarkus-org.apache.camel.Processor.java │ ├── spring-boot-org.apache.camel.AggregationStrategy.java │ └── spring-boot-org.apache.camel.Processor.java ├── src │ ├── designerView.ts │ ├── exec.ts │ ├── extension.ts │ ├── helpView.ts │ ├── integrationView.ts │ ├── jbang.ts │ ├── maven.ts │ ├── openapiView.ts │ ├── topologyView.ts │ ├── utils.ts │ └── webviewContent.ts ├── tsconfig.json ├── webpack.config.js └── webview │ ├── App.css │ ├── App.tsx │ ├── acquireVsCodeApi.d.ts │ ├── expression │ ├── ExpressionBottomPanel.tsx │ ├── ExpressionContextModel.tsx │ ├── ExpressionModalEditor.css │ └── ExpressionModalEditor.tsx │ ├── index.css │ ├── index.tsx │ ├── prerender.tsx │ ├── react-app-env.d.ts │ ├── topology │ ├── CustomEdge.tsx │ ├── CustomGroup.tsx │ ├── CustomNode.tsx │ ├── TopologyApi.tsx │ ├── TopologyLegend.tsx │ ├── TopologyPropertiesPanel.tsx │ ├── TopologyStore.ts │ ├── TopologyTab.tsx │ ├── TopologyToolbar.tsx │ └── topology.css │ └── vscode.ts └── release-utils ├── prerelease.sh └── release.sh /.asf.yaml: -------------------------------------------------------------------------------- 1 | # 2 | # Licensed to the Apache Software Foundation (ASF) under one or more 3 | # contributor license agreements. See the NOTICE file distributed with 4 | # this work for additional information regarding copyright ownership. 5 | # The ASF licenses this file to You under the Apache License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | notifications: 19 | commits: commits@camel.apache.org 20 | issues: commits@camel.apache.org 21 | pullrequests: commits@camel.apache.org 22 | discussions: users@camel.apache.org 23 | github: 24 | description: "Apache Camel Karavan a Low-code Data Integration Platform" 25 | homepage: https://camel.apache.org 26 | labels: 27 | - camel 28 | - integration 29 | - java 30 | - low-code 31 | - vscode 32 | - docker 33 | - kubernetes 34 | enabled_merge_buttons: 35 | squash: true 36 | merge: false 37 | rebase: true 38 | features: 39 | issues: true 40 | discussions: true -------------------------------------------------------------------------------- /.github/DISCUSSION_TEMPLATE/q-a.yml: -------------------------------------------------------------------------------- 1 | title: "Question" 2 | body: 3 | - type: textarea 4 | id: question 5 | attributes: 6 | label: Ask a question 7 | description: Please provide a detailed explanation of your objectives and any challenges you are encountering in reaching these goals 8 | value: "How can I create a new REST service to get data from Postgres database" 9 | validations: 10 | required: true 11 | - type: dropdown 12 | id: variant 13 | attributes: 14 | label: Variant 15 | description: What Karavan variant are you running? 16 | options: 17 | - Web Application 18 | - Vs Code Extension 19 | - type: dropdown 20 | id: container 21 | attributes: 22 | label: Container Management (if applicable) 23 | description: What Container Management System are you running? 24 | options: 25 | - Docker 26 | - Kubernetes 27 | - Openshift 28 | - type: dropdown 29 | id: os 30 | attributes: 31 | label: Operating System (if applicable) 32 | description: What Operating System are you running? 33 | options: 34 | - Linux 35 | - MacOS 36 | - Windows 37 | - type: dropdown 38 | id: version 39 | attributes: 40 | label: Version 41 | description: What Karavan version are you running? 42 | options: 43 | - 4.8.0 44 | - 4.10.2 45 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: Feature request 2 | description: Suggest an idea for this project 3 | title: "Feature" 4 | labels: ["feature"] 5 | body: 6 | - type: textarea 7 | id: description 8 | attributes: 9 | label: Describe the solution you'd like 10 | description: A clear and concise description of what you want to happen. 11 | value: "A feature that simplifies the work of integration developers" 12 | validations: 13 | required: true 14 | - type: dropdown 15 | id: variant 16 | attributes: 17 | label: Variant 18 | description: To what Karavan variant this feature is related? 19 | options: 20 | - Web Application 21 | - VS Code Extension 22 | - Both 23 | default: 0 24 | validations: 25 | required: true 26 | - type: dropdown 27 | id: container 28 | attributes: 29 | label: Container Management (if applicable) 30 | description: What Container Management System are you running? 31 | options: 32 | - Docker 33 | - Kubernetes 34 | - Openshift 35 | - type: dropdown 36 | id: os 37 | attributes: 38 | label: Operating System (for VS Code Extension) 39 | options: 40 | - Linux 41 | - macOS 42 | - Windows 43 | -------------------------------------------------------------------------------- /.github/workflows/docker-devmode.yml: -------------------------------------------------------------------------------- 1 | name: DevMode container 2 | 3 | on: 4 | push: 5 | branches: [ main ] 6 | paths: ['karavan-devmode/Dockerfile', '.github/workflows/docker-devmode.yml'] 7 | workflow_dispatch: 8 | 9 | env: 10 | REGISTRY: ghcr.io 11 | IMAGE_NAME: ${{ github.repository }}-devmode 12 | TAG: 4.10.2 13 | 14 | jobs: 15 | docker: 16 | 17 | runs-on: ubuntu-latest 18 | 19 | steps: 20 | - name: Checkout repository 21 | uses: actions/checkout@v4 22 | - name: Set up QEMU 23 | uses: docker/setup-qemu-action@v3 24 | - name: Set up Docker Buildx 25 | uses: docker/setup-buildx-action@v3 26 | - name: Log in to the Container registry 27 | uses: docker/login-action@v3 28 | with: 29 | registry: ${{ env.REGISTRY }} 30 | username: ${{ github.actor }} 31 | password: ${{ secrets.GITHUB_TOKEN }} 32 | - name: Build and push Docker image 33 | uses: docker/build-push-action@v5 34 | with: 35 | context: ./karavan-devmode 36 | platforms: linux/amd64,linux/arm64 37 | file: karavan-devmode/Dockerfile 38 | push: true 39 | tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ env.TAG }} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #Maven 2 | target/ 3 | pom.xml.tag 4 | pom.xml.releaseBackup 5 | pom.xml.versionsBackup 6 | release.properties 7 | dependency-reduced-pom.xml 8 | 9 | # Eclipse 10 | .project 11 | .classpath 12 | .settings/ 13 | bin/ 14 | 15 | # IntelliJ 16 | .idea 17 | *.ipr 18 | *.iml 19 | *.iws 20 | 21 | # NetBeans 22 | nb-configuration.xml 23 | 24 | # Visual Studio Code 25 | .factorypath 26 | .vscode 27 | 28 | # Typesript 29 | node_modules 30 | build 31 | dist 32 | npm-debug.log* 33 | yarn-debug.log* 34 | yarn-error.log* 35 | .changelog 36 | .npm 37 | 38 | # OSX 39 | .DS_Store 40 | *__MACOSX/ 41 | 42 | # Vim 43 | *.swp 44 | *.swo 45 | 46 | # patch 47 | *.orig 48 | *.rej 49 | 50 | # Local environment 51 | .camel-jbang 52 | .env 53 | /.java-version 54 | /keys/* 55 | *.jar 56 | 57 | **/*.tgz 58 | **/*.vsix 59 | **/*.bak 60 | 61 | .quinoa/ 62 | 63 | /karavan-core/lib/ 64 | 65 | /karavan-designer/public/kamelets/* 66 | /karavan-designer/public/components/* 67 | /karavan-designer/.firebase/ 68 | /karavan-designer/.firebaserc 69 | /karavan-designer/firebase.json 70 | 71 | /karavan-app/.quinoa/ 72 | /karavan-app/karavan-data* 73 | /karavan-app/src/main/webapp/src/designer/* 74 | /karavan-app/src/main/resources/kamelets/* 75 | 76 | karavan-cloud/karavan-secret-real.yaml 77 | 78 | docs/install/karavan-docker/data/* 79 | 80 | **/dependency-reduced-pom.xml 81 | 82 | .env -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Documentation 2 | 3 | ## User guide 4 | 5 | ### Web Application 6 | 7 | Karavan Web Application is a container deployed into Docker, Kubernetes or OpenShift 8 | 9 | 1. [Run in Docker](WEB_DOCKER.md) 10 | 2. [Run in Kubernetes](WEB_KUBERNETES.md) 11 | 3. [How to use](WEB_HOWTO.md) 12 | 13 | ### VS Code extensions 14 | 15 | VS Code extension available on the [Marketplace](https://marketplace.visualstudio.com/items?itemName=camel-karavan.karavan). 16 | 17 | Extensions for VS Code Compatible Editors available on [Open VSX Registry](https://open-vsx.org/extension/camel-karavan/karavan) 18 | 19 | 1. [Install](VSCODE_INSTALL.md) 20 | 2. [How to use](VSCODE_HOWTO.md) 21 | 22 | 23 | ## Developer Guide 24 | 25 | 1. [How to build Karavan](DEV.md) 26 | -------------------------------------------------------------------------------- /docs/VSCODE_HOWTO.md: -------------------------------------------------------------------------------- 1 | # How to use Karavan 2 | 3 | ## Create new Integration 4 | 5 | ![create](../images/create.png) 6 | 7 | ## Edit an existing Integration 8 | 9 | ![open](../images/open.png) 10 | 11 | 12 | ## Run integration locally 13 | * Run in UI: click `Run` button 14 | 15 | ![run](../images/run.png) 16 | 17 | * Run using CLI 18 | ```shell 19 | jbang -Dcamel.jbang.version=4.10.2 camel@apache/camel run $INTEGRATION.yaml --max-messages=10 --logging-level=info 20 | ``` 21 | 22 | ## Export integration to Maven project 23 | 24 | * Export using context menu 25 | ![export](../images/export.png) 26 | 27 | * Export using CLI 28 | ```shell 29 | jbang -Dcamel.jbang.version=4.10.2 camel@apache/camel export --directory=export 30 | ``` -------------------------------------------------------------------------------- /docs/VSCODE_INSTALL.md: -------------------------------------------------------------------------------- 1 | # Install Karavan extension in VS Code 2 | 3 | ## Prerequisites 4 | * Microsoft VS Code installed. You can get the most recent version from (https://code.visualstudio.com/) for your chosen operating system. 5 | * [Camel JBang] installed(https://camel.apache.org/manual/camel-jbang.html) 6 | 7 | ## How to install 8 | 1. Open your VS Code Integrated Development Environment (IDE). 9 | 2. In the VS Code Activity Bar, select Extensions. (Alternatively, press Ctrl+Shift+X). 10 | 3. In the search bar, type **Karavan** 11 | 4. In the **Apache Camel Karavan** box, click **Install**. 12 | 13 | ![install](../images/install.png) 14 | -------------------------------------------------------------------------------- /docs/WEB_DOCKER.md: -------------------------------------------------------------------------------- 1 | ## Karavan in Docker 2 | 3 | ### Requirements 4 | 1. Linux or MacOS 5 | 2. Docker Engine 24+ 6 | 7 | ### How to run Karavan on Docker 8 | 1. Download [docker-compose.yaml](install/karavan-docker/docker-compose.yaml) 9 | 2. Set Environment Variables for Git Repository and Container Image Registry connections in docker-compose.yaml 10 | 2. Create network 11 | ``` 12 | docker network create karavan 13 | ``` 14 | 3. Start Karavan 15 | ``` 16 | docker compose up 17 | ``` 18 | 3. Open http://localhost:8080 19 | -------------------------------------------------------------------------------- /docs/WEB_HOWTO.md: -------------------------------------------------------------------------------- 1 | # How to use Karavan 2 | 3 | 4 | [![Watch the video](https://img.youtube.com/vi/trsZyzEvbWw/default.jpg)](https://youtu.be/trsZyzEvbWw) 5 | 6 | 7 | -------------------------------------------------------------------------------- /docs/WEB_KUBERNETES.md: -------------------------------------------------------------------------------- 1 | ## Karavan in Kubernetes 2 | 3 | ### Requirements 4 | 1. minikube v1.30+ installed with `--driver=hyperkit` 5 | 6 | ### Install on minikube 7 | 1. Start minikube 8 | ``` 9 | minikube start 10 | ``` 11 | 2. Enable registry addon 12 | ``` 13 | minikube addons enable registry 14 | ``` 15 | 3. Start dashboard (optional) 16 | ``` 17 | minikube dashboard 18 | ``` 19 | 4. Download [karavan-kubernetes](install/karavan-kubernetes) folder 20 | 21 | 5. Get registry IP and set it to `secrets.yaml` 22 | ``` 23 | kubectl get service registry -n kube-system -o jsonpath="{.spec.clusterIP}" 24 | ``` 25 | 26 | 6. Set Secrets for Git Repository and Container Image Registry connections in `secrets.yaml` 27 | 28 | 6. Install Karavan using kubectl 29 | ``` 30 | kubectl create namespace karavan 31 | kubectl apply -k . 32 | ``` 33 | 7. Expose karavan service 34 | ``` 35 | minikube service karavan --url --namespace karavan 36 | ``` -------------------------------------------------------------------------------- /docs/install/karavan-docker/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | name: karavan 2 | 3 | services: 4 | 5 | karavan: 6 | container_name: karavan 7 | image: ghcr.io/apache/camel-karavan:4.10.2 8 | ports: 9 | - "8080:8080" 10 | environment: 11 | - KARAVAN_GIT_REPOSITORY=${KARAVAN_GIT_REPOSITORY} 12 | - KARAVAN_GIT_USERNAME=${KARAVAN_GIT_USERNAME} 13 | - KARAVAN_GIT_PASSWORD=${KARAVAN_GIT_PASSWORD} 14 | - KARAVAN_GIT_BRANCH=main 15 | - KARAVAN_CONTAINER_IMAGE_REGISTRY=registry:5000 16 | - KARAVAN_CONTAINER_IMAGE_REGISTRY_USERNAME= 17 | - KARAVAN_CONTAINER_IMAGE_REGISTRY_PASSWORD= 18 | - KARAVAN_CONTAINER_IMAGE_GROUP=karavan 19 | - KARAVAN_DOCKER_NETWORK=karavan 20 | volumes: 21 | - "/var/run/docker.sock:/var/run/docker.sock" 22 | labels: 23 | - "org.apache.camel.karavan/type=internal" 24 | networks: 25 | - karavan 26 | 27 | registry: 28 | container_name: registry 29 | image: registry:2 30 | restart: always 31 | ports: 32 | - "5555:5000" 33 | labels: 34 | - "org.apache.camel.karavan/type=internal" 35 | networks: 36 | - karavan 37 | 38 | networks: 39 | karavan: 40 | name: karavan -------------------------------------------------------------------------------- /docs/install/karavan-kubernetes/kustomization.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: kustomize.config.k8s.io/v1beta1 2 | kind: Kustomization 3 | commonLabels: 4 | app: "karavan" 5 | app.kubernetes.io/part-of: "karavan" 6 | app.kubernetes.io/name: "karavan" 7 | app.kubernetes.io/version: "4.10.2" 8 | namespace: "karavan" 9 | resources: 10 | - secret.yaml 11 | - role.yaml 12 | - service-account.yaml 13 | - role-binding.yaml 14 | - deployment.yaml 15 | - service.yaml 16 | 17 | # Patch for Service with nodePort 18 | patches: 19 | - path: ./nodePort.yaml 20 | target: 21 | kind: "Service" 22 | name: "karavan" 23 | 24 | # Replace secret from.env if required 25 | secretGenerator: 26 | - name: karavan 27 | behavior: replace 28 | options: 29 | disableNameSuffixHash: true 30 | envs: 31 | - .env -------------------------------------------------------------------------------- /docs/install/karavan-kubernetes/nodePort.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: "v1" 2 | kind: "Service" 3 | metadata: 4 | name: "karavan" 5 | spec: 6 | ports: 7 | - name: "http" 8 | nodePort: 30777 9 | port: 80 10 | protocol: "TCP" 11 | targetPort: 8080 12 | selector: 13 | app: "karavan" 14 | type: "NodePort" -------------------------------------------------------------------------------- /docs/install/karavan-kubernetes/role-binding.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: "rbac.authorization.k8s.io/v1" 3 | kind: "RoleBinding" 4 | metadata: 5 | name: "karavan-role-binding" 6 | roleRef: 7 | kind: "Role" 8 | apiGroup: "rbac.authorization.k8s.io" 9 | name: "karavan" 10 | subjects: 11 | - kind: "ServiceAccount" 12 | apiGroup: "" 13 | name: "karavan" 14 | --- 15 | apiVersion: "rbac.authorization.k8s.io/v1" 16 | kind: "RoleBinding" 17 | metadata: 18 | name: "karavan-cluster-role-binding" 19 | roleRef: 20 | kind: "ClusterRole" 21 | apiGroup: "rbac.authorization.k8s.io" 22 | name: "view" 23 | subjects: 24 | - kind: "ServiceAccount" 25 | apiGroup: "" 26 | name: "karavan" -------------------------------------------------------------------------------- /docs/install/karavan-kubernetes/role.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: "rbac.authorization.k8s.io/v1" 3 | kind: "Role" 4 | metadata: 5 | name: "karavan" 6 | rules: 7 | - apiGroups: [""] 8 | resources: ["secrets", "configmaps", "serviceaccounts"] 9 | verbs: ["*"] 10 | - apiGroups: [""] 11 | resources: ["persistentvolumes", "persistentvolumeclaims"] 12 | verbs: ["*"] 13 | - apiGroups: [""] 14 | resources: ["pods", "services", "replicationcontrollers"] 15 | verbs: ["*"] 16 | - apiGroups: ["route.openshift.io"] 17 | resources: ["routes"] 18 | verbs: ["*"] 19 | - apiGroups: ["apps"] 20 | resources: ["deployments"] 21 | verbs: ["*"] 22 | - apiGroups: ["networking.k8s.io"] 23 | resources: ["ingresses"] 24 | verbs: ["*"] 25 | - apiGroups: ["image.openshift.io"] 26 | resources: ["imagestreams/layers"] 27 | verbs: ["update", "get"] 28 | - apiGroups: [""] 29 | resources: ["pods/exec"] 30 | verbs: ["create", "get"] -------------------------------------------------------------------------------- /docs/install/karavan-kubernetes/secret.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: "v1" 3 | kind: "Secret" 4 | metadata: 5 | name: "karavan" 6 | stringData: 7 | karavan.keycloak.url: "https://localhost" 8 | karavan.keycloak.realm: "karavan" 9 | karavan.keycloak.frontend.clientId: "karavan" 10 | karavan.keycloak.backend.clientId: "karavan" 11 | karavan.keycloak.backend.secret: "secret" 12 | karavan.git.repository: "http://reporitory/karavan/karavan.git" 13 | karavan.git.username: "karavan" 14 | karavan.git.password: "karavan" 15 | karavan.git.branch: "main" 16 | karavan.container-image.registry: "registry:5000" 17 | karavan.container-image.group: "karavan" 18 | karavan.container-image.registry-username: 19 | karavan.container-image.registry-password: 20 | -------------------------------------------------------------------------------- /docs/install/karavan-kubernetes/service-account.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: "v1" 3 | kind: "ServiceAccount" 4 | metadata: 5 | name: "karavan" 6 | -------------------------------------------------------------------------------- /docs/install/karavan-kubernetes/service.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | apiVersion: "v1" 3 | kind: "Service" 4 | metadata: 5 | name: "karavan" 6 | spec: 7 | ports: 8 | - name: "http" 9 | # nodePort: 30777 10 | port: 80 11 | protocol: "TCP" 12 | targetPort: 8080 13 | - name: "https" 14 | port: 443 15 | protocol: "TCP" 16 | targetPort: 8080 17 | selector: 18 | app: "karavan" 19 | # type: "NodePort" 20 | type: "ClusterIP" -------------------------------------------------------------------------------- /images/architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/architecture.png -------------------------------------------------------------------------------- /images/create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/create.png -------------------------------------------------------------------------------- /images/designer-rest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/designer-rest.png -------------------------------------------------------------------------------- /images/designer-routes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/designer-routes.png -------------------------------------------------------------------------------- /images/export.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/export.png -------------------------------------------------------------------------------- /images/install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/install.png -------------------------------------------------------------------------------- /images/introduction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/introduction.png -------------------------------------------------------------------------------- /images/karavan-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/karavan-architecture.png -------------------------------------------------------------------------------- /images/karavan-clouds-large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/karavan-clouds-large.png -------------------------------------------------------------------------------- /images/karavan-clouds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/karavan-clouds.png -------------------------------------------------------------------------------- /images/karavan-dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/karavan-dashboard.png -------------------------------------------------------------------------------- /images/karavan-ipaas-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/karavan-ipaas-1.png -------------------------------------------------------------------------------- /images/karavan-ipaas-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/karavan-ipaas-2.png -------------------------------------------------------------------------------- /images/karavan-ipaas-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/karavan-ipaas-3.png -------------------------------------------------------------------------------- /images/karavan-ipaas-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/karavan-ipaas-4.png -------------------------------------------------------------------------------- /images/karavan-logo-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/karavan-logo-dark.png -------------------------------------------------------------------------------- /images/karavan-logo-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/karavan-logo-light.png -------------------------------------------------------------------------------- /images/karavan-right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/karavan-right.png -------------------------------------------------------------------------------- /images/karavan-vscode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/karavan-vscode.png -------------------------------------------------------------------------------- /images/karavan-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/karavan-web.png -------------------------------------------------------------------------------- /images/karavan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/karavan.png -------------------------------------------------------------------------------- /images/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/open.png -------------------------------------------------------------------------------- /images/run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/run.png -------------------------------------------------------------------------------- /images/topology.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/images/topology.png -------------------------------------------------------------------------------- /karavan-app/.dockerignore: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | * 17 | !target/*-runner 18 | !target/*-runner.jar 19 | !target/lib/* 20 | !target/quarkus-app/* 21 | src/* -------------------------------------------------------------------------------- /karavan-app/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.8/apache-maven-3.8.8-bin.zip 18 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 19 | -------------------------------------------------------------------------------- /karavan-app/Dockerfile.dockerignore: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | * 17 | !target/*-runner 18 | !target/*-runner.jar 19 | !target/lib/* 20 | !target/quarkus-app/* 21 | src/* -------------------------------------------------------------------------------- /karavan-app/src/main/docker/Dockerfile: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | FROM eclipse-temurin:17-jdk 17 | 18 | LABEL "org.opencontainers.image.title"="karavan" 19 | LABEL "org.opencontainers.image.description"="Apache Camel Karavan" 20 | LABEL "org.opencontainers.image.url"="https://camel.apache.org" 21 | LABEL "org.opencontainers.image.licenses"="Apache 2.0" 22 | LABEL "org.opencontainers.image.version"="4.8." 23 | LABEL "org.apache.camel.karavan/type"="internal" 24 | 25 | RUN mkdir /opt/app 26 | COPY target/*-runner.jar /opt/app/karavan.jar 27 | EXPOSE 8080 28 | 29 | CMD exec "java" \ 30 | ${JAVA_OPTS} \ 31 | "-jar" "/opt/app/karavan.jar" 32 | 33 | -------------------------------------------------------------------------------- /karavan-app/src/main/java/org/apache/camel/karavan/docker/DockerLogCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.apache.camel.karavan.docker; 19 | 20 | import com.github.dockerjava.api.async.ResultCallback; 21 | import com.github.dockerjava.api.model.Frame; 22 | 23 | import java.util.function.Consumer; 24 | 25 | public class DockerLogCallback extends ResultCallback.Adapter { 26 | 27 | private final Consumer action; 28 | 29 | public DockerLogCallback(Consumer action) { 30 | this.action = action; 31 | } 32 | 33 | @Override 34 | public void onNext(Frame frame) { 35 | action.accept(new String(frame.getPayload())); 36 | } 37 | 38 | } -------------------------------------------------------------------------------- /karavan-app/src/main/java/org/apache/camel/karavan/model/ContainerType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.apache.camel.karavan.model; 19 | 20 | public enum ContainerType { 21 | internal, 22 | devmode, 23 | devservice, 24 | packaged, 25 | build, 26 | unknown, 27 | } 28 | -------------------------------------------------------------------------------- /karavan-app/src/main/java/org/apache/camel/karavan/model/DockerComposeNetwork.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | package org.apache.camel.karavan.model; 19 | 20 | 21 | public class DockerComposeNetwork { 22 | 23 | private String name; 24 | private Boolean external; 25 | 26 | public DockerComposeNetwork() { 27 | } 28 | 29 | public String getName() { 30 | return name; 31 | } 32 | 33 | public void setName(String name) { 34 | this.name = name; 35 | } 36 | 37 | public Boolean getExternal() { 38 | return external; 39 | } 40 | 41 | public void setExternal(Boolean external) { 42 | this.external = external; 43 | } 44 | } -------------------------------------------------------------------------------- /karavan-app/src/main/java/org/apache/camel/karavan/model/KubernetesConfigMap.java: -------------------------------------------------------------------------------- 1 | package org.apache.camel.karavan.model; 2 | 3 | import java.util.Map; 4 | 5 | public class KubernetesConfigMap { 6 | 7 | private String name; 8 | private Map data; 9 | 10 | public KubernetesConfigMap() { 11 | } 12 | 13 | public KubernetesConfigMap(String name, Map data) { 14 | this.name = name; 15 | this.data = data; 16 | } 17 | 18 | public String getName() { 19 | return name; 20 | } 21 | 22 | public void setName(String name) { 23 | this.name = name; 24 | } 25 | 26 | public Map getData() { 27 | return data; 28 | } 29 | 30 | public void setData(Map data) { 31 | this.data = data; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /karavan-app/src/main/java/org/apache/camel/karavan/model/KubernetesSecret.java: -------------------------------------------------------------------------------- 1 | package org.apache.camel.karavan.model; 2 | 3 | import java.util.Map; 4 | 5 | public class KubernetesSecret { 6 | 7 | private String name; 8 | private Map data; 9 | 10 | public KubernetesSecret() { 11 | } 12 | 13 | public KubernetesSecret(String name, Map data) { 14 | this.name = name; 15 | this.data = data; 16 | } 17 | 18 | public String getName() { 19 | return name; 20 | } 21 | 22 | public void setName(String name) { 23 | this.name = name; 24 | } 25 | 26 | public Map getData() { 27 | return data; 28 | } 29 | 30 | public void setData(Map data) { 31 | this.data = data; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /karavan-app/src/main/resources/configuration/docker/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | git config --global credential.helper 'cache --timeout=3600' 4 | git_credential_fill() { 5 | echo url=$GIT_REPOSITORY 6 | echo username=$GIT_USERNAME 7 | echo password=$GIT_PASSWORD 8 | } 9 | git_credential_fill | git credential approve 10 | git clone --depth 1 --branch $GIT_BRANCH $GIT_REPOSITORY $CODE_DIR 11 | 12 | cd $CODE_DIR/$PROJECT_ID 13 | 14 | jbang -Dcamel.jbang.version=$CAMEL_VERSION camel@apache/camel export --local-kamelet-dir=$KAMELETS_DIR 15 | 16 | mvn package jib:build \ 17 | -Djib.allowInsecureRegistries=true \ 18 | -Djib.to.image=$IMAGE_REGISTRY/$IMAGE_GROUP/$PROJECT_ID:$TAG \ 19 | -Djib.to.auth.username=$IMAGE_REGISTRY_USERNAME \ 20 | -Djib.to.auth.password=$IMAGE_REGISTRY_PASSWORD 21 | -------------------------------------------------------------------------------- /karavan-app/src/main/resources/configuration/docker/builder.docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | ${projectId}-builder: 3 | environment: 4 | - PROJECT_ID=${projectId} 5 | - TAG=${tag} 6 | - GIT_REPOSITORY=${karavan.git.repository} 7 | - GIT_USERNAME=${karavan.git.username} 8 | - GIT_PASSWORD=${karavan.git.password} 9 | - GIT_BRANCH=${karavan.git.branch} 10 | - IMAGE_REGISTRY=${karavan.container-image.registry} 11 | - IMAGE_GROUP=${karavan.container-image.group} 12 | - IMAGE_REGISTRY_PASSWORD=${karavan.container-image.registry-password} 13 | - IMAGE_REGISTRY_USERNAME=${karavan.container-image.registry-username} -------------------------------------------------------------------------------- /karavan-app/src/main/resources/configuration/docker/components-blocklist.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/karavan-app/src/main/resources/configuration/docker/components-blocklist.txt -------------------------------------------------------------------------------- /karavan-app/src/main/resources/configuration/docker/kamelets-blocklist.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/karavan-app/src/main/resources/configuration/docker/kamelets-blocklist.txt -------------------------------------------------------------------------------- /karavan-app/src/main/resources/configuration/kubernetes/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | export NAMESPACE=$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace) 4 | 5 | git config --global credential.helper 'cache --timeout=3600' 6 | git_credential_fill() { 7 | echo url=$GIT_REPOSITORY 8 | echo username=$GIT_USERNAME 9 | echo password=$GIT_PASSWORD 10 | } 11 | git_credential_fill | git credential approve 12 | git clone --depth 1 --branch $GIT_BRANCH $GIT_REPOSITORY $CODE_DIR 13 | 14 | cd $CODE_DIR/$PROJECT_ID 15 | 16 | jbang -Dcamel.jbang.version=$CAMEL_VERSION camel@apache/camel export --local-kamelet-dir=$KAMELETS_DIR 17 | 18 | mvn package jib:build k8s:resource k8s:apply \ 19 | -Djkube.namespace=${NAMESPACE} \ 20 | -Djib.allowInsecureRegistries=true \ 21 | -Djib.to.image=${IMAGE_REGISTRY}/${IMAGE_GROUP}/${PROJECT_ID}:${TAG} \ 22 | -Djib.to.auth.username=${IMAGE_REGISTRY_USERNAME} \ 23 | -Djib.to.auth.password=${IMAGE_REGISTRY_PASSWORD} 24 | # -Djib.from.platforms=linux/arm64 \ 25 | # -Djib.platform.architecture=arm64 \ -------------------------------------------------------------------------------- /karavan-app/src/main/resources/configuration/kubernetes/builder.pod.jkube.yaml: -------------------------------------------------------------------------------- 1 | spec: 2 | containers: 3 | - env: 4 | - name: PROJECT_ID 5 | value: ${projectId} 6 | - name: TAG 7 | value: ${tag} 8 | - name: IMAGE_REGISTRY 9 | valueFrom: 10 | secretKeyRef: 11 | name: karavan 12 | key: karavan.container-image.registry 13 | - name: IMAGE_REGISTRY_USERNAME 14 | valueFrom: 15 | secretKeyRef: 16 | name: karavan 17 | key: karavan.container-image.registry-username 18 | - name: IMAGE_REGISTRY_PASSWORD 19 | valueFrom: 20 | secretKeyRef: 21 | name: karavan 22 | key: karavan.container-image.registry-password 23 | - name: IMAGE_GROUP 24 | valueFrom: 25 | secretKeyRef: 26 | name: karavan 27 | key: karavan.container-image.group 28 | - name: GIT_REPOSITORY 29 | valueFrom: 30 | secretKeyRef: 31 | name: karavan 32 | key: karavan.git.repository 33 | - name: GIT_USERNAME 34 | valueFrom: 35 | secretKeyRef: 36 | name: karavan 37 | key: karavan.git.username 38 | - name: GIT_PASSWORD 39 | valueFrom: 40 | secretKeyRef: 41 | name: karavan 42 | key: karavan.git.password 43 | - name: GIT_BRANCH 44 | valueFrom: 45 | secretKeyRef: 46 | name: karavan 47 | key: karavan.git.branch -------------------------------------------------------------------------------- /karavan-app/src/main/resources/configuration/kubernetes/components-blocklist.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/karavan-app/src/main/resources/configuration/kubernetes/components-blocklist.txt -------------------------------------------------------------------------------- /karavan-app/src/main/resources/configuration/kubernetes/kamelets-blocklist.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/karavan-app/src/main/resources/configuration/kubernetes/kamelets-blocklist.txt -------------------------------------------------------------------------------- /karavan-app/src/main/resources/metadata/.gitignore: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # Ignore everything in this directory 17 | .gitignore 18 | # Except this file 19 | !.gitignore 20 | -------------------------------------------------------------------------------- /karavan-app/src/main/resources/services/docker/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | services: 4 | 5 | artemis: 6 | container_name: artemis 7 | image: apache/activemq-artemis:2.37.0 8 | ports: 9 | - "8161:8161" 10 | - "61616:61616" 11 | - "5672:5672" 12 | environment: 13 | ARTEMIS_USER: artemis 14 | ARTEMIS_PASSWORD: artemis 15 | ANONYMOUS_LOGIN: false 16 | 17 | kafka: 18 | container_name: kafka 19 | image: apache/kafka:3.7.0 20 | ports: 21 | - 9092:9092 22 | 23 | postgres: 24 | container_name: postgres 25 | image: postgres:16.2 26 | restart: always 27 | environment: 28 | - POSTGRES_USER=postgres 29 | - POSTGRES_PASSWORD=postgres 30 | ports: 31 | - '5432:5432' 32 | 33 | adminer: 34 | container_name: adminer 35 | image: adminer:4.8.1-standalone 36 | restart: always 37 | ports: 38 | - 8080:8080 39 | 40 | greenmail: 41 | container_name: greenmail 42 | image: greenmail/standalone:2.0.0 43 | ports: 44 | - "3025:3025" 45 | - "3110:3110" 46 | - "3143:3143" 47 | - "3465:3465" 48 | - "3993:3993" 49 | - "3995:3995" 50 | - "9980:8080" 51 | -------------------------------------------------------------------------------- /karavan-app/src/main/resources/templates/docker/application.properties: -------------------------------------------------------------------------------- 1 | camel.karavan.projectId=${projectId} 2 | camel.karavan.projectName=${projectName} 3 | camel.jbang.gav=org.camel.karavan.demo:${packageSuffix}:1 4 | camel.jbang.runtime=camel-main 5 | camel.jbang.version=4.10.2 6 | camel.jbang.dependencies=camel-console,camel-platform-http-main 7 | camel.jbang.jib-maven-plugin-version=3.4.4 8 | camel.server.enabled=true 9 | camel.server.healthCheckEnabled=true 10 | camel.server.devConsoleEnabled=true 11 | camel.main.name=${projectId} 12 | camel.main.tracingStandby=true 13 | camel.trace.enabled=true 14 | camel.main.autoConfigurationFailFast=false 15 | camel.routecontroller.superviseEnabled=true 16 | camel.routecontroller.backoffDelay=5000 17 | camel.routecontroller.backoffMaxAttempts=100 18 | camel.routecontroller.initialDelay=1000 19 | camel.routecontroller.threadPoolSize=3 20 | camel.context.dev-console=true 21 | camel.health.enabled=true 22 | camel.health.exposure-level=full 23 | jkube.version=1.18.1 24 | jib.from.image=gcr.io/distroless/java17@sha256:68e2373f7bef9486c08356bd9ffd3b40b56e6b9316c5f6885eb58b1d9093b43d 25 | -------------------------------------------------------------------------------- /karavan-app/src/main/resources/templates/docker/database-bean-template.camel.yaml: -------------------------------------------------------------------------------- 1 | - beans: 2 | - name: PostgresDatabase 3 | properties: 4 | username: 'username' 5 | password: 'password' 6 | url: 'jdbc:postgresql://serverName:serverPort/databaseName' 7 | driverClassName: org.postgresql.Driver 8 | type: '#class:org.apache.commons.dbcp2.BasicDataSource' 9 | - name: MySqlDatabase 10 | properties: 11 | username: 'username' 12 | password: 'password' 13 | url: 'jdbc:mysql://serverName:serverPort/databaseName' 14 | driverClassName: com.mysql.cj.jdbc.Driver 15 | type: '#class:org.apache.commons.dbcp2.BasicDataSource' 16 | - name: OracleDatabase 17 | properties: 18 | username: 'username' 19 | password: 'password' 20 | url: 'jdbc:oracle:thin:@serverName:serverPort/databaseName' 21 | driverClassName: oracle.jdbc.driver.OracleDriver 22 | type: '#class:org.apache.commons.dbcp2.BasicDataSource' -------------------------------------------------------------------------------- /karavan-app/src/main/resources/templates/docker/docker-compose.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | ${projectId}: 3 | image: ${projectImage} 4 | restart: always 5 | ports: 6 | - "${projectPort}:8080" 7 | networks: 8 | - karavan 9 | -------------------------------------------------------------------------------- /karavan-app/src/main/resources/templates/docker/messaging-bean-template.camel.yaml: -------------------------------------------------------------------------------- 1 | - beans: 2 | - name: JMSArtemis 3 | properties: 4 | brokerURL: 'tcp://serverHost:serverPort' 5 | type: '#class:org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory' 6 | - name: AMQP 7 | properties: 8 | brokerURL: 'amqp://serverHost:serverPort' 9 | type: "#class:org.apache.qpid.jms.JmsConnectionFactory" -------------------------------------------------------------------------------- /karavan-app/src/main/resources/templates/docker/org.apache.camel.AggregationStrategy.java: -------------------------------------------------------------------------------- 1 | import org.apache.camel.AggregationStrategy; 2 | import org.apache.camel.Configuration; 3 | import org.apache.camel.BindToRegistry; 4 | import org.apache.camel.Exchange; 5 | 6 | @Configuration 7 | @BindToRegistry("${NAME}") 8 | public class ${NAME} implements AggregationStrategy { 9 | @Override 10 | public Exchange aggregate(Exchange oldExchange, Exchange newExchange) { 11 | 12 | if (oldExchange == null) { 13 | return newExchange; 14 | } 15 | 16 | String oldBody = oldExchange.getIn().getBody(String.class); 17 | String newBody = newExchange.getIn().getBody(String.class); 18 | oldExchange.getIn().setBody(oldBody + "+" + newBody); 19 | return oldExchange; 20 | } 21 | } -------------------------------------------------------------------------------- /karavan-app/src/main/resources/templates/docker/org.apache.camel.Processor.java: -------------------------------------------------------------------------------- 1 | import org.apache.camel.BindToRegistry; 2 | import org.apache.camel.Configuration; 3 | import org.apache.camel.Exchange; 4 | import org.apache.camel.Processor; 5 | 6 | @Configuration 7 | @BindToRegistry("${NAME}") 8 | public class ${NAME} implements Processor { 9 | 10 | public void process(Exchange exchange) throws Exception { 11 | exchange.getIn().setBody("Hello World"); 12 | } 13 | } -------------------------------------------------------------------------------- /karavan-app/src/main/resources/templates/kubernetes/application.properties: -------------------------------------------------------------------------------- 1 | camel.karavan.projectId=${projectId} 2 | camel.karavan.projectName=${projectName} 3 | camel.jbang.gav=org.camel.karavan.demo:${packageSuffix}:1 4 | camel.jbang.runtime=camel-main 5 | camel.jbang.version=4.10.2 6 | camel.jbang.dependencies=camel-console,camel-platform-http-main 7 | camel.jbang.jib-maven-plugin-version=3.4.4 8 | camel.health.enabled=true 9 | camel.health.exposure-level=full 10 | camel.server.enabled=true 11 | camel.server.healthCheckEnabled=true 12 | camel.server.devConsoleEnabled=true 13 | camel.main.name=${projectId} 14 | camel.trace.enabled=true 15 | camel.main.tracingStandby=true 16 | camel.main.autoConfigurationFailFast=false 17 | camel.routecontroller.superviseEnabled=true 18 | camel.routecontroller.backoffDelay=5000 19 | camel.routecontroller.backoffMaxAttempts=100 20 | camel.routecontroller.initialDelay=1000 21 | camel.routecontroller.threadPoolSize=3 22 | camel.context.dev-console=true 23 | label.runtime=app.kubernetes.io/runtime 24 | jib.from.image=gcr.io/distroless/java17@sha256:68e2373f7bef9486c08356bd9ffd3b40b56e6b9316c5f6885eb58b1d9093b43d 25 | #jib.from.image=gcr.io/distroless/java17-debian11:nonroot-arm64 26 | jkube.version=1.18.1 27 | jkube.skip.build=true 28 | jkube.imagePullPolicy=Always 29 | jkube.enricher.jkube-controller.type=Deployment 30 | jkube.enricher.jkube-service.port=80:8080,443:8080 31 | jkube.enricher.jkube-project-label.group=karavan 32 | jkube.enricher.jkube-project-label.provider=karavan 33 | jkube.enricher.jkube-well-known-labels.partOf=${projectId} 34 | jkube.recreate=true -------------------------------------------------------------------------------- /karavan-app/src/main/resources/templates/kubernetes/configmap.jkube.yaml: -------------------------------------------------------------------------------- 1 | data: 2 | application.properties: | 3 | # application properties file 4 | welcome = Hello from Kubernetes ConfigMap!!! 5 | dummy = some value -------------------------------------------------------------------------------- /karavan-app/src/main/resources/templates/kubernetes/database-bean-template.camel.yaml: -------------------------------------------------------------------------------- 1 | - beans: 2 | - name: PostgresDatabase 3 | properties: 4 | username: 'username' 5 | password: 'password' 6 | url: 'jdbc:postgresql://serverName:serverPort/databaseName' 7 | driverClassName: org.postgresql.Driver 8 | type: '#class:org.apache.commons.dbcp2.BasicDataSource' 9 | - name: MySqlDatabase 10 | properties: 11 | username: 'username' 12 | password: 'password' 13 | url: 'jdbc:mysql://serverName:serverPort/databaseName' 14 | driverClassName: com.mysql.cj.jdbc.Driver 15 | type: '#class:org.apache.commons.dbcp2.BasicDataSource' 16 | - name: OracleDatabase 17 | properties: 18 | username: 'username' 19 | password: 'password' 20 | url: 'jdbc:oracle:thin:@serverName:serverPort/databaseName' 21 | driverClassName: oracle.jdbc.driver.OracleDriver 22 | type: '#class:org.apache.commons.dbcp2.BasicDataSource' -------------------------------------------------------------------------------- /karavan-app/src/main/resources/templates/kubernetes/deployment.jkube.yaml: -------------------------------------------------------------------------------- 1 | spec: 2 | replicas: 1 3 | template: 4 | spec: 5 | serviceAccount: karavan -------------------------------------------------------------------------------- /karavan-app/src/main/resources/templates/kubernetes/ingress.jkube.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: networking.k8s.io/v1 2 | kind: Ingress 3 | metadata: 4 | name: karavan-example-ingress 5 | spec: 6 | tls: 7 | - hosts: 8 | - https-example.foo.com 9 | secretName: karavan-secret-tls 10 | rules: 11 | - host: https-example.foo.com 12 | http: 13 | paths: 14 | - path: / 15 | pathType: Prefix 16 | backend: 17 | service: 18 | name: service1 19 | port: 20 | number: 80 -------------------------------------------------------------------------------- /karavan-app/src/main/resources/templates/kubernetes/messaging-bean-template.camel.yaml: -------------------------------------------------------------------------------- 1 | - beans: 2 | - name: JMSArtemis 3 | properties: 4 | brokerURL: 'tcp://serverHost:serverPort' 5 | type: '#class:org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory' 6 | - name: AMQP 7 | properties: 8 | brokerURL: 'amqp://serverHost:serverPort' 9 | type: "#class:org.apache.qpid.jms.JmsConnectionFactory" -------------------------------------------------------------------------------- /karavan-app/src/main/resources/templates/kubernetes/org.apache.camel.AggregationStrategy.java: -------------------------------------------------------------------------------- 1 | import org.apache.camel.AggregationStrategy; 2 | import org.apache.camel.Configuration; 3 | import org.apache.camel.BindToRegistry; 4 | import org.apache.camel.Exchange; 5 | 6 | @Configuration 7 | @BindToRegistry("${NAME}") 8 | public class ${NAME} implements AggregationStrategy { 9 | @Override 10 | public Exchange aggregate(Exchange oldExchange, Exchange newExchange) { 11 | 12 | if (oldExchange == null) { 13 | return newExchange; 14 | } 15 | 16 | String oldBody = oldExchange.getIn().getBody(String.class); 17 | String newBody = newExchange.getIn().getBody(String.class); 18 | oldExchange.getIn().setBody(oldBody + "+" + newBody); 19 | return oldExchange; 20 | } 21 | } -------------------------------------------------------------------------------- /karavan-app/src/main/resources/templates/kubernetes/org.apache.camel.Processor.java: -------------------------------------------------------------------------------- 1 | import org.apache.camel.BindToRegistry; 2 | import org.apache.camel.Configuration; 3 | import org.apache.camel.Exchange; 4 | import org.apache.camel.Processor; 5 | 6 | @Configuration 7 | @BindToRegistry("${NAME}") 8 | public class ${NAME} implements Processor { 9 | 10 | public void process(Exchange exchange) throws Exception { 11 | exchange.getIn().setBody("Hello World"); 12 | } 13 | } -------------------------------------------------------------------------------- /karavan-app/src/main/webui/index.html: -------------------------------------------------------------------------------- 1 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | Karavan 25 | 26 | 27 | 28 |
29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /karavan-app/src/main/webui/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/karavan-app/src/main/webui/public/favicon.ico -------------------------------------------------------------------------------- /karavan-app/src/main/webui/public/karavan-logo-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/karavan-app/src/main/webui/public/karavan-logo-light.png -------------------------------------------------------------------------------- /karavan-app/src/main/webui/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Karavan", 3 | "name": "Karavan", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /karavan-app/src/main/webui/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/api/ErrorEventBus.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | import {Subject} from 'rxjs'; 18 | 19 | const apiErrors = new Subject(); 20 | 21 | export const ErrorEventBus = { 22 | 23 | sendApiError: (error: any) => apiErrors.next(error), 24 | onApiError: () => apiErrors.asObservable(), 25 | } 26 | -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/api/ProjectEventBus.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | import {Subject} from 'rxjs'; 18 | 19 | const log = new Subject<["add" | "set", string]>(); 20 | 21 | export const ProjectEventBus = { 22 | 23 | sendLog: (type: "add" | "set", m: string) => log.next([type, m]), 24 | onLog: () => log.asObservable(), 25 | } 26 | -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/containers/ContainerPage.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | .container-page { 19 | display: flex; 20 | flex-direction: column; 21 | height: 100%; 22 | } 23 | 24 | .container-page-section { 25 | background-color: var(--pf-v5-global--BackgroundColor--light-300); 26 | flex-grow: 1; 27 | flex-shrink: 1; 28 | overflow: auto; 29 | } -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/designer/ErrorBoundaryWrapper.tsx: -------------------------------------------------------------------------------- 1 | import React, {ReactNode} from "react"; 2 | 3 | export interface ErrorBoundaryState { 4 | hasError: boolean; 5 | error: Error | null; 6 | } 7 | 8 | export class ErrorBoundaryWrapper extends React.Component<{ 9 | children: ReactNode; 10 | onError: (error: Error) => void; 11 | }> { 12 | componentDidCatch(error: Error, errorInfo: React.ErrorInfo) { 13 | // Handle error (logging, etc.) 14 | console.error("Error caught in ErrorBoundary:", error, errorInfo); 15 | this.props.onError(error); 16 | } 17 | 18 | render() { 19 | return this.props.children; 20 | } 21 | } -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/designer/kamelet/KameletDesigner.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | import React from 'react'; 18 | import { 19 | PageSection, 20 | } from '@patternfly/react-core'; 21 | import '../karavan.css'; 22 | import './kamelet.css'; 23 | import {KameletAnnotationsPanel} from "./KameletAnnotationsPanel"; 24 | import {KameletDefinitionsPanel} from "./KameletDefinitionsPanel"; 25 | 26 | export function KameletDesigner() { 27 | 28 | return ( 29 | 30 | 31 | 32 |
33 | 34 | 35 | 36 | ) 37 | } 38 | -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/designer/property/property/BeanProperties.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | .karavan .properties .bean-properties .pf-v5-c-form__group-control { 19 | display: flex; 20 | flex-direction: column; 21 | gap: 6px; 22 | } 23 | 24 | .karavan .properties .bean-property { 25 | display: flex; 26 | flex-direction: row; 27 | gap: 3px; 28 | } 29 | 30 | .karavan .properties .bean-property .argument-name, 31 | .karavan .properties .bean-property .field-name { 32 | flex: 1; 33 | } 34 | 35 | .karavan .properties .bean-property .field-value { 36 | flex: 2; 37 | } 38 | .karavan .properties .bean-property .argument-value { 39 | flex: 4; 40 | } 41 | 42 | .karavan .properties .bean-property .delete-button { 43 | padding: 3px; 44 | color: #b1b1b7; 45 | } -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/designer/property/property/PropertyPlaceholderDropdown.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | .karavan .properties .property-placeholder-toggle { 19 | padding-left: 6px; 20 | padding-right: 6px; 21 | } 22 | 23 | .karavan .properties .property-placeholder-toggle .pf-v5-c-button__icon.pf-m-start { 24 | margin-inline-end: 0; 25 | } 26 | 27 | .karavan .properties .property-placeholder-toggle .pf-v5-c-menu-toggle__controls { 28 | display: none; 29 | } 30 | 31 | .karavan .properties .property-placeholder-dropdown .pf-v5-c-menu__group-title { 32 | font-weight: bold; 33 | font-size: 13px; 34 | } 35 | 36 | .pf-v5-c-popover .property-placeholder-toggle-form { 37 | width: 300px; 38 | } 39 | 40 | .pf-v5-c-popover .property-placeholder-toggle-form .pf-v5-c-form__group { 41 | grid-template-columns: 1fr 2fr; 42 | } -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/designer/property/property/VariablesDropdown.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | .karavan .properties .variables-toggle { 19 | padding-left: 6px; 20 | padding-right: 6px; 21 | } 22 | 23 | .karavan .properties .variables-toggle .pf-v5-c-button__icon.pf-m-start { 24 | margin-inline-end: 0; 25 | } 26 | 27 | .karavan .properties .variables-toggle .pf-v5-c-menu-toggle__controls { 28 | display: none; 29 | } 30 | 31 | .pf-v5-c-popover .variables-toggle-form { 32 | width: 300px; 33 | } 34 | 35 | .pf-v5-c-popover .variables-toggle-form .pf-v5-c-form__group { 36 | grid-template-columns: 1fr 2fr; 37 | } -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/designer/route/useResizeObserver.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | import { useLayoutEffect, useRef } from 'react'; 19 | 20 | function useResizeObserver(callback: (target: T, entry: ResizeObserverEntry) => void) { 21 | const ref = useRef(null) 22 | 23 | useLayoutEffect(() => { 24 | const element = ref?.current; 25 | if (!element) { 26 | return; 27 | } 28 | const observer1 = new ResizeObserver((entries) => { 29 | callback(element, entries[0]); 30 | }); 31 | observer1.observe(element); 32 | return () => { 33 | observer1.disconnect(); 34 | }; 35 | }, [callback, ref]); 36 | 37 | return ref 38 | } 39 | 40 | export default useResizeObserver; -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/designer/utils/ElementIcon.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | 19 | .add-button-icon, .insert-button-icon { 20 | fill: var(--pf-v5-global--primary-color--100); 21 | width: 20px; 22 | height: 20px; 23 | background: transparent; 24 | vertical-align: text-bottom; 25 | } 26 | 27 | .copy-button-icon { 28 | width: 20px; 29 | height: 20px; 30 | background: transparent; 31 | vertical-align: text-bottom; 32 | } 33 | 34 | .delete-button-icon { 35 | fill: var(--pf-v5-global--danger-color--100); 36 | width: 20px; 37 | height: 20px; 38 | background: transparent; 39 | vertical-align: text-bottom; 40 | } 41 | -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/index.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | import React from 'react'; 19 | import ReactDOM from 'react-dom/client'; 20 | import "@patternfly/patternfly/patternfly.css"; 21 | import './index.css'; 22 | import {Main} from "./main/Main"; 23 | import {BrowserRouter} from "react-router-dom"; 24 | 25 | ReactDOM.createRoot(document.getElementById("root")!).render( 26 | 27 | 28 |
29 | 30 | 31 | ); 32 | -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/project/DevModeToolbar.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | .karavan .refresher { 19 | width: 34px; 20 | height: 34px; 21 | } 22 | 23 | .karavan .refresher .spinner { 24 | position: absolute; 25 | width: 34px; 26 | height: 34px; 27 | } 28 | 29 | .karavan .refresher .button { 30 | position: absolute; 31 | width: 34px; 32 | height: 34px; 33 | padding: 0; 34 | font-size: 16px; 35 | } 36 | 37 | .karavan .refresher .button .pf-v5-c-button__icon { 38 | margin: 0; 39 | } 40 | 41 | .karavan .toolbar .dev-action-button-place { 42 | --pf-v5-l-flex--spacer: 12px; 43 | } 44 | 45 | .karavan .toolbar .dev-action-button-place:last-child { 46 | --pf-v5-l-flex--spacer: 0; 47 | } -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/project/beans/BeanFilesDropdown.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | .bean-wizard .bean-wizard-toggle { 19 | padding-left: 6px; 20 | padding-right: 6px; 21 | } 22 | 23 | .bean-wizard .bean-wizard-toggle .pf-v5-c-button__icon.pf-m-start { 24 | margin-inline-end: 0; 25 | } 26 | 27 | .bean-wizard .bean-wizard-toggle .pf-v5-c-menu-toggle__controls { 28 | display: none; 29 | } 30 | -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/project/devmode.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | .karavan .refresher { 19 | width: 34px; 20 | height: 34px; 21 | } 22 | 23 | .karavan .refresher .spinner { 24 | position: absolute; 25 | width: 34px; 26 | height: 34px; 27 | } 28 | 29 | .karavan .refresher .button { 30 | position: absolute; 31 | width: 34px; 32 | height: 34px; 33 | padding: 0; 34 | font-size: 16px; 35 | } 36 | 37 | .karavan .refresher .button .pf-v5-c-button__icon { 38 | margin: 0; 39 | } -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/project/files/DiffFileModal.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | .karavan-diff-modal { 19 | height: 90%; 20 | } -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/project/package/Package.css: -------------------------------------------------------------------------------- 1 | .karavan .project-page .project-package .toolbar { 2 | display: flex; 3 | gap: 12px; 4 | } -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/project/trace/trace.css: -------------------------------------------------------------------------------- 1 | .trace-modal { 2 | height: 90%; 3 | } 4 | 5 | .trace-no-padding { 6 | padding: 0; 7 | } 8 | 9 | .trace-padding-bottom-only { 10 | padding: 0 0 var(--pf-v5-c-panel__header--PaddingBottom) 0; 11 | } 12 | 13 | .trace-modal .pf-v5-c-modal-box__body { 14 | display: flex; 15 | } 16 | 17 | .trace-modal .container { 18 | display: flex; 19 | flex-direction: row; 20 | padding: 0; 21 | flex: 1; 22 | } 23 | 24 | .trace-modal .panel1 { 25 | flex: 1; 26 | padding: 10px; 27 | } 28 | 29 | .trace-modal .panel1 .scrollable, 30 | .trace-modal .panel2 .scrollable { 31 | overflow-y: auto; 32 | height: 95%; 33 | padding-top: 10px; 34 | } 35 | 36 | .trace-modal .panel2 { 37 | flex: 4; 38 | padding: 10px; 39 | } 40 | 41 | /*.trace-modal .panel2 .pf-v5-c-tab-content {*/ 42 | /* overflow-y: auto;*/ 43 | /* height: 100%;*/ 44 | /*}*/ -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/topology/CustomGroup.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | import * as React from 'react'; 19 | 20 | import './topology.css'; 21 | import {DefaultGroup, LabelPosition, observer} from '@patternfly/react-topology'; 22 | 23 | const CustomGroup: React.FC = observer(({ element, ...rest }) => { 24 | return ( 25 | 32 | 33 | ) 34 | }) 35 | export default CustomGroup; -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/topology/TopologyBeans.css: -------------------------------------------------------------------------------- 1 | .karavan .topology-panel .topology-beans-card { 2 | position: absolute; 3 | top: 6px; 4 | right: 6px; 5 | } 6 | 7 | .karavan .topology-panel .topology-beans-card .pf-v5-c-card__title { 8 | padding: 5px; 9 | display: flex; 10 | justify-content: center; 11 | } 12 | 13 | .karavan .topology-panel .topology-beans-card .card-body { 14 | display: flex; 15 | flex-direction: column; 16 | gap: 5px; 17 | padding: 0 10px 10px 10px; 18 | } 19 | 20 | .karavan .topology-panel .topology-beans-card .pf-v5-c-label { 21 | background-color: white; 22 | } 23 | 24 | .karavan .topology-panel .topology-beans-card .pf-v5-c-label__content::before { 25 | border-radius: 4px; 26 | } 27 | .karavan .topology-panel .topology-beans-card .bean-button { 28 | padding: 0; 29 | display: flex; 30 | } 31 | 32 | .karavan .topology-panel .topology-beans-card .pf-v5-c-badge { 33 | min-width: 32px; 34 | font-weight: normal; 35 | } 36 | 37 | .karavan .topology-panel .topology-beans-card .pf-v5-c-label__icon { 38 | height: unset; 39 | } 40 | 41 | .karavan .topology-panel .topology-beans-card .bean-button .pf-v5-c-button__icon { 42 | margin-top: auto; 43 | margin-bottom: auto; 44 | height: 16px; 45 | width: 16px; 46 | } -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/topology/TopologyLegend.css: -------------------------------------------------------------------------------- 1 | .karavan .topology-panel .topology-legend-card { 2 | position: absolute; 3 | bottom: 6px; 4 | right: 6px; 5 | display: flex; 6 | flex-direction: row; 7 | align-items: center; 8 | } 9 | 10 | .karavan .topology-panel .topology-legend-card .pf-v5-c-card__title { 11 | padding: 5px; 12 | display: flex; 13 | justify-content: center; 14 | } 15 | 16 | .karavan .topology-panel .topology-legend-card .card-body { 17 | display: flex; 18 | flex-direction: row; 19 | gap: 5px; 20 | padding: 10px 10px 10px 10px; 21 | } 22 | 23 | .karavan .topology-panel .topology-legend-card .pf-v5-c-label { 24 | background-color: white; 25 | /*border-color: #ef9234;*/ 26 | } 27 | .karavan .topology-panel .topology-legend-card .orange .pf-v5-c-label__content::before { 28 | border-color: #ef9234; 29 | } 30 | 31 | .karavan .topology-panel .topology-legend-card .route-template .pf-v5-c-label__content::before { 32 | border-style: dashed; 33 | } 34 | 35 | .karavan .topology-panel .topology-legend-card .blue .pf-v5-c-label__content::before { 36 | border-color: #2b9af3; 37 | } 38 | 39 | .karavan .topology-panel .topology-legend-card .green .pf-v5-c-label__content::before { 40 | border-color: #6ec664; 41 | } 42 | 43 | .karavan .topology-panel .topology-legend-card .pf-v5-c-label__content::before { 44 | border-radius: 4px; 45 | } 46 | 47 | .karavan .topology-panel .topology-legend-card .pf-v5-c-badge { 48 | min-width: 32px; 49 | font-weight: normal; 50 | } 51 | 52 | .karavan .topology-panel .topology-legend-card .pf-v5-c-label__icon { 53 | height: unset; 54 | } -------------------------------------------------------------------------------- /karavan-app/src/main/webui/src/util/form-util.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | .pf-v5-c-modal-box .text-field-with-prefix { 19 | gap: 0; 20 | } 21 | 22 | .pf-v5-c-modal-box .text-field-with-prefix .text-field-prefix { 23 | margin-top: auto; 24 | margin-bottom: auto; 25 | } 26 | 27 | .pf-v5-c-modal-box .text-field-with-prefix .pf-v5-c-text-input-group__text-input { 28 | padding-left: 0; 29 | } 30 | 31 | .pf-v5-c-modal-box .text-field-with-suffix .text-field-suffix { 32 | margin-top: auto; 33 | margin-bottom: auto; 34 | padding-left: 3px; 35 | padding-right: 3px; 36 | } 37 | 38 | .form-util-text-field { 39 | width: 100%; 40 | } 41 | .form-util-text-field-suffix, 42 | .form-util-text-field-suffix input { 43 | width: 150px 44 | } -------------------------------------------------------------------------------- /karavan-app/src/main/webui/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": false, 6 | "skipLibCheck": true, 7 | "esModuleInterop": true, 8 | "allowSyntheticDefaultImports": true, 9 | "strict": true, 10 | "forceConsistentCasingInFileNames": true, 11 | "module": "esnext", 12 | "moduleResolution": "node", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "noEmit": true, 16 | "noFallthroughCasesInSwitch": true, 17 | "jsx": "react-jsx", 18 | "types": ["vite/client", "vite-plugin-svgr/client"] 19 | }, 20 | "include": ["src", "**.mjs", "*.ts"] 21 | } -------------------------------------------------------------------------------- /karavan-app/src/main/webui/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// -------------------------------------------------------------------------------- /karavan-app/src/main/webui/vite.config.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | import { defineConfig } from 'vite' 19 | import react from '@vitejs/plugin-react' 20 | import viteTsconfigPaths from 'vite-tsconfig-paths' 21 | 22 | // https://vitejs.dev/config/ 23 | export default defineConfig({ 24 | base: '/', 25 | plugins: [react(), viteTsconfigPaths()], 26 | server: { 27 | // this ensures that the browser opens upon server start 28 | open: true, 29 | // this sets a default port to 3000, you can change this 30 | port: 3003, 31 | } 32 | }) -------------------------------------------------------------------------------- /karavan-core/.mocharc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extension": ["ts"], 3 | "package": "./package.json", 4 | "spec": ["./test/**/*.spec.ts"], 5 | "node-option": [ 6 | "experimental-specifier-resolution=node", 7 | "loader=ts-node/esm" 8 | ], 9 | "require": "ts-node/register", 10 | "loader": "ts-node/esm" 11 | } 12 | -------------------------------------------------------------------------------- /karavan-core/.prettierignore: -------------------------------------------------------------------------------- 1 | **/CamelDefinitionApi.ts 2 | **/CamelDefinitionYamlStep.ts 3 | **/CamelDefinition.ts 4 | **/CamelMetadata.ts 5 | **/test 6 | .prettierrc 7 | package-lock.json 8 | package.json 9 | tsconfig.json 10 | -------------------------------------------------------------------------------- /karavan-core/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "all", 3 | "tabWidth": 4, 4 | "useTabs": false, 5 | "semi": true, 6 | "singleQuote": true, 7 | "jsxSingleQuote": true, 8 | "proseWrap": "never", 9 | "bracketSameLine": true, 10 | "arrowParens": "avoid", 11 | "printWidth": 120, 12 | "bracketSpacing": true, 13 | "singleAttributePerLine": false 14 | } 15 | -------------------------------------------------------------------------------- /karavan-core/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "karavan-core", 3 | "publisher": "camel-karavan", 4 | "version": "4.10.2", 5 | "description": "Apache Camel Karavan Core", 6 | "scripts": { 7 | "build": "tsc && tsc-alias", 8 | "test": "cross-env TS_NODE_PROJECT=\"test/tsconfig.testing.json\" mocha --config=\".mocharc.json\"", 9 | "prepare": "npm run build && npm run test", 10 | "prepublishOnly": "npm run test" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "https://github.com/apache/camel-karavan.git" 15 | }, 16 | "type": "module", 17 | "keywords": [ 18 | "Camel", 19 | "Tool", 20 | "Integration", 21 | "Camel Yaml" 22 | ], 23 | "author": { 24 | "name": "Marat Gubaidullin", 25 | "email": "marat.gubaidullin@gmail.com" 26 | }, 27 | "maintainers": [ 28 | { 29 | "name": "Marat Gubaidullin", 30 | "email": "marat.gubaidullin@gmail.com" 31 | } 32 | ], 33 | "license": "Apache-2.0", 34 | "bugs": { 35 | "url": "https://github.com/apache/camel-karavan/issues" 36 | }, 37 | "homepage": "https://github.com/apache/camel-karavan#readme", 38 | "dependencies": { 39 | "@types/js-yaml": "^4.0.9", 40 | "@types/uuid": "^10.0.0", 41 | "tsconfig-paths": "^4.2.0", 42 | "uuid": "10.0.0" 43 | }, 44 | "devDependencies": { 45 | "@types/chai": "^5.0.1", 46 | "@types/dagre": "^0.7.52", 47 | "@types/mocha": "^10.0.10", 48 | "@types/node": "20.14.15", 49 | "typescript": "4.9.5", 50 | "chai": "^5.1.2", 51 | "cross-env": "^7.0.3", 52 | "fs": "^0.0.1-security", 53 | "mocha": "^11.1.0", 54 | "ts-node": "^10.9.2", 55 | "tsc-alias": "^1.8.10" 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /karavan-core/src/core/model/MainConfigurationModel.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | export class ApplicationProperty { 19 | name: string = ''; 20 | value?: string; 21 | defaultValue?: string; 22 | description?: string; 23 | type?: string; 24 | 25 | public constructor(init?: Partial) { 26 | Object.assign(this, init); 27 | } 28 | } 29 | 30 | export class ApplicationPropertyGroup { 31 | name: string = ''; 32 | description?: string; 33 | 34 | public constructor(init?: Partial) { 35 | Object.assign(this, init); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /karavan-core/src/core/model/ProjectModel.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | import { v4 as uuidv4 } from 'uuid'; 18 | 19 | export class ProjectProperty { 20 | id: string = ''; 21 | key: string = ''; 22 | value: any; 23 | 24 | public constructor(init?: Partial) { 25 | Object.assign(this, init); 26 | } 27 | 28 | static createNew(key: string, value: any): ProjectProperty { 29 | return new ProjectProperty({ id: uuidv4(), key: key, value: value }); 30 | } 31 | } 32 | 33 | export class ProjectModel { 34 | properties: ProjectProperty[] = []; 35 | 36 | public constructor(init?: Partial) { 37 | Object.assign(this, init); 38 | } 39 | 40 | static createNew(init?: Partial): ProjectModel { 41 | return new ProjectModel(init ? init : {}); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /karavan-core/test/addStep1.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: camel.apache.org/v1 2 | kind: Integration 3 | metadata: 4 | name: '' 5 | spec: 6 | flows: 7 | - from: 8 | uri: kamelet:http-secured-source 9 | steps: 10 | - do-try: 11 | steps: 12 | - to: "log:when-a" 13 | - to: "log:when-b" 14 | do-catch: 15 | - exception: 16 | - "java.io.FileNotFoundException" 17 | - "java.io.IOException" 18 | onWhen: 19 | simple: "${body.size()} == 1" 20 | steps: 21 | - to: "log:io-error" 22 | - choice: 23 | when: 24 | - expression: {} 25 | steps: 26 | - tod: {} 27 | otherwise: {} -------------------------------------------------------------------------------- /karavan-core/test/allowableValues.camel.yaml: -------------------------------------------------------------------------------- 1 | - rest: 2 | id: rest-b536 3 | get: 4 | - id: metadata 5 | path: /metadata 6 | to: direct:metadata 7 | param: 8 | - description: Requests the server to return a designated subset of the resource 9 | name: _summary 10 | type: query 11 | required: false 12 | collectionFormat: multi 13 | dataType: string 14 | allowableValues: 15 | - "true" 16 | - text 17 | - data 18 | - count 19 | - "false" 20 | -------------------------------------------------------------------------------- /karavan-core/test/allowableValues.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | import {expect} from 'chai'; 18 | import 'mocha'; 19 | import {CamelDefinitionYaml} from "../src/core/api/CamelDefinitionYaml"; 20 | import * as fs from 'fs'; 21 | 22 | describe('Array of string', () => { 23 | 24 | it('Array of string', () => { 25 | const yaml = fs.readFileSync('test/allowableValues.camel.yaml', { encoding: 'utf8', flag: 'r' }); 26 | const i = CamelDefinitionYaml.yamlToIntegration('allowableValues.camel.yaml', yaml); 27 | const yaml2 = CamelDefinitionYaml.integrationToYaml(i); 28 | expect(yaml2).to.equal(yaml); 29 | }); 30 | }); 31 | -------------------------------------------------------------------------------- /karavan-core/test/beans1.yaml: -------------------------------------------------------------------------------- 1 | - beans: 2 | - name: myNested 3 | type: ${MyBean.class.name} 4 | properties: 5 | field1: 'value1' 6 | field2: 'value2' 7 | nested: 8 | foo: 'valueFoo' 9 | bar: 'valueBar' 10 | - name: myProps 11 | type: ${MyBean.class.name} 12 | properties: 13 | field1: 'f1_p' 14 | field2: 'f2_p' 15 | nested.foo: 'nf1_p' 16 | nested.bar: 'nf2_p' 17 | - from: 18 | uri: "direct:route" 19 | steps: 20 | - aggregate: 21 | strategy-ref: "myAggregatorStrategy" 22 | completion-size: 2 23 | correlation-expression: 24 | simple: "${header.StockSymbol}" 25 | steps: 26 | - to: "mock:route" 27 | - from: 28 | uri: "direct:route" 29 | steps: 30 | - aggregate: 31 | strategy-ref: "myAggregatorStrategy" 32 | completion-size: 2 33 | correlation-expression: 34 | simple: "${header.StockSymbol}" 35 | steps: 36 | - to: "mock:route" -------------------------------------------------------------------------------- /karavan-core/test/beans2.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: camel.apache.org/v1 2 | kind: Integration 3 | metadata: 4 | name: Beans 5 | spec: 6 | flows: 7 | - beans: 8 | - name: myNested 9 | type: ${MyBean.class.name} 10 | properties: 11 | field1: 'value1' 12 | field2: 'value2' 13 | nested: 14 | foo: 'valueFoo' 15 | bar: 'valueBar' 16 | - name: myProps 17 | type: ${MyBean.class.name} 18 | properties: 19 | field1: 'f1_p' 20 | field2: 'f2_p' 21 | nested.foo: 'nf1_p' 22 | nested.bar: 'nf2_p' 23 | - from: 24 | uri: "direct:route" 25 | steps: 26 | - aggregate: 27 | strategy-ref: "myAggregatorStrategy" 28 | completion-size: 2 29 | correlation-expression: 30 | simple: "${header.StockSymbol}" 31 | steps: 32 | - to: "mock:route" 33 | - from: 34 | uri: "direct:route" 35 | steps: 36 | - aggregate: 37 | strategy-ref: "myAggregatorStrategy" 38 | completion-size: 2 39 | correlation-expression: 40 | simple: "${header.StockSymbol}" 41 | steps: 42 | - to: "mock:route" -------------------------------------------------------------------------------- /karavan-core/test/beans3.yaml: -------------------------------------------------------------------------------- 1 | - beans: 2 | - constructors: 3 | 0: zero 4 | 1: one 5 | 2: two 6 | name: Name 7 | type: Type -------------------------------------------------------------------------------- /karavan-core/test/circuitBreaker.yaml: -------------------------------------------------------------------------------- 1 | - route: 2 | id: route-1 3 | from: 4 | uri: direct 5 | parameters: 6 | name: direct1 7 | id: from-1 8 | steps: 9 | - circuitBreaker: 10 | id: cb-1 11 | resilience4jConfiguration: 12 | id: rc-1 13 | minimumNumberOfCalls: 5 14 | failureRateThreshold: 50 15 | steps: 16 | - log: 17 | message: hello11 18 | id: log-1 19 | logName: log11 20 | -------------------------------------------------------------------------------- /karavan-core/test/cxf.yaml: -------------------------------------------------------------------------------- 1 | - route: 2 | id: exampleRoute 3 | from: 4 | uri: cxf://{{output.url}} 5 | parameters: 6 | wsdlURL: '{{input.wsdl}}' 7 | dataFormat: PAYLOAD 8 | address: '//{{output.url}}' 9 | steps: 10 | - to: 11 | uri: cxf:bean:beanName 12 | parameters: 13 | beanId: bean:beanName 14 | wsdlURL: '{{output.wsdl}}' 15 | dataFormat: PAYLOAD 16 | -------------------------------------------------------------------------------- /karavan-core/test/demo.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: camel.apache.org/v1 2 | kind: Integration 3 | metadata: 4 | name: 'demo' 5 | spec: 6 | flows: 7 | - route: 8 | from: 9 | uri: kamelet:http-secured-source 10 | steps: 11 | - doTry: 12 | steps: 13 | - to: "log:when-a" 14 | - to: "log:when-b" 15 | doCatch: 16 | - exception: 17 | - "java.io.FileNotFoundException" 18 | - "java.io.IOException" 19 | onWhen: 20 | expression: 21 | simple: "${body.size()} == 1" 22 | steps: 23 | - to: "log:io-error" 24 | - choice: 25 | when: 26 | - expression: 27 | simple: "${body.size()} == 1" 28 | steps: 29 | - toD: "log:xxx" 30 | otherwise: 31 | steps: 32 | - toD: "log:yyy" -------------------------------------------------------------------------------- /karavan-core/test/doCatchOnWhen.camel.yaml: -------------------------------------------------------------------------------- 1 | - route: 2 | id: route-8a40 3 | nodePrefixId: route-78f 4 | from: 5 | id: from-674b 6 | uri: timer 7 | parameters: 8 | timerName: name 9 | steps: 10 | - doTry: 11 | id: doTry-258c 12 | doCatch: 13 | - id: doCatch-32ac 14 | exception: 15 | - java.lang.ArrayIndexOutOfBoundsException 16 | onWhen: 17 | id: when-b4f0 18 | expression: 19 | groovy: 20 | id: groovy-2d4f 21 | -------------------------------------------------------------------------------- /karavan-core/test/doCatchOnWhen.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | import * as fs from 'fs'; 18 | import 'mocha'; 19 | import {CamelDefinitionYaml} from "../src/core/api/CamelDefinitionYaml"; 20 | import {CamelUtil} from "../src/core/api/CamelUtil"; 21 | import {CamelDefinitionApiExt} from "../src/core/api/CamelDefinitionApiExt"; 22 | import {CatchDefinition, FromDefinition} from "../src/core/model/CamelDefinition"; 23 | import {expect} from "chai"; 24 | import {TryDefinition} from "../src/core/model/CamelDefinition"; 25 | 26 | describe('DoCatch', () => { 27 | 28 | it('on When', () => { 29 | const yaml = fs.readFileSync('test/doCatchOnWhen.camel.yaml',{encoding:'utf8', flag:'r'}); 30 | const i = CamelDefinitionYaml.yamlToIntegration("demo.yaml", yaml); 31 | const yaml2 = CamelDefinitionYaml.integrationToYaml(i); 32 | 33 | expect(yaml2).to.equal(yaml); 34 | }); 35 | 36 | }); -------------------------------------------------------------------------------- /karavan-core/test/errorHandler1.yaml: -------------------------------------------------------------------------------- 1 | - route: 2 | id: route-1 3 | from: 4 | id: from-1 5 | uri: kamelet:timer-source 6 | parameters: 7 | period: 1000 8 | message: "1" 9 | steps: 10 | - setBody: 11 | id: setBody-1 12 | expression: 13 | groovy: 14 | id: groovy-10a6 15 | expression: 1000 / 0 16 | - log: 17 | id: log-1 18 | message: $[body} 19 | - routeConfiguration: 20 | id: routeConfiguration-1 21 | errorHandler: 22 | id: errorHandler-1 23 | deadLetterChannel: 24 | id: deadLetterChannel-1 25 | deadLetterUri: log:dlq 26 | useOriginalMessage: true 27 | level: TRACE 28 | -------------------------------------------------------------------------------- /karavan-core/test/getElementProperties.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | import {expect} from 'chai'; 18 | import 'mocha'; 19 | import {CamelDefinitionApiExt} from "../src/core/api/CamelDefinitionApiExt"; 20 | import {PropertyMeta} from "../src/core/model/CamelMetadata"; 21 | 22 | describe('getElementProperties', () => { 23 | 24 | it('getElementProperties 1', () => { 25 | 26 | const p: PropertyMeta[] = CamelDefinitionApiExt.getElementProperties("FromDefinition"); 27 | expect(p.length).to.equal(5); 28 | 29 | }); 30 | 31 | 32 | }); -------------------------------------------------------------------------------- /karavan-core/test/getElementPropertiesByName.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | import {expect} from 'chai'; 18 | import 'mocha'; 19 | import {CamelDefinitionApiExt} from "../src/core/api/CamelDefinitionApiExt"; 20 | import {PropertyMeta} from "../src/core/model/CamelMetadata"; 21 | 22 | describe('getElementPropertiesByName', () => { 23 | 24 | it('getElementPropertiesByName 1', () => { 25 | 26 | const p: PropertyMeta[] = CamelDefinitionApiExt.getElementPropertiesByName("json"); 27 | expect(p.length).to.equal(24); 28 | }); 29 | 30 | 31 | }); -------------------------------------------------------------------------------- /karavan-core/test/hasElementWithId1.camel.yaml: -------------------------------------------------------------------------------- 1 | - route: 2 | id: route-0dc7 3 | description: Audit Start 4 | nodePrefixId: route-972 5 | from: 6 | id: fhello-world 7 | description: Audit Start 8 | uri: direct 9 | parameters: 10 | name: start 11 | steps: 12 | - to: 13 | id: fhello-world 14 | uri: kafka 15 | parameters: 16 | topic: audit 17 | -------------------------------------------------------------------------------- /karavan-core/test/integration1.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: camel.apache.org/v1 2 | kind: Integration 3 | metadata: 4 | name: test1.yaml 5 | spec: 6 | flows: 7 | - from: 8 | uri: kamelet:timer-source 9 | steps: 10 | - log: 11 | message: wwwww 12 | - filter: 13 | expression: 14 | constant: 15 | expression: Hello Yaml !!! 16 | steps: 17 | - to: 18 | uri: log 19 | parameters: 20 | level: 'OFF' 21 | logMask: true 22 | parameters: 23 | period: 1000 24 | message: qqq 25 | -------------------------------------------------------------------------------- /karavan-core/test/integration2.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: camel.apache.org/v1 2 | kind: Integration 3 | metadata: 4 | name: test1.yaml 5 | spec: 6 | flows: 7 | - from: 8 | uri: kamelet:timer-source 9 | steps: 10 | - log: 11 | message: wwwww 12 | - filter: 13 | expression: 14 | constant: Hello Yaml !!! 15 | steps: 16 | - to: 17 | uri: log 18 | parameters: 19 | level: 'OFF' 20 | logMask: true 21 | parameters: 22 | period: 1000 23 | message: qqq 24 | -------------------------------------------------------------------------------- /karavan-core/test/intercept.yaml: -------------------------------------------------------------------------------- 1 | - routeConfiguration: 2 | intercept: 3 | - intercept: 4 | id: intercept-9b31 5 | steps: 6 | - log: 7 | message: Interceptor ${body} 8 | id: log-c2f5 9 | - route: 10 | id: route-ddaa 11 | from: 12 | uri: kamelet:timer-source 13 | id: from-847d 14 | parameters: 15 | message: Hello 16 | steps: 17 | - log: 18 | message: Main ${body} 19 | id: log-7972 -------------------------------------------------------------------------------- /karavan-core/test/multiObjectProperties1.yaml: -------------------------------------------------------------------------------- 1 | - route: 2 | id: route-e653 3 | from: 4 | uri: direct1 5 | id: from-6ecf 6 | steps: 7 | - saga: 8 | option: 9 | - key: key1 10 | expression: 11 | simple: ${body} 12 | - key: key2 13 | expression: 14 | simple: ${headers} 15 | id: saga-726c 16 | steps: 17 | - to: 18 | uri: direct:direct2 19 | id: to-efd8 20 | -------------------------------------------------------------------------------- /karavan-core/test/multiple.yaml: -------------------------------------------------------------------------------- 1 | - from: 2 | uri: netty-http 3 | parameters: 4 | protocol: http 5 | host: localhost 6 | port: 8080 7 | path: demo 8 | steps: 9 | - convertBodyTo: 10 | type: String 11 | - unmarshal: 12 | json: {} 13 | - choice: 14 | when: 15 | - expression: 16 | simple: ${body[amount]} < 1000 17 | steps: 18 | - log: 19 | message: 'WHEN: ${body}' 20 | logging-level: INFO 21 | log-name: when 22 | otherwise: 23 | steps: 24 | - log: 25 | log-name: otherwise 26 | logging-level: INFO 27 | message: 'OTHERWISE: ${body}' 28 | - from: 29 | uri: kamelet:aws-kinesis-source -------------------------------------------------------------------------------- /karavan-core/test/openapi.yaml: -------------------------------------------------------------------------------- 1 | - rest: 2 | id: rest-1 3 | description: Hello World 4 | path: /demo 5 | openApi: 6 | id: openapi-1 7 | specification: openapi.json 8 | -------------------------------------------------------------------------------- /karavan-core/test/placeholder.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | import {expect} from 'chai'; 18 | import * as fs from 'fs'; 19 | import 'mocha'; 20 | import {CamelDefinitionYaml} from "../src/core/api/CamelDefinitionYaml"; 21 | import {CamelUtil} from "../src/core/api/CamelUtil"; 22 | 23 | describe('Get Placeholders', () => { 24 | 25 | it('Get Placeholders', () => { 26 | const yaml = fs.readFileSync('test/placeholder.yaml',{encoding:'utf8', flag:'r'}); 27 | const i = CamelDefinitionYaml.yamlToIntegration("test1.yaml", yaml); 28 | const placeholders = CamelUtil.findPlaceholdersInObject(i); 29 | expect(placeholders.size).to.equal(4); 30 | }); 31 | 32 | }); 33 | -------------------------------------------------------------------------------- /karavan-core/test/plain-try-catch.yaml: -------------------------------------------------------------------------------- 1 | - route: 2 | id: route-1 3 | from: 4 | id: from-1 5 | uri: timer 6 | parameters: 7 | name: info 8 | steps: 9 | - doTry: 10 | id: doTry-1 11 | doCatch: 12 | - id: doCatch-1 13 | exception: 14 | - java.lang.ArithmeticException 15 | steps: 16 | - log: 17 | id: log-1 18 | message: Exception 19 | doFinally: 20 | id: doFinally-1 21 | steps: 22 | - log: 23 | id: log-2 24 | message: ${body} 25 | steps: 26 | - setBody: 27 | id: setBody-1 28 | expression: 29 | groovy: 30 | id: groovy-1 31 | expression: 1000 / 0 32 | -------------------------------------------------------------------------------- /karavan-core/test/plain1.yaml: -------------------------------------------------------------------------------- 1 | - from: 2 | uri: timer 3 | id: from-1 4 | parameters: 5 | name: info 6 | steps: 7 | - choice: 8 | when: 9 | - expression: 10 | simple: 11 | expression: ${headers} != null 12 | steps: 13 | - log: 14 | message: hello11 15 | logName: log11 16 | - expression: 17 | simple: 18 | expression: ${headers} == null 19 | steps: 20 | - log: 21 | message: hello22 22 | logName: log22 23 | -------------------------------------------------------------------------------- /karavan-core/test/plain2.yaml: -------------------------------------------------------------------------------- 1 | - from: 2 | uri: timer 3 | id: from-1 4 | parameters: 5 | name: info 6 | steps: 7 | - set-body: 8 | expression: 9 | constant: 10 | expression: Hello Yaml !!! 11 | - log: 12 | message: ${body} 13 | logName: log11 14 | -------------------------------------------------------------------------------- /karavan-core/test/plain3.yaml: -------------------------------------------------------------------------------- 1 | - route: 2 | autoStartup: true 3 | id: route-1 4 | from: 5 | id: from-f6d9 -------------------------------------------------------------------------------- /karavan-core/test/plain4.yaml: -------------------------------------------------------------------------------- 1 | - route: 2 | id: route-1 3 | autoStartup: false 4 | from: 5 | id: from-f6d9 6 | -------------------------------------------------------------------------------- /karavan-core/test/restConfigDsl.yaml: -------------------------------------------------------------------------------- 1 | - rest: 2 | id: rest-6df5 3 | post: 4 | - id: post-9b00 5 | to: direct:direct1 6 | path: path1 7 | - rest: 8 | id: rest-8b5c 9 | post: 10 | - id: post-2c9e 11 | to: direct:direct2 12 | path: path2 13 | - restConfiguration: 14 | port: '8080' 15 | host: localhost 16 | -------------------------------------------------------------------------------- /karavan-core/test/restDsl.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: camel.apache.org/v1 2 | kind: Integration 3 | metadata: 4 | name: RestDsl 5 | spec: 6 | flows: 7 | - rest-configuration: 8 | component: "platform-http" 9 | context-path: "/base" 10 | port: 8081 11 | - rest: 12 | path: "/demo" 13 | post: 14 | - path: "/foo" 15 | to: "direct:foo" 16 | - path: "/bar" 17 | to: "direct:bar" 18 | get: 19 | - path: "/getFoo" 20 | to: "direct:foo" 21 | - path: "/getBar" 22 | to: "direct:foo" 23 | - from: 24 | uri: 'direct:foo' 25 | steps: 26 | - log: '${body}' 27 | - log: '${headers}' 28 | - setBody: 29 | constant: "Hello world" -------------------------------------------------------------------------------- /karavan-core/test/routeTemplate1.camel.yaml: -------------------------------------------------------------------------------- 1 | - routeTemplate: 2 | id: routeFileReaderTemplate 3 | description: File reader 4 | route: 5 | id: routeFileReader 6 | description: File reader 7 | from: 8 | id: from-c667 9 | description: Read file 10 | uri: file 11 | parameters: 12 | directoryName: "{{folderName}}" 13 | noop: true 14 | steps: 15 | - to: 16 | id: to-1234 17 | uri: direct 18 | parameters: 19 | name: converter 20 | parameters: 21 | - name: folderName 22 | -------------------------------------------------------------------------------- /karavan-core/test/routeTemplate2.camel.yaml: -------------------------------------------------------------------------------- 1 | - routeTemplate: 2 | id: routeFileReaderTemplate 3 | description: File reader 4 | route: 5 | id: routeFileReader 6 | description: File reader 7 | from: 8 | id: from-c667 9 | description: Read file 10 | uri: file 11 | parameters: 12 | directoryName: "{{folderName}}" 13 | noop: true 14 | steps: 15 | - to: 16 | id: to-1234 17 | uri: direct 18 | parameters: 19 | name: converter 20 | parameters: 21 | - name: folderName 22 | - route: 23 | id: route-dummy 24 | autoStartup: false 25 | from: 26 | id: from-dummy 27 | uri: direct 28 | parameters: 29 | name: dummy 30 | steps: 31 | - log: 32 | id: log-b47b 33 | message: DUMMY 34 | -------------------------------------------------------------------------------- /karavan-core/test/routes1.yaml: -------------------------------------------------------------------------------- 1 | - route: 2 | id: route-ea82 3 | from: 4 | id: from-1 5 | uri: timer 6 | parameters: 7 | name: info 8 | steps: 9 | - choice: 10 | id: choice-1 11 | when: 12 | - id: when-1 13 | expression: 14 | simple: 15 | id: simple-1 16 | expression: ${headers} != null 17 | steps: 18 | - log: 19 | id: log-1 20 | message: hello11 21 | logName: log11 22 | - id: when-2 23 | expression: 24 | simple: 25 | id: simple-2 26 | expression: ${headers} == null 27 | steps: 28 | - log: 29 | id: log-2 30 | message: hello22s 31 | logName: log22 32 | -------------------------------------------------------------------------------- /karavan-core/test/supportedComponents.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | import {expect} from 'chai'; 18 | import * as fs from 'fs'; 19 | import 'mocha'; 20 | import {CamelDefinitionYaml} from "../src/core/api/CamelDefinitionYaml"; 21 | import {ComponentApi} from "../src/core/api/ComponentApi"; 22 | import {SupportedComponent} from "../src/core/model/ComponentModels"; 23 | 24 | 25 | describe('Supported Components List', () => { 26 | 27 | it('Read Supported Components', () => { 28 | const json = fs.readFileSync('test/supported-components.json',{encoding:'utf8', flag:'r'}); 29 | ComponentApi.saveSupportedComponents(json); 30 | const sc = ComponentApi.getSupportedComponents(); 31 | expect(sc.length).to.equal(305); 32 | }); 33 | 34 | }); 35 | -------------------------------------------------------------------------------- /karavan-core/test/template1.AggregationStrategy.java: -------------------------------------------------------------------------------- 1 | import org.apache.camel.AggregationStrategy; 2 | import org.apache.camel.Configuration; 3 | import org.apache.camel.BindToRegistry; 4 | import org.apache.camel.Exchange; 5 | 6 | @Configuration 7 | @BindToRegistry("${NAME}") 8 | public class ${NAME} implements AggregationStrategy { 9 | @Override 10 | public Exchange aggregate(Exchange oldExchange, Exchange newExchange) { 11 | 12 | if (oldExchange == null) { 13 | return newExchange; 14 | } 15 | 16 | String oldBody = oldExchange.getIn().getBody(String.class); 17 | String newBody = newExchange.getIn().getBody(String.class); 18 | oldExchange.getIn().setBody(oldBody + "+" + newBody); 19 | return oldExchange; 20 | } 21 | } -------------------------------------------------------------------------------- /karavan-core/test/template1.Processor.java: -------------------------------------------------------------------------------- 1 | import org.apache.camel.BindToRegistry; 2 | import org.apache.camel.Configuration; 3 | import org.apache.camel.Exchange; 4 | import org.apache.camel.Processor; 5 | 6 | @Configuration 7 | @BindToRegistry("${NAME}") 8 | public class ${NAME} implements Processor { 9 | 10 | public void process(Exchange exchange) throws Exception { 11 | exchange.getIn().setBody("Hello World"); 12 | } 13 | } -------------------------------------------------------------------------------- /karavan-core/test/template2.AggregationStrategy.java: -------------------------------------------------------------------------------- 1 | import org.apache.camel.AggregationStrategy; 2 | import org.apache.camel.Configuration; 3 | import org.apache.camel.BindToRegistry; 4 | import org.apache.camel.Exchange; 5 | 6 | @Configuration 7 | @BindToRegistry("CustomAggregationStrategy") 8 | public class CustomAggregationStrategy implements AggregationStrategy { 9 | @Override 10 | public Exchange aggregate(Exchange oldExchange, Exchange newExchange) { 11 | 12 | if (oldExchange == null) { 13 | return newExchange; 14 | } 15 | 16 | String oldBody = oldExchange.getIn().getBody(String.class); 17 | String newBody = newExchange.getIn().getBody(String.class); 18 | oldExchange.getIn().setBody(oldBody + "+" + newBody); 19 | return oldExchange; 20 | } 21 | } -------------------------------------------------------------------------------- /karavan-core/test/template2.Processor.java: -------------------------------------------------------------------------------- 1 | import org.apache.camel.BindToRegistry; 2 | import org.apache.camel.Configuration; 3 | import org.apache.camel.Exchange; 4 | import org.apache.camel.Processor; 5 | 6 | @Configuration 7 | @BindToRegistry("CustomProcessor") 8 | public class CustomProcessor implements Processor { 9 | 10 | public void process(Exchange exchange) throws Exception { 11 | exchange.getIn().setBody("Hello World"); 12 | } 13 | } -------------------------------------------------------------------------------- /karavan-core/test/tod.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | import {expect} from 'chai'; 18 | import * as fs from 'fs'; 19 | import 'mocha'; 20 | import {CamelDefinitionYaml} from "../src/core/api/CamelDefinitionYaml"; 21 | 22 | 23 | describe('ToDynamicDefinition', () => { 24 | 25 | it('ToDynamicDefinition URI', () => { 26 | const yaml = fs.readFileSync('test/tod.yaml',{encoding:'utf8', flag:'r'}); 27 | const i = CamelDefinitionYaml.yamlToIntegration("test1.yaml", yaml); 28 | expect(i.spec.flows?.[0].from.steps[0].uri, 'kafka:${header.foo}') 29 | }); 30 | 31 | }); 32 | -------------------------------------------------------------------------------- /karavan-core/test/tod.yaml: -------------------------------------------------------------------------------- 1 | - route: 2 | id: route-f435 3 | from: 4 | uri: kamelet:timer-source 5 | id: from-e52c 6 | steps: 7 | - toD: 8 | uri: kafka:${header.foo} 9 | id: toD-0d39 -------------------------------------------------------------------------------- /karavan-core/test/topology1.camel.yaml: -------------------------------------------------------------------------------- 1 | - route: 2 | id: route-c67f1 3 | description: Timer Scheduler 4 | from: 5 | uri: kamelet:timer-source 6 | id: from-b4181 7 | parameters: 8 | message: Hello 9 | steps: 10 | - log: 11 | message: ${body} 12 | id: log-a68a1 13 | - route: 14 | id: route-2cbd1 15 | from: 16 | uri: kamelet:aws-cloudtrail-source 17 | id: from-a3f61 18 | parameters: 19 | region: fff 20 | steps: 21 | - to: 22 | uri: kamelet:google-pubsub-sink 23 | id: to-c27f1 24 | - route: 25 | id: route-de2b1 26 | from: 27 | uri: amqp 28 | id: from-1e661 29 | steps: 30 | - to: 31 | uri: direct 32 | id: to-6a041 33 | parameters: 34 | name: xxxx 35 | - route: 36 | id: route-ec4e1 37 | from: 38 | uri: direct 39 | id: from-e9181 40 | parameters: 41 | name: xxx 42 | steps: 43 | - to: 44 | uri: kamelet:kafka-not-secured-sink 45 | id: to-a47b1 46 | - rest: 47 | id: rest-b499 48 | get: 49 | - to: direct:xxx 50 | id: get-cb63 51 | post: 52 | - to: direct:xxx 53 | id: post-07e4 54 | put: 55 | - to: direct:xxx 56 | id: put-8271 -------------------------------------------------------------------------------- /karavan-core/test/topology2.camel.yaml: -------------------------------------------------------------------------------- 1 | - route: 2 | id: route-c67f 3 | from: 4 | uri: kamelet:timer-source 5 | id: from-b418 6 | parameters: 7 | message: Hello 8 | steps: 9 | - log: 10 | message: ${body} 11 | id: log-a68a 12 | - route: 13 | id: route-2cbd 14 | from: 15 | uri: kamelet:aws-cloudtrail-source 16 | id: from-a3f6 17 | parameters: 18 | region: fff 19 | steps: 20 | - to: 21 | uri: kamelet:google-pubsub-sink 22 | id: to-c27f 23 | - route: 24 | id: route-de2b 25 | from: 26 | uri: amqp 27 | id: from-1e66 28 | steps: 29 | - to: 30 | uri: direct 31 | id: to-6a04 32 | parameters: 33 | name: xxxx 34 | - route: 35 | id: route-ec4e 36 | from: 37 | uri: direct 38 | id: from-e918 39 | parameters: 40 | name: xxx 41 | steps: 42 | - to: 43 | uri: kamelet:kafka-not-secured-sink 44 | id: to-a47b 45 | -------------------------------------------------------------------------------- /karavan-core/test/topology3.camel.yaml: -------------------------------------------------------------------------------- 1 | - route: 2 | id: route-6312 3 | description: File Send 4 | nodePrefixId: route-b7f 5 | autoStartup: true 6 | from: 7 | id: file-send-direct 8 | uri: direct 9 | parameters: 10 | name: send-roster-files 11 | synchronous: false 12 | steps: 13 | - log: 14 | id: log-894b 15 | message: "DEBUG: Transfer Starting ${date:now:yyyyMMdd hh:mm:ss}" 16 | - routeConfiguration: 17 | errorHandler: 18 | id: errorHandler-1b09 19 | deadLetterChannel: 20 | id: deadLetterChannel-2cf3 21 | deadLetterUri: direct:dlq 22 | redeliveryPolicy: 23 | id: redeliveryPolicy-58fe 24 | maximumRedeliveries: 5 25 | redeliveryDelay: "60000" 26 | useOriginalMessage: false 27 | useOriginalBody: false 28 | -------------------------------------------------------------------------------- /karavan-core/test/tsconfig.testing.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "ES2022", 4 | "target": "ES2022", 5 | "lib": [ 6 | "dom", 7 | "dom.iterable", 8 | "esnext", 9 | "ES2021", 10 | "ES2021.String" 11 | ] 12 | }, 13 | "include": ["**/*.spec.ts"] 14 | } 15 | -------------------------------------------------------------------------------- /karavan-core/test/variable1.camel.yaml: -------------------------------------------------------------------------------- 1 | - route: 2 | id: route-18e5 3 | nodePrefixId: route-656 4 | from: 5 | id: from-9468 6 | uri: amqp 7 | variableReceive: global:variable1 8 | steps: 9 | - doTry: 10 | id: doTry-8bb0 11 | doCatch: 12 | - id: doCatch-19a9 13 | steps: 14 | - convertVariableTo: 15 | id: convertVariableTo-b0e5 16 | name: xxx 17 | toName: yyy 18 | steps: 19 | - multicast: 20 | id: multicast-ad44 21 | steps: 22 | - to: 23 | id: to-0c20 24 | variableSend: send1 25 | variableReceive: receive1 26 | uri: activemq 27 | - to: 28 | id: to-e79a 29 | variableSend: route:aran1 30 | variableReceive: route:aran1 31 | uri: arangodb 32 | - setVariable: 33 | id: setVariable-957d 34 | name: varrr 35 | expression: 36 | simple: 37 | id: simple-cd4b 38 | - to: 39 | id: to-60f8 40 | variableSend: hello 41 | variableReceive: world 42 | uri: amqp 43 | -------------------------------------------------------------------------------- /karavan-core/test/variable2.camel.yaml: -------------------------------------------------------------------------------- 1 | - route: 2 | id: route-18e5 3 | nodePrefixId: route-656 4 | from: 5 | id: from-9468 6 | uri: amqp 7 | variableReceive: variable2 8 | steps: 9 | - doTry: 10 | id: doTry-8bb0 11 | doCatch: 12 | - id: doCatch-19a9 13 | steps: 14 | - convertVariableTo: 15 | id: convertVariableTo-b0e5 16 | name: xxx2 17 | toName: yyy2 18 | steps: 19 | - multicast: 20 | id: multicast-ad44 21 | steps: 22 | - to: 23 | id: to-0c20 24 | variableSend: asend2 25 | variableReceive: breceive2 26 | uri: activemq 27 | - to: 28 | id: to-e79a 29 | variableSend: route:aran2 30 | variableReceive: global:aran2 31 | uri: arangodb 32 | - setVariable: 33 | id: setVariable-957d 34 | name: varrr2 35 | expression: 36 | simple: 37 | id: simple-cd4b 38 | - to: 39 | id: to-60f8 40 | variableSend: hello2 41 | variableReceive: world2 42 | uri: amqp 43 | -------------------------------------------------------------------------------- /karavan-core/test/variables.spec.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | import {expect} from 'chai'; 18 | import * as fs from 'fs'; 19 | import 'mocha'; 20 | import { VariableUtil } from '../src/core/api/VariableUtil'; 21 | import { IntegrationFile } from '../src/core/model/IntegrationDefinition'; 22 | 23 | describe('Variables', () => { 24 | 25 | it('Find Variables', () => { 26 | const yaml1 = fs.readFileSync('test/variable1.camel.yaml',{encoding:'utf8', flag:'r'}); 27 | const yaml2 = fs.readFileSync('test/variable2.camel.yaml',{encoding:'utf8', flag:'r'}); 28 | const variables = VariableUtil.findVariables([ 29 | new IntegrationFile('variable1.camel.yaml', yaml1) 30 | , new IntegrationFile('variable2.camel.yaml', yaml2) 31 | ]); 32 | expect(variables.length).to.equal(19); 33 | }); 34 | }); -------------------------------------------------------------------------------- /karavan-core/test/yamDataFormat.camel.yaml: -------------------------------------------------------------------------------- 1 | - route: 2 | id: route-7447 3 | from: 4 | id: from-875e 5 | uri: direct1 6 | steps: 7 | - marshal: 8 | id: marshal-7abc 9 | yaml: 10 | id: yaml-b347 11 | library: hello 12 | constructor: any-constructor 13 | 14 | -------------------------------------------------------------------------------- /karavan-core/test/yamDataFormat1.camel.yaml: -------------------------------------------------------------------------------- 1 | - route: 2 | id: route-7447 3 | from: 4 | id: from-875e 5 | uri: direct1 6 | steps: 7 | - marshal: 8 | id: marshal-7abc 9 | yaml: 10 | id: yaml-b347 11 | library: hello 12 | -------------------------------------------------------------------------------- /karavan-core/test/yamDataFormat2.camel.yaml: -------------------------------------------------------------------------------- 1 | - route: 2 | id: route-7447 3 | from: 4 | id: from-875e 5 | uri: direct1 6 | steps: 7 | - marshal: 8 | id: marshal-7abc 9 | yaml: 10 | id: yaml-b347 11 | library: hello 12 | constructor: test 13 | -------------------------------------------------------------------------------- /karavan-core/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "ts-node": { 3 | "transpileOnly": true, 4 | "esm": true 5 | }, 6 | "compilerOptions": { 7 | "target": "ES2022", 8 | "module": "es2022", 9 | "declaration": true, 10 | "outDir": "./lib", 11 | "strict": true, 12 | "lib": [ 13 | "dom", 14 | "dom.iterable", 15 | "esnext", 16 | "ES2021", 17 | "ES2021.String" 18 | ], 19 | "moduleResolution": "node", 20 | "resolveJsonModule": true, 21 | "isolatedModules": true 22 | }, 23 | "tsc-alias": { 24 | "resolveFullPaths": true, 25 | "verbose": false 26 | }, 27 | "include": [ 28 | "src" 29 | ], 30 | "exclude": [ 31 | "node_modules", 32 | "**/test/*" 33 | ] 34 | } 35 | -------------------------------------------------------------------------------- /karavan-designer/index.html: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | Karavan-Designer 25 | 26 | 27 | 28 |
29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /karavan-designer/public/example/demo.camel.yaml: -------------------------------------------------------------------------------- 1 | - route: 2 | id: route-1eda 3 | from: 4 | id: from-b189 5 | uri: direct 6 | parameters: 7 | name: getUser 8 | steps: 9 | - to: 10 | id: to-a36b 11 | uri: amqp 12 | parameters: 13 | destinationName: hello 14 | clientId: world 15 | - to: 16 | id: to-6d55 17 | uri: bean 18 | parameters: 19 | beanName: userService 20 | method: getUser(${header.id}) 21 | - filter: 22 | id: filter-64ac 23 | expression: 24 | simple: 25 | id: simple-12cd 26 | expression: ${body} == null 27 | steps: 28 | - setHeader: 29 | id: setHeader-392d 30 | name: Exchange.HTTP_RESPONSE_CODE 31 | expression: 32 | constant: 33 | id: constant-9d21 34 | expression: 404 35 | - routeConfiguration: {} 36 | -------------------------------------------------------------------------------- /karavan-designer/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/karavan-designer/public/favicon.ico -------------------------------------------------------------------------------- /karavan-designer/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Karavan", 3 | "name": "Karavan", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /karavan-designer/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /karavan-designer/public/snippets/org.apache.camel.AggregationStrategy: -------------------------------------------------------------------------------- 1 | import org.apache.camel.BindToRegistry; 2 | import org.apache.camel.Exchange; 3 | import org.apache.camel.Processor; 4 | 5 | @BindToRegistry("NAME") 6 | public class NAME implements Processor { 7 | 8 | public void process(Exchange exchange) throws Exception { 9 | exchange.getIn().setBody("Hello World"); 10 | } 11 | } -------------------------------------------------------------------------------- /karavan-designer/public/snippets/org.apache.camel.Processor: -------------------------------------------------------------------------------- 1 | import org.apache.camel.BindToRegistry; 2 | import org.apache.camel.Exchange; 3 | import org.apache.camel.Processor; 4 | 5 | @BindToRegistry("NAME") 6 | public class NAME implements Processor { 7 | 8 | public void process(Exchange exchange) throws Exception { 9 | exchange.getIn().setBody("Hello World"); 10 | } 11 | } -------------------------------------------------------------------------------- /karavan-designer/src/App.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | .App { 18 | background-color: var(--background); 19 | } 20 | -------------------------------------------------------------------------------- /karavan-designer/src/KnowledgebaseHome.tsx: -------------------------------------------------------------------------------- 1 | import { KnowledgebasePage } from "./knowledgebase/KnowledgebasePage" 2 | import { ComponentApi } from "karavan-core/lib/api/ComponentApi"; 3 | import { KameletApi } from "karavan-core/lib/api/KameletApi"; 4 | interface Props { 5 | dark: boolean, 6 | } 7 | export const KnowledgebaseHome = (props: Props) => { 8 | 9 | 10 | const onchangeBlockedList = (type: string, name: string, checked: boolean) => { 11 | if (type === 'kamelet') { 12 | 13 | const blockedKamelet = KameletApi.saveBlockedKameletName(name, checked); 14 | } 15 | else if (type === 'component') { 16 | const blockedComponent = ComponentApi.saveBlockedComponentName(name, checked); 17 | } 18 | } 19 | return ( 20 | onchangeBlockedList(type, name, checked)} /> 21 | ); 22 | } -------------------------------------------------------------------------------- /karavan-designer/src/designer/ErrorBoundaryWrapper.tsx: -------------------------------------------------------------------------------- 1 | import React, {ReactNode} from "react"; 2 | 3 | export interface ErrorBoundaryState { 4 | hasError: boolean; 5 | error: Error | null; 6 | } 7 | 8 | export class ErrorBoundaryWrapper extends React.Component<{ 9 | children: ReactNode; 10 | onError: (error: Error) => void; 11 | }> { 12 | componentDidCatch(error: Error, errorInfo: React.ErrorInfo) { 13 | // Handle error (logging, etc.) 14 | console.error("Error caught in ErrorBoundary:", error, errorInfo); 15 | this.props.onError(error); 16 | } 17 | 18 | render() { 19 | return this.props.children; 20 | } 21 | } -------------------------------------------------------------------------------- /karavan-designer/src/designer/kamelet/KameletDesigner.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | import React from 'react'; 18 | import { 19 | PageSection, 20 | } from '@patternfly/react-core'; 21 | import '../karavan.css'; 22 | import './kamelet.css'; 23 | import {KameletAnnotationsPanel} from "./KameletAnnotationsPanel"; 24 | import {KameletDefinitionsPanel} from "./KameletDefinitionsPanel"; 25 | 26 | export function KameletDesigner() { 27 | 28 | return ( 29 | 30 | 31 | 32 |
33 | 34 | 35 | 36 | ) 37 | } 38 | -------------------------------------------------------------------------------- /karavan-designer/src/designer/kamelet/kamelet.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | .karavan .kamelet-designer { 19 | display: block; 20 | height: 100vh; 21 | width: 100%; 22 | overflow-y: auto; 23 | padding-bottom: 106px; 24 | } 25 | 26 | .karavan .kamelet-designer .pf-v5-c-drawer__content, 27 | .karavan .kamelet-designer .main { 28 | background-color: var(--pf-v5-global--BackgroundColor--light-300); 29 | } 30 | .karavan .kamelet-designer .icon { 31 | height: 20px; 32 | width: 20px; 33 | border: none; 34 | -webkit-user-select: none; 35 | -o-user-select: none; 36 | user-select: none; 37 | } 38 | 39 | .karavan .kamelet-designer .properties { 40 | padding: 10px 10px 10px 10px; 41 | background: transparent; 42 | width: 100%; 43 | height: 100%; 44 | overflow: auto; 45 | display: flex; 46 | flex-direction: column; 47 | justify-content: space-between; 48 | } -------------------------------------------------------------------------------- /karavan-designer/src/designer/property/property/PropertyPlaceholderDropdown.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | .karavan .properties .property-placeholder-toggle { 19 | padding-left: 6px; 20 | padding-right: 6px; 21 | } 22 | 23 | .karavan .properties .property-placeholder-toggle .pf-v5-c-button__icon.pf-m-start { 24 | margin-inline-end: 0; 25 | } 26 | 27 | .karavan .properties .property-placeholder-toggle .pf-v5-c-menu-toggle__controls { 28 | display: none; 29 | } 30 | 31 | .karavan .properties .property-placeholder-dropdown .pf-v5-c-menu__group-title { 32 | font-weight: bold; 33 | font-size: 13px; 34 | } 35 | 36 | .pf-v5-c-popover .property-placeholder-toggle-form { 37 | width: 300px; 38 | } 39 | 40 | .pf-v5-c-popover .property-placeholder-toggle-form .pf-v5-c-form__group { 41 | grid-template-columns: 1fr 2fr; 42 | } -------------------------------------------------------------------------------- /karavan-designer/src/designer/property/property/VariablesDropdown.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | .karavan .properties .variables-toggle { 19 | padding-left: 6px; 20 | padding-right: 6px; 21 | } 22 | 23 | .karavan .properties .variables-toggle .pf-v5-c-button__icon.pf-m-start { 24 | margin-inline-end: 0; 25 | } 26 | 27 | .karavan .properties .variables-toggle .pf-v5-c-menu-toggle__controls { 28 | display: none; 29 | } 30 | 31 | .pf-v5-c-popover .variables-toggle-form { 32 | width: 300px; 33 | } 34 | 35 | .pf-v5-c-popover .variables-toggle-form .pf-v5-c-form__group { 36 | grid-template-columns: 1fr 2fr; 37 | } -------------------------------------------------------------------------------- /karavan-designer/src/designer/route/useResizeObserver.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | import { useLayoutEffect, useRef } from 'react'; 19 | 20 | function useResizeObserver(callback: (target: T, entry: ResizeObserverEntry) => void) { 21 | const ref = useRef(null) 22 | 23 | useLayoutEffect(() => { 24 | const element = ref?.current; 25 | if (!element) { 26 | return; 27 | } 28 | const observer1 = new ResizeObserver((entries) => { 29 | callback(element, entries[0]); 30 | }); 31 | observer1.observe(element); 32 | return () => { 33 | observer1.disconnect(); 34 | }; 35 | }, [callback, ref]); 36 | 37 | return ref 38 | } 39 | 40 | export default useResizeObserver; -------------------------------------------------------------------------------- /karavan-designer/src/designer/utils/ElementIcon.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | 19 | .add-button-icon, .insert-button-icon { 20 | fill: var(--pf-v5-global--primary-color--100); 21 | width: 20px; 22 | height: 20px; 23 | background: transparent; 24 | vertical-align: text-bottom; 25 | } 26 | 27 | .copy-button-icon { 28 | width: 20px; 29 | height: 20px; 30 | background: transparent; 31 | vertical-align: text-bottom; 32 | } 33 | 34 | .delete-button-icon { 35 | fill: var(--pf-v5-global--danger-color--100); 36 | width: 20px; 37 | height: 20px; 38 | background: transparent; 39 | vertical-align: text-bottom; 40 | } 41 | -------------------------------------------------------------------------------- /karavan-designer/src/index.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | import React, {StrictMode} from 'react'; 18 | import "./index.css"; 19 | import "@patternfly/patternfly/patternfly.css"; 20 | import App from "./App"; 21 | import {createRoot} from "react-dom/client"; 22 | 23 | const container = document.getElementById('root'); 24 | const root = createRoot(container!); 25 | root.render( 26 | 27 | 28 | 29 | ); -------------------------------------------------------------------------------- /karavan-designer/src/topology/CustomGroup.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | import * as React from 'react'; 19 | 20 | import './topology.css'; 21 | import {DefaultGroup, LabelPosition, observer} from '@patternfly/react-topology'; 22 | 23 | const CustomGroup: React.FC = observer(({ element, ...rest }) => { 24 | return ( 25 | 32 | 33 | ) 34 | }) 35 | export default CustomGroup; -------------------------------------------------------------------------------- /karavan-designer/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": false, 6 | "skipLibCheck": true, 7 | "esModuleInterop": true, 8 | "allowSyntheticDefaultImports": true, 9 | "strict": true, 10 | "forceConsistentCasingInFileNames": true, 11 | "module": "esnext", 12 | "moduleResolution": "node", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "noEmit": true, 16 | "noFallthroughCasesInSwitch": true, 17 | "jsx": "react-jsx", 18 | "types": ["vite/client", "vite-plugin-svgr/client"] 19 | }, 20 | "include": ["src"] 21 | } -------------------------------------------------------------------------------- /karavan-designer/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// -------------------------------------------------------------------------------- /karavan-designer/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | import viteTsconfigPaths from 'vite-tsconfig-paths' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | base: '/', 8 | plugins: [react(), viteTsconfigPaths()], 9 | server: { 10 | // this ensures that the browser opens upon server start 11 | open: true, 12 | // this sets a default port to 3000, you can change this 13 | port: 3003, 14 | } 15 | }) -------------------------------------------------------------------------------- /karavan-generator/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one 2 | # or more contributor license agreements. See the NOTICE file 3 | # distributed with this work for additional information 4 | # regarding copyright ownership. The ASF licenses this file 5 | # to you under the Apache License, Version 2.0 (the 6 | # "License"); you may not use this file except in compliance 7 | # with the License. You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, 12 | # software distributed under the License is distributed on an 13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 | # KIND, either express or implied. See the License for the 15 | # specific language governing permissions and limitations 16 | # under the License. 17 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.8/apache-maven-3.8.8-bin.zip 18 | wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar 19 | -------------------------------------------------------------------------------- /karavan-generator/src/main/resources/CamelDefinition.header.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Generated by karavan build tools - do NOT edit this file! 20 | */ 21 | import {v4 as uuidv4} from 'uuid'; 22 | import {CamelElement} from "./IntegrationDefinition.js"; 23 | -------------------------------------------------------------------------------- /karavan-generator/src/main/resources/CamelDefinition.ts: -------------------------------------------------------------------------------- 1 | export class %1$s extends CamelElement { 2 | %2$s 3 | public constructor(init?: Partial<%1$s>) { 4 | super('%1$s'); 5 | Object.assign(this, init); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /karavan-generator/src/main/resources/CamelDefinitionApi.footer.ts: -------------------------------------------------------------------------------- 1 | 2 | static createSteps = (elements: any[] | undefined): CamelElement[] => { 3 | const result: CamelElement[] = [] 4 | if (elements !== undefined){ 5 | elements.forEach(e => { 6 | result.push(CamelDefinitionApi.createStep(e.dslName, e)); 7 | }) 8 | } 9 | return result 10 | } 11 | -------------------------------------------------------------------------------- /karavan-generator/src/main/resources/CamelDefinitionApi.header.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Generated by karavan build tools - do NOT edit this file! 20 | */ 21 | import {CamelElement} from "../model/IntegrationDefinition.js"; 22 | import { 23 | -------------------------------------------------------------------------------- /karavan-generator/src/main/resources/CamelDefinitionApi.ts: -------------------------------------------------------------------------------- 1 | static create%1$s = (element: any): %1$s => { %2$s 2 | const def = element ? new %1$s({...element}) : new %1$s(); 3 | def.uuid = element?.uuid ? element.uuid : def.uuid; %3$s 4 | return def; 5 | } 6 | -------------------------------------------------------------------------------- /karavan-generator/src/main/resources/CamelDefinitionYamlStep.footer.ts: -------------------------------------------------------------------------------- 1 | 2 | static readSteps = (elements: any[] | undefined): CamelElement[] => { 3 | const result: CamelElement[] = [] 4 | if (elements !== undefined){ 5 | elements.forEach(e => { 6 | result.push(CamelDefinitionYamlStep.readStep(e)); 7 | }) 8 | } 9 | return result 10 | } 11 | -------------------------------------------------------------------------------- /karavan-generator/src/main/resources/CamelDefinitionYamlStep.header.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | /** 19 | * Generated by karavan build tools - do NOT edit this file! 20 | */ 21 | import {CamelElement} from "../model/IntegrationDefinition.js"; 22 | import { 23 | 24 | -------------------------------------------------------------------------------- /karavan-generator/src/main/resources/CamelDefinitionYamlStep.ts: -------------------------------------------------------------------------------- 1 | static read%1$s = (element: any): %1$s => { 2 | %2$s 3 | let def = element ? new %1$s({...element}) : new %1$s();%3$s 4 | %4$s 5 | return def; 6 | } 7 | -------------------------------------------------------------------------------- /karavan-generator/src/main/resources/TraitDefinition.header.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Generated by karavan build tools - do NOT edit this file! 3 | */ 4 | import {CamelElement} from "./IntegrationDefinition.js"; 5 | 6 | export class TraitPropertyMeta { 7 | name: string 8 | type: string 9 | description: string 10 | 11 | constructor(name: string, type: string, description: string) { 12 | this.name = name; 13 | this.type = type; 14 | this.description = description; 15 | } 16 | } 17 | 18 | export class TraitMeta { 19 | name: string 20 | platform: boolean 21 | profiles: string 22 | description: string 23 | properties: TraitPropertyMeta[] 24 | 25 | 26 | constructor(name: string, platform:boolean, profiles: string, description: string, properties: TraitPropertyMeta[]) { 27 | this.name = name; 28 | this.platform = platform; 29 | this.profiles = profiles; 30 | this.description = description; 31 | this.properties = properties; 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /karavan-generator/src/main/resources/application.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/karavan-generator/src/main/resources/application.properties -------------------------------------------------------------------------------- /karavan-space/index.html: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 33 | 34 | 35 | Karavan 36 | 37 | 38 |
39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /karavan-space/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/karavan-space/public/favicon.ico -------------------------------------------------------------------------------- /karavan-space/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Karavan", 3 | "name": "Karavan", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /karavan-space/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /karavan-space/public/snippets/org.apache.camel.AggregationStrategy: -------------------------------------------------------------------------------- 1 | import org.apache.camel.AggregationStrategy; 2 | import org.apache.camel.Exchange; 3 | 4 | import javax.inject.Named; 5 | import javax.inject.Singleton; 6 | 7 | @Singleton 8 | @Named("NAME") 9 | public class NAME implements AggregationStrategy { 10 | @Override 11 | public Exchange aggregate(Exchange oldExchange, Exchange newExchange) { 12 | 13 | if (oldExchange == null) { 14 | return newExchange; 15 | } 16 | 17 | String oldBody = oldExchange.getIn().getBody(String.class); 18 | String newBody = newExchange.getIn().getBody(String.class); 19 | oldExchange.getIn().setBody(oldBody + "+" + newBody); 20 | return oldExchange; 21 | } 22 | } -------------------------------------------------------------------------------- /karavan-space/public/snippets/org.apache.camel.Processor: -------------------------------------------------------------------------------- 1 | import org.apache.camel.Exchange; 2 | import org.apache.camel.Processor; 3 | 4 | import javax.inject.Named; 5 | import javax.inject.Singleton; 6 | 7 | @Singleton 8 | @Named("NAME") 9 | public class NAME implements Processor { 10 | 11 | public void process(Exchange exchange) throws Exception { 12 | exchange.getIn().setBody("Hello World"); 13 | } 14 | } -------------------------------------------------------------------------------- /karavan-space/src/App.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | .App { 18 | background-color: var(--background); 19 | } 20 | -------------------------------------------------------------------------------- /karavan-space/src/api/GeneratorApi.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | export class GeneratorApi { 19 | 20 | static async generate(filename: string, data: string) { 21 | const response = await fetch("https://kameleon.dev/generator/openapi?filename="+ filename, { 22 | method: 'POST', 23 | mode: 'cors', // no-cors, *cors, same-origin 24 | cache: 'no-cache', 25 | credentials: 'same-origin', 26 | headers: { 27 | 'Content-Type': filename.endsWith("json") ? 'application/json' : 'application/yaml' 28 | }, 29 | redirect: 'follow', 30 | referrerPolicy: 'no-referrer', 31 | body: data 32 | }); 33 | return response.text(); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /karavan-space/src/designer/ErrorBoundaryWrapper.tsx: -------------------------------------------------------------------------------- 1 | import React, {ReactNode} from "react"; 2 | 3 | export interface ErrorBoundaryState { 4 | hasError: boolean; 5 | error: Error | null; 6 | } 7 | 8 | export class ErrorBoundaryWrapper extends React.Component<{ 9 | children: ReactNode; 10 | onError: (error: Error) => void; 11 | }> { 12 | componentDidCatch(error: Error, errorInfo: React.ErrorInfo) { 13 | // Handle error (logging, etc.) 14 | console.error("Error caught in ErrorBoundary:", error, errorInfo); 15 | this.props.onError(error); 16 | } 17 | 18 | render() { 19 | return this.props.children; 20 | } 21 | } -------------------------------------------------------------------------------- /karavan-space/src/designer/kamelet/KameletDesigner.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | import React from 'react'; 18 | import { 19 | PageSection, 20 | } from '@patternfly/react-core'; 21 | import '../karavan.css'; 22 | import './kamelet.css'; 23 | import {KameletAnnotationsPanel} from "./KameletAnnotationsPanel"; 24 | import {KameletDefinitionsPanel} from "./KameletDefinitionsPanel"; 25 | 26 | export function KameletDesigner() { 27 | 28 | return ( 29 | 30 | 31 | 32 |
33 | 34 | 35 | 36 | ) 37 | } 38 | -------------------------------------------------------------------------------- /karavan-space/src/designer/kamelet/kamelet.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | .karavan .kamelet-designer { 19 | display: block; 20 | height: 100vh; 21 | width: 100%; 22 | overflow-y: auto; 23 | padding-bottom: 106px; 24 | } 25 | 26 | .karavan .kamelet-designer .pf-v5-c-drawer__content, 27 | .karavan .kamelet-designer .main { 28 | background-color: var(--pf-v5-global--BackgroundColor--light-300); 29 | } 30 | .karavan .kamelet-designer .icon { 31 | height: 20px; 32 | width: 20px; 33 | border: none; 34 | -webkit-user-select: none; 35 | -o-user-select: none; 36 | user-select: none; 37 | } 38 | 39 | .karavan .kamelet-designer .properties { 40 | padding: 10px 10px 10px 10px; 41 | background: transparent; 42 | width: 100%; 43 | height: 100%; 44 | overflow: auto; 45 | display: flex; 46 | flex-direction: column; 47 | justify-content: space-between; 48 | } -------------------------------------------------------------------------------- /karavan-space/src/designer/property/property/DslPropertyField.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | .switch-placeholder { 18 | margin: auto; 19 | padding-right: 12px; 20 | } 21 | 22 | .karavan .properties .route-variable .pf-v5-c-toggle-group__button:before, 23 | .karavan .properties .route-variable .pf-v5-c-toggle-group__button { 24 | border-start-end-radius: 0; 25 | border-end-end-radius: 0; 26 | } 27 | 28 | .karavan .properties .infra-button { 29 | width: 1em; 30 | height: 1em; 31 | vertical-align: -0.125em; 32 | } -------------------------------------------------------------------------------- /karavan-space/src/designer/property/property/PropertyPlaceholderDropdown.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | .karavan .properties .property-placeholder-toggle { 19 | padding-left: 6px; 20 | padding-right: 6px; 21 | } 22 | 23 | .karavan .properties .property-placeholder-toggle .pf-v5-c-button__icon.pf-m-start { 24 | margin-inline-end: 0; 25 | } 26 | 27 | .karavan .properties .property-placeholder-toggle .pf-v5-c-menu-toggle__controls { 28 | display: none; 29 | } 30 | 31 | .karavan .properties .property-placeholder-dropdown .pf-v5-c-menu__group-title { 32 | font-weight: bold; 33 | font-size: 13px; 34 | } 35 | 36 | .pf-v5-c-popover .property-placeholder-toggle-form { 37 | width: 300px; 38 | } 39 | 40 | .pf-v5-c-popover .property-placeholder-toggle-form .pf-v5-c-form__group { 41 | grid-template-columns: 1fr 2fr; 42 | } -------------------------------------------------------------------------------- /karavan-space/src/designer/property/property/VariablesDropdown.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | .karavan .properties .variables-toggle { 19 | padding-left: 6px; 20 | padding-right: 6px; 21 | } 22 | 23 | .karavan .properties .variables-toggle .pf-v5-c-button__icon.pf-m-start { 24 | margin-inline-end: 0; 25 | } 26 | 27 | .karavan .properties .variables-toggle .pf-v5-c-menu-toggle__controls { 28 | display: none; 29 | } 30 | 31 | .pf-v5-c-popover .variables-toggle-form { 32 | width: 300px; 33 | } 34 | 35 | .pf-v5-c-popover .variables-toggle-form .pf-v5-c-form__group { 36 | grid-template-columns: 1fr 2fr; 37 | } -------------------------------------------------------------------------------- /karavan-space/src/designer/route/useResizeObserver.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | import { useLayoutEffect, useRef } from 'react'; 19 | 20 | function useResizeObserver(callback: (target: T, entry: ResizeObserverEntry) => void) { 21 | const ref = useRef(null) 22 | 23 | useLayoutEffect(() => { 24 | const element = ref?.current; 25 | if (!element) { 26 | return; 27 | } 28 | const observer1 = new ResizeObserver((entries) => { 29 | callback(element, entries[0]); 30 | }); 31 | observer1.observe(element); 32 | return () => { 33 | observer1.disconnect(); 34 | }; 35 | }, [callback, ref]); 36 | 37 | return ref 38 | } 39 | 40 | export default useResizeObserver; -------------------------------------------------------------------------------- /karavan-space/src/designer/utils/ElementIcon.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | 19 | .add-button-icon, .insert-button-icon { 20 | fill: var(--pf-v5-global--primary-color--100); 21 | width: 20px; 22 | height: 20px; 23 | background: transparent; 24 | vertical-align: text-bottom; 25 | } 26 | 27 | .copy-button-icon { 28 | width: 20px; 29 | height: 20px; 30 | background: transparent; 31 | vertical-align: text-bottom; 32 | } 33 | 34 | .delete-button-icon { 35 | fill: var(--pf-v5-global--danger-color--100); 36 | width: 20px; 37 | height: 20px; 38 | background: transparent; 39 | vertical-align: text-bottom; 40 | } 41 | -------------------------------------------------------------------------------- /karavan-space/src/designer/utils/ValidatorUtils.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | export function isSensitiveFieldValid(field: string): boolean { 19 | if (field === undefined || field.trim() === "") { 20 | return true; 21 | } 22 | if (field.startsWith("{{") && field.endsWith("}}")) { 23 | const content = field.slice(2, -2).trim(); 24 | return content !== ""; 25 | } 26 | if (field.startsWith("${") && field.endsWith("}")) { 27 | const content = field.slice(2, -1).trim(); 28 | return content !== ""; 29 | } 30 | return false; 31 | } 32 | 33 | 34 | -------------------------------------------------------------------------------- /karavan-space/src/index.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | import React, {StrictMode} from 'react'; 18 | import "./index.css"; 19 | import "@patternfly/patternfly/patternfly.css"; 20 | import App from "./App"; 21 | import {createRoot} from "react-dom/client"; 22 | 23 | const container = document.getElementById('root'); 24 | const root = createRoot(container!); 25 | root.render( 26 | 27 | 28 | 29 | ); -------------------------------------------------------------------------------- /karavan-space/src/topology/CustomEdge.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | import * as React from 'react'; 19 | 20 | import './topology.css'; 21 | import {DefaultEdge, observer} from '@patternfly/react-topology'; 22 | 23 | 24 | const CustomEdge: React.FC = observer(({ element, ...rest }) => { 25 | return ( 26 | 27 | 28 | ) 29 | }) 30 | export default CustomEdge; -------------------------------------------------------------------------------- /karavan-space/src/topology/CustomGroup.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | import * as React from 'react'; 19 | 20 | import './topology.css'; 21 | import {DefaultGroup, LabelPosition, observer} from '@patternfly/react-topology'; 22 | 23 | const CustomGroup: React.FC = observer(({ element, ...rest }) => { 24 | return ( 25 | 32 | 33 | ) 34 | }) 35 | export default CustomGroup; -------------------------------------------------------------------------------- /karavan-space/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ESNext", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": false, 6 | "skipLibCheck": true, 7 | "esModuleInterop": true, 8 | "allowSyntheticDefaultImports": true, 9 | "strict": true, 10 | "forceConsistentCasingInFileNames": true, 11 | "module": "esnext", 12 | "moduleResolution": "node", 13 | "resolveJsonModule": true, 14 | "isolatedModules": true, 15 | "noEmit": true, 16 | "noFallthroughCasesInSwitch": true, 17 | "jsx": "react-jsx", 18 | "types": ["vite/client", "vite-plugin-svgr/client"] 19 | }, 20 | "include": ["src"] 21 | } -------------------------------------------------------------------------------- /karavan-space/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// -------------------------------------------------------------------------------- /karavan-space/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | import viteTsconfigPaths from 'vite-tsconfig-paths' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | base: '/', 8 | plugins: [react(), viteTsconfigPaths()], 9 | server: { 10 | // this ensures that the browser opens upon server start 11 | open: true, 12 | // this sets a default port to 3000, you can change this 13 | port: 3003, 14 | } 15 | }) -------------------------------------------------------------------------------- /karavan-vscode/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es2021": true, 5 | "node": true 6 | }, 7 | "extends": [ 8 | // "eslint:recommended", 9 | // "plugin:react/recommended", 10 | // "plugin:@typescript-eslint/recommended", 11 | // "plugin:prettier/recommended" 12 | ], 13 | "parser": "@typescript-eslint/parser", 14 | "parserOptions": { 15 | "ecmaFeatures": { 16 | "jsx": true 17 | }, 18 | "ecmaVersion": 12, 19 | "sourceType": "module" 20 | }, 21 | "settings": { 22 | "react": { 23 | "version": "detect" 24 | } 25 | }, 26 | "ignorePatterns": ["out", "dist", "**/*.d.ts"], 27 | "plugins": ["react", "@typescript-eslint"], 28 | "rules": { 29 | "@typescript-eslint/explicit-module-boundary-types": "off" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /karavan-vscode/.gitignore: -------------------------------------------------------------------------------- 1 | out 2 | dist 3 | node_modules 4 | .vscode-test/ 5 | *.vsix 6 | .DS_Store 7 | .idea 8 | yarn-error.log 9 | webview/designer 10 | webview/components 11 | webview/knowledgebase 12 | webview/kamelets 13 | webview/core 14 | webview/eip 15 | .vscode-test-web 16 | -------------------------------------------------------------------------------- /karavan-vscode/.prettierignore: -------------------------------------------------------------------------------- 1 | out 2 | dist 3 | -------------------------------------------------------------------------------- /karavan-vscode/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.0", 3 | "configurations": [ 4 | { 5 | "name": "Attach", 6 | "port": 9229, 7 | "request": "attach", 8 | "skipFiles": [ 9 | "/**" 10 | ], 11 | "type": "extensionHost" 12 | }, 13 | { 14 | "name": "Extension", 15 | "type": "extensionHost", 16 | "request": "launch", 17 | "runtimeExecutable": "${execPath}", 18 | "args": ["--extensionDevelopmentPath=${workspaceFolder}"], 19 | "outFiles": ["${workspaceFolder}/out/extension.js"], 20 | "stopOnEntry": true, 21 | "showReturnValue": true, 22 | // "preLaunchTask": "npm: watch" 23 | }, 24 | { 25 | "name": "Run Web Extension in VS Code", 26 | "type": "pwa-extensionHost", 27 | "debugWebWorkerHost": true, 28 | "request": "launch", 29 | "args": [ 30 | "--extensionDevelopmentPath=${workspaceFolder}", 31 | "--extensionDevelopmentKind=web" 32 | ], 33 | "outFiles": ["${workspaceFolder}/dist/**/*.*"], 34 | "preLaunchTask": "npm: watch" 35 | } 36 | ] 37 | } -------------------------------------------------------------------------------- /karavan-vscode/.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "type": "npm", 6 | "script": "watch", 7 | "problemMatcher": "$tsc-watch", 8 | "isBackground": true, 9 | "presentation": { 10 | "reveal": "never" 11 | }, 12 | "group": { 13 | "kind": "build", 14 | "isDefault": true 15 | } 16 | }, 17 | { 18 | "type": "npm", 19 | "script": "watch-web", 20 | "group": "build", 21 | "isBackground": true, 22 | "problemMatcher": ["$ts-webpack-watch"] 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /karavan-vscode/.vscodeignore: -------------------------------------------------------------------------------- 1 | .vscode/** 2 | .vscode-test/** 3 | out/** 4 | node_modules/** 5 | src/** 6 | .gitignore 7 | .yarnrc 8 | vsc-extension-quickstart.md 9 | **/tsconfig.json 10 | **/.eslintrc.json 11 | **/*.map 12 | **/*.ts 13 | dist/prerender.js 14 | dist/*.prerender.js 15 | dist/*.prerender.js.* 16 | -------------------------------------------------------------------------------- /karavan-vscode/icons/karavan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/karavan-vscode/icons/karavan.png -------------------------------------------------------------------------------- /karavan-vscode/icons/run-jbang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/karavan-vscode/icons/run-jbang.png -------------------------------------------------------------------------------- /karavan-vscode/icons/run.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | Layer 1 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /karavan-vscode/images/create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/karavan-vscode/images/create.png -------------------------------------------------------------------------------- /karavan-vscode/images/export.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/karavan-vscode/images/export.png -------------------------------------------------------------------------------- /karavan-vscode/images/install.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/karavan-vscode/images/install.png -------------------------------------------------------------------------------- /karavan-vscode/images/karavan-vscode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/karavan-vscode/images/karavan-vscode.png -------------------------------------------------------------------------------- /karavan-vscode/images/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/karavan-vscode/images/open.png -------------------------------------------------------------------------------- /karavan-vscode/images/run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/apache/camel-karavan/8bc3d54936935c70b0866b29f6f6db499bd25cf8/karavan-vscode/images/run.png -------------------------------------------------------------------------------- /karavan-vscode/snippets/camel-main-org.apache.camel.AggregationStrategy.java: -------------------------------------------------------------------------------- 1 | import org.apache.camel.AggregationStrategy; 2 | import org.apache.camel.Configuration; 3 | import org.apache.camel.BindToRegistry; 4 | import org.apache.camel.Exchange; 5 | 6 | @Configuration 7 | @BindToRegistry("${NAME}") 8 | public class ${NAME} implements AggregationStrategy { 9 | @Override 10 | public Exchange aggregate(Exchange oldExchange, Exchange newExchange) { 11 | 12 | if (oldExchange == null) { 13 | return newExchange; 14 | } 15 | 16 | String oldBody = oldExchange.getIn().getBody(String.class); 17 | String newBody = newExchange.getIn().getBody(String.class); 18 | oldExchange.getIn().setBody(oldBody + "+" + newBody); 19 | return oldExchange; 20 | } 21 | } -------------------------------------------------------------------------------- /karavan-vscode/snippets/camel-main-org.apache.camel.Processor.java: -------------------------------------------------------------------------------- 1 | import org.apache.camel.BindToRegistry; 2 | import org.apache.camel.Configuration; 3 | import org.apache.camel.Exchange; 4 | import org.apache.camel.Processor; 5 | 6 | @Configuration 7 | @BindToRegistry("${NAME}") 8 | public class ${NAME} implements Processor { 9 | 10 | public void process(Exchange exchange) throws Exception { 11 | exchange.getIn().setBody("Hello World"); 12 | } 13 | } -------------------------------------------------------------------------------- /karavan-vscode/snippets/quarkus-org.apache.camel.AggregationStrategy.java: -------------------------------------------------------------------------------- 1 | import org.apache.camel.AggregationStrategy 2 | ; 3 | import org.apache.camel.Exchange; 4 | 5 | import javax.inject.Named; 6 | import javax.inject.Singleton; 7 | 8 | @Singleton 9 | @Named("NAME") 10 | public class NAME implements AggregationStrategy { 11 | @Override 12 | public Exchange aggregate(Exchange oldExchange, Exchange newExchange) { 13 | 14 | if (oldExchange == null) { 15 | return newExchange; 16 | } 17 | 18 | String oldBody = oldExchange.getIn().getBody(String.class); 19 | String newBody = newExchange.getIn().getBody(String.class); 20 | oldExchange.getIn().setBody(oldBody + "+" + newBody); 21 | return oldExchange; 22 | } 23 | } -------------------------------------------------------------------------------- /karavan-vscode/snippets/quarkus-org.apache.camel.Processor.java: -------------------------------------------------------------------------------- 1 | import org.apache.camel.Exchange; 2 | import org.apache.camel.Processor; 3 | 4 | import javax.inject.Named; 5 | import javax.inject.Singleton; 6 | 7 | @Singleton 8 | @Named("NAME") 9 | public class NAME implements Processor { 10 | 11 | public void process(Exchange exchange) throws Exception { 12 | exchange.getIn().setBody("Hello World"); 13 | } 14 | } -------------------------------------------------------------------------------- /karavan-vscode/snippets/spring-boot-org.apache.camel.AggregationStrategy.java: -------------------------------------------------------------------------------- 1 | import org.apache.camel.AggregationStrategy; 2 | import org.apache.camel.Exchange; 3 | 4 | import org.springframework.stereotype.Component; 5 | 6 | @Component("NAME") 7 | public class NAME implements AggregationStrategy { 8 | @Override 9 | public Exchange aggregate(Exchange oldExchange, Exchange newExchange) { 10 | 11 | if (oldExchange == null) { 12 | return newExchange; 13 | } 14 | 15 | String oldBody = oldExchange.getIn().getBody(String.class); 16 | String newBody = newExchange.getIn().getBody(String.class); 17 | oldExchange.getIn().setBody(oldBody + "+" + newBody); 18 | return oldExchange; 19 | } 20 | } -------------------------------------------------------------------------------- /karavan-vscode/snippets/spring-boot-org.apache.camel.Processor.java: -------------------------------------------------------------------------------- 1 | import org.apache.camel.Exchange; 2 | import org.apache.camel.Processor; 3 | 4 | import org.springframework.stereotype.Component; 5 | 6 | @Component("NAME") 7 | public class NAME implements Processor { 8 | 9 | public void process(Exchange exchange) throws Exception { 10 | exchange.getIn().setBody("Hello World"); 11 | } 12 | } -------------------------------------------------------------------------------- /karavan-vscode/src/maven.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | export function createPackageAndPushImageCommand(directory: string) { 19 | return "mvn clean package -f " + directory 20 | + " -Dquarkus.kubernetes.deploy=false" 21 | + " -Dquarkus.container-image.build=true -Dquarkus.container-image.push=true" 22 | } 23 | 24 | export function createPackageAndDeployCommand(directory: string) { 25 | return "mvn clean package -f " + directory 26 | + " -Dquarkus.kubernetes.deploy=true -Dquarkus.container-image.registry=image-registry.openshift-image-registry.svc:5000" 27 | + " -Dquarkus.container-image.build=false -Dquarkus.container-image.push=false" 28 | } 29 | 30 | 31 | -------------------------------------------------------------------------------- /karavan-vscode/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "rootDir": ".", 5 | "outDir": "dist", 6 | "module": "esnext", 7 | "target": "es2022", 8 | "lib": [ 9 | "dom", 10 | "dom.iterable", 11 | "esnext", 12 | "es2022" 13 | ], 14 | "sourceMap": true, 15 | "jsx": "react", 16 | "moduleResolution": "node", 17 | "forceConsistentCasingInFileNames": true, 18 | "noImplicitReturns": false, 19 | "noImplicitThis": true, 20 | "noImplicitAny": false, 21 | "allowJs": true, 22 | "esModuleInterop": true, 23 | "allowSyntheticDefaultImports": true, 24 | "strict": true, 25 | "paths": { 26 | "@app/*": ["src/app/*"], 27 | "@assets/*": ["node_modules/@patternfly/react-core/dist/styles/assets/*"], 28 | "core": ["webview/core"] 29 | }, 30 | "importHelpers": true, 31 | "skipLibCheck": true 32 | }, 33 | "include": [ 34 | "**/*.ts", 35 | "**/*.tsx", 36 | "**/*.jsx", 37 | "**/*.js" 38 | ], 39 | "exclude": ["node_modules", ".vscode-test"] 40 | } 41 | -------------------------------------------------------------------------------- /karavan-vscode/webview/App.css: -------------------------------------------------------------------------------- 1 | /* Licensed to the Apache Software Foundation (ASF) under one or more 2 | contributor license agreements. See the NOTICE file distributed with 3 | this work for additional information regarding copyright ownership. 4 | The ASF licenses this file to You under the Apache License, Version 2.0 5 | (the "License"); you may not use this file except in compliance with 6 | the License. You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. */ 15 | 16 | .App { 17 | background-color: var(--background); 18 | } 19 | -------------------------------------------------------------------------------- /karavan-vscode/webview/acquireVsCodeApi.d.ts: -------------------------------------------------------------------------------- 1 | // Licensed to the Apache Software Foundation (ASF) under one or more 2 | // contributor license agreements. See the NOTICE file distributed with 3 | // this work for additional information regarding copyright ownership. 4 | // The ASF licenses this file to You under the Apache License, Version 2.0 5 | // (the "License"); you may not use this file except in compliance with 6 | // the License. You may obtain a copy of the License at 7 | 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | 16 | declare var acquireVsCodeApi: any; 17 | -------------------------------------------------------------------------------- /karavan-vscode/webview/index.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | import * as React from "react"; 18 | import {createRoot} from "react-dom/client"; 19 | import App from "./App"; 20 | import "./index.css"; 21 | import "@patternfly/patternfly/patternfly.css"; 22 | 23 | const dark = document.body.className.includes('vscode-dark'); 24 | const container = document.getElementById('root'); 25 | const root = createRoot(container!); 26 | root.render(); 27 | -------------------------------------------------------------------------------- /karavan-vscode/webview/prerender.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | import * as React from "react"; 18 | import { renderToString } from "react-dom/server"; 19 | import App from "./App"; 20 | 21 | export default () => { 22 | const html = renderToString(); 23 | 24 | return ` 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 |
${html}
35 | 37 | 38 | 39 | 40 | `; 41 | }; 42 | -------------------------------------------------------------------------------- /karavan-vscode/webview/topology/CustomEdge.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | import * as React from 'react'; 19 | 20 | import './topology.css'; 21 | import {DefaultEdge, observer} from '@patternfly/react-topology'; 22 | 23 | 24 | const CustomEdge: React.FC = observer(({ element, ...rest }) => { 25 | return ( 26 | 27 | 28 | ) 29 | }) 30 | export default CustomEdge; -------------------------------------------------------------------------------- /karavan-vscode/webview/topology/CustomGroup.tsx: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | 18 | import * as React from 'react'; 19 | 20 | import './topology.css'; 21 | import {DefaultGroup, LabelPosition, observer} from '@patternfly/react-topology'; 22 | 23 | const CustomGroup: React.FC = observer(({ element, ...rest }) => { 24 | return ( 25 | 32 | 33 | ) 34 | }) 35 | export default CustomGroup; -------------------------------------------------------------------------------- /karavan-vscode/webview/vscode.ts: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed to the Apache Software Foundation (ASF) under one or more 3 | * contributor license agreements. See the NOTICE file distributed with 4 | * this work for additional information regarding copyright ownership. 5 | * The ASF licenses this file to You under the Apache License, Version 2.0 6 | * (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | let vscode; 18 | if (typeof acquireVsCodeApi !== "undefined") { 19 | vscode = acquireVsCodeApi(); 20 | } 21 | 22 | export default vscode; 23 | -------------------------------------------------------------------------------- /release-utils/prerelease.sh: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | set -e 17 | 18 | if [ "$#" -lt 1 ]; then 19 | echo "usage: $0 version" 20 | exit 1 21 | fi 22 | 23 | location=$(dirname $0) 24 | version=$1 25 | 26 | mkdir $1/ 27 | cd $1/ 28 | 29 | wget https://github.com/apache/camel-karavan/releases/download/$1/camel-karavan-$1.zip 30 | wget https://github.com/apache/camel-karavan/releases/download/$1/camel-karavan-$1.zip.asc 31 | wget https://github.com/apache/camel-karavan/releases/download/$1/camel-karavan-$1.zip.sha512 32 | cd ../ 33 | svn import $1/ https://dist.apache.org/repos/dist/dev/camel/camel-karavan/$1/ -m "Import camel-karavan release" 34 | rm -rf $1/ -------------------------------------------------------------------------------- /release-utils/release.sh: -------------------------------------------------------------------------------- 1 | # Licensed to the Apache Software Foundation (ASF) under one or more 2 | # contributor license agreements. See the NOTICE file distributed with 3 | # this work for additional information regarding copyright ownership. 4 | # The ASF licenses this file to You under the Apache License, Version 2.0 5 | # (the "License"); you may not use this file except in compliance with 6 | # the License. You may obtain a copy of the License at 7 | 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | set -e 17 | 18 | if [ "$#" -lt 1 ]; then 19 | echo "usage: $0 version" 20 | exit 1 21 | fi 22 | 23 | location=$(dirname $0) 24 | version=$1 25 | 26 | mkdir $1/ 27 | cd $1/ 28 | 29 | wget https://dist.apache.org/repos/dist/dev/camel/camel-karavan/$1/camel-karavan-$1.zip 30 | wget https://dist.apache.org/repos/dist/dev/camel/camel-karavan/$1/camel-karavan-$1.zip.asc 31 | wget https://dist.apache.org/repos/dist/dev/camel/camel-karavan/$1/camel-karavan-$1.zip.sha512 32 | cd ../ 33 | svn import $1/ https://dist.apache.org/repos/dist/release/camel/camel-karavan/$1/ -m "Import camel-karavan release" 34 | 35 | rm -rf $1/ --------------------------------------------------------------------------------