mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 05:45:22 +02:00
feat(home): filter by connection type and agent version [EE-3373] (#7085)
This commit is contained in:
parent
9666c21b8a
commit
5ee570e075
31 changed files with 828 additions and 323 deletions
|
@ -4,6 +4,7 @@ import { Environment } from '@/portainer/environments/types';
|
|||
import { useCreateEdgeAgentEnvironmentMutation } from '@/portainer/environments/queries/useCreateEnvironmentMutation';
|
||||
import { baseHref } from '@/portainer/helpers/pathHelper';
|
||||
import { EdgeCheckinIntervalField } from '@/edge/components/EdgeCheckInIntervalField';
|
||||
import { useCreateEdgeDeviceParam } from '@/react/portainer/environments/wizard/hooks/useCreateEdgeDeviceParam';
|
||||
|
||||
import { FormSection } from '@@/form-components/FormSection';
|
||||
import { LoadingButton } from '@@/buttons/LoadingButton';
|
||||
|
@ -24,6 +25,8 @@ interface Props {
|
|||
const initialValues = buildInitialValues();
|
||||
|
||||
export function EdgeAgentForm({ onCreate, readonly, showGpus = false }: Props) {
|
||||
const createEdgeDevice = useCreateEdgeDeviceParam();
|
||||
|
||||
const createMutation = useCreateEdgeAgentEnvironmentMutation();
|
||||
|
||||
return (
|
||||
|
@ -68,11 +71,14 @@ export function EdgeAgentForm({ onCreate, readonly, showGpus = false }: Props) {
|
|||
);
|
||||
|
||||
function handleSubmit(values: typeof initialValues) {
|
||||
createMutation.mutate(values, {
|
||||
onSuccess(environment) {
|
||||
onCreate(environment);
|
||||
},
|
||||
});
|
||||
createMutation.mutate(
|
||||
{ ...values, isEdgeDevice: createEdgeDevice },
|
||||
{
|
||||
onSuccess(environment) {
|
||||
onCreate(environment);
|
||||
},
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue