diff --git a/ui100/src/AccountPanel.tsx b/ui100/src/AccountPanel.tsx index 1f710cd7d..9a47555a3 100644 --- a/ui100/src/AccountPanel.tsx +++ b/ui100/src/AccountPanel.tsx @@ -16,6 +16,10 @@ const AccountPanel = ({ account}: AccountPanelProps) => { token: row => } + const label = { + token: "Account Token" + } + return ( @@ -24,7 +28,7 @@ const AccountPanel = ({ account}: AccountPanelProps) => { - + diff --git a/ui100/src/EnvironmentPanel.tsx b/ui100/src/EnvironmentPanel.tsx index 407471067..127020924 100644 --- a/ui100/src/EnvironmentPanel.tsx +++ b/ui100/src/EnvironmentPanel.tsx @@ -21,6 +21,10 @@ const EnvironmentPanel = ({ environment }: EnvironmentPanelProps) => { updatedAt: row => new Date(row.value).toLocaleString() } + const labels = { + zId: "OpenZiti Service" + } + useEffect(() => { let cfg = new Configuration({ headers: { @@ -48,7 +52,7 @@ const EnvironmentPanel = ({ environment }: EnvironmentPanelProps) => { - + diff --git a/ui100/src/PropertyTable.tsx b/ui100/src/PropertyTable.tsx index e5a60f667..4a291f505 100644 --- a/ui100/src/PropertyTable.tsx +++ b/ui100/src/PropertyTable.tsx @@ -5,9 +5,10 @@ import {Paper, Table, TableBody, TableCell, TableRow} from "@mui/material"; type PropertyTableProps = { object: any; custom: any; + labels: any; } -const PropertyTable = ({ object, custom }: PropertyTableProps) => { +const PropertyTable = ({ object, custom, labels }: PropertyTableProps) => { const [data, setData] = useState([]); useEffect(() => { @@ -23,13 +24,22 @@ const PropertyTable = ({ object, custom }: PropertyTableProps) => { return row.value; } + const renderLabel = (row) => { + if(labels) { + if(row.property in labels) { + return labels[row.property]; + } + } + return camelToWords(row.property); + } + return ( {data.map((row) => ( - {camelToWords(row.property)} + {renderLabel(row)} {value(row)} ))}