generated from Luis/nextjs-python-web-template
[Functionality] Request DID Resolution #38
0
pkgs/clan-cli/bin/clan
Executable file → Normal file
0
pkgs/clan-cli/bin/clan
Executable file → Normal file
0
pkgs/clan-cli/bin/clan-config
Executable file → Normal file
0
pkgs/clan-cli/bin/clan-config
Executable file → Normal file
0
pkgs/clan-cli/bin/gen-openapi
Executable file → Normal file
0
pkgs/clan-cli/bin/gen-openapi
Executable file → Normal file
0
pkgs/node-packages/generate.sh
Executable file → Normal file
0
pkgs/node-packages/generate.sh
Executable file → Normal file
0
pkgs/ui/nix/update-ui-assets.sh
Executable file → Normal file
0
pkgs/ui/nix/update-ui-assets.sh
Executable file → Normal file
@@ -23,22 +23,11 @@ export default function AccessPoint() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetch("http://localhost:2979/api/v1/get_repositories", {
|
fetch("http://localhost:2979/api/v1/get_repositories", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
// credentials: 'include',
|
|
||||||
})
|
})
|
||||||
.then((resp) =>
|
.then((resp) =>
|
||||||
resp.json().then((jsonData) => {
|
resp.json().then((jsonData) => {
|
||||||
console.log(jsonData);
|
console.log(jsonData);
|
||||||
|
setRepositoryData(jsonData);
|
||||||
const transformedData = jsonData.map(
|
|
||||||
(item: { service_name: any; entity_did: any; network: any }) => ({
|
|
||||||
entity_name: item.service_name,
|
|
||||||
entity_did: item.entity_did,
|
|
||||||
network: item.network,
|
|
||||||
ip_address: "",
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
|
|
||||||
setRepositoryData(transformedData);
|
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.then()
|
.then()
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ export default function Client1() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetch("http://localhost:2979/api/v1/get_consumers", {
|
fetch("http://localhost:2979/api/v1/get_consumers", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
// credentials: 'include',
|
|
||||||
})
|
})
|
||||||
.then((resp) =>
|
.then((resp) =>
|
||||||
resp.json().then((jsonData) => {
|
resp.json().then((jsonData) => {
|
||||||
@@ -29,7 +28,6 @@ export default function Client1() {
|
|||||||
|
|
||||||
fetch("http://localhost:2979/api/v1/get_producers", {
|
fetch("http://localhost:2979/api/v1/get_producers", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
// credentials: 'include',
|
|
||||||
})
|
})
|
||||||
.then((resp) =>
|
.then((resp) =>
|
||||||
resp.json().then((jsonData) => {
|
resp.json().then((jsonData) => {
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ export default function Client1() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetch("http://localhost:2979/api/v1/get_consumers", {
|
fetch("http://localhost:2979/api/v1/get_consumers", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
// credentials: 'include',
|
|
||||||
})
|
})
|
||||||
.then((resp) =>
|
.then((resp) =>
|
||||||
resp.json().then((jsonData) => {
|
resp.json().then((jsonData) => {
|
||||||
|
|||||||
@@ -1,14 +1,27 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import {
|
import { DLGResolutionTableConfig, DLGSummaryDetails } from "@/mock/dlg";
|
||||||
DLGResolutionDummyData,
|
|
||||||
DLGResolutionTableConfig,
|
|
||||||
DLGSummaryDetails,
|
|
||||||
} from "@/mock/dlg";
|
|
||||||
import CustomTable from "@/components/table";
|
import CustomTable from "@/components/table";
|
||||||
import SummaryDetails from "@/components/summary_card";
|
import SummaryDetails from "@/components/summary_card";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
export default function DLG() {
|
export default function DLG() {
|
||||||
|
const [resolutionData, setResolutionData] = useState([]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
fetch("http://localhost:2979/api/v1/get_resolutions", {
|
||||||
|
method: "GET",
|
||||||
|
})
|
||||||
|
.then((resp) =>
|
||||||
|
resp.json().then((jsonData) => {
|
||||||
|
console.log(jsonData);
|
||||||
|
setResolutionData(jsonData);
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
.then()
|
||||||
|
.catch();
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="m-10">
|
<div className="m-10">
|
||||||
<SummaryDetails
|
<SummaryDetails
|
||||||
@@ -21,7 +34,7 @@ export default function DLG() {
|
|||||||
<div>
|
<div>
|
||||||
<h4>DID Resolution View</h4>
|
<h4>DID Resolution View</h4>
|
||||||
<CustomTable
|
<CustomTable
|
||||||
data={DLGResolutionDummyData}
|
data={resolutionData}
|
||||||
configuration={DLGResolutionTableConfig}
|
configuration={DLGResolutionTableConfig}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ export default function Home() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetch("http://localhost:2979/api/v1/get_entities", {
|
fetch("http://localhost:2979/api/v1/get_entities", {
|
||||||
method: "GET",
|
method: "GET",
|
||||||
// credentials: 'include',
|
|
||||||
})
|
})
|
||||||
.then((resp) =>
|
.then((resp) =>
|
||||||
resp.json().then((jsonData) => {
|
resp.json().then((jsonData) => {
|
||||||
|
|||||||
@@ -16,14 +16,14 @@ export const DLGSummaryDetails = [
|
|||||||
export const DLGResolutionDummyData = [
|
export const DLGResolutionDummyData = [
|
||||||
{
|
{
|
||||||
requester_name: "C1",
|
requester_name: "C1",
|
||||||
requester_DID: "did:sov:test:1234",
|
requester_did: "did:sov:test:1234",
|
||||||
DID_resolved: "did:sov:test:1234",
|
resolved_did: "did:sov:test:1234",
|
||||||
timestamp: "2023.11.01 17:05:45",
|
timestamp: "2023.11.01 17:05:45",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
requester_name: "C2",
|
requester_name: "C2",
|
||||||
requester_DID: "did:sov:test:5678",
|
requester_did: "did:sov:test:5678",
|
||||||
DID_resolved: "did:sov:test:5678",
|
resolved_did: "did:sov:test:5678",
|
||||||
timestamp: "2023.12.01 15:05:50",
|
timestamp: "2023.12.01 15:05:50",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@@ -34,12 +34,12 @@ export const DLGResolutionTableConfig = [
|
|||||||
label: "Requester name",
|
label: "Requester name",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "requester_DID",
|
key: "requester_did",
|
||||||
label: "Requester DID",
|
label: "Requester DID",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "DID_resolved",
|
key: "resolved_did",
|
||||||
label: "DID resolved",
|
label: "Resolved DID",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "timestamp",
|
key: "timestamp",
|
||||||
|
|||||||
Reference in New Issue
Block a user