fix: Preserve OCI container type through unified resource conversion
The useResources.ts hook was hardcoding type: 'lxc' when converting unified resources to legacy container format, causing OCI containers to intermittently display as LXC when WebSocket updates occurred. Now preserves the actual type from platformData (oci/lxc).
This commit is contained in:
parent
689f229c72
commit
a20760f527
1 changed files with 1 additions and 1 deletions
|
|
@ -313,7 +313,7 @@ export function useResourcesAsLegacy() {
|
|||
node: platformData?.node as string ?? '',
|
||||
instance: platformData?.instance as string ?? r.platformId,
|
||||
status: r.status === 'running' ? 'running' : 'stopped',
|
||||
type: 'lxc',
|
||||
type: (platformData?.type as string) ?? 'lxc', // Preserve oci/lxc type from backend
|
||||
cpu: (r.cpu?.current ?? 0) / 100, // Convert from percentage to ratio for Dashboard
|
||||
cpus: platformData?.cpus as number ?? 1,
|
||||
memory: r.memory ? {
|
||||
|
|
|
|||
Loading…
Reference in a new issue