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 2024/01/18 22:44:00 UTC
(camel-karavan) branch main updated: Notification in DevMode run
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 841fe6b0 Notification in DevMode run
841fe6b0 is described below
commit 841fe6b0f7027c254599b65f07bfe8a6924ccccd
Author: Marat Gubaidullin <ma...@talismancloud.io>
AuthorDate: Thu Jan 18 17:43:52 2024 -0500
Notification in DevMode run
---
.../src/main/webui/src/api/ProjectService.ts | 29 +++++++++++-----------
1 file changed, 14 insertions(+), 15 deletions(-)
diff --git a/karavan-web/karavan-app/src/main/webui/src/api/ProjectService.ts b/karavan-web/karavan-app/src/main/webui/src/api/ProjectService.ts
index 4cefba6a..b3d925d8 100644
--- a/karavan-web/karavan-app/src/main/webui/src/api/ProjectService.ts
+++ b/karavan-web/karavan-app/src/main/webui/src/api/ProjectService.ts
@@ -42,7 +42,7 @@ export class ProjectService {
ProjectEventBus.sendLog('set', '');
useLogStore.setState({showLog: true, type: 'container', podName: res.data})
} else {
- // Todo notification
+ EventBus.sendAlert('Error Starting DevMode container', res.statusText, 'warning')
}
});
}
@@ -54,8 +54,7 @@ export class ProjectService {
if (res.status === 200 || res.status === 201) {
// setIsReloadingPod(false);
} else {
- // Todo notification
- // setIsReloadingPod(false);
+ EventBus.sendAlert('Error Reloading DevMode container', res.statusText, 'warning')
}
});
}
@@ -115,19 +114,19 @@ export class ProjectService {
}
public static pullProject(projectId: string) {
- useProjectStore.setState({isPulling: true})
- KaravanApi.pull(projectId, res => {
- console.log(res);
- if (res.status === 200 || res.status === 201) {
- useProjectStore.setState({isPulling: false})
- ProjectService.refreshProject(projectId);
- ProjectService.refreshProjectData(projectId);
- } else {
- EventBus.sendAlert("Error pulling", (res as any)?.response?.data, 'danger')
- }
+ useProjectStore.setState({isPulling: true})
+ KaravanApi.pull(projectId, res => {
+ console.log(res);
+ if (res.status === 200 || res.status === 201) {
useProjectStore.setState({isPulling: false})
- });
- }
+ ProjectService.refreshProject(projectId);
+ ProjectService.refreshProjectData(projectId);
+ } else {
+ EventBus.sendAlert("Error pulling", (res as any)?.response?.data, 'danger')
+ }
+ useProjectStore.setState({isPulling: false})
+ });
+ }
public static reloadKamelets() {
KaravanApi.getKamelets(yamls => {