mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-10 01:43:43 +00:00
2586b0b10c
* addtime endpoint * create universal Subscription * add http integration * catch error from HTTP integration emit * unify osc and http validateSubscriptionEntry * add necessary endpoint for http subscription * make subscription part of modal generic * add http subscription to integration modal * remove log * Revert "addtime endpoint" This reverts commit4c039220dc. * reuse agent and test url compatibility * simplify retun path * add todo in UI * test for http protocol * import not needed yet * lint * fix merge * lint * fix httpPlaceholder * wip: prepare endpoints * wip: temporary fix to get form to work * disable HTTP integration if enabledOut==false * register/unregister http * refactor: subscription types and form register * refactor: validation * cleanup * cleanup * try GOT * allow https * split url and searchParams allow for post option * add options to post * add retry count * fix test * Revert "fix test" This reverts commit927e88370f. * Revert "add options to post" This reverts commit0523a68ef4. * Revert "split url and searchParams allow for post option" This reverts commit54ab8d4ffe. * missing retryCount in httpPlaceholder * remove global this * remove retry count * remove https --------- Co-authored-by: Carlos Valente <carlosvalente@pm.me>
52 lines
1.4 KiB
TypeScript
52 lines
1.4 KiB
TypeScript
import { ModalBody, Tab, TabList, TabPanel, TabPanels, Tabs } from '@chakra-ui/react';
|
|
|
|
import ModalWrapper from '../ModalWrapper';
|
|
|
|
import HttpIntegration from './http/HttpIntegration';
|
|
import OscIntegration from './osc/OscIntegration';
|
|
import OscSettings from './osc/OscSettings';
|
|
|
|
import styles from '../Modal.module.scss';
|
|
|
|
interface IntegrationModalProps {
|
|
isOpen: boolean;
|
|
onClose: () => void;
|
|
}
|
|
|
|
const oscDocsUrl = 'https://ontime.gitbook.io/v2/control-and-feedback/integrations';
|
|
|
|
export default function IntegrationModal(props: IntegrationModalProps) {
|
|
const { isOpen, onClose } = props;
|
|
|
|
return (
|
|
<ModalWrapper title='Integration Settings' isOpen={isOpen} onClose={onClose}>
|
|
<ModalBody>
|
|
<div className={styles.headerNotes}>
|
|
Manage settings related to protocol integrations
|
|
<a href={oscDocsUrl} target='_blank' rel='noreferrer'>
|
|
Read the docs
|
|
</a>
|
|
</div>
|
|
<Tabs variant='ontime' size='sm' isLazy>
|
|
<TabList>
|
|
<Tab>OSC</Tab>
|
|
<Tab>OSC Integration</Tab>
|
|
<Tab>HTTP Integration</Tab>
|
|
</TabList>
|
|
<TabPanels>
|
|
<TabPanel>
|
|
<OscSettings />
|
|
</TabPanel>
|
|
<TabPanel>
|
|
<OscIntegration />
|
|
</TabPanel>
|
|
<TabPanel>
|
|
<HttpIntegration />
|
|
</TabPanel>
|
|
</TabPanels>
|
|
</Tabs>
|
|
</ModalBody>
|
|
</ModalWrapper>
|
|
);
|
|
}
|