ui updtae
This commit is contained in:
parent
ba0d2ab332
commit
6fa14d2f6e
|
|
@ -32,7 +32,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|||
'ip' => $_POST['ip'] ?? '',
|
||||
'netmask' => $_POST['netmask'] ?? '',
|
||||
'gateway' => $_POST['gateway'] ?? '',
|
||||
'dns' => $_POST['dns'] ?? ''
|
||||
'dns' => $_POST['dns'] ?? '',
|
||||
'multicast' => $_POST['multicast'] ?? 'off'
|
||||
];
|
||||
|
||||
$network_config[$interface] = $config;
|
||||
|
|
@ -72,9 +73,11 @@ foreach ($output as $line) {
|
|||
}
|
||||
|
||||
// Check if interface is a bridge or docker interface
|
||||
if (strpos($current_interface, 'docker') === 0 ||
|
||||
if (
|
||||
strpos($current_interface, 'docker') === 0 ||
|
||||
strpos($current_interface, 'br-') === 0 ||
|
||||
strpos($current_interface, 'veth') === 0) {
|
||||
strpos($current_interface, 'veth') === 0
|
||||
) {
|
||||
$current_interface = null;
|
||||
continue;
|
||||
}
|
||||
|
|
@ -108,8 +111,10 @@ foreach ($output as $line) {
|
|||
$selected_interface = $_GET['interface'] ?? array_keys($interface_data)[0] ?? null;
|
||||
?>
|
||||
|
||||
<div class="container">
|
||||
<h2>Network Configuration</h2>
|
||||
<div class="containerindex">
|
||||
<div class="grid">
|
||||
<div class="card wide">
|
||||
<h3>Network Configuration</h3>
|
||||
|
||||
<!-- Interface selection -->
|
||||
<div class="interface-selector">
|
||||
|
|
@ -129,7 +134,7 @@ $selected_interface = $_GET['interface'] ?? array_keys($interface_data)[0] ?? nu
|
|||
<?php if ($selected_interface && isset($interface_data[$selected_interface])): ?>
|
||||
<div class="interface-card">
|
||||
<div class="interface-header">
|
||||
<h5><?php echo htmlspecialchars($interface_data[$selected_interface]['name']); ?></h5>
|
||||
<h5>Interface Settings</h5>
|
||||
<span class="badge bg-<?php echo $interface_data[$selected_interface]['status'] === 'up' ? 'success' : 'secondary'; ?>">
|
||||
<?php echo htmlspecialchars($interface_data[$selected_interface]['status']); ?>
|
||||
</span>
|
||||
|
|
@ -184,6 +189,24 @@ $selected_interface = $_GET['interface'] ?? array_keys($interface_data)[0] ?? nu
|
|||
placeholder="8.8.8.8">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Multicast</label>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="multicast" id="multicast-on-<?php echo $selected_interface; ?>"
|
||||
value="on" <?php echo ($interface_data[$selected_interface]['config']['multicast'] ?? 'off') === 'on' ? 'checked' : ''; ?>>
|
||||
<label class="form-check-label" for="multicast-on-<?php echo $selected_interface; ?>">
|
||||
Enable
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="multicast" id="multicast-off-<?php echo $selected_interface; ?>"
|
||||
value="off" <?php echo ($interface_data[$selected_interface]['config']['multicast'] ?? 'off') === 'off' ? 'checked' : ''; ?>>
|
||||
<label class="form-check-label" for="multicast-off-<?php echo $selected_interface; ?>">
|
||||
Disable
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="d-flex justify-content-between">
|
||||
<button type="submit" class="btn btn-primary">Save Configuration</button>
|
||||
<div>
|
||||
|
|
@ -207,6 +230,8 @@ $selected_interface = $_GET['interface'] ?? array_keys($interface_data)[0] ?? nu
|
|||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Toggle static IP fields based on method selection
|
||||
|
|
|
|||
Loading…
Reference in New Issue