1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

feat(edge): create edge device with wizard [EE-3096] (#7029)

This commit is contained in:
Chaim Lev-Ari 2022-07-28 15:34:22 +02:00 committed by GitHub
parent d574a71cb1
commit 762c664948
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 129 additions and 953 deletions

View file

@ -0,0 +1,18 @@
import { EnvironmentCreationTypes } from '@/portainer/environments/types';
import { BoxSelectorOption } from '@@/BoxSelector';
import { useCreateEdgeDeviceParam } from '../hooks/useCreateEdgeDeviceParam';
export function useFilterEdgeOptionsIfNeeded<T = EnvironmentCreationTypes>(
options: BoxSelectorOption<T>[],
edgeValue: T
) {
const createEdgeDevice = useCreateEdgeDeviceParam();
if (!createEdgeDevice) {
return options;
}
return options.filter((option) => option.value === edgeValue);
}