fixed 304 errors and removed admin ui from dash
Build and Push Docker Images / detect-changes (push) Successful in 10s
Build and Push Docker Images / build-auth-api (push) Has been skipped
Build and Push Docker Images / build-employee-api (push) Has been skipped
Build and Push Docker Images / build-transit-api (push) Has been skipped
Build and Push Docker Images / build-error-log-api (push) Has been skipped
Build and Push Docker Images / build-admin-ui (push) Has been skipped
Build and Push Docker Images / build-monitoring-ui (push) Successful in 1m15s
Build and Push Docker Images / deploy-test-node (push) Has been skipped
Build and Push Docker Images / detect-changes (push) Successful in 10s
Build and Push Docker Images / build-auth-api (push) Has been skipped
Build and Push Docker Images / build-employee-api (push) Has been skipped
Build and Push Docker Images / build-transit-api (push) Has been skipped
Build and Push Docker Images / build-error-log-api (push) Has been skipped
Build and Push Docker Images / build-admin-ui (push) Has been skipped
Build and Push Docker Images / build-monitoring-ui (push) Successful in 1m15s
Build and Push Docker Images / deploy-test-node (push) Has been skipped
This commit is contained in:
+15
-29
@@ -4,26 +4,10 @@ const runtime =
|
|||||||
typeof window !== "undefined" && window.__ENV__ ? window.__ENV__ : {};
|
typeof window !== "undefined" && window.__ENV__ ? window.__ENV__ : {};
|
||||||
|
|
||||||
const configured = {
|
const configured = {
|
||||||
auth:
|
auth: runtime.AUTH_API || import.meta.env.VITE_AUTH_API || "",
|
||||||
runtime.AUTH_API ||
|
employee: runtime.EMPLOYEE_API || import.meta.env.VITE_EMPLOYEE_API || "",
|
||||||
import.meta.env.VITE_AUTH_API ||
|
transit: runtime.TRANSIT_API || import.meta.env.VITE_TRANSIT_API || "",
|
||||||
"http://localhost:5000",
|
errors: runtime.ERROR_LOG_API || import.meta.env.VITE_ERROR_LOG_API || "",
|
||||||
employee:
|
|
||||||
runtime.EMPLOYEE_API ||
|
|
||||||
import.meta.env.VITE_EMPLOYEE_API ||
|
|
||||||
"http://localhost:4000",
|
|
||||||
transit:
|
|
||||||
runtime.TRANSIT_API ||
|
|
||||||
import.meta.env.VITE_TRANSIT_API ||
|
|
||||||
"http://localhost:5001",
|
|
||||||
errors:
|
|
||||||
runtime.ERROR_LOG_API ||
|
|
||||||
import.meta.env.VITE_ERROR_LOG_API ||
|
|
||||||
"http://localhost:5003",
|
|
||||||
admin:
|
|
||||||
runtime.ADMIN_UI ||
|
|
||||||
import.meta.env.VITE_ADMIN_UI ||
|
|
||||||
"http://localhost:5174",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const serviceMeta = {
|
const serviceMeta = {
|
||||||
@@ -60,13 +44,6 @@ const serviceMeta = {
|
|||||||
data: "Centralized bad requests and service errors",
|
data: "Centralized bad requests and service errors",
|
||||||
routes: ["/health", "/error_log?limit=100"],
|
routes: ["/health", "/error_log?limit=100"],
|
||||||
},
|
},
|
||||||
admin: {
|
|
||||||
label: "Admin UI",
|
|
||||||
role: "Operator surface",
|
|
||||||
color: "violet",
|
|
||||||
data: "The deployed React administration console",
|
|
||||||
routes: ["/health"],
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const healthPaths = {
|
const healthPaths = {
|
||||||
@@ -74,7 +51,6 @@ const healthPaths = {
|
|||||||
employee: "/health",
|
employee: "/health",
|
||||||
transit: "/health",
|
transit: "/health",
|
||||||
errors: "/health",
|
errors: "/health",
|
||||||
admin: "/health",
|
|
||||||
};
|
};
|
||||||
const testerRoutes = [
|
const testerRoutes = [
|
||||||
{ service: "auth", method: "GET", path: "/me", label: "Current session" },
|
{ service: "auth", method: "GET", path: "/me", label: "Current session" },
|
||||||
@@ -146,9 +122,19 @@ function App() {
|
|||||||
const checkService = useCallback(
|
const checkService = useCallback(
|
||||||
async (key) => {
|
async (key) => {
|
||||||
const started = performance.now();
|
const started = performance.now();
|
||||||
|
const url = urls[key];
|
||||||
|
if (!url) {
|
||||||
|
return {
|
||||||
|
ok: false,
|
||||||
|
status: 0,
|
||||||
|
body: { error: "No URL configured" },
|
||||||
|
latency: 0,
|
||||||
|
checkedAt: new Date().toISOString(),
|
||||||
|
};
|
||||||
|
}
|
||||||
const headers = token ? { Authorization: `Bearer ${token}` } : {};
|
const headers = token ? { Authorization: `Bearer ${token}` } : {};
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`${urls[key]}${healthPaths[key]}`, {
|
const response = await fetch(`${url}${healthPaths[key]}`, {
|
||||||
headers,
|
headers,
|
||||||
});
|
});
|
||||||
const body = await response.json().catch(() => null);
|
const body = await response.json().catch(() => null);
|
||||||
|
|||||||
Reference in New Issue
Block a user