mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: add GANDI provider
This commit is contained in:
@@ -90,6 +90,29 @@ export function ConnectorForm({form, onCreate}: { form: FormInstance, onCreate:
|
||||
>
|
||||
<Select options={ovhPricingMode} optionFilterProp="label"/>
|
||||
</Form.Item>
|
||||
</>
|
||||
}
|
||||
{
|
||||
provider === ConnectorProvider.GANDI && <>
|
||||
<Form.Item
|
||||
label={t`Personal Access Token (PAT)`}
|
||||
name={['authData', 'token']}
|
||||
rules={[{required: true, message: t`Required`}]}>
|
||||
<Input autoComplete='off'/>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t`Organization sharing ID`}
|
||||
name={['authData', 'sharingId']}
|
||||
help={<Typography.Text
|
||||
type='secondary'>{t`It indicates the organization that will pay for the ordered product`}</Typography.Text>}
|
||||
required={false}>
|
||||
<Input autoComplete='off' placeholder='xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'/>
|
||||
</Form.Item>
|
||||
</>
|
||||
}
|
||||
|
||||
{
|
||||
provider !== undefined && <>
|
||||
<Form.Item
|
||||
valuePropName="checked"
|
||||
label={t`API Terms of Service`}
|
||||
@@ -124,7 +147,6 @@ export function ConnectorForm({form, onCreate}: { form: FormInstance, onCreate:
|
||||
</>
|
||||
}
|
||||
|
||||
|
||||
<Form.Item style={{marginTop: 10}}>
|
||||
<Space>
|
||||
<Button type="primary" htmlType="submit">
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import {request} from "./index";
|
||||
|
||||
export enum ConnectorProvider {
|
||||
OVH = 'ovh'
|
||||
OVH = 'ovh',
|
||||
GANDI = 'gandi'
|
||||
}
|
||||
|
||||
export type Connector = {
|
||||
|
||||
@@ -10,8 +10,14 @@ export const helpGetTokenLink = (provider?: string) => {
|
||||
href="https://api.ovh.com/createToken/index.cgi?GET=/order/cart&GET=/order/cart/*&POST=/order/cart&POST=/order/cart/*&DELETE=/order/cart/*">
|
||||
{t`Retrieve a set of tokens from your customer account on the Provider's website`}
|
||||
</Typography.Link>
|
||||
|
||||
case ConnectorProvider.GANDI:
|
||||
return <Typography.Link target='_blank' href="https://admin.gandi.net/organizations/account/pat">
|
||||
{t`Retrieve a Personal Access Token from your customer account on the Provider's website`}
|
||||
</Typography.Link>
|
||||
default:
|
||||
return <></>
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +25,8 @@ export const tosHyperlink = (provider?: string) => {
|
||||
switch (provider) {
|
||||
case ConnectorProvider.OVH:
|
||||
return 'https://www.ovhcloud.com/fr/terms-and-conditions/contracts/'
|
||||
case ConnectorProvider.GANDI:
|
||||
return 'https://www.gandi.net/en/contracts/terms-of-service'
|
||||
default:
|
||||
return ''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user