fixed interval string -> number
This commit is contained in:
parent
45c9b0d5fd
commit
cf68a1de76
|
@ -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 ETCSelectorProps {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ETCSelectorState {
|
export interface ETCSelectorState {
|
||||||
interval: string;
|
interval: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ETCSelector extends React.Component<ETCSelectorProps, ETCSelectorState> {
|
export class ETCSelector extends React.Component<ETCSelectorProps, ETCSelectorState> {
|
||||||
constructor(props: any, context: any) {
|
constructor(props: any, context: any) {
|
||||||
super(props, context);
|
super(props, context);
|
||||||
// this.state = {
|
this.state = {
|
||||||
// interval: 5,
|
interval: 5,
|
||||||
// };
|
};
|
||||||
}
|
}
|
||||||
public handleIntervalChange(e: any, { value }: any): void {
|
public handleIntervalChange(e: any, { value }: any): void {
|
||||||
this.setState({ interval: value });
|
this.setState({ interval: value });
|
||||||
|
@ -446,7 +404,7 @@ export class ETCSelector extends React.Component<ETCSelectorProps, ETCSelectorSt
|
||||||
label='5 seconds'
|
label='5 seconds'
|
||||||
name='radioGroup'
|
name='radioGroup'
|
||||||
value='5'
|
value='5'
|
||||||
checked={this.state.interval === '5'}
|
checked={this.state.interval === 5}
|
||||||
onChange={this.handleIntervalChange}
|
onChange={this.handleIntervalChange}
|
||||||
/>
|
/>
|
||||||
</Form.Field>
|
</Form.Field>
|
||||||
|
@ -455,7 +413,7 @@ export class ETCSelector extends React.Component<ETCSelectorProps, ETCSelectorSt
|
||||||
label='10 seconds'
|
label='10 seconds'
|
||||||
name='radioGroup'
|
name='radioGroup'
|
||||||
value='10'
|
value='10'
|
||||||
checked={this.state.interval === '10'}
|
checked={this.state.interval === 10}
|
||||||
onChange={this.handleIntervalChange}
|
onChange={this.handleIntervalChange}
|
||||||
/>
|
/>
|
||||||
</Form.Field>
|
</Form.Field>
|
||||||
|
@ -464,7 +422,7 @@ export class ETCSelector extends React.Component<ETCSelectorProps, ETCSelectorSt
|
||||||
label='15 seconds'
|
label='15 seconds'
|
||||||
name='radioGroup'
|
name='radioGroup'
|
||||||
value='15'
|
value='15'
|
||||||
checked={this.state.interval === '15'}
|
checked={this.state.interval === 15}
|
||||||
onChange={this.handleIntervalChange}
|
onChange={this.handleIntervalChange}
|
||||||
/>
|
/>
|
||||||
</Form.Field>
|
</Form.Field>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user