UI: Fixed exception in service view rendering
Some checks failed
checks-impure / test (pull_request) Successful in 25s
checks / test (pull_request) Failing after 1m26s

This commit is contained in:
2024-01-15 19:41:57 +01:00
parent 422a3f4da1
commit 4918f84e85
5 changed files with 73 additions and 88 deletions

View File

@@ -54,19 +54,28 @@ export const ServiceTableConfig = [
{
key: "status",
label: "Status",
render: (value: any) => {
let renderedValue: any = "";
if (Array.isArray(value.data)) {
renderedValue = value.data.join(", ");
} else {
console.error("Status is not an array", value);
}
return renderedValue;
},
},
{
key: "other",
key: "action",
label: "Action",
render: (value: any) => {
let renderedValue: any = "";
console.log("value", value.data);
if (typeof value === "object")
renderedValue = (
<>
{value.action.map((actionType: string) => (
{value.data.map((actionType: any) => (
<>
<code>{actionType}</code>
<br />
<Button>{actionType.name}</Button>
</>
))}
</>