generated from Luis/nextjs-python-web-template
some final fixes before the demo
This commit is contained in:
77
pkgs/ui/src/config/access_point/index.tsx
Normal file
77
pkgs/ui/src/config/access_point/index.tsx
Normal file
@@ -0,0 +1,77 @@
|
||||
// AP - Summary
|
||||
|
||||
export const APSummaryDetails = [
|
||||
{
|
||||
label: "DID",
|
||||
value: "did:sov:test:1274",
|
||||
},
|
||||
{
|
||||
label: "IP",
|
||||
value: "127.0.0.2",
|
||||
},
|
||||
{
|
||||
label: "Network",
|
||||
value: "Carlo's Home Network",
|
||||
},
|
||||
];
|
||||
|
||||
export const APAttachmentsTableConfig = [
|
||||
{
|
||||
key: "entity_name",
|
||||
label: "Entity name",
|
||||
},
|
||||
{
|
||||
key: "entity_did",
|
||||
label: "Entity DID",
|
||||
},
|
||||
{
|
||||
key: "other",
|
||||
label: "Network",
|
||||
render: (value: any) => {
|
||||
let renderedValue = ''
|
||||
if (typeof value === 'object')
|
||||
renderedValue = value?.network;
|
||||
return renderedValue;
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "ip",
|
||||
label: "IP address",
|
||||
},
|
||||
];
|
||||
|
||||
export const APServiceRepositoryTableConfig = [
|
||||
{
|
||||
key: "service_name",
|
||||
label: "Service name",
|
||||
},
|
||||
{
|
||||
key: "service_type",
|
||||
label: "Service type",
|
||||
},
|
||||
{
|
||||
key: "endpoint_url",
|
||||
label: "End point",
|
||||
},
|
||||
{
|
||||
key: "entity_did",
|
||||
label: "Entity DID",
|
||||
},
|
||||
{
|
||||
key: "status",
|
||||
label: "Status",
|
||||
},
|
||||
{
|
||||
key: "other",
|
||||
label: "Type",
|
||||
render: (value: any) => {
|
||||
let renderedValue: any = ''
|
||||
if (typeof value === 'object') {
|
||||
const label = Object.keys(value)[0];
|
||||
const info = value[label]
|
||||
renderedValue = (<code>{label} {info}</code>);
|
||||
}
|
||||
return renderedValue;
|
||||
}
|
||||
},
|
||||
];
|
||||
68
pkgs/ui/src/config/client_1/index.tsx
Normal file
68
pkgs/ui/src/config/client_1/index.tsx
Normal file
@@ -0,0 +1,68 @@
|
||||
import { Button } from "@mui/material";
|
||||
|
||||
export const Client1ConsumerTableConfig = [
|
||||
{
|
||||
key: "service_name",
|
||||
label: "Service name",
|
||||
},
|
||||
{
|
||||
key: "service_type",
|
||||
label: "Service Type",
|
||||
},
|
||||
{
|
||||
key: "endpoint_url",
|
||||
label: "End Point",
|
||||
render: (value: any) => {
|
||||
return <Button disabled variant="outlined">Consume</Button>
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "entity",
|
||||
label: "Entity",
|
||||
},
|
||||
{
|
||||
key: "entity_did",
|
||||
label: "Entity DID",
|
||||
},
|
||||
{
|
||||
key: "network",
|
||||
label: "Network",
|
||||
},
|
||||
];
|
||||
|
||||
export const Client1ProducerTableConfig = [
|
||||
{
|
||||
key: "service_name",
|
||||
label: "Service name",
|
||||
},
|
||||
{
|
||||
key: "service_type",
|
||||
label: "Service Type",
|
||||
},
|
||||
{
|
||||
key: "endpoint_url",
|
||||
label: "End Point",
|
||||
},
|
||||
{
|
||||
key: "entity_did",
|
||||
label: "Entity DID",
|
||||
},
|
||||
{
|
||||
key: "status",
|
||||
label: "Status",
|
||||
},
|
||||
{
|
||||
key: "other",
|
||||
label: "Action",
|
||||
render: (value: any) => {
|
||||
let renderedValue: any = '';
|
||||
if (typeof value === "object")
|
||||
renderedValue = (
|
||||
<>
|
||||
{value.action.map((actionType: string) => <><code>{actionType}</code><br /></>)}
|
||||
</>
|
||||
)
|
||||
return renderedValue;
|
||||
},
|
||||
}
|
||||
];
|
||||
68
pkgs/ui/src/config/client_2/index.tsx
Normal file
68
pkgs/ui/src/config/client_2/index.tsx
Normal file
@@ -0,0 +1,68 @@
|
||||
import { Button } from "@mui/material";
|
||||
|
||||
export const Client2ConsumerTableConfig = [
|
||||
{
|
||||
key: "service_name",
|
||||
label: "Service name",
|
||||
},
|
||||
{
|
||||
key: "service_type",
|
||||
label: "Service Type",
|
||||
},
|
||||
{
|
||||
key: "endpoint_url",
|
||||
label: "End Point",
|
||||
render: (value: any) => {
|
||||
return <Button disabled variant="outlined">Consume</Button>
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "entity",
|
||||
label: "Entity",
|
||||
},
|
||||
{
|
||||
key: "entity_did",
|
||||
label: "Entity DID",
|
||||
},
|
||||
{
|
||||
key: "network",
|
||||
label: "Network",
|
||||
},
|
||||
];
|
||||
|
||||
export const Client2ProducerTableConfig = [
|
||||
{
|
||||
key: "service_name",
|
||||
label: "Service name",
|
||||
},
|
||||
{
|
||||
key: "service_type",
|
||||
label: "Service Type",
|
||||
},
|
||||
{
|
||||
key: "endpoint_url",
|
||||
label: "End Point",
|
||||
},
|
||||
{
|
||||
key: "entity_did",
|
||||
label: "Entity DID",
|
||||
},
|
||||
{
|
||||
key: "status",
|
||||
label: "Status",
|
||||
},
|
||||
{
|
||||
key: "other",
|
||||
label: "Action",
|
||||
render: (value: any) => {
|
||||
let renderedValue: any = '';
|
||||
if (typeof value === "object")
|
||||
renderedValue = (
|
||||
<>
|
||||
{value.action.map((actionType: string) => <><code>{actionType}</code><br /></>)}
|
||||
</>
|
||||
)
|
||||
return renderedValue;
|
||||
},
|
||||
}
|
||||
];
|
||||
51
pkgs/ui/src/config/dlg/index.ts
Normal file
51
pkgs/ui/src/config/dlg/index.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
// DLG Summary Details
|
||||
|
||||
import { formatDateTime } from "@/utils/helpers";
|
||||
|
||||
export const DLGSummaryDetails = [
|
||||
{
|
||||
label: "DID",
|
||||
value: "did:sov:test:1274",
|
||||
},
|
||||
{
|
||||
label: "URL",
|
||||
value: "dlg.tu-berlin.de",
|
||||
},
|
||||
];
|
||||
|
||||
// DLG Resolution Table
|
||||
|
||||
export const DLGResolutionDummyData = [
|
||||
{
|
||||
requester_name: "C1",
|
||||
requester_did: "did:sov:test:1234",
|
||||
resolved_did: "did:sov:test:1234",
|
||||
timestamp: "2023.11.01 17:05:45",
|
||||
},
|
||||
{
|
||||
requester_name: "C2",
|
||||
requester_did: "did:sov:test:5678",
|
||||
resolved_did: "did:sov:test:5678",
|
||||
timestamp: "2023.12.01 15:05:50",
|
||||
},
|
||||
];
|
||||
|
||||
export const DLGResolutionTableConfig = [
|
||||
{
|
||||
key: "requester_name",
|
||||
label: "Requester name",
|
||||
},
|
||||
{
|
||||
key: "requester_did",
|
||||
label: "Requester DID",
|
||||
},
|
||||
{
|
||||
key: "resolved_did",
|
||||
label: "Resolved DID",
|
||||
},
|
||||
{
|
||||
key: "timestamp",
|
||||
label: "Timestamp",
|
||||
render: (value: string) => formatDateTime(value)
|
||||
}
|
||||
];
|
||||
34
pkgs/ui/src/config/home/index.ts
Normal file
34
pkgs/ui/src/config/home/index.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
export const HomeTableConfig = [
|
||||
{
|
||||
key: "name",
|
||||
label: "Entity name",
|
||||
},
|
||||
{
|
||||
key: "did",
|
||||
label: "Entity DID",
|
||||
},
|
||||
{
|
||||
key: "other",
|
||||
label: "Network",
|
||||
render: (value: any) => {
|
||||
const renderedValue = typeof value === "object" ? value?.network : "-";
|
||||
return renderedValue;
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "ip",
|
||||
label: "IP address",
|
||||
},
|
||||
{
|
||||
key: "other",
|
||||
label: "Roles",
|
||||
render: (value: any) => {
|
||||
const renderedValue = typeof value === "object" ? value?.roles?.join(", ") : "-";
|
||||
return renderedValue;
|
||||
}
|
||||
},
|
||||
{
|
||||
key: "attached",
|
||||
label: "Attached",
|
||||
},
|
||||
];
|
||||
Reference in New Issue
Block a user