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/03/10 11:57:53 UTC
[camel-karavan] 01/02: Start without custom components
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
commit 3f558f34d175bf588ef38a21fd3acb73681acfe0
Author: Marat Gubaidullin <ma...@gmail.com>
AuthorDate: Mon Mar 6 16:27:24 2023 -0500
Start without custom components
---
karavan-designer/src/App.tsx | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/karavan-designer/src/App.tsx b/karavan-designer/src/App.tsx
index bc75043c..e536a093 100644
--- a/karavan-designer/src/App.tsx
+++ b/karavan-designer/src/App.tsx
@@ -97,9 +97,9 @@ class App extends React.Component<Props, State> {
Promise.all([
fetch("kamelets/kamelets.yaml"),
fetch("components/components.json"),
- fetch("components/supported-components.json"),
fetch("snippets/org.apache.camel.AggregationStrategy"),
fetch("snippets/org.apache.camel.Processor")
+ // fetch("components/supported-components.json"),
]).then(responses =>
Promise.all(responses.map(response => response.text()))
).then(data => {
@@ -112,14 +112,16 @@ class App extends React.Component<Props, State> {
JSON.parse(data[1]).forEach((c: any) => jsons.push(JSON.stringify(c)));
ComponentApi.saveComponents(jsons, true);
- ComponentApi.saveSupportedComponents(data[2]);
- ComponentApi.setSupportedOnly(true);
-
this.toast("Success", "Loaded " + jsons.length + " components", 'success');
this.setState({loaded: true});
- TemplateApi.saveTemplate("org.apache.camel.AggregationStrategy", data[3]);
- TemplateApi.saveTemplate("org.apache.camel.Processor", data[4]);
+ TemplateApi.saveTemplate("org.apache.camel.AggregationStrategy", data[2]);
+ TemplateApi.saveTemplate("org.apache.camel.Processor", data[3]);
+
+ if (data[4]) {
+ ComponentApi.saveSupportedComponents(data[4]);
+ ComponentApi.setSupportedOnly(true);
+ }
}).catch(err =>
this.toast("Error", err.text, 'danger')
);