mirror of
https://github.com/crocofied/CoreControl.git
synced 2025-12-29 16:14:43 +00:00
Display Networks on Sites
This commit is contained in:
@@ -5,7 +5,15 @@ interface SitesProps {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
networks: string[];
|
||||
networks: Network[];
|
||||
}
|
||||
|
||||
interface Network {
|
||||
id: number;
|
||||
name: string;
|
||||
ipv4Subnet?: string;
|
||||
ipv6Subnet?: string;
|
||||
gateway?: string;
|
||||
}
|
||||
|
||||
export default function Sites({ id, name, description, networks }: SitesProps) {
|
||||
@@ -16,7 +24,7 @@ export default function Sites({ id, name, description, networks }: SitesProps) {
|
||||
<h2 className="card-title">{name}</h2>
|
||||
<p>{description}</p>
|
||||
{ networks && networks.length > 0 && (
|
||||
<p>Networks: {networks.join(', ')}</p>
|
||||
<p>Networks: {networks.map((network) => network.name).join(", ")}</p>
|
||||
)}
|
||||
<div className="card-actions justify-end">
|
||||
<button className="btn btn-secondary btn-sm btn-outline" onClick={() => router.push(`/dashboard/sites/${id}`)}>View</button>
|
||||
|
||||
Reference in New Issue
Block a user