generated from Luis/nextjs-python-web-template
remove fake data in the header of dlg and ap views
This commit is contained in:
@@ -6,13 +6,14 @@ import { useGetAllRepositories } from "@/api/repositories/repositories";
|
||||
import SummaryDetails from "@/components/summary_card";
|
||||
import CustomTable from "@/components/table";
|
||||
import {
|
||||
APSummaryDetails,
|
||||
APAttachmentsTableConfig,
|
||||
APServiceRepositoryTableConfig,
|
||||
} from "@/config/access_point";
|
||||
import { useEffect } from "react";
|
||||
import useGetEntityByNameOrDid from "@/components/hooks/useGetEntityByNameOrDid";
|
||||
|
||||
export default function AccessPoint() {
|
||||
const { entity } = useGetEntityByNameOrDid("AP");
|
||||
const {
|
||||
data: APAttachementData,
|
||||
isLoading: loadingAttachements,
|
||||
@@ -54,10 +55,25 @@ export default function AccessPoint() {
|
||||
return (
|
||||
<div className="m-10">
|
||||
<SummaryDetails
|
||||
fake
|
||||
hasRefreshButton
|
||||
onRefresh={onRefresh}
|
||||
entity={{ name: "Access Point", details: APSummaryDetails }}
|
||||
entity={{
|
||||
name: "Access Point",
|
||||
details: [
|
||||
{
|
||||
label: "DID",
|
||||
value: entity?.did,
|
||||
},
|
||||
{
|
||||
label: "IP",
|
||||
value: entity?.ip,
|
||||
},
|
||||
{
|
||||
label: "Network",
|
||||
value: entity?.network,
|
||||
},
|
||||
],
|
||||
}}
|
||||
/>
|
||||
<div>
|
||||
<h4>Attachment View</h4>
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
"use client";
|
||||
|
||||
import { DLGResolutionTableConfig, DLGSummaryDetails } from "@/config/dlg";
|
||||
import { DLGResolutionTableConfig } from "@/config/dlg";
|
||||
import CustomTable from "@/components/table";
|
||||
import SummaryDetails from "@/components/summary_card";
|
||||
import { useEffect } from "react";
|
||||
import { useGetAllResolutions } from "@/api/resolution/resolution";
|
||||
import { mutate } from "swr";
|
||||
import useGetEntityByNameOrDid from "@/components/hooks/useGetEntityByNameOrDid";
|
||||
|
||||
export default function DLG() {
|
||||
const { entity } = useGetEntityByNameOrDid("DLG");
|
||||
const {
|
||||
data: resolutionData,
|
||||
isLoading: loadingResolutions,
|
||||
@@ -37,12 +39,24 @@ export default function DLG() {
|
||||
return (
|
||||
<div className="m-10">
|
||||
<SummaryDetails
|
||||
fake
|
||||
hasRefreshButton
|
||||
onRefresh={onRefresh}
|
||||
entity={{
|
||||
name: "Distributed Ledger Gateway",
|
||||
details: DLGSummaryDetails,
|
||||
details: [
|
||||
{
|
||||
label: "DID",
|
||||
value: entity?.did,
|
||||
},
|
||||
{
|
||||
label: "IP",
|
||||
value: entity?.ip,
|
||||
},
|
||||
{
|
||||
label: "Network",
|
||||
value: entity?.network,
|
||||
},
|
||||
],
|
||||
}}
|
||||
/>
|
||||
<div>
|
||||
|
||||
@@ -1,20 +1,3 @@
|
||||
// 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",
|
||||
},
|
||||
];
|
||||
|
||||
// AP - 2 Tables Configurations to display labels
|
||||
|
||||
export const APAttachmentsTableConfig = [
|
||||
|
||||
@@ -1,18 +1,5 @@
|
||||
// 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 - 2 Tables Configurations to display labels
|
||||
|
||||
export const DLGResolutionDummyData = [
|
||||
|
||||
Reference in New Issue
Block a user