added support for container Backup
This commit is contained in:
@@ -27,6 +27,7 @@ export function Dashboard({ health, jobs, loading, onManage, vms }) {
|
||||
<tr>
|
||||
<th className="px-4 py-3 font-medium">VM</th>
|
||||
<th className="px-4 py-3 font-medium">Node</th>
|
||||
<th className="px-4 py-3 font-medium">Type</th>
|
||||
<th className="px-4 py-3 font-medium">Incus</th>
|
||||
<th className="px-4 py-3 font-medium">Last Job</th>
|
||||
<th className="px-4 py-3 font-medium">Active Job</th>
|
||||
@@ -38,6 +39,7 @@ export function Dashboard({ health, jobs, loading, onManage, vms }) {
|
||||
<tr className="hover:bg-zinc-900" key={vm.id || vm.name}>
|
||||
<td className="px-4 py-3 font-medium text-zinc-100">{vm.name}</td>
|
||||
<td className="px-4 py-3 text-zinc-300">{vm.nodeName || '-'}</td>
|
||||
<td className="px-4 py-3 text-zinc-300">{vm.type === 'container' ? 'Container' : 'VM'}</td>
|
||||
<td className="px-4 py-3">
|
||||
<span className="inline-flex items-center gap-2 text-zinc-300">
|
||||
<Circle className={`h-2.5 w-2.5 fill-current ${vm.status === 'Running' ? 'text-emerald-400' : 'text-red-400'}`} />
|
||||
@@ -71,7 +73,7 @@ export function Dashboard({ health, jobs, loading, onManage, vms }) {
|
||||
))}
|
||||
{!vms.length ? (
|
||||
<tr>
|
||||
<td className="px-4 py-8 text-center text-zinc-500" colSpan="6">
|
||||
<td className="px-4 py-8 text-center text-zinc-500" colSpan="7">
|
||||
No VMs loaded.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -90,6 +90,7 @@ export function VMDetail({ jobs, onBack, onChanged, vm }) {
|
||||
</button>
|
||||
<div className="flex items-center gap-3">
|
||||
<h1 className="text-2xl font-semibold text-zinc-100">{vm.name}</h1>
|
||||
<span className="rounded-md border border-zinc-800 px-2 py-1 text-xs text-zinc-300">{vm.type === 'container' ? 'Container' : 'VM'}</span>
|
||||
<span className="rounded-md border border-zinc-800 px-2 py-1 text-xs text-zinc-300">{vm.status || 'Unknown'}</span>
|
||||
</div>
|
||||
<p className="mt-2 text-sm text-zinc-500">Node: {vm.nodeName || '-'}</p>
|
||||
@@ -118,7 +119,13 @@ export function VMDetail({ jobs, onBack, onChanged, vm }) {
|
||||
<SnapshotTable
|
||||
snapshots={snapshots}
|
||||
onInspect={inspectSnapshot}
|
||||
onRestore={(snapshot) => setSelectedSnapshot(snapshot)}
|
||||
onRestore={(snapshot) => {
|
||||
if (vm.type === 'container') {
|
||||
setError('Container restore is not implemented yet. Backups are available, restore needs a safe zfs receive workflow.');
|
||||
return;
|
||||
}
|
||||
setSelectedSnapshot(snapshot);
|
||||
}}
|
||||
/>
|
||||
<SnapshotFilesPanel
|
||||
files={snapshotFiles}
|
||||
|
||||
Reference in New Issue
Block a user