mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: start Connector page
This commit is contained in:
8
assets/components/tracking/ConnectorForm.tsx
Normal file
8
assets/components/tracking/ConnectorForm.tsx
Normal file
@@ -0,0 +1,8 @@
|
||||
import {FormInstance} from "antd";
|
||||
import React from "react";
|
||||
import {Connector} from "../../utils/api/connectors";
|
||||
|
||||
export function ConnectorForm({form, onCreate}: { form: FormInstance, onCreate: (values: Connector) => void }) {
|
||||
return <>
|
||||
</>
|
||||
}
|
||||
28
assets/components/tracking/ConnectorsList.tsx
Normal file
28
assets/components/tracking/ConnectorsList.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import {Card, Divider, Popconfirm, Typography} from "antd";
|
||||
import {t} from "ttag";
|
||||
import {DeleteFilled} from "@ant-design/icons";
|
||||
import React from "react";
|
||||
import {Connector, deleteConnector} from "../../utils/api/connectors";
|
||||
|
||||
type ConnectorElement = Connector & { id: string }
|
||||
|
||||
export function ConnectorsList({connectors, onDelete}: { connectors: ConnectorElement[], onDelete: () => void }) {
|
||||
return <>
|
||||
{connectors.map(connector =>
|
||||
<>
|
||||
<Card title={t`Connector ${connector.id}`} extra={<Popconfirm
|
||||
title={t`Delete the Connector`}
|
||||
description={t`Are you sure to delete this Connector?`}
|
||||
onConfirm={() => deleteConnector(connector.id).then(onDelete)}
|
||||
okText={t`Yes`}
|
||||
cancelText={t`No`}
|
||||
><DeleteFilled/> </Popconfirm>}>
|
||||
<Typography.Paragraph>
|
||||
{t`Provider`} : {connector.provider}
|
||||
</Typography.Paragraph>
|
||||
</Card>
|
||||
<Divider/>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
}
|
||||
Reference in New Issue
Block a user