diff --git a/src/ts/@overflow/app/redux/reducer/index.ts b/src/ts/@overflow/app/redux/reducer/index.ts index 8b15df8..dba0d32 100644 --- a/src/ts/@overflow/app/redux/reducer/index.ts +++ b/src/ts/@overflow/app/redux/reducer/index.ts @@ -1,9 +1,9 @@ import { Action, combineReducers } from 'redux'; import State from '../state'; -import { reducer as signinReducer} from '@overflow/member/redux/reducer/signin'; -import { reducer as signoutReducer} from '@overflow/member/redux/reducer/signout'; -import { reducer as signupReducer} from '@overflow/member/redux/reducer/signup'; +import { reducer as signinReducer} from '@overflow/member/redux/reducer/signIn'; +import { reducer as signoutReducer} from '@overflow/member/redux/reducer/signOut'; +import { reducer as signupReducer} from '@overflow/member/redux/reducer/signUp'; import { ConnectedRouter } from 'react-router-redux'; diff --git a/src/ts/@overflow/app/redux/saga/index.ts b/src/ts/@overflow/app/redux/saga/index.ts index 8ac9555..5929e4c 100644 --- a/src/ts/@overflow/app/redux/saga/index.ts +++ b/src/ts/@overflow/app/redux/saga/index.ts @@ -1,7 +1,7 @@ import { SagaIterator } from 'redux-saga'; import { fork } from 'redux-saga/effects'; -import { watchSignin as memberWatchSignin } from '@overflow/member/redux/saga/signin'; +import { watchSignin as memberWatchSignin } from '@overflow/member/redux/saga/signIn'; export default function* sagas(): SagaIterator { yield fork(memberWatchSignin); diff --git a/src/ts/@overflow/app/views/member/SignOut.tsx b/src/ts/@overflow/app/views/member/SignOut.tsx index e69de29..3f1b2e1 100644 --- a/src/ts/@overflow/app/views/member/SignOut.tsx +++ b/src/ts/@overflow/app/views/member/SignOut.tsx @@ -0,0 +1,30 @@ +import * as React from 'react'; +import { RouteComponentProps } from 'react-router'; +import SignInContainer from '@overflow/member/react/SignIn'; +import WebSocketRPC from '@overflow/commons/websocket/WebSocketRPC'; +import AppContext from '@overflow/commons/context'; +import inject from '@overflow/commons/context/decorator/inject'; + +class SignOut extends React.Component, object> { + @inject() + private client: WebSocketRPC; + + public constructor(props?: RouteComponentProps, context?: object) { + super(props, context); + + let con = AppContext.get(); + } + + public render(): JSX.Element { + return ( + + ); + } + + private test(@inject() c: WebSocketRPC): void { + console.log(''); + } +} + + +export default SignOut; diff --git a/src/ts/@overflow/app/views/member/SignUp.tsx b/src/ts/@overflow/app/views/member/SignUp.tsx index e69de29..9c255c5 100644 --- a/src/ts/@overflow/app/views/member/SignUp.tsx +++ b/src/ts/@overflow/app/views/member/SignUp.tsx @@ -0,0 +1,30 @@ +import * as React from 'react'; +import { RouteComponentProps } from 'react-router'; +import SignUpContainer from '@overflow/member/react/SignUp'; +import WebSocketRPC from '@overflow/commons/websocket/WebSocketRPC'; +import AppContext from '@overflow/commons/context'; +import inject from '@overflow/commons/context/decorator/inject'; + +class SignIUp extends React.Component, object> { + @inject() + private client: WebSocketRPC; + + public constructor(props?: RouteComponentProps, context?: object) { + super(props, context); + + let con = AppContext.get(); + } + + public render(): JSX.Element { + return ( + + ); + } + + private test(@inject() c: WebSocketRPC): void { + console.log(''); + } +} + + +export default SignIUp; diff --git a/src/ts/@overflow/discovery/react/components/Discovery.tsx b/src/ts/@overflow/discovery/react/components/Discovery.tsx index e69de29..ed7baa2 100644 --- a/src/ts/@overflow/discovery/react/components/Discovery.tsx +++ b/src/ts/@overflow/discovery/react/components/Discovery.tsx @@ -0,0 +1,98 @@ +import * as React from 'react'; +import { + Button, + Modal, + Checkbox, + Header, + Container, +} from 'semantic-ui-react'; +import { DiscoveryProbe } from './DiscoveryProbe'; +import { DiscoveryTable } from './DiscoveryTable'; + +export interface Props { + +} + +export interface State { + startPopup:boolean; + probeTemp: any; +} + +const probeTemp:Object = { + 'id': '11', + 'metaProbeStatus': { + 'name': 'STARTED', + }, + 'domain': { + 'name': 'overFlow\'s domain111', + }, + 'host': { + 'ip': '192.168.1.103', + 'mac': '44:8a:5b:44:8c:e8', + 'os': 'Ubuntu 17.04', + 'name': '?????', + }, + 'createAt': '2017-07-12', + 'probeKey': 'AGBLKDFJ2452ASDGFL2KWJLKSDJ', + 'description': 'description1111111111', + 'lastPollingAt': '2017-07-12 14:20', + 'nextPollingAt': '2017-07-12 14:30', +}; + +export class Discovery extends React.Component { + + private submitData: any; + + public constructor(props: Props, context: State) { + super(props, context); + this.handleProbeChange.bind(this); + this.state = { + startPopup:false, + probeTemp:probeTemp, + }; + } + + public componentWillMount():void { + super.componentWillMount(); + + + } + + public handleProbeChange(obj: Object): void { + console.log(obj); + this.setState({ startPopup:true }); + this.submitData = obj; + } + + public handleSubmit(): void { + console.log(this.submitData); + } + + public handleCancel= () => this.setState({ startPopup: false }); + + public handlePopupClose = () => this.setState({ startPopup: false }); + + public render(): JSX.Element { + return ( + +
Discovery Details
+ +
+ + + + Change your password Enter email address. + + + + + + + + + +
+ + ); + } +} diff --git a/src/ts/@overflow/temp/react/components/DiscoveryProbe.tsx b/src/ts/@overflow/discovery/react/components/DiscoveryProbe.tsx similarity index 100% rename from src/ts/@overflow/temp/react/components/DiscoveryProbe.tsx rename to src/ts/@overflow/discovery/react/components/DiscoveryProbe.tsx diff --git a/src/ts/@overflow/temp/react/components/DiscoveryTable.tsx b/src/ts/@overflow/discovery/react/components/DiscoveryTable.tsx similarity index 100% rename from src/ts/@overflow/temp/react/components/DiscoveryTable.tsx rename to src/ts/@overflow/discovery/react/components/DiscoveryTable.tsx diff --git a/src/ts/@overflow/member/react/SignIn.tsx b/src/ts/@overflow/member/react/SignIn.tsx index 70b62ca..9c612c9 100644 --- a/src/ts/@overflow/member/react/SignIn.tsx +++ b/src/ts/@overflow/member/react/SignIn.tsx @@ -4,18 +4,18 @@ import { Props as SignInProps, State as SignInState, } from './components/SignIn'; -import State from '../redux/state/Signin'; +import State from '../redux/state/SignIn'; -import * as signinActions from '../redux/action/signin'; +import * as signinActions from '../redux/action/signIn'; -export function mapStateToProps(state: any): SignInProps { +export function mapStateToProps(state: SignInState): SignInProps { return { }; } -export function mapDispatchToProps(dispatch: Dispatch): SignInProps { +export function mapDispatchToProps(dispatch: Dispatch): SignInProps { return { onSignin: (signinId: string, signinPw: string) => { dispatch(signinActions.request(signinId, signinPw)); diff --git a/src/ts/@overflow/member/react/SignUp.tsx b/src/ts/@overflow/member/react/SignUp.tsx new file mode 100644 index 0000000..dd9b004 --- /dev/null +++ b/src/ts/@overflow/member/react/SignUp.tsx @@ -0,0 +1,34 @@ +import { connect, Dispatch } from 'react-redux'; +import Member from '../api/model/Member'; + +import { + SignUp, + Props as SignUpProps, + State as SignUpState, +} from './components/SignUp'; +import State from '../redux/state/SignUp'; + +import * as signupActions from '../redux/action/signUp'; + + +export function mapStateToProps(state: SignUpState): SignUpProps { + return { + + }; +} + +export function mapDispatchToProps(dispatch: Dispatch): SignUpProps { + return { + onSignin: () => { + return; + }, + onSignup: (member: Member) => { + dispatch(signupActions.request(member)); + }, + onResetPassword: () => { + return; + }, + }; +} + +export default connect(mapStateToProps, mapDispatchToProps)(SignUp); diff --git a/src/ts/@overflow/member/redux/action/signin.ts b/src/ts/@overflow/member/redux/action/signIn.ts similarity index 96% rename from src/ts/@overflow/member/redux/action/signin.ts rename to src/ts/@overflow/member/redux/action/signIn.ts index 9ec4917..dd467a4 100644 --- a/src/ts/@overflow/member/redux/action/signin.ts +++ b/src/ts/@overflow/member/redux/action/signIn.ts @@ -1,7 +1,7 @@ import Action from '@overflow/commons/redux/Action'; import Member from '@overflow/member/api/model/Member'; -import SigninPayload from '../payload/SigninPayload'; +import SigninPayload from '../payload/SignInPayload'; // Action Type export type REQUEST = '@overflow/member/signin/REQUEST'; diff --git a/src/ts/@overflow/member/redux/action/signout.ts b/src/ts/@overflow/member/redux/action/signOut.ts similarity index 100% rename from src/ts/@overflow/member/redux/action/signout.ts rename to src/ts/@overflow/member/redux/action/signOut.ts diff --git a/src/ts/@overflow/member/redux/action/signup.ts b/src/ts/@overflow/member/redux/action/signUp.ts similarity index 95% rename from src/ts/@overflow/member/redux/action/signup.ts rename to src/ts/@overflow/member/redux/action/signUp.ts index 0cc1a91..00a90f8 100644 --- a/src/ts/@overflow/member/redux/action/signup.ts +++ b/src/ts/@overflow/member/redux/action/signUp.ts @@ -1,7 +1,7 @@ import Action from '@overflow/commons/redux/Action'; import Member from '@overflow/member/api/model/Member'; -import SigninPayload from '../payload/SigninPayload'; +import SigninPayload from '../payload/SignInPayload'; // Action Type export type REQUEST = '@overflow/member/signup/REQUEST'; diff --git a/src/ts/@overflow/member/redux/payload/SigninPayload.ts b/src/ts/@overflow/member/redux/payload/SignInPayload.ts similarity index 100% rename from src/ts/@overflow/member/redux/payload/SigninPayload.ts rename to src/ts/@overflow/member/redux/payload/SignInPayload.ts diff --git a/src/ts/@overflow/member/redux/payload/SignoutPayload.ts b/src/ts/@overflow/member/redux/payload/SignOutPayload.ts similarity index 100% rename from src/ts/@overflow/member/redux/payload/SignoutPayload.ts rename to src/ts/@overflow/member/redux/payload/SignOutPayload.ts diff --git a/src/ts/@overflow/member/redux/payload/SignupPayload.ts b/src/ts/@overflow/member/redux/payload/SignUpPayload.ts similarity index 100% rename from src/ts/@overflow/member/redux/payload/SignupPayload.ts rename to src/ts/@overflow/member/redux/payload/SignUpPayload.ts diff --git a/src/ts/@overflow/member/redux/reducer/signin.ts b/src/ts/@overflow/member/redux/reducer/signIn.ts similarity index 91% rename from src/ts/@overflow/member/redux/reducer/signin.ts rename to src/ts/@overflow/member/redux/reducer/signIn.ts index 1126991..f0ffafc 100644 --- a/src/ts/@overflow/member/redux/reducer/signin.ts +++ b/src/ts/@overflow/member/redux/reducer/signIn.ts @@ -1,8 +1,8 @@ import Action from '@overflow/commons/redux/Action'; import Member from '@overflow/member/api/model/Member'; -import * as SigninActionTypes from '../action/signin'; -import SigninState, { defaultState as signinDefaultState } from '../state/Signin'; +import * as SigninActionTypes from '../action/signIn'; +import SigninState, { defaultState as signinDefaultState } from '../state/SignIn'; export type reducer = (state: SigninState, action: Action) => SigninState; diff --git a/src/ts/@overflow/member/redux/reducer/signout.ts b/src/ts/@overflow/member/redux/reducer/signOut.ts similarity index 89% rename from src/ts/@overflow/member/redux/reducer/signout.ts rename to src/ts/@overflow/member/redux/reducer/signOut.ts index f078227..6c3d3bc 100644 --- a/src/ts/@overflow/member/redux/reducer/signout.ts +++ b/src/ts/@overflow/member/redux/reducer/signOut.ts @@ -1,8 +1,8 @@ import Action from '@overflow/commons/redux/Action'; import Member from '@overflow/member/api/model/Member'; -import * as SignoutActionTypes from '../action/signout'; -import SigninState, { defaultState as signinDefaultState } from '../state/Signin'; +import * as SignoutActionTypes from '../action/signOut'; +import SigninState, { defaultState as signinDefaultState } from '../state/SignIn'; export type reducer = (state: SigninState, action: Action) => SigninState; diff --git a/src/ts/@overflow/member/redux/reducer/signup.ts b/src/ts/@overflow/member/redux/reducer/signUp.ts similarity index 91% rename from src/ts/@overflow/member/redux/reducer/signup.ts rename to src/ts/@overflow/member/redux/reducer/signUp.ts index 9e41bc5..8085dc5 100644 --- a/src/ts/@overflow/member/redux/reducer/signup.ts +++ b/src/ts/@overflow/member/redux/reducer/signUp.ts @@ -1,8 +1,8 @@ import Action from '@overflow/commons/redux/Action'; import Member from '@overflow/member/api/model/Member'; -import * as SignupActionTypes from '../action/signup'; -import SignupState, { defaultState as signupDefaultState } from '../state/Signup'; +import * as SignupActionTypes from '../action/signUp'; +import SignupState, { defaultState as signupDefaultState } from '../state/SignUp'; export type reducer = (state: SignupState, action: Action) => SignupState; diff --git a/src/ts/@overflow/member/redux/saga/signin.ts b/src/ts/@overflow/member/redux/saga/signIn.ts similarity index 91% rename from src/ts/@overflow/member/redux/saga/signin.ts rename to src/ts/@overflow/member/redux/saga/signIn.ts index 906b087..1befd07 100644 --- a/src/ts/@overflow/member/redux/saga/signin.ts +++ b/src/ts/@overflow/member/redux/saga/signIn.ts @@ -7,8 +7,8 @@ import Action from '@overflow/commons/redux/Action'; import Member from '../../api/model/Member'; import MemberService from '../../api/service/MemberService'; -import * as SigninActions from '../action/signin'; -import SigninPayload from '../payload/SigninPayload'; +import * as SigninActions from '../action/signIn'; +import SigninPayload from '../payload/SignInPayload'; function* signin(action: Action): SagaIterator { try { diff --git a/src/ts/@overflow/member/redux/saga/signout.ts b/src/ts/@overflow/member/redux/saga/signOut.ts similarity index 90% rename from src/ts/@overflow/member/redux/saga/signout.ts rename to src/ts/@overflow/member/redux/saga/signOut.ts index a0906d8..a15ae13 100644 --- a/src/ts/@overflow/member/redux/saga/signout.ts +++ b/src/ts/@overflow/member/redux/saga/signOut.ts @@ -1,8 +1,8 @@ import Action from '@overflow/commons/redux/Action'; import Member from '@overflow/member/api/model/Member'; -import SignoutActionTypes from '../action/signout'; -import SigninState, { defaultState as signinDefaultState } from '../state/Signin'; +import SignoutActionTypes from '../action/signOut'; +import SigninState, { defaultState as signinDefaultState } from '../state/SignIn'; export type reducer = (state: SigninState, action: Action) => SigninState; diff --git a/src/ts/@overflow/member/redux/saga/signup.ts b/src/ts/@overflow/member/redux/saga/signUp.ts similarity index 91% rename from src/ts/@overflow/member/redux/saga/signup.ts rename to src/ts/@overflow/member/redux/saga/signUp.ts index 1bb8251..b9fed32 100644 --- a/src/ts/@overflow/member/redux/saga/signup.ts +++ b/src/ts/@overflow/member/redux/saga/signUp.ts @@ -1,8 +1,8 @@ import Action from '@overflow/commons/redux/Action'; import Member from '@overflow/member/api/model/Member'; -import SignupActionTypes from '../action/signup'; -import SignupState, { defaultState as signupDefaultState } from '../state/Signup'; +import SignupActionTypes from '../action/signUp'; +import SignupState, { defaultState as signupDefaultState } from '../state/SignUp'; export type reducer = (state: SignupState, action: Action) => SignupState; diff --git a/src/ts/@overflow/member/redux/state/Signin.ts b/src/ts/@overflow/member/redux/state/SignIn.ts similarity index 100% rename from src/ts/@overflow/member/redux/state/Signin.ts rename to src/ts/@overflow/member/redux/state/SignIn.ts diff --git a/src/ts/@overflow/member/redux/state/Signout.ts b/src/ts/@overflow/member/redux/state/SignOut.ts similarity index 100% rename from src/ts/@overflow/member/redux/state/Signout.ts rename to src/ts/@overflow/member/redux/state/SignOut.ts diff --git a/src/ts/@overflow/member/redux/state/Signup.ts b/src/ts/@overflow/member/redux/state/SignUp.ts similarity index 100% rename from src/ts/@overflow/member/redux/state/Signup.ts rename to src/ts/@overflow/member/redux/state/SignUp.ts diff --git a/src/ts/@overflow/temp/react/components/DiscoveryDetails.tsx b/src/ts/@overflow/temp/react/components/DiscoveryDetails.tsx deleted file mode 100644 index c5df4f5..0000000 --- a/src/ts/@overflow/temp/react/components/DiscoveryDetails.tsx +++ /dev/null @@ -1,98 +0,0 @@ -import * as React from 'react'; -import { - Button, - Modal, - Checkbox, - Header, - Container, -} from 'semantic-ui-react'; -import { DiscoveryProbe } from './DiscoveryProbe'; -import { DiscoveryTable } from './DiscoveryTable'; - -export interface Props { - -} - -export interface State { - startPopup:boolean; - probeTemp: any; -} - -const probeTemp:Object = { - 'id': '11', - 'metaProbeStatus': { - 'name': 'STARTED', - }, - 'domain': { - 'name': 'overFlow\'s domain111', - }, - 'host': { - 'ip': '192.168.1.103', - 'mac': '44:8a:5b:44:8c:e8', - 'os': 'Ubuntu 17.04', - 'name': '?????', - }, - 'createAt': '2017-07-12', - 'probeKey': 'AGBLKDFJ2452ASDGFL2KWJLKSDJ', - 'description': 'description1111111111', - 'lastPollingAt': '2017-07-12 14:20', - 'nextPollingAt': '2017-07-12 14:30', -}; - -export class DiscoveryDetails extends React.Component { - - private submitData: any; - - public constructor(props: Props, context: State) { - super(props, context); - this.handleProbeChange.bind(this); - this.state = { - startPopup:false, - probeTemp:probeTemp, - }; - } - - public componentWillMount():void { - super.componentWillMount(); - - - } - - public handleProbeChange(obj: Object): void { - console.log(obj); - this.setState({ startPopup:true }); - this.submitData = obj; - } - - public handleSubmit(): void { - console.log(this.submitData); - } - - public handleCancel= () => this.setState({ startPopup: false }); - - public handlePopupClose = () => this.setState({ startPopup: false }); - - public render(): JSX.Element { - return ( - -
Discovery Details
- -
- - - - Change your password Enter email address. - - - - - - - - - -
- - ); - } -}