mirror of
https://github.com/portainer/portainer.git
synced 2025-08-08 15:25:22 +02:00
refactor(docker/images): convert table to react [EE-4668] (#8910)
This commit is contained in:
parent
0e9902fee9
commit
ecd54ab929
26 changed files with 496 additions and 441 deletions
15
app/portainer/helpers/array.ts
Normal file
15
app/portainer/helpers/array.ts
Normal file
|
@ -0,0 +1,15 @@
|
|||
export function getValueAsArrayOfStrings(value: unknown): string[] {
|
||||
if (Array.isArray(value)) {
|
||||
return value;
|
||||
}
|
||||
|
||||
if (!value || (typeof value !== 'string' && typeof value !== 'number')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (typeof value === 'number') {
|
||||
return [value.toString()];
|
||||
}
|
||||
|
||||
return [value];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue