mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-02-19 08:56:23 +00:00
Update modal vm
This commit is contained in:
@@ -1239,13 +1239,13 @@ const handleDownloadLogs = async (vmid: number, vmName: string) => {
|
||||
|
||||
<div className="flex-1 overflow-hidden px-6 py-4">
|
||||
{/* Mobile carousel container */}
|
||||
<div className="sm:hidden relative">
|
||||
<div className="sm:hidden relative overflow-hidden">
|
||||
<div
|
||||
className="flex transition-transform duration-300 ease-in-out"
|
||||
style={{ transform: `translateX(-${modalPage * 100}%)` }}
|
||||
className="flex transition-transform duration-300 ease-in-out w-[200%]"
|
||||
style={{ transform: `translateX(-${modalPage * 50}%)` }}
|
||||
>
|
||||
{/* Page 0: Main content */}
|
||||
<div className="w-full flex-shrink-0 overflow-y-auto" style={{ maxHeight: 'calc(100vh - 280px)' }}>
|
||||
<div className="w-1/2 flex-shrink-0 overflow-y-auto pr-2" style={{ maxHeight: 'calc(100vh - 280px)' }}>
|
||||
<div className="space-y-6 pr-1">
|
||||
{selectedVM && (
|
||||
<>
|
||||
@@ -1369,8 +1369,8 @@ const handleDownloadLogs = async (vmid: number, vmName: string) => {
|
||||
</div>
|
||||
|
||||
{/* Page 1: Backups */}
|
||||
<div className="w-full flex-shrink-0 overflow-y-auto" style={{ maxHeight: 'calc(100vh - 280px)' }}>
|
||||
<div className="space-y-4 pr-1">
|
||||
<div className="w-1/2 flex-shrink-0 overflow-y-auto pl-2" style={{ maxHeight: 'calc(100vh - 280px)' }}>
|
||||
<div className="space-y-4">
|
||||
<Card className="border border-border bg-card/50">
|
||||
<CardContent className="p-4">
|
||||
<h3 className="text-sm font-semibold text-muted-foreground uppercase tracking-wide mb-4">Create Backup</h3>
|
||||
|
||||
@@ -5546,6 +5546,10 @@ def api_backup_storages():
|
||||
try:
|
||||
storages = []
|
||||
|
||||
# Get current node name
|
||||
node_result = subprocess.run(['hostname'], capture_output=True, text=True, timeout=5)
|
||||
node = node_result.stdout.strip() if node_result.returncode == 0 else 'localhost'
|
||||
|
||||
# Get all storages
|
||||
result = subprocess.run(['pvesh', 'get', '/storage', '--output-format', 'json'],
|
||||
capture_output=True, text=True, timeout=10)
|
||||
@@ -5560,10 +5564,10 @@ def api_backup_storages():
|
||||
|
||||
# Only include storages that support backup content
|
||||
if 'backup' in content or storage_type == 'pbs':
|
||||
# Get storage status for space info
|
||||
# Get storage status for space info - use correct path with node
|
||||
try:
|
||||
status_result = subprocess.run(
|
||||
['pvesh', 'get', f'/storage/{storage_id}/status', '--output-format', 'json'],
|
||||
['pvesh', 'get', f'/nodes/{node}/storage/{storage_id}/status', '--output-format', 'json'],
|
||||
capture_output=True, text=True, timeout=10
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user