Skip to content

Commit

Permalink
chrore: Modified Accounts pages including timestamp formating values …
Browse files Browse the repository at this point in the history
…and costs values

Signed-off-by: Alejandro Villegas <[email protected]>
  • Loading branch information
r2dedios committed Jul 22, 2024
1 parent 04b2184 commit a9f2fea
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/app/AccountDetails/AccountDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import {
parseScanTimestamp,
parseNumberToCurrency,
} from 'src/app/utils/parseFuncs';
import React, { useEffect, useState } from "react";
import { useParams } from 'react-router-dom';
import {
Expand Down Expand Up @@ -192,21 +196,21 @@ const AccountDetails: React.FunctionComponent = () => {
<DescriptionListDescription>
{accountData.accounts[0].provider}
</DescriptionListDescription>
<DescriptionListTerm>Account Cost (Estimated)</DescriptionListTerm>
<DescriptionListDescription>
{parseNumberToCurrency(accountData.accounts[0].totalCost)}
</DescriptionListDescription>
</DescriptionListGroup>
<DescriptionListGroup>
<DescriptionListTerm>Labels</DescriptionListTerm>
</DescriptionListGroup>
<DescriptionListGroup>
<DescriptionListTerm>Last scanned at</DescriptionListTerm>
<DescriptionListDescription>
<time>Oct 15, 1:51 pm</time>
{parseScanTimestamp(accountData.accounts[0].lastScanTimestamp)}
</DescriptionListDescription>
</DescriptionListGroup>
<DescriptionListGroup>
<DescriptionListTerm>Created at</DescriptionListTerm>
<DescriptionListDescription>
<time>Oct 15, 1:51 pm</time>
</DescriptionListDescription>
</DescriptionListGroup>
</DescriptionList>
</FlexItem>
Expand Down
3 changes: 3 additions & 0 deletions src/app/types/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export type Cluster = {
accountName: string;
instanceCount: number;
lastScanTimestamp: string;
totalCost: number;
instances: Instance[];
};

Expand All @@ -26,6 +27,8 @@ export type Account = {
name: string;
provider: string;
clusterCount: number;
lastScanTimestamp: string;
totalCost: number;
clusters: Record<string, Cluster>;
};

Expand Down

0 comments on commit a9f2fea

Please sign in to comment.