ui update
This commit is contained in:
parent
178a0463d0
commit
a3b85d4e9d
|
|
@ -430,69 +430,6 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") {
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<style>
|
|
||||||
body {
|
|
||||||
font-family: Arial;
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
padding: 6px 12px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.restart-btn {
|
|
||||||
background: #ffaa00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.delete-btn {
|
|
||||||
background: #b40000;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.edit-btn {
|
|
||||||
background: #0066cc;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#popup {
|
|
||||||
display: none;
|
|
||||||
position: fixed;
|
|
||||||
top: 50%;
|
|
||||||
left: 50%;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
background: #fff;
|
|
||||||
padding: 20px;
|
|
||||||
border: 1px solid #333;
|
|
||||||
width: 350px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#overlay {
|
|
||||||
display: none;
|
|
||||||
position: fixed;
|
|
||||||
inset: 0;
|
|
||||||
background: rgba(0, 0, 0, 0.5);
|
|
||||||
}
|
|
||||||
|
|
||||||
table {
|
|
||||||
width: 100%;
|
|
||||||
border-collapse: collapse;
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
th,
|
|
||||||
td {
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
padding: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
input,
|
|
||||||
select {
|
|
||||||
width: 100%;
|
|
||||||
padding: 6px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<div class="containerindex">
|
<div class="containerindex">
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
|
|
|
||||||
|
|
@ -156,11 +156,13 @@ function generate_netplan_config($config)
|
||||||
exec("sudo netplan generate 2>&1", $out, $return_code);
|
exec("sudo netplan generate 2>&1", $out, $return_code);
|
||||||
|
|
||||||
if ($return_code !== 0) {
|
if ($return_code !== 0) {
|
||||||
|
error_log("This is my custom log message!");
|
||||||
if (file_exists($backup_file)) {
|
if (file_exists($backup_file)) {
|
||||||
exec('sudo cp /var/www/50-cloud-init.yaml_backup /etc/netplan/50-cloud-init.yaml', $output, $return_code);
|
exec('sudo cp /var/www/50-cloud-init.yaml_backup /etc/netplan/50-cloud-init.yaml', $output, $return_code);
|
||||||
exec('sudo netplan apply', $output, $return_code);
|
exec('sudo netplan apply', $output, $return_code);
|
||||||
}
|
}
|
||||||
}
|
} else
|
||||||
|
exec('sudo netplan apply', $output, $return_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get network interfaces excluding specific ones
|
// Get network interfaces excluding specific ones
|
||||||
|
|
|
||||||
|
|
@ -936,3 +936,62 @@ input:checked+.slider:before {
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
color: var(--text-primary);
|
color: var(--text-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#popup {
|
||||||
|
display: none;
|
||||||
|
position: fixed;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
background: #fff;
|
||||||
|
padding: 20px;
|
||||||
|
border: 1px solid #333;
|
||||||
|
width: 350px;
|
||||||
|
max-width: 90vw;
|
||||||
|
max-height: 90vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
z-index: 1000;
|
||||||
|
border-radius: 8px;
|
||||||
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
#overlay {
|
||||||
|
display: none;
|
||||||
|
position: fixed;
|
||||||
|
inset: 0;
|
||||||
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure the popup content is properly centered */
|
||||||
|
#popup h3 {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#popup input,
|
||||||
|
#popup select {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
padding: 8px;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#popup button {
|
||||||
|
margin: 5px;
|
||||||
|
padding: 8px 12px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
#popup button#saveBtn {
|
||||||
|
background: #0066cc;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
#popup button[type="button"] {
|
||||||
|
background: #ccc;
|
||||||
|
color: black;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue