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 SummaryDetails from "@/components/summary_card";
|
||||||
import CustomTable from "@/components/table";
|
import CustomTable from "@/components/table";
|
||||||
import {
|
import {
|
||||||
APSummaryDetails,
|
|
||||||
APAttachmentsTableConfig,
|
APAttachmentsTableConfig,
|
||||||
APServiceRepositoryTableConfig,
|
APServiceRepositoryTableConfig,
|
||||||
} from "@/config/access_point";
|
} from "@/config/access_point";
|
||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
|
import useGetEntityByNameOrDid from "@/components/hooks/useGetEntityByNameOrDid";
|
||||||
|
|
||||||
export default function AccessPoint() {
|
export default function AccessPoint() {
|
||||||
|
const { entity } = useGetEntityByNameOrDid("AP");
|
||||||
const {
|
const {
|
||||||
data: APAttachementData,
|
data: APAttachementData,
|
||||||
isLoading: loadingAttachements,
|
isLoading: loadingAttachements,
|
||||||
@@ -54,10 +55,25 @@ export default function AccessPoint() {
|
|||||||
return (
|
return (
|
||||||
<div className="m-10">
|
<div className="m-10">
|
||||||
<SummaryDetails
|
<SummaryDetails
|
||||||
fake
|
|
||||||
hasRefreshButton
|
hasRefreshButton
|
||||||
onRefresh={onRefresh}
|
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>
|
<div>
|
||||||
<h4>Attachment View</h4>
|
<h4>Attachment View</h4>
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { DLGResolutionTableConfig, DLGSummaryDetails } from "@/config/dlg";
|
import { DLGResolutionTableConfig } from "@/config/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 } from "react";
|
import { useEffect } from "react";
|
||||||
import { useGetAllResolutions } from "@/api/resolution/resolution";
|
import { useGetAllResolutions } from "@/api/resolution/resolution";
|
||||||
import { mutate } from "swr";
|
import { mutate } from "swr";
|
||||||
|
import useGetEntityByNameOrDid from "@/components/hooks/useGetEntityByNameOrDid";
|
||||||
|
|
||||||
export default function DLG() {
|
export default function DLG() {
|
||||||
|
const { entity } = useGetEntityByNameOrDid("DLG");
|
||||||
const {
|
const {
|
||||||
data: resolutionData,
|
data: resolutionData,
|
||||||
isLoading: loadingResolutions,
|
isLoading: loadingResolutions,
|
||||||
@@ -37,12 +39,24 @@ export default function DLG() {
|
|||||||
return (
|
return (
|
||||||
<div className="m-10">
|
<div className="m-10">
|
||||||
<SummaryDetails
|
<SummaryDetails
|
||||||
fake
|
|
||||||
hasRefreshButton
|
hasRefreshButton
|
||||||
onRefresh={onRefresh}
|
onRefresh={onRefresh}
|
||||||
entity={{
|
entity={{
|
||||||
name: "Distributed Ledger Gateway",
|
name: "Distributed Ledger Gateway",
|
||||||
details: DLGSummaryDetails,
|
details: [
|
||||||
|
{
|
||||||
|
label: "DID",
|
||||||
|
value: entity?.did,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "IP",
|
||||||
|
value: entity?.ip,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Network",
|
||||||
|
value: entity?.network,
|
||||||
|
},
|
||||||
|
],
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<div>
|
<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
|
// AP - 2 Tables Configurations to display labels
|
||||||
|
|
||||||
export const APAttachmentsTableConfig = [
|
export const APAttachmentsTableConfig = [
|
||||||
|
|||||||
@@ -1,18 +1,5 @@
|
|||||||
// DLG Summary Details
|
|
||||||
|
|
||||||
import { formatDateTime } from "@/utils/helpers";
|
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
|
// DLG - 2 Tables Configurations to display labels
|
||||||
|
|
||||||
export const DLGResolutionDummyData = [
|
export const DLGResolutionDummyData = [
|
||||||
|
|||||||
Reference in New Issue
Block a user