mirror of
https://github.com/portainer/portainer.git
synced 2025-07-20 22:09:41 +02:00
refactor(containers): migrate volumes tab to react [EE-5209] (#10284)
This commit is contained in:
parent
16ccf5871e
commit
e92f067e42
18 changed files with 398 additions and 143 deletions
|
@ -0,0 +1,16 @@
|
|||
import { ContainerJSON } from '../../queries/container';
|
||||
|
||||
import { VolumeType, Values } from './types';
|
||||
|
||||
export function toViewModel(config: ContainerJSON): Values {
|
||||
return Object.values(config.Mounts || {}).map((mount) => ({
|
||||
type: (mount.Type || 'volume') as VolumeType,
|
||||
name: mount.Name || mount.Source || '',
|
||||
containerPath: mount.Destination || '',
|
||||
readOnly: mount.RW === false,
|
||||
}));
|
||||
}
|
||||
|
||||
export function getDefaultViewModel(): Values {
|
||||
return [];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue