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:
parent
d574a71cb1
commit
762c664948
11 changed files with 129 additions and 953 deletions
|
@ -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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue