diff --git a/src/dashboard/ProviderInfo.tsx b/src/dashboard/ProviderInfo.tsx index dbeebc9f91..93a77c437f 100644 --- a/src/dashboard/ProviderInfo.tsx +++ b/src/dashboard/ProviderInfo.tsx @@ -1,4 +1,4 @@ -import React, { Fragment, useMemo, useState } from "react"; +import React, { useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; import { ExpandableSection, PageSection } from "@patternfly/react-core"; import { @@ -12,6 +12,7 @@ import { import { useServerInfo } from "../context/server-info/ServerInfoProvider"; import { TableToolbar } from "../components/table-toolbar/TableToolbar"; +import { isDefined } from "../utils/isDefined"; export const ProviderInfo = () => { const { t } = useTranslation("dashboard"); @@ -55,38 +56,37 @@ export const ProviderInfo = () => { {name} + {Object.entries(providers) + .map(([key, { operationalInfo }]) => + operationalInfo ? ( + toggleOpen(key)} + toggleText={ + open.includes(key) ? t("showLess") : t("showMore") + } + > + + + {Object.entries(operationalInfo).map( + ([key, value]) => ( + + {key} + {value} + + ) + )} + + + + ) : null + ) + .filter(isDefined)} ))}