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 0fc8590c Increase axios.defaults.timeout = 30000
0fc8590c is described below
commit 0fc8590c28d447c01a84a704e50eb67a96d2c05d
Author: Marat Gubaidullin <[email protected]>
AuthorDate: Wed Dec 11 12:37:09 2024 -0500
Increase axios.defaults.timeout = 30000
---
karavan-app/src/main/webui/src/api/KaravanApi.tsx | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/karavan-app/src/main/webui/src/api/KaravanApi.tsx
b/karavan-app/src/main/webui/src/api/KaravanApi.tsx
index b4614940..6eaab190 100644
--- a/karavan-app/src/main/webui/src/api/KaravanApi.tsx
+++ b/karavan-app/src/main/webui/src/api/KaravanApi.tsx
@@ -32,7 +32,7 @@ import {EventBus} from "../designer/utils/EventBus";
import {ErrorEventBus} from "./ErrorEventBus";
const USER_ID_KEY = 'KARAVAN_USER_ID';
-axios.defaults.timeout = 5000;
+axios.defaults.timeout = 30000;
axios.defaults.headers.common['Accept'] = 'application/json';
axios.defaults.headers.common['Content-Type'] = 'application/json';
const instance = axios.create();
@@ -463,8 +463,8 @@ export class KaravanApi {
});
}
- static async startDevModeContainer(project: Project, verbose: boolean,
after: (res: AxiosResponse<any>) => void) {
- instance.post('/ui/devmode/' + verbose.toString(), project)
+ static async startDevModeContainer(project: Project, verbose: boolean,
compile: boolean, after: (res: AxiosResponse<any>) => void) {
+
instance.post(`/ui/devmode/${verbose.toString()}/${compile.toString()}`,
project)
.then(res => {
after(res);
}).catch(err => {
@@ -704,7 +704,7 @@ export class KaravanApi {
}
static async getKamelets(after: (yaml: string) => void) {
- instance.get('/ui/metadata/kamelets', {headers: {'Accept':
'text/plain'}})
+ instance.get('/ui/metadata/kamelets', {headers: {'Accept':
'text/plain'}, timeout: 0})
.then(res => {
if (res.status === 200) {
after(res.data);
@@ -715,7 +715,7 @@ export class KaravanApi {
}
static async getKameletsForProject(projectId: string, after: (yaml:
string) => void) {
- instance.get('/ui/metadata/kamelets/' + projectId, {headers:
{'Accept': 'text/plain'}})
+ instance.get('/ui/metadata/kamelets/' + projectId, {headers:
{'Accept': 'text/plain'}, timeout: 0})
.then(res => {
if (res.status === 200) {
after(res.data);
@@ -726,7 +726,7 @@ export class KaravanApi {
}
static async getComponents(after: (json: string) => void) {
- instance.get('/ui/metadata/components')
+ instance.get('/ui/metadata/components', {timeout: 0})
.then(res => {
if (res.status === 200) {
after(JSON.stringify(res.data));
@@ -737,7 +737,7 @@ export class KaravanApi {
}
static async getBeans(after: (json: string) => void) {
- instance.get('/ui/metadata/beans')
+ instance.get('/ui/metadata/beans', {timeout: 0})
.then(res => {
if (res.status === 200) {
after(JSON.stringify(res.data));
@@ -748,7 +748,7 @@ export class KaravanApi {
}
static async getMainConfiguration(after: (json: string) => void) {
- instance.get('/ui/metadata/mainConfiguration')
+ instance.get('/ui/metadata/mainConfiguration', {timeout: 0})
.then(res => {
if (res.status === 200) {
after(JSON.stringify(res.data));