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

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

commit 17230af5af495adb32c9496de849cbd9fd95b183
Author: Marat Gubaidullin <[email protected]>
AuthorDate: Mon Aug 24 14:40:30 2026 -0400

    Karavan Webapp UI Bus
---
 .../src/main/webui/src/bus/ErrorEventBus.ts        | 25 ++++++++++++++++++++++
 karavan-app/src/main/webui/src/bus/LogsEventBus.ts | 25 ++++++++++++++++++++++
 2 files changed, 50 insertions(+)

diff --git a/karavan-app/src/main/webui/src/bus/ErrorEventBus.ts 
b/karavan-app/src/main/webui/src/bus/ErrorEventBus.ts
new file mode 100644
index 00000000..17df7fb2
--- /dev/null
+++ b/karavan-app/src/main/webui/src/bus/ErrorEventBus.ts
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import {Subject} from 'rxjs';
+
+const apiErrors = new Subject<any>();
+
+export const ErrorEventBus = {
+
+    sendApiError: (error: any) =>  apiErrors.next(error),
+    onApiError: () => apiErrors.asObservable(),
+}
diff --git a/karavan-app/src/main/webui/src/bus/LogsEventBus.ts 
b/karavan-app/src/main/webui/src/bus/LogsEventBus.ts
new file mode 100644
index 00000000..0f08ff86
--- /dev/null
+++ b/karavan-app/src/main/webui/src/bus/LogsEventBus.ts
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+import {Subject} from 'rxjs';
+
+const log = new Subject<["add" | "set", string]>();
+
+export const LogsEventBus = {
+
+    sendLog: (type: "add" | "set", m: string) =>  log.next([type, m]),
+    onLog: () => log.asObservable(),
+}

Reply via email to