Added memory info and renamed tab (#4050)

This commit is contained in:
Erik Jan de Wit 2023-01-03 11:21:37 -05:00 committed by GitHub
parent 5032770ddb
commit fb5b62d267
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 2 deletions

View file

@ -19,5 +19,9 @@
"realmInfo": "Realm info",
"spi": "SPI",
"showMore": "Show more",
"showLess": "Show less"
"showLess": "Show less",
"memory": "Memory",
"totalMemory": "Total memory",
"freeMemory": "Free memory",
"usedMemory": "Used memory"
}

View file

@ -150,7 +150,7 @@ const Dashboard = () => {
<Tab
id="info"
data-testid="infoTab"
title={<TabTitleText>{t("realmInfo")}</TabTitleText>}
title={<TabTitleText>{t("serverInfo")}</TabTitleText>}
{...route("info")}
>
<PageSection variant="light">
@ -176,6 +176,31 @@ const Dashboard = () => {
</DescriptionListGroup>
</DescriptionList>
</CardBody>
<CardTitle>{t("memory")}</CardTitle>
<CardBody>
<DescriptionList>
<DescriptionListGroup>
<DescriptionListTerm>
{t("totalMemory")}
</DescriptionListTerm>
<DescriptionListDescription>
{serverInfo.memoryInfo?.totalFormated}
</DescriptionListDescription>
<DescriptionListTerm>
{t("freeMemory")}
</DescriptionListTerm>
<DescriptionListDescription>
{serverInfo.memoryInfo?.freeFormated}
</DescriptionListDescription>
<DescriptionListTerm>
{t("usedMemory")}
</DescriptionListTerm>
<DescriptionListDescription>
{serverInfo.memoryInfo?.usedFormated}
</DescriptionListDescription>
</DescriptionListGroup>
</DescriptionList>
</CardBody>
</Card>
</GridItem>
<GridItem lg={10} sm={12}>