mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 23:19:09 +00:00
lint
This commit is contained in:
@@ -1,5 +1,14 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { Alias, OSCSettings, Subscription, ProjectData, Settings, UserFields, ViewSettings, HTTPSettings } from 'ontime-types';
|
import {
|
||||||
|
Alias,
|
||||||
|
OSCSettings,
|
||||||
|
Subscription,
|
||||||
|
ProjectData,
|
||||||
|
Settings,
|
||||||
|
UserFields,
|
||||||
|
ViewSettings,
|
||||||
|
HTTPSettings,
|
||||||
|
} from 'ontime-types';
|
||||||
|
|
||||||
import { apiRepoLatest } from '../../externals';
|
import { apiRepoLatest } from '../../externals';
|
||||||
import { InfoType } from '../models/Info';
|
import { InfoType } from '../models/Info';
|
||||||
@@ -98,9 +107,9 @@ export async function getOSC(): Promise<OSCSettings> {
|
|||||||
* @return {Promise}
|
* @return {Promise}
|
||||||
*/
|
*/
|
||||||
export async function getHTTP(): Promise<HTTPSettings> {
|
export async function getHTTP(): Promise<HTTPSettings> {
|
||||||
console.log('getHTTP')
|
console.log('getHTTP');
|
||||||
const res = await axios.get(`${ontimeURL}/http`);
|
const res = await axios.get(`${ontimeURL}/http`);
|
||||||
console.log(res)
|
console.log(res);
|
||||||
|
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import useHttpSettings, { usePostHttpSubscriptions } from '../../../common/hooks
|
|||||||
import { useEmitLog } from '../../../common/stores/logger';
|
import { useEmitLog } from '../../../common/stores/logger';
|
||||||
import ModalLoader from '../modal-loader/ModalLoader';
|
import ModalLoader from '../modal-loader/ModalLoader';
|
||||||
import OntimeModalFooter from '../OntimeModalFooter';
|
import OntimeModalFooter from '../OntimeModalFooter';
|
||||||
// import { Switch } from '@chakra-ui/react';
|
|
||||||
import SubscriptionRow from './SubscriptionRow';
|
import SubscriptionRow from './SubscriptionRow';
|
||||||
|
|
||||||
import styles from '../Modal.module.scss';
|
import styles from '../Modal.module.scss';
|
||||||
@@ -92,7 +91,7 @@ export default function HttpIntegration() {
|
|||||||
return <ModalLoader />;
|
return <ModalLoader />;
|
||||||
}
|
}
|
||||||
const placeholder = 'http://x.x.x.x:xxxx/api/path';
|
const placeholder = 'http://x.x.x.x:xxxx/api/path';
|
||||||
//TODO: add golobal off
|
//TODO: add golobal off
|
||||||
return (
|
return (
|
||||||
<form onSubmit={handleSubmit(onSubmit)} className={styles.sectionContainer} id='http-subscriptions'>
|
<form onSubmit={handleSubmit(onSubmit)} className={styles.sectionContainer} id='http-subscriptions'>
|
||||||
{/* <div className={styles.splitSection}>
|
{/* <div className={styles.splitSection}>
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ export default function OscIntegration() {
|
|||||||
if (isFetching) {
|
if (isFetching) {
|
||||||
return <ModalLoader />;
|
return <ModalLoader />;
|
||||||
}
|
}
|
||||||
const placeholder = 'OSC message'
|
const placeholder = 'OSC message';
|
||||||
return (
|
return (
|
||||||
<form onSubmit={handleSubmit(onSubmit)} className={styles.sectionContainer} id='osc-subscriptions'>
|
<form onSubmit={handleSubmit(onSubmit)} className={styles.sectionContainer} id='osc-subscriptions'>
|
||||||
<SubscriptionRow
|
<SubscriptionRow
|
||||||
|
|||||||
@@ -17,11 +17,11 @@ interface SubscriptionRowProps {
|
|||||||
setShowSection: (cycle: TimerLifeCycle) => void;
|
setShowSection: (cycle: TimerLifeCycle) => void;
|
||||||
register: UseFormRegister<Subscription>;
|
register: UseFormRegister<Subscription>;
|
||||||
control: Control<Subscription>;
|
control: Control<Subscription>;
|
||||||
placeholder: string
|
placeholder: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function SubscriptionRow(props: SubscriptionRowProps) {
|
export default function SubscriptionRow(props: SubscriptionRowProps) {
|
||||||
const { cycle, title, subtitle, visible, setShowSection, register, control , placeholder} = props;
|
const { cycle, title, subtitle, visible, setShowSection, register, control, placeholder } = props;
|
||||||
const { emitError } = useEmitLog();
|
const { emitError } = useEmitLog();
|
||||||
const { fields, append, remove } = useFieldArray({
|
const { fields, append, remove } = useFieldArray({
|
||||||
name: cycle,
|
name: cycle,
|
||||||
|
|||||||
Reference in New Issue
Block a user