diff --git a/packages/frinx-gamma/src/components/forms/connection-form.tsx b/packages/frinx-gamma/src/components/forms/connection-form.tsx index 1299cfae2..443d4488d 100644 --- a/packages/frinx-gamma/src/components/forms/connection-form.tsx +++ b/packages/frinx-gamma/src/components/forms/connection-form.tsx @@ -1,7 +1,7 @@ import React, { FC } from 'react'; import { Input, Select, FormControl, FormErrorMessage, FormLabel } from '@chakra-ui/react'; -import { FormikErrors, FormikValues } from 'formik'; -import { Connection, VpnBearer } from './bearer-types'; +import { FormikErrors } from 'formik'; +import { Connection } from './bearer-types'; import { getSelectOptions } from './options.helper'; type Props = { @@ -79,7 +79,7 @@ const ConnectionForm: FC = ({ connection, errors, onChange }) => { })} - + MTU = ({ onSuccess, onCa } }; - const handleCancel = () => { + const handleCancel = async () => { + const uniflowCallbacks = uniflowCallbackUtils.getCallbacks; + await uniflowCallbacks.executeWorkflow({ + name: 'Free_SvlanId', + version: 1, + input: { + sp_bearer_reference: unwrap(selectedBearer?.spBearerReference), // eslint-disable-line @typescript-eslint/naming-convention + vlan: unwrap(svlanId), + }, + }); // eslint-disable-next-line no-console console.log('cancel clicked'); onCancel(unwrap(selectedBearer?.spBearerReference)); diff --git a/packages/frinx-gamma/src/pages/create-site-network-access/create-site-network-access.tsx b/packages/frinx-gamma/src/pages/create-site-network-access/create-site-network-access.tsx index c1c34d912..a945545f1 100644 --- a/packages/frinx-gamma/src/pages/create-site-network-access/create-site-network-access.tsx +++ b/packages/frinx-gamma/src/pages/create-site-network-access/create-site-network-access.tsx @@ -152,7 +152,16 @@ const CreateSiteNetAccessPage: VoidFunctionComponent = ({ onSuccess, onCa } }; - const handleCancel = () => { + const handleCancel = async () => { + const uniflowCallbacks = uniflowCallbackUtils.getCallbacks; + await uniflowCallbacks.executeWorkflow({ + name: 'Free_CustomerAddress', + version: 1, + input: { + site: siteId, + customer_address: unwrap(customerAddress), // eslint-disable-line @typescript-eslint/naming-convention + }, + }); // eslint-disable-next-line no-console console.log('cancel clicked'); onCancel(unwrap(selectedSite?.siteId)); diff --git a/packages/frinx-gamma/src/pages/create-vpn-service/create-vpn-service.tsx b/packages/frinx-gamma/src/pages/create-vpn-service/create-vpn-service.tsx index 7f2f3c960..3b2fb2d77 100644 --- a/packages/frinx-gamma/src/pages/create-vpn-service/create-vpn-service.tsx +++ b/packages/frinx-gamma/src/pages/create-vpn-service/create-vpn-service.tsx @@ -35,6 +35,7 @@ type Props = { const CreateVpnServicePage: VoidFunctionComponent = ({ onSuccess, onCancel }) => { const [workflowId, setWorkflowId] = useState(null); const [vpnId, setVpnId] = useState(null); + const [counter, setCounter] = useState(null); const [vpnServices, setVpnServices] = useState(null); const [submitError, setSubmitError] = useState(null); @@ -76,7 +77,16 @@ const CreateVpnServicePage: VoidFunctionComponent = ({ onSuccess, onCance } }; - const handleCancel = () => { + const handleCancel = async () => { + const uniflowCallbacks = uniflowCallbackUtils.getCallbacks; + await uniflowCallbacks.executeWorkflow({ + name: 'Free_VpnServiceId', + version: 1, + input: { + text: unwrap(vpnId), + counter: unwrap(counter), + }, + }); // eslint-disable-next-line no-console console.log('cancel clicked'); onCancel(); @@ -89,6 +99,7 @@ const CreateVpnServicePage: VoidFunctionComponent = ({ onSuccess, onCance // eslint-disable-next-line @typescript-eslint/naming-convention const { response_body }: VpnServiceWorkflowData = JSON.parse(data); setVpnId(response_body.text); + setCounter(response_body.counter); }; if (!workflowId) { diff --git a/packages/frinx-gamma/src/pages/evc-list/evc-table.tsx b/packages/frinx-gamma/src/pages/evc-list/evc-table.tsx index 0b3f07bf4..06adf6253 100644 --- a/packages/frinx-gamma/src/pages/evc-list/evc-table.tsx +++ b/packages/frinx-gamma/src/pages/evc-list/evc-table.tsx @@ -1,4 +1,4 @@ -import { Flex, HStack, Icon, IconButton, Table, Tbody, Td, Text, Th, Thead, Tr, Tooltip } from '@chakra-ui/react'; +import { HStack, Icon, IconButton, Table, Tbody, Td, Text, Th, Thead, Tr, Tooltip } from '@chakra-ui/react'; import { ChevronDownIcon, ChevronUpIcon } from '@chakra-ui/icons'; import FeatherIcon from 'feather-icons-react'; import React, { VoidFunctionComponent } from 'react'; @@ -32,7 +32,7 @@ const EvcTable: VoidFunctionComponent = ({ - + BMT Circuit Reference Carrier Reference Svlan Id diff --git a/packages/frinx-gamma/src/uniflow-callback-utils.ts b/packages/frinx-gamma/src/uniflow-callback-utils.ts index 9b3f48e84..9b2167f9e 100644 --- a/packages/frinx-gamma/src/uniflow-callback-utils.ts +++ b/packages/frinx-gamma/src/uniflow-callback-utils.ts @@ -1,5 +1,5 @@ export type WorkflowPayload = { - input: Record; + input: Record; name: string; version: number; };