feat: Update Proxmox extension with various improvements and bug fixes
- Change listStates method to accept nullable integer for limit parameter. - Modify TechnitiumDns class to return structured error messages on failure. - Enhance VNC and xterm popup routes with user authorization checks. - Update backups view to improve loading states and add unique keys for dynamic elements. - Refactor cloud-init view to ensure proper data binding and improve user experience. - Add wire:key attributes to various elements in views for better Livewire performance. - Improve error handling and user feedback in the firewall view. - Update server overview and statistics views to handle potential null values gracefully. - Add new migration files to extend database schema with user-set icons and notes for Proxmox nodes.
This commit is contained in:
@@ -11,6 +11,7 @@ class Node extends Model
|
||||
protected $fillable = [
|
||||
// Shows to customer
|
||||
'name',
|
||||
'notes',
|
||||
'memory',
|
||||
'disk',
|
||||
'cpu',
|
||||
@@ -51,9 +52,9 @@ class Node extends Model
|
||||
$usedDisk = 0;
|
||||
$usedCpu = 0;
|
||||
foreach ($servers as $server) {
|
||||
$usedMemory += (int) $server->service->product->settings()->where('key', 'memory')->first()->value ?? 0;
|
||||
$usedDisk += (int) $server->service->product->settings()->where('key', 'disk')->first()->value ?? 0;
|
||||
$usedCpu += (int) $server->service->product->settings()->where('key', 'cpu')->first()->value ?? 0;
|
||||
$usedMemory += (int) ($server->service->product->settings()->where('key', 'memory')->first()?->value ?? 0);
|
||||
$usedDisk += (int) ($server->service->product->settings()->where('key', 'disk')->first()?->value ?? 0);
|
||||
$usedCpu += (int) ($server->service->product->settings()->where('key', 'cpu')->first()?->value ?? 0);
|
||||
}
|
||||
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user