mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-02-19 00:46:31 +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">
|
<div className="flex-1 overflow-hidden px-6 py-4">
|
||||||
{/* Mobile carousel container */}
|
{/* Mobile carousel container */}
|
||||||
<div className="sm:hidden relative">
|
<div className="sm:hidden relative overflow-hidden">
|
||||||
<div
|
<div
|
||||||
className="flex transition-transform duration-300 ease-in-out"
|
className="flex transition-transform duration-300 ease-in-out w-[200%]"
|
||||||
style={{ transform: `translateX(-${modalPage * 100}%)` }}
|
style={{ transform: `translateX(-${modalPage * 50}%)` }}
|
||||||
>
|
>
|
||||||
{/* Page 0: Main content */}
|
{/* 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">
|
<div className="space-y-6 pr-1">
|
||||||
{selectedVM && (
|
{selectedVM && (
|
||||||
<>
|
<>
|
||||||
@@ -1369,8 +1369,8 @@ const handleDownloadLogs = async (vmid: number, vmName: string) => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Page 1: Backups */}
|
{/* Page 1: Backups */}
|
||||||
<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 pl-2" style={{ maxHeight: 'calc(100vh - 280px)' }}>
|
||||||
<div className="space-y-4 pr-1">
|
<div className="space-y-4">
|
||||||
<Card className="border border-border bg-card/50">
|
<Card className="border border-border bg-card/50">
|
||||||
<CardContent className="p-4">
|
<CardContent className="p-4">
|
||||||
<h3 className="text-sm font-semibold text-muted-foreground uppercase tracking-wide mb-4">Create Backup</h3>
|
<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:
|
try:
|
||||||
storages = []
|
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
|
# Get all storages
|
||||||
result = subprocess.run(['pvesh', 'get', '/storage', '--output-format', 'json'],
|
result = subprocess.run(['pvesh', 'get', '/storage', '--output-format', 'json'],
|
||||||
capture_output=True, text=True, timeout=10)
|
capture_output=True, text=True, timeout=10)
|
||||||
@@ -5560,10 +5564,10 @@ def api_backup_storages():
|
|||||||
|
|
||||||
# Only include storages that support backup content
|
# Only include storages that support backup content
|
||||||
if 'backup' in content or storage_type == 'pbs':
|
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:
|
try:
|
||||||
status_result = subprocess.run(
|
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
|
capture_output=True, text=True, timeout=10
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user