added router
This commit is contained in:
parent
27ed41d4fb
commit
b9c90bb7f9
|
@ -49,6 +49,7 @@ const routes = (
|
|||
<Route exact path='/test2' component={SignUp} />
|
||||
<Route exact path='/test3' component={SignIn} />
|
||||
<Route exact path='/probe_list' component={ProbeList} />
|
||||
<Route exact path='/sensor_list' component={SensorList} />
|
||||
|
||||
|
||||
</Switch>
|
||||
|
|
|
@ -3,11 +3,13 @@
|
|||
|
||||
|
||||
export function int2ip(ipInt: number): string {
|
||||
// tslint:disable-next-line:no-bitwise
|
||||
return ((ipInt >>> 24) + '.' + (ipInt >> 16 & 255) + '.' + (ipInt >> 8 & 255) + '.' + (ipInt & 255));
|
||||
}
|
||||
|
||||
export function ip2int(ip: string): number {
|
||||
return ip.split('.').reduce(function (ipInt, octet) { return (ipInt << 8) + parseInt(octet, 10); }, 0) >>> 0;
|
||||
// tslint:disable-next-line:no-bitwise
|
||||
return ip.split('.').reduce<number>(function (ipInt: number, octet: string) { return (ipInt << 8) + parseInt(octet, 10); }, 0) >>> 0;
|
||||
}
|
||||
|
||||
export function sec2date(ms: number): string {
|
||||
|
|
23
src/ts/@overflow/sensor/react/SensorConfiguration.tsx
Normal file
23
src/ts/@overflow/sensor/react/SensorConfiguration.tsx
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { connect, Dispatch } from 'react-redux';
|
||||
import {
|
||||
SensorConfiguration,
|
||||
SensorConfigurationStateProps,
|
||||
SensorConfigurationDispatchProps,
|
||||
} from './components/SensorConfiguration';
|
||||
// import State from '../redux/state/ReadAllByTarget';
|
||||
|
||||
// import * as ReadAllByTargetActions from '../redux/action/read_all_by_target';
|
||||
// FIXME::....
|
||||
|
||||
export function mapStateToProps(state: any): SensorConfigurationStateProps {
|
||||
return {
|
||||
};
|
||||
}
|
||||
|
||||
export function mapDispatchToProps(dispatch: Dispatch<any>): SensorConfigurationDispatchProps {
|
||||
return {
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(SensorConfiguration);
|
|
@ -4,7 +4,11 @@ import { Grid, Image, Label, Segment, Dropdown, Input, List, Accordion, Loader }
|
|||
|
||||
import MetaCrawler from '@overflow/meta/api/model/MetaCrawler';
|
||||
|
||||
export interface SensorConfigurationProps {
|
||||
export interface SensorConfigurationStateProps {
|
||||
|
||||
}
|
||||
|
||||
export interface SensorConfigurationDispatchProps {
|
||||
|
||||
}
|
||||
|
||||
|
@ -12,6 +16,8 @@ export interface SensorConfigurationState {
|
|||
|
||||
}
|
||||
|
||||
export type SensorConfigurationProps = SensorConfigurationStateProps & SensorConfigurationDispatchProps;
|
||||
|
||||
export class SensorConfiguration extends React.Component<SensorConfigurationProps, SensorConfigurationState> {
|
||||
|
||||
constructor(props: SensorConfigurationProps, context: SensorConfigurationState) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user