+ |
+
{row.subject}
|
- {row.issuer || row.pem} |
- {row.type || ''} |
+ {row.issuer ?? row.pem} |
+ {row.type ?? ""} |
{/* {row.role ? capitalizeFirstLetter(row.role) : ''} | */}
-
- {' '}
- {row.status ? capitalizeFirstLetter(row.status) : ''}
+
+ {" "}
+ {row.status ? capitalizeFirstLetter(row.status) : ""}
|
{/* {row.version ? row.version : null} | */}
{
- console.log('Copy Fingerprint button clicked');
+ console.log("Copy Fingerprint button clicked");
},
},
{
- title: 'Download',
+ title: "Download",
onClick: () => {
- console.log('Download button clicked');
+ console.log("Download button clicked");
},
},
]}
@@ -347,7 +350,7 @@ const CertificatesPage = ({ certificates, columns }: ICertificatesPageProps) =>
))}
- {renderPagination('bottom', false)}
+ {renderPagination("bottom", false)}
>
);
diff --git a/client/src/app/pages/Certificates/index.ts b/client/src/app/pages/Certificates/index.ts
new file mode 100644
index 0000000..e7db3b2
--- /dev/null
+++ b/client/src/app/pages/Certificates/index.ts
@@ -0,0 +1 @@
+export { Certificates as default } from "./Certificates";
diff --git a/client/src/app/pages/Overview/Overview.tsx b/client/src/app/pages/Overview/Overview.tsx
new file mode 100644
index 0000000..fef82a8
--- /dev/null
+++ b/client/src/app/pages/Overview/Overview.tsx
@@ -0,0 +1,7 @@
+import type React from "react";
+
+import { TrustOverview } from "./TrustOverview";
+
+export const Overview: React.FC = () => {
+ return ;
+};
diff --git a/src/app/Trust/Overview/TrustOverview.tsx b/client/src/app/pages/Overview/TrustOverview.tsx
similarity index 73%
rename from src/app/Trust/Overview/TrustOverview.tsx
rename to client/src/app/pages/Overview/TrustOverview.tsx
index 267cdc4..71a3b86 100644
--- a/src/app/Trust/Overview/TrustOverview.tsx
+++ b/client/src/app/pages/Overview/TrustOverview.tsx
@@ -1,4 +1,4 @@
-import { Fragment } from 'react';
+import { Fragment } from "react";
import {
Button,
Card,
@@ -24,40 +24,40 @@ import {
TimestampTooltipVariant,
Flex,
FlexItem,
-} from '@patternfly/react-core';
-import { ChartDonut, ChartThemeColor } from '@patternfly/react-charts/victory';
-import { MultiContentCard } from '@patternfly/react-component-groups';
-import { ArrowRightIcon, LockIcon, RedoIcon } from '@patternfly/react-icons';
-import { formatDate } from '@app/utils/utils';
+} from "@patternfly/react-core";
+import { ChartDonut, ChartThemeColor } from "@patternfly/react-charts/victory";
+import { MultiContentCard } from "@patternfly/react-component-groups";
+import { ArrowRightIcon, LockIcon, RedoIcon } from "@patternfly/react-icons";
+import { formatDate } from "@app/utils/utils";
// import { useQuery } from '@tanstack/react-query';
const exampleCerts = [
{
- subject: 'CN=Release Signing Cert,O=Release Engineering',
- issuer: 'CN=Some Root CA',
- validFrom: '2024-04-15T00:00:00Z',
+ subject: "CN=Release Signing Cert,O=Release Engineering",
+ issuer: "CN=Some Root CA",
+ validFrom: "2024-04-15T00:00:00Z",
validTo: new Date(Date.now() + 5 * 24 * 60 * 60 * 1000).toISOString(),
- fingerprint: 'FF:EE:DD:CC:BB:AA:99:88:77:66:55:44:33:22:11:00:FF:EE:DD:CC',
- type: 'Fulcio',
- status: 'expiring',
+ fingerprint: "FF:EE:DD:CC:BB:AA:99:88:77:66:55:44:33:22:11:00:FF:EE:DD:CC",
+ type: "Fulcio",
+ status: "expiring",
},
{
- subject: 'CN=Build Signing Cert,O=CI System',
- issuer: 'CN=Intermed.. CA',
- validFrom: '2024-06-01T00:00:00Z',
+ subject: "CN=Build Signing Cert,O=CI System",
+ issuer: "CN=Intermed.. CA",
+ validFrom: "2024-06-01T00:00:00Z",
validTo: new Date(Date.now() + 10 * 24 * 60 * 60 * 1000).toISOString(),
- fingerprint: '11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33:44',
- type: 'Fulcio',
- status: 'expiring',
+ fingerprint: "11:22:33:44:55:66:77:88:99:AA:BB:CC:DD:EE:FF:00:11:22:33:44",
+ type: "Fulcio",
+ status: "expiring",
},
{
- subject: 'CN=Test Cert Expiring Soon,O=Example Org',
- issuer: 'CN=Example CA',
- validFrom: '2024-05-01T00:00:00Z',
+ subject: "CN=Test Cert Expiring Soon,O=Example Org",
+ issuer: "CN=Example CA",
+ validFrom: "2024-05-01T00:00:00Z",
validTo: new Date(Date.now() + 15 * 24 * 60 * 60 * 1000).toISOString(),
- fingerprint: 'AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD',
- type: 'Fulcio',
- status: 'expiring',
+ fingerprint: "AA:BB:CC:DD:EE:FF:00:11:22:33:44:55:66:77:88:99:AA:BB:CC:DD",
+ type: "Fulcio",
+ status: "expiring",
},
];
@@ -100,12 +100,13 @@ const TrustOverview = () => {
ariaTitle="Certificate validity"
constrainToVisibleArea
data={[
- { x: 'Valid', y: 35 },
- { x: 'Expiring', y: 55 },
- { x: 'Expired', y: 10 },
+ { x: "Valid", y: 35 },
+ { x: "Expiring", y: 55 },
+ { x: "Expired", y: 10 },
]}
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
labels={({ datum }) => `${datum.x}: ${datum.y}%`}
- legendData={[{ name: 'Valid: 35' }, { name: 'Expiring: 55' }, { name: 'Expired: 10' }]}
+ legendData={[{ name: "Valid: 35" }, { name: "Expiring: 55" }, { name: "Expired: 10" }]}
legendOrientation="vertical"
name="certificate-chart"
padding={{
@@ -118,7 +119,7 @@ const TrustOverview = () => {
title="100"
themeColor={ChartThemeColor.multiOrdered}
width={350}
- />{' '}
+ />{" "}
|