1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 23:09:41 +02:00

feat(containers): migrate labels tab to react [EE-5212] (#10348)

This commit is contained in:
Chaim Lev-Ari 2023-09-26 13:54:45 +03:00 committed by GitHub
parent b4b44e6fa4
commit 7acde18930
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 159 additions and 67 deletions

View file

@ -0,0 +1,18 @@
import { ContainerJSON } from '../../queries/container';
import { Values } from './types';
export function toViewModel(config: ContainerJSON): Values {
if (!config || !config.Config || !config.Config.Labels) {
return [];
}
return Object.entries(config.Config.Labels).map(([name, value]) => ({
name,
value,
}));
}
export function getDefaultViewModel(): Values {
return [];
}