mirror of
https://github.com/harness/drone.git
synced 2025-05-18 09:59:57 +08:00
fix: [CDE-629]: Infra project level apis are deprecated, so made changes to the Infra APIs used in CDE (#3518)
* fix: Infra project level apis are deprecated
This commit is contained in:
parent
7962ec99ce
commit
f751984c6e
@ -20,7 +20,7 @@ import { Layout } from '@harnessio/uicore'
|
|||||||
import { useFormikContext } from 'formik'
|
import { useFormikContext } from 'formik'
|
||||||
import { useParams } from 'react-router-dom'
|
import { useParams } from 'react-router-dom'
|
||||||
import { CDEPathParams, useGetCDEAPIParams } from 'cde-gitness/hooks/useGetCDEAPIParams'
|
import { CDEPathParams, useGetCDEAPIParams } from 'cde-gitness/hooks/useGetCDEAPIParams'
|
||||||
import { OpenapiCreateGitspaceRequest, useGetInfraProviderDeprecated } from 'services/cde'
|
import { OpenapiCreateGitspaceRequest, useGetInfraProvider } from 'services/cde'
|
||||||
import { useAppContext } from 'AppContext'
|
import { useAppContext } from 'AppContext'
|
||||||
import { SelectRegion } from '../SelectRegion/SelectRegion'
|
import { SelectRegion } from '../SelectRegion/SelectRegion'
|
||||||
import { SelectMachine } from '../SelectMachine/SelectMachine'
|
import { SelectMachine } from '../SelectMachine/SelectMachine'
|
||||||
@ -30,12 +30,10 @@ export const SelectInfraProvider = () => {
|
|||||||
const { hooks } = useAppContext()
|
const { hooks } = useAppContext()
|
||||||
const { CDE_OVH_ENABLED } = hooks?.useFeatureFlags()
|
const { CDE_OVH_ENABLED } = hooks?.useFeatureFlags()
|
||||||
const { values, setFieldValue: onChange } = useFormikContext<OpenapiCreateGitspaceRequest>()
|
const { values, setFieldValue: onChange } = useFormikContext<OpenapiCreateGitspaceRequest>()
|
||||||
const { accountIdentifier = '', projectIdentifier = '', orgIdentifier = '' } = useGetCDEAPIParams() as CDEPathParams
|
const { accountIdentifier = '' } = useGetCDEAPIParams() as CDEPathParams
|
||||||
|
|
||||||
const { data } = useGetInfraProviderDeprecated({
|
const { data } = useGetInfraProvider({
|
||||||
accountIdentifier,
|
accountIdentifier,
|
||||||
projectIdentifier,
|
|
||||||
orgIdentifier,
|
|
||||||
infraprovider_identifier: values?.metadata?.infraProvider as string
|
infraprovider_identifier: values?.metadata?.infraProvider as string
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user