From 015a92c0658c41ef96ce4c777b77200c5dd12beb Mon Sep 17 00:00:00 2001 From: Danilo Horta Date: Wed, 23 Aug 2023 21:13:28 +0100 Subject: [PATCH] Fix API_BASE URL in config.json to use the correct hostname --- src/components/Query.jsx | 2 +- src/components/Result.jsx | 2 +- src/config/config.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Query.jsx b/src/components/Query.jsx index e2ba4e9..619698a 100755 --- a/src/components/Query.jsx +++ b/src/components/Query.jsx @@ -21,7 +21,7 @@ const submitJob = (dbId, queryText, handleJobSubmitted) => { }; axios.post(`${config.API_BASE}/scans/`, data).then((res) => { - const jobId = res.data.id; + const jobId = res.data.job.id; handleJobSubmitted( jobId, data.seqs.map((seq) => seq.name) diff --git a/src/components/Result.jsx b/src/components/Result.jsx index 0b38ed0..79307ca 100755 --- a/src/components/Result.jsx +++ b/src/components/Result.jsx @@ -177,7 +177,7 @@ const Result = () => { setNumResults(response?.data?.length); }); } - }, [jobState]); + }, [jobState, scanId]); const finishedAt = jobState ? new Date(1000 * parseInt(jobState?.exec_ended || "0")).toLocaleString() diff --git a/src/config/config.json b/src/config/config.json index 7c31e81..03bea0f 100755 --- a/src/config/config.json +++ b/src/config/config.json @@ -1,4 +1,4 @@ { - "API_BASE": "http://127.0.0.1", + "API_BASE": "http://deciphon-sched:1515", "POLLING_INTERVAL_MS": 1000 }