diff --git a/package.json b/package.json
index 42426c0..3f924e4 100644
--- a/package.json
+++ b/package.json
@@ -2,6 +2,7 @@
"name": "webapp-deployment-status-ui",
"version": "0.1.0",
"private": true,
+ "homepage": "LACONIC_HOSTED_CONFIG_homepage",
"dependencies": {
"@tanstack/react-query": "^5.17.15",
"@testing-library/jest-dom": "^5.14.1",
diff --git a/src/App.tsx b/src/App.tsx
index 33a55c5..56199fa 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -19,8 +19,10 @@ function StatusTable() {
const [logId, setLogId] = useState("");
// Queries
- const query = useQuery({queryKey: ['allStatus'], queryFn: fetchAllStatuses})
+ const query = useQuery({queryKey: ['allStatus'], queryFn: fetchAllStatuses, refetchInterval: 10000});
const queryLog = useQuery({queryKey: ['log', logId], queryFn: () => fetchLogs(logId)});
+
+ const consoleLink = "LACONIC_HOSTED_CONFIG_app_console_link";
return (
{logId && (
@@ -33,7 +35,7 @@ function StatusTable() {
{query.data?.map((status: any) =>
Application:
diff --git a/src/index.css b/src/index.css
index 7eb2663..be0ac97 100644
--- a/src/index.css
+++ b/src/index.css
@@ -17,6 +17,10 @@ button {
cursor: pointer;
}
+a {
+ color: #444;
+}
+
#all-status {
margin: auto;
min-width: 50%;
diff --git a/src/utils/data-utils.ts b/src/utils/data-utils.ts
index 4808b66..b361c20 100644
--- a/src/utils/data-utils.ts
+++ b/src/utils/data-utils.ts
@@ -1,6 +1,7 @@
+const apiUrl = "LACONIC_HOSTED_CONFIG_app_api_url";
+
export const fetchAllStatuses = async () => {
- let url = "http://localhost:9555"
- const res = await fetch(url);
+ const res = await fetch(apiUrl);
if (!res.ok) {
throw new Error('Network response was not ok')
}
@@ -12,10 +13,10 @@ export const fetchLogs = async (id: string) => {
if (!id) {
return "";
}
- let url = `http://localhost:9555/log/${id}`
+ let url = `${apiUrl}/log/${id}`
const res = await fetch(url);
if (!res.ok) {
throw new Error('Network response was not ok')
}
return await res.text();
-}
\ No newline at end of file
+}