generated from Luis/nextjs-python-web-template
fix linting
This commit is contained in:
@@ -6,7 +6,7 @@ import {
|
|||||||
Client1ConsumerData,
|
Client1ConsumerData,
|
||||||
Client1ConsumerTableConfig,
|
Client1ConsumerTableConfig,
|
||||||
Client1ProducerTableConfig,
|
Client1ProducerTableConfig,
|
||||||
Client1ProducerData
|
Client1ProducerData,
|
||||||
} from "@/mock/client_1";
|
} from "@/mock/client_1";
|
||||||
import CustomTable from "@/components/table";
|
import CustomTable from "@/components/table";
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
Client2ConsumerTableConfig,
|
Client2ConsumerTableConfig,
|
||||||
Client2ProducerData,
|
Client2ProducerData,
|
||||||
Client2ProducerTableConfig,
|
Client2ProducerTableConfig,
|
||||||
Client2SummaryDetails
|
Client2SummaryDetails,
|
||||||
} from "@/mock/client_2";
|
} from "@/mock/client_2";
|
||||||
import CustomTable from "@/components/table";
|
import CustomTable from "@/components/table";
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import Image from "next/image";
|
|||||||
import React, { ReactNode } from "react";
|
import React, { ReactNode } from "react";
|
||||||
|
|
||||||
import { tw } from "@/utils/tailwind";
|
import { tw } from "@/utils/tailwind";
|
||||||
import Collapse from '@mui/material/Collapse';
|
import Collapse from "@mui/material/Collapse";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";
|
import ChevronLeftIcon from "@mui/icons-material/ChevronLeft";
|
||||||
import HomeIcon from "@mui/icons-material/Home";
|
import HomeIcon from "@mui/icons-material/Home";
|
||||||
@@ -19,8 +19,8 @@ import HubIcon from "@mui/icons-material/Hub";
|
|||||||
import PersonIcon from "@mui/icons-material/Person";
|
import PersonIcon from "@mui/icons-material/Person";
|
||||||
import RouterIcon from "@mui/icons-material/Router";
|
import RouterIcon from "@mui/icons-material/Router";
|
||||||
import StorageIcon from "@mui/icons-material/Storage";
|
import StorageIcon from "@mui/icons-material/Storage";
|
||||||
import ExpandLess from '@mui/icons-material/ExpandLess';
|
import ExpandLess from "@mui/icons-material/ExpandLess";
|
||||||
import ExpandMore from '@mui/icons-material/ExpandMore';
|
import ExpandMore from "@mui/icons-material/ExpandMore";
|
||||||
|
|
||||||
type MenuEntry = {
|
type MenuEntry = {
|
||||||
icon: ReactNode;
|
icon: ReactNode;
|
||||||
@@ -43,7 +43,7 @@ const menuEntityEntries: MenuEntry[] = [
|
|||||||
label: "C2",
|
label: "C2",
|
||||||
to: "/client-2",
|
to: "/client-2",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
}
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const menuEntries: MenuEntry[] = [
|
const menuEntries: MenuEntry[] = [
|
||||||
@@ -83,7 +83,9 @@ interface SidebarProps {
|
|||||||
|
|
||||||
export function Sidebar(props: SidebarProps) {
|
export function Sidebar(props: SidebarProps) {
|
||||||
const { show, onClose } = props;
|
const { show, onClose } = props;
|
||||||
const [activeMenuItem, setActiveMenuItem] = React.useState(typeof window !== "undefined" ? window.location.pathname : "");
|
const [activeMenuItem, setActiveMenuItem] = React.useState(
|
||||||
|
typeof window !== "undefined" ? window.location.pathname : "",
|
||||||
|
);
|
||||||
const [collapseMenuOpen, setCollapseMenuOpen] = React.useState(true);
|
const [collapseMenuOpen, setCollapseMenuOpen] = React.useState(true);
|
||||||
|
|
||||||
const handleCollapseClick = () => {
|
const handleCollapseClick = () => {
|
||||||
@@ -130,7 +132,7 @@ export function Sidebar(props: SidebarProps) {
|
|||||||
disablePadding
|
disablePadding
|
||||||
className="!overflow-hidden py-2"
|
className="!overflow-hidden py-2"
|
||||||
>
|
>
|
||||||
{menuEntry.label !== "Entities" ?
|
{menuEntry.label !== "Entities" ? (
|
||||||
<ListItemButton
|
<ListItemButton
|
||||||
className="justify-center lg:justify-normal"
|
className="justify-center lg:justify-normal"
|
||||||
LinkComponent={Link}
|
LinkComponent={Link}
|
||||||
@@ -153,13 +155,14 @@ export function Sidebar(props: SidebarProps) {
|
|||||||
className="hidden lg:block"
|
className="hidden lg:block"
|
||||||
/>
|
/>
|
||||||
</ListItemButton>
|
</ListItemButton>
|
||||||
:
|
) : (
|
||||||
<div>
|
<div>
|
||||||
<ListItemButton
|
<ListItemButton
|
||||||
className="justify-center lg:justify-normal"
|
className="justify-center lg:justify-normal"
|
||||||
disabled={menuEntry.disabled}
|
disabled={menuEntry.disabled}
|
||||||
selected={activeMenuItem === menuEntry.to}
|
selected={activeMenuItem === menuEntry.to}
|
||||||
onClick={handleCollapseClick}>
|
onClick={handleCollapseClick}
|
||||||
|
>
|
||||||
<ListItemIcon
|
<ListItemIcon
|
||||||
color="inherit"
|
color="inherit"
|
||||||
className="justify-center overflow-hidden text-white lg:justify-normal"
|
className="justify-center overflow-hidden text-white lg:justify-normal"
|
||||||
@@ -175,10 +178,16 @@ export function Sidebar(props: SidebarProps) {
|
|||||||
/>
|
/>
|
||||||
{collapseMenuOpen ? <ExpandLess /> : <ExpandMore />}
|
{collapseMenuOpen ? <ExpandLess /> : <ExpandMore />}
|
||||||
</ListItemButton>
|
</ListItemButton>
|
||||||
<Collapse in={collapseMenuOpen} timeout="auto" unmountOnExit>
|
<Collapse
|
||||||
|
in={collapseMenuOpen}
|
||||||
|
timeout="auto"
|
||||||
|
unmountOnExit
|
||||||
|
>
|
||||||
<List component="div" disablePadding>
|
<List component="div" disablePadding>
|
||||||
{menuEntityEntries.map((menuEntry, idx) => (
|
{menuEntityEntries.map((menuEntry, idx) => (
|
||||||
<ListItemButton key={idx} sx={{pl: 4}}
|
<ListItemButton
|
||||||
|
key={idx}
|
||||||
|
sx={{ pl: 4 }}
|
||||||
className="justify-center lg:justify-normal"
|
className="justify-center lg:justify-normal"
|
||||||
LinkComponent={Link}
|
LinkComponent={Link}
|
||||||
href={menuEntry.to}
|
href={menuEntry.to}
|
||||||
@@ -204,7 +213,7 @@ export function Sidebar(props: SidebarProps) {
|
|||||||
</List>
|
</List>
|
||||||
</Collapse>
|
</Collapse>
|
||||||
</div>
|
</div>
|
||||||
}
|
)}
|
||||||
</ListItem>
|
</ListItem>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -17,124 +17,124 @@ export const Client1SummaryDetails = [
|
|||||||
|
|
||||||
export const Client1ConsumerData = [
|
export const Client1ConsumerData = [
|
||||||
{
|
{
|
||||||
"service_name": "Carlo's Printing",
|
service_name: "Carlo's Printing",
|
||||||
"service_type": "3D Printing",
|
service_type: "3D Printing",
|
||||||
"end_point": "Consume",
|
end_point: "Consume",
|
||||||
"producer": "C2",
|
producer: "C2",
|
||||||
"producer_did": "did:sov:test:1223",
|
producer_did: "did:sov:test:1223",
|
||||||
"network": "Carlo's Home Network",
|
network: "Carlo's Home Network",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"service_name": "Steve's Printing",
|
service_name: "Steve's Printing",
|
||||||
"service_type": "3D Printing",
|
service_type: "3D Printing",
|
||||||
"end_point": "Consume",
|
end_point: "Consume",
|
||||||
"producer": "C2",
|
producer: "C2",
|
||||||
"producer_did": "did:sov:test:1234",
|
producer_did: "did:sov:test:1234",
|
||||||
"network": "Steve's Home Network",
|
network: "Steve's Home Network",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"service_name": "Test A",
|
service_name: "Test A",
|
||||||
"service_type": "3D Printing",
|
service_type: "3D Printing",
|
||||||
"end_point": "Consume",
|
end_point: "Consume",
|
||||||
"producer": "C2",
|
producer: "C2",
|
||||||
"producer_did": "did:sov:test:4567",
|
producer_did: "did:sov:test:4567",
|
||||||
"network": "Test Network A",
|
network: "Test Network A",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"service_name": "Test B",
|
service_name: "Test B",
|
||||||
"service_type": "3D Printing",
|
service_type: "3D Printing",
|
||||||
"end_point": "Consume",
|
end_point: "Consume",
|
||||||
"producer": "C2",
|
producer: "C2",
|
||||||
"producer_did": "did:sov:test:0062",
|
producer_did: "did:sov:test:0062",
|
||||||
"network": "Test Network B",
|
network: "Test Network B",
|
||||||
},
|
},
|
||||||
]
|
];
|
||||||
|
|
||||||
export const Client1ConsumerTableConfig = [
|
export const Client1ConsumerTableConfig = [
|
||||||
{
|
{
|
||||||
key: "service_name",
|
key: "service_name",
|
||||||
label: "Service name"
|
label: "Service name",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "service_type",
|
key: "service_type",
|
||||||
label: "Service Type"
|
label: "Service Type",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "end_point",
|
key: "end_point",
|
||||||
label: "End Point"
|
label: "End Point",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "producer",
|
key: "producer",
|
||||||
label: "Producer"
|
label: "Producer",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "producer_did",
|
key: "producer_did",
|
||||||
label: "Producer DID"
|
label: "Producer DID",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "network",
|
key: "network",
|
||||||
label: "Network"
|
label: "Network",
|
||||||
}
|
},
|
||||||
]
|
];
|
||||||
|
|
||||||
export const Client1ProducerData = [
|
export const Client1ProducerData = [
|
||||||
{
|
{
|
||||||
"service_name": "Carlo's Printing",
|
service_name: "Carlo's Printing",
|
||||||
"service_type": "3D Printing",
|
service_type: "3D Printing",
|
||||||
"end_point": "URL",
|
end_point: "URL",
|
||||||
"usage": "C1(3), C3(4)",
|
usage: "C1(3), C3(4)",
|
||||||
"status": "DRAFT, REGISTERED",
|
status: "DRAFT, REGISTERED",
|
||||||
"action": "Register, Deregister, Delete",
|
action: "Register, Deregister, Delete",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"service_name": "Steve's Printing",
|
service_name: "Steve's Printing",
|
||||||
"service_type": "3D Printing",
|
service_type: "3D Printing",
|
||||||
"end_point": "URL",
|
end_point: "URL",
|
||||||
"usage": "C1(3), C3(4)",
|
usage: "C1(3), C3(4)",
|
||||||
"status": "REGISTERED",
|
status: "REGISTERED",
|
||||||
"action": "Create",
|
action: "Create",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"service_name": "Test Printing A",
|
service_name: "Test Printing A",
|
||||||
"service_type": "3D Printing",
|
service_type: "3D Printing",
|
||||||
"end_point": "URL",
|
end_point: "URL",
|
||||||
"usage": "C1(3), C3(4)",
|
usage: "C1(3), C3(4)",
|
||||||
"status": "DRAFT",
|
status: "DRAFT",
|
||||||
"action": "Register, Deregister",
|
action: "Register, Deregister",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"service_name": "Test Printing B",
|
service_name: "Test Printing B",
|
||||||
"service_type": "3D Printing",
|
service_type: "3D Printing",
|
||||||
"end_point": "URL",
|
end_point: "URL",
|
||||||
"usage": "C1(3), C3(4)",
|
usage: "C1(3), C3(4)",
|
||||||
"status": "DRAFT, REGISTERED",
|
status: "DRAFT, REGISTERED",
|
||||||
"action": "Delete, Create",
|
action: "Delete, Create",
|
||||||
},
|
},
|
||||||
]
|
];
|
||||||
|
|
||||||
export const Client1ProducerTableConfig = [
|
export const Client1ProducerTableConfig = [
|
||||||
{
|
{
|
||||||
key: "service_name",
|
key: "service_name",
|
||||||
label: "Service name"
|
label: "Service name",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "service_type",
|
key: "service_type",
|
||||||
label: "Service Type"
|
label: "Service Type",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "end_point",
|
key: "end_point",
|
||||||
label: "End Point"
|
label: "End Point",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "usage",
|
key: "usage",
|
||||||
label: "Usage"
|
label: "Usage",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "status",
|
key: "status",
|
||||||
label: "Status"
|
label: "Status",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "action",
|
key: "action",
|
||||||
label: "Action"
|
label: "Action",
|
||||||
}
|
},
|
||||||
]
|
];
|
||||||
|
|||||||
@@ -17,124 +17,124 @@ export const Client2SummaryDetails = [
|
|||||||
|
|
||||||
export const Client2ConsumerData = [
|
export const Client2ConsumerData = [
|
||||||
{
|
{
|
||||||
"service_name": "Carlo's Printing",
|
service_name: "Carlo's Printing",
|
||||||
"service_type": "3D Printing",
|
service_type: "3D Printing",
|
||||||
"end_point": "Consume",
|
end_point: "Consume",
|
||||||
"producer": "C2",
|
producer: "C2",
|
||||||
"producer_did": "did:sov:test:1223",
|
producer_did: "did:sov:test:1223",
|
||||||
"network": "Carlo's Home Network",
|
network: "Carlo's Home Network",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"service_name": "Steve's Printing",
|
service_name: "Steve's Printing",
|
||||||
"service_type": "3D Printing",
|
service_type: "3D Printing",
|
||||||
"end_point": "Consume",
|
end_point: "Consume",
|
||||||
"producer": "C2",
|
producer: "C2",
|
||||||
"producer_did": "did:sov:test:1234",
|
producer_did: "did:sov:test:1234",
|
||||||
"network": "Steve's Home Network",
|
network: "Steve's Home Network",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"service_name": "Test A",
|
service_name: "Test A",
|
||||||
"service_type": "3D Printing",
|
service_type: "3D Printing",
|
||||||
"end_point": "Consume",
|
end_point: "Consume",
|
||||||
"producer": "C2",
|
producer: "C2",
|
||||||
"producer_did": "did:sov:test:4567",
|
producer_did: "did:sov:test:4567",
|
||||||
"network": "Test Network A",
|
network: "Test Network A",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"service_name": "Test B",
|
service_name: "Test B",
|
||||||
"service_type": "3D Printing",
|
service_type: "3D Printing",
|
||||||
"end_point": "Consume",
|
end_point: "Consume",
|
||||||
"producer": "C2",
|
producer: "C2",
|
||||||
"producer_did": "did:sov:test:0062",
|
producer_did: "did:sov:test:0062",
|
||||||
"network": "Test Network B",
|
network: "Test Network B",
|
||||||
},
|
},
|
||||||
]
|
];
|
||||||
|
|
||||||
export const Client2ConsumerTableConfig = [
|
export const Client2ConsumerTableConfig = [
|
||||||
{
|
{
|
||||||
key: "service_name",
|
key: "service_name",
|
||||||
label: "Service name"
|
label: "Service name",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "service_type",
|
key: "service_type",
|
||||||
label: "Service Type"
|
label: "Service Type",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "end_point",
|
key: "end_point",
|
||||||
label: "End Point"
|
label: "End Point",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "producer",
|
key: "producer",
|
||||||
label: "Producer"
|
label: "Producer",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "producer_did",
|
key: "producer_did",
|
||||||
label: "Producer DID"
|
label: "Producer DID",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "network",
|
key: "network",
|
||||||
label: "Network"
|
label: "Network",
|
||||||
}
|
},
|
||||||
]
|
];
|
||||||
|
|
||||||
export const Client2ProducerData = [
|
export const Client2ProducerData = [
|
||||||
{
|
{
|
||||||
"service_name": "Carlo's Printing",
|
service_name: "Carlo's Printing",
|
||||||
"service_type": "3D Printing",
|
service_type: "3D Printing",
|
||||||
"end_point": "URL",
|
end_point: "URL",
|
||||||
"usage": "C1(3), C3(4)",
|
usage: "C1(3), C3(4)",
|
||||||
"status": "DRAFT, REGISTERED",
|
status: "DRAFT, REGISTERED",
|
||||||
"action": "Register, Deregister, Delete",
|
action: "Register, Deregister, Delete",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"service_name": "Steve's Printing",
|
service_name: "Steve's Printing",
|
||||||
"service_type": "3D Printing",
|
service_type: "3D Printing",
|
||||||
"end_point": "URL",
|
end_point: "URL",
|
||||||
"usage": "C1(3), C3(4)",
|
usage: "C1(3), C3(4)",
|
||||||
"status": "REGISTERED",
|
status: "REGISTERED",
|
||||||
"action": "Create",
|
action: "Create",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"service_name": "Test Printing A",
|
service_name: "Test Printing A",
|
||||||
"service_type": "3D Printing",
|
service_type: "3D Printing",
|
||||||
"end_point": "URL",
|
end_point: "URL",
|
||||||
"usage": "C1(3), C3(4)",
|
usage: "C1(3), C3(4)",
|
||||||
"status": "DRAFT",
|
status: "DRAFT",
|
||||||
"action": "Register, Deregister",
|
action: "Register, Deregister",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"service_name": "Test Printing B",
|
service_name: "Test Printing B",
|
||||||
"service_type": "3D Printing",
|
service_type: "3D Printing",
|
||||||
"end_point": "URL",
|
end_point: "URL",
|
||||||
"usage": "C1(3), C3(4)",
|
usage: "C1(3), C3(4)",
|
||||||
"status": "DRAFT, REGISTERED",
|
status: "DRAFT, REGISTERED",
|
||||||
"action": "Delete, Create",
|
action: "Delete, Create",
|
||||||
},
|
},
|
||||||
]
|
];
|
||||||
|
|
||||||
export const Client2ProducerTableConfig = [
|
export const Client2ProducerTableConfig = [
|
||||||
{
|
{
|
||||||
key: "service_name",
|
key: "service_name",
|
||||||
label: "Service name"
|
label: "Service name",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "service_type",
|
key: "service_type",
|
||||||
label: "Service Type"
|
label: "Service Type",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "end_point",
|
key: "end_point",
|
||||||
label: "End Point"
|
label: "End Point",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "usage",
|
key: "usage",
|
||||||
label: "Usage"
|
label: "Usage",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "status",
|
key: "status",
|
||||||
label: "Status"
|
label: "Status",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "action",
|
key: "action",
|
||||||
label: "Action"
|
label: "Action",
|
||||||
}
|
},
|
||||||
]
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user