You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ma...@apache.org on 2023/10/23 16:34:57 UTC

[camel-karavan] branch main updated: Fix #948

This is an automated email from the ASF dual-hosted git repository.

marat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-karavan.git


The following commit(s) were added to refs/heads/main by this push:
     new f3f536af Fix #948
f3f536af is described below

commit f3f536aff1af56781c0cb618dba03235d89dc4a3
Author: Marat Gubaidullin <ma...@talismancloud.io>
AuthorDate: Mon Oct 23 12:34:51 2023 -0400

    Fix #948
---
 karavan-designer/src/designer/utils/CamelUi.tsx                       | 3 ++-
 karavan-space/src/designer/utils/CamelUi.tsx                          | 3 ++-
 karavan-web/karavan-app/src/main/webui/src/designer/utils/CamelUi.tsx | 3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/karavan-designer/src/designer/utils/CamelUi.tsx b/karavan-designer/src/designer/utils/CamelUi.tsx
index 86dc6c58..6864361b 100644
--- a/karavan-designer/src/designer/utils/CamelUi.tsx
+++ b/karavan-designer/src/designer/utils/CamelUi.tsx
@@ -273,7 +273,8 @@ export class CamelUi {
     static getKameletDslMetaModel = (type: 'source' | "sink" | "action"): DslMetaModel[] => {
         return KameletApi.getKamelets().filter((k) => k.metadata.labels["camel.apache.org/kamelet.type"] === type)
             .map((k) => {
-                const descriptionLines = k.description().split("\n");
+                const descriptionLines = k.description().split("\n")
+                    .filter(line => line !== undefined && line.trim().length > 0);
                 const description = descriptionLines.at(0);
                 return new DslMetaModel({
                     dsl: type === 'source' ? "FromDefinition" : "ToDefinition",
diff --git a/karavan-space/src/designer/utils/CamelUi.tsx b/karavan-space/src/designer/utils/CamelUi.tsx
index 86dc6c58..6864361b 100644
--- a/karavan-space/src/designer/utils/CamelUi.tsx
+++ b/karavan-space/src/designer/utils/CamelUi.tsx
@@ -273,7 +273,8 @@ export class CamelUi {
     static getKameletDslMetaModel = (type: 'source' | "sink" | "action"): DslMetaModel[] => {
         return KameletApi.getKamelets().filter((k) => k.metadata.labels["camel.apache.org/kamelet.type"] === type)
             .map((k) => {
-                const descriptionLines = k.description().split("\n");
+                const descriptionLines = k.description().split("\n")
+                    .filter(line => line !== undefined && line.trim().length > 0);
                 const description = descriptionLines.at(0);
                 return new DslMetaModel({
                     dsl: type === 'source' ? "FromDefinition" : "ToDefinition",
diff --git a/karavan-web/karavan-app/src/main/webui/src/designer/utils/CamelUi.tsx b/karavan-web/karavan-app/src/main/webui/src/designer/utils/CamelUi.tsx
index 86dc6c58..6864361b 100644
--- a/karavan-web/karavan-app/src/main/webui/src/designer/utils/CamelUi.tsx
+++ b/karavan-web/karavan-app/src/main/webui/src/designer/utils/CamelUi.tsx
@@ -273,7 +273,8 @@ export class CamelUi {
     static getKameletDslMetaModel = (type: 'source' | "sink" | "action"): DslMetaModel[] => {
         return KameletApi.getKamelets().filter((k) => k.metadata.labels["camel.apache.org/kamelet.type"] === type)
             .map((k) => {
-                const descriptionLines = k.description().split("\n");
+                const descriptionLines = k.description().split("\n")
+                    .filter(line => line !== undefined && line.trim().length > 0);
                 const description = descriptionLines.at(0);
                 return new DslMetaModel({
                     dsl: type === 'source' ? "FromDefinition" : "ToDefinition",