mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 15:29:42 +02:00
feat(containers): migrate labels tab to react [EE-5212] (#10348)
This commit is contained in:
parent
b4b44e6fa4
commit
7acde18930
11 changed files with 159 additions and 67 deletions
|
@ -0,0 +1,17 @@
|
|||
import { CreateContainerRequest } from '../types';
|
||||
|
||||
import { Values } from './types';
|
||||
|
||||
export function toRequest(
|
||||
oldConfig: CreateContainerRequest,
|
||||
values: Values
|
||||
): CreateContainerRequest {
|
||||
return {
|
||||
...oldConfig,
|
||||
Labels: Object.fromEntries(
|
||||
values
|
||||
.filter((label) => label.name)
|
||||
.map((label) => [label.name, label.value])
|
||||
),
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue