feat: add LXC container support to Proxmox extension
- Add is_lxc boolean column to ext_proxmox_nodes (default false, existing nodes unaffected) - Add LXC checkbox to admin node creation form (disabled on edit) - Dynamic API path selection via Node::vmType() (returns 'lxc' or 'qemu') - LXC deployment: syncLxcSettings() for cores, memory, swap, hostname, rootfs, net config - LXC network uses name=eth0 format with applyLxcPoolSettings() for VLAN/firewall/MTU - All lifecycle operations LXC-aware: install, suspend, unsuspend, terminate, upgrade, reinstall - VNC/xterm console uses correct type (lxc vs kvm) - All 20+ Livewire components use vmType() for Proxmox API paths - LXC user interface shows basic-only view (no advanced toggle, no KVM-specific tabs) - Basic tabs for LXC: Overview, Network Configuration, Backups, Console
This commit is contained in:
@@ -895,7 +895,7 @@ class Statistics extends Component
|
||||
// Reduced cache TTL from 60 to 30 seconds for fresher data and faster updates
|
||||
$data = Cache::remember($cacheKey, 30, function () use ($timeRange, $aggregation) {
|
||||
$proxmox = new Proxmox;
|
||||
$stats = $proxmox->request('/nodes/' . $this->server->node->name . '/qemu/' . $this->server->vm_id . '/rrddata', data: [
|
||||
$stats = $proxmox->request('/nodes/' . $this->server->node->name . '/' . $this->server->node->vmType() . '/' . $this->server->vm_id . '/rrddata', data: [
|
||||
'timeframe' => $timeRange,
|
||||
'cf' => $aggregation === 'maximum' ? 'MAX' : 'AVERAGE',
|
||||
]);
|
||||
@@ -1028,7 +1028,7 @@ class Statistics extends Component
|
||||
|
||||
$proxmox = new Proxmox;
|
||||
$status = $proxmox->request(
|
||||
'/nodes/' . $this->server->node->name . '/qemu/' . $this->server->vm_id . '/status/current'
|
||||
'/nodes/' . $this->server->node->name . '/' . $this->server->node->vmType() . '/' . $this->server->vm_id . '/status/current'
|
||||
)->json()['data'] ?? null;
|
||||
|
||||
if ($status) {
|
||||
@@ -1040,7 +1040,7 @@ class Statistics extends Component
|
||||
|
||||
try {
|
||||
$rrdData = $proxmox->request(
|
||||
'/nodes/' . $this->server->node->name . '/qemu/' . $this->server->vm_id . '/rrddata',
|
||||
'/nodes/' . $this->server->node->name . '/' . $this->server->node->vmType() . '/' . $this->server->vm_id . '/rrddata',
|
||||
'get',
|
||||
['timeframe' => 'hour', 'cf' => 'AVERAGE']
|
||||
)->json()['data'] ?? null;
|
||||
@@ -1058,7 +1058,7 @@ class Statistics extends Component
|
||||
// The status endpoint may not return maxdisk, especially if guest agent is not enabled
|
||||
try {
|
||||
$config = $proxmox->request(
|
||||
'/nodes/' . $this->server->node->name . '/qemu/' . $this->server->vm_id . '/config'
|
||||
'/nodes/' . $this->server->node->name . '/' . $this->server->node->vmType() . '/' . $this->server->vm_id . '/config'
|
||||
)->json()['data'] ?? null;
|
||||
|
||||
if ($config) {
|
||||
|
||||
Reference in New Issue
Block a user