fixed interval string -> number

This commit is contained in:
snoop 2017-07-26 15:33:29 +09:00
parent 45c9b0d5fd
commit cf68a1de76

View File

@ -370,63 +370,21 @@ export class CrawlerAuthInputs extends React.Component<CrawlerAuthInputsProps, C
}
}
export interface SensorItemSelectorProps {
}
export interface SensorItemSelectorState {
}
export class SensorItemSelector extends React.Component<SensorItemSelectorProps, SensorItemSelectorState> {
constructor(props: any, context: any) {
super(props, context);
this.state = {
};
}
public render(): JSX.Element {
return (
<Accordion exclusive={false} styled>
<Accordion.Title>
<Icon name='dropdown' />
<Checkbox label='CPU' />
</Accordion.Title>
<Accordion.Content>
<Checkbox label='cpu.free' /><br />
<Checkbox label='cpu.free' /><br />
</Accordion.Content>
<Accordion.Title>
<Icon name='dropdown' />
<Checkbox label='MEM' />
</Accordion.Title>
<Accordion.Content>
<Checkbox label='cpu.free' /><br />
<Checkbox label='cpu.free' /><br />
</Accordion.Content>
</Accordion>
);
}
}
export interface ETCSelectorProps {
}
export interface ETCSelectorState {
interval: string;
interval: number;
}
export class ETCSelector extends React.Component<ETCSelectorProps, ETCSelectorState> {
constructor(props: any, context: any) {
super(props, context);
// this.state = {
// interval: 5,
// };
this.state = {
interval: 5,
};
}
public handleIntervalChange(e: any, { value }: any): void {
this.setState({ interval: value });
@ -446,7 +404,7 @@ export class ETCSelector extends React.Component<ETCSelectorProps, ETCSelectorSt
label='5 seconds'
name='radioGroup'
value='5'
checked={this.state.interval === '5'}
checked={this.state.interval === 5}
onChange={this.handleIntervalChange}
/>
</Form.Field>
@ -455,7 +413,7 @@ export class ETCSelector extends React.Component<ETCSelectorProps, ETCSelectorSt
label='10 seconds'
name='radioGroup'
value='10'
checked={this.state.interval === '10'}
checked={this.state.interval === 10}
onChange={this.handleIntervalChange}
/>
</Form.Field>
@ -464,7 +422,7 @@ export class ETCSelector extends React.Component<ETCSelectorProps, ETCSelectorSt
label='15 seconds'
name='radioGroup'
value='15'
checked={this.state.interval === '15'}
checked={this.state.interval === 15}
onChange={this.handleIntervalChange}
/>
</Form.Field>