diff --git a/florist/app/jobs/details/page.tsx b/florist/app/jobs/details/page.tsx index 17e12ca..fea9992 100644 --- a/florist/app/jobs/details/page.tsx +++ b/florist/app/jobs/details/page.tsx @@ -55,7 +55,7 @@ export function JobDetailsBody(): ReactElement { return (
-
+
Job ID:
@@ -63,7 +63,7 @@ export function JobDetailsBody(): ReactElement { {job._id}
-
+
Status:
@@ -71,7 +71,7 @@ export function JobDetailsBody(): ReactElement {
-
+
Model:
@@ -79,7 +79,7 @@ export function JobDetailsBody(): ReactElement { {job.model}
-
+
Server Address:
@@ -87,7 +87,7 @@ export function JobDetailsBody(): ReactElement { {job.server_address}
-
+
Redis Host:
@@ -95,7 +95,7 @@ export function JobDetailsBody(): ReactElement { {job.redis_host}
-
+
Redis Port:
@@ -104,11 +104,18 @@ export function JobDetailsBody(): ReactElement {
-
Server Configuration:
- + + + -
Clients Configuration:
-
); } @@ -155,22 +162,45 @@ export function JobDetailsStatus({ status }: { status: string }): ReactElement { ); } -export function JobDetailsServerConfig({ serverConfig }: { serverConfig: string }): ReactElement { +export function JobDetailsTableHeader({ Component, title, data }): ReactElement { + return ( +
+
+
+
+
+
{title}
+
+
+ +
+
+ +
+
+ +
+
+
+ ) +} + +export function JobDetailsServerConfigTable({ data }: { data: string }): ReactElement { const emptyResponse = ( -
+
Empty.
); - if (!serverConfig) { + if (!data) { return emptyResponse; } - const serverConfigJson = JSON.parse(serverConfig); + const serverConfigJson = JSON.parse(data); if (typeof serverConfigJson != "object" || Array.isArray(serverConfigJson)) { return ( -
+
Error parsing server configuration.
); @@ -183,60 +213,104 @@ export function JobDetailsServerConfig({ serverConfig }: { serverConfig: string } return ( -
- {serverConfigNames.map((serverConfigName, i) => ( -
-
- {serverConfigName}: -
-
- {serverConfigJson[serverConfigName]} -
-
- ))} -
+ + + + + + + + + {serverConfigNames.map((serverConfigName, i) => ( + + + + + ))} + +
+ Name + + Value +
+
+ + {serverConfigName} + +
+
+
+ + {serverConfigJson[serverConfigName]} + +
+
); } -export function JobDetailsClientsInfo({ clientsInfo }: { clientsInfo: Array }): ReactElement { +export function JobDetailsClientsInfoTable({ data }: { data: Array }): ReactElement { return ( -
-
-
- Client -
-
- Address -
-
- Data Path -
-
- Redis Host -
-
- Redis Port -
-
- {clientsInfo.map((clientInfo, i) => ( -
-
- {clientInfo.client} -
-
- {clientInfo.service_address} -
-
- {clientInfo.data_path} -
-
- {clientInfo.redis_host} -
-
- {clientInfo.redis_port} -
-
- ))} -
+ + + + + + + + + + + + {data.map((clientInfo, i) => ( + + + + + + + + ))} + +
+ Client + + Address + + Data Path + + Redis Host + + Redis Port +
+
+ + {clientInfo.client} + +
+
+
+ + {clientInfo.service_address} + +
+
+
+ + {clientInfo.data_path} + +
+
+
+ + {clientInfo.redis_host} + +
+
+
+ + {clientInfo.redis_port} + +
+
); }