Skip to content

Commit

Permalink
Update service-info in webdash
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeckman314 committed Feb 8, 2024
1 parent b0af684 commit 4599d3b
Show file tree
Hide file tree
Showing 11 changed files with 3,653 additions and 2,160 deletions.
3 changes: 2 additions & 1 deletion webdash/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"build": "NODE_ENV=production react-scripts build",
"build-dev": "NODE_ENV=development react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Expand Down
2 changes: 2 additions & 0 deletions webdash/src/Pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,10 @@ function ServiceInfo() {

React.useEffect(() => {
var url = new URL("/v1/service-info", window.location.origin);
console.log("DEBUG: ServiceInfo url:", url);
get(url).then(
(info) => {
console.log("DEBUG: ServiceInfo info:", info);
setInfo(info);
});
}, []);
Expand Down
66 changes: 59 additions & 7 deletions webdash/src/SystemInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,67 @@ function SystemInfoRaw(props) {
return (
<Table className={classes.table}>
<TableBody>
<TableRow className={classes.row} key="name">
<TableCell className={classNames(classes.cell, classes.key)}><b>Name</b></TableCell>
<TableCell className={classNames(classes.cell, classes.value)}>{info.name}</TableCell>
<TableRow className={classes.row} key="contactUrl">
<TableCell className={classNames(classes.cell, classes.key)}><b>contactUrl</b></TableCell>
<TableCell className={classNames(classes.cell, classes.value)}><pre>{info.contactUrl}</pre></TableCell>
</TableRow>
<TableRow className={classes.row} key="doc">
<TableCell className={classNames(classes.cell, classes.key)}><b>Doc</b></TableCell>
<TableCell className={classNames(classes.cell, classes.value)}><pre>{info.doc}</pre></TableCell>
<TableRow className={classes.row} key="createdAt">
<TableCell className={classNames(classes.cell, classes.key)}><b>createdAt</b></TableCell>
<TableCell className={classNames(classes.cell, classes.value)}><pre>{info.createdAt}</pre></TableCell>
</TableRow>
<TableRow className={classes.row} key="description">
<TableCell className={classNames(classes.cell, classes.key)}><b>description</b></TableCell>
<TableCell className={classNames(classes.cell, classes.value)}><pre>{info.description}</pre></TableCell>
</TableRow>
<TableRow className={classes.row} key="documentationUrl">
<TableCell className={classNames(classes.cell, classes.key)}><b>documentationUrl</b></TableCell>
<TableCell className={classNames(classes.cell, classes.value)}><pre>{info.documentationUrl}</pre></TableCell>
</TableRow>
<TableRow className={classes.row} key="id">
<TableCell className={classNames(classes.cell, classes.key)}><b>id</b></TableCell>
<TableCell className={classNames(classes.cell, classes.value)}><pre>{info.id}</pre></TableCell>
</TableRow>
<TableRow className={classes.row} key="organization">
<TableCell className={classNames(classes.cell, classes.key)}><b>organization</b></TableCell>
<TableBody>
<TableRow className={classes.row}>
<TableCell className={classNames(classes.cell, classes.value)}><pre>{info.organization?.name}</pre></TableCell>
</TableRow>
<TableRow>
<TableCell className={classNames(classes.cell, classes.value)}><pre>{info.organization?.url}</pre></TableCell>
</TableRow>
</TableBody>
</TableRow>
<TableRow className={classes.row} key="storage">
<TableCell className={classNames(classes.cell, classes.key)}><b>storage</b></TableCell>
<TableCell className={classNames(classes.cell, classes.value)}><pre>{info.storage}</pre></TableCell>
</TableRow>
<TableRow className={classes.row} key="tesResources_backend_parameter">
<TableCell className={classNames(classes.cell, classes.key)}><b>tesResources_backend_parameter</b></TableCell>
<TableCell className={classNames(classes.cell, classes.value)}><pre>{info.tesResources_backend_parameter}</pre></TableCell>
</TableRow>
<TableRow className={classes.row} key="type">
<TableCell className={classNames(classes.cell, classes.key)}><b>type</b></TableCell>
<TableBody>
<TableRow className={classes.row}>
<TableCell className={classNames(classes.cell, classes.value)}><pre>{info.type?.artifact}</pre></TableCell>
</TableRow>
<TableRow>
<TableCell className={classNames(classes.cell, classes.value)}><pre>{info.type?.group}</pre></TableCell>
</TableRow>
<TableRow>
<TableCell className={classNames(classes.cell, classes.value)}><pre>{info.type?.version}</pre></TableCell>
</TableRow>
</TableBody>
</TableRow>
<TableRow className={classes.row} key="updatedAt">
<TableCell className={classNames(classes.cell, classes.key)}><b>updatedAt</b></TableCell>
<TableCell className={classNames(classes.cell, classes.value)}><pre>{info.updatedAt}</pre></TableCell>
</TableRow>
<TableRow className={classes.row} key="version">
<TableCell className={classNames(classes.cell, classes.key)}><b>version</b></TableCell>
<TableCell className={classNames(classes.cell, classes.value)}><pre>{info.version}</pre></TableCell>
</TableRow>
{renderStateCounts()}
</TableBody>
</Table>
);
Expand Down
4 changes: 4 additions & 0 deletions webdash/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
}

.MuiTableRow-root {
border-bottom: 1px dashed lightgray;
}
Loading

0 comments on commit 4599d3b

Please sign in to comment.