Bridge Configuration
-
-
Virtual Member Interfaces
-
- {selectedInterface.bridge_members.length > 0 ? (
- selectedInterface.bridge_members
- .filter(
- (member) =>
- !member.startsWith("enp") &&
- !member.startsWith("eth") &&
- !member.startsWith("eno") &&
- !member.startsWith("ens") &&
- !member.startsWith("wlan") &&
- !member.startsWith("wlp"),
- )
- .map((member, idx) => (
+
+ {selectedInterface.bridge_physical_interface && (
+
+
Physical Interface
+
+ {selectedInterface.bridge_physical_interface}
+
+
+ )}
+ {selectedInterface.bridge_bond_slaves && selectedInterface.bridge_bond_slaves.length > 0 && (
+
+
Bond Slave Interfaces
+
+ {selectedInterface.bridge_bond_slaves.map((slave, idx) => (
- {member}
+ {slave}
- ))
- ) : (
-
No virtual members
- )}
-
+ ))}
+
+
+ )}
+ {selectedInterface.bridge_members && (
+
+
Virtual Member Interfaces
+
+ {selectedInterface.bridge_members.length > 0 ? (
+ selectedInterface.bridge_members
+ .filter(
+ (member) =>
+ !member.startsWith("enp") &&
+ !member.startsWith("eth") &&
+ !member.startsWith("eno") &&
+ !member.startsWith("ens") &&
+ !member.startsWith("wlan") &&
+ !member.startsWith("wlp"),
+ )
+ .map((member, idx) => (
+
+ {member}
+
+ ))
+ ) : (
+
No virtual members
+ )}
+
+
+ )}
)}
diff --git a/AppImage/components/virtual-machines.tsx b/AppImage/components/virtual-machines.tsx
index 75abecd..1027705 100644
--- a/AppImage/components/virtual-machines.tsx
+++ b/AppImage/components/virtual-machines.tsx
@@ -94,6 +94,24 @@ const formatBytes = (bytes: number | undefined): string => {
return `${(bytes / Math.pow(k, i)).toFixed(2)} ${sizes[i]}`
}
+const extractIPFromNetConfig = (netConfig: string | undefined): string => {
+ if (!netConfig) return "N/A"
+
+ // Parse the network config string: name=eth0,bridge=vmbr0,gw=192.168.0.1,hwaddr=...,ip=192.168.0.4/24,type=veth
+ const ipMatch = netConfig.match(/ip=([^,]+)/)
+ if (ipMatch && ipMatch[1]) {
+ const ip = ipMatch[1]
+ // Check if it's DHCP
+ if (ip.toLowerCase() === "dhcp") {
+ return "DHCP"
+ }
+ // Return the IP without the subnet mask for cleaner display
+ return ip.split("/")[0]
+ }
+
+ return "N/A"
+}
+
export function VirtualMachines() {
const {
data: vmData,
@@ -396,7 +414,7 @@ export function VirtualMachines() {
-