From 33518da1070d1a156ec351f2576ce6ea747e38ca Mon Sep 17 00:00:00 2001 From: geek Date: Mon, 24 Jul 2017 17:58:48 +0900 Subject: [PATCH] Target Layout push --- .../views/infrastructure/target/Detail.tsx | 27 +++++ .../@overflow/app/views/layout/AppLayout.tsx | 2 + .../@overflow/app/views/layout/LeftMenu.tsx | 4 +- .../app/views/layout/TargetDetailLayout.tsx | 56 ++++++++++ .../@overflow/app/views/layout/TempLayout.tsx | 6 +- .../@overflow/target/react/TargetDetail.tsx | 2 +- src/ts/@overflow/target/react/TargetList.tsx | 24 ++-- .../target/react/components/TargetList.tsx | 11 +- .../temp/react/components/TableSort.tsx | 103 ++++++++++++++++++ 9 files changed, 219 insertions(+), 16 deletions(-) create mode 100644 src/ts/@overflow/app/views/infrastructure/target/Detail.tsx create mode 100644 src/ts/@overflow/app/views/layout/TargetDetailLayout.tsx create mode 100644 src/ts/@overflow/temp/react/components/TableSort.tsx diff --git a/src/ts/@overflow/app/views/infrastructure/target/Detail.tsx b/src/ts/@overflow/app/views/infrastructure/target/Detail.tsx new file mode 100644 index 0000000..6a3d43c --- /dev/null +++ b/src/ts/@overflow/app/views/infrastructure/target/Detail.tsx @@ -0,0 +1,27 @@ +import * as React from 'react'; +import { RouteComponentProps } from 'react-router'; +import TargetDetailContainer from '@overflow/target/react/TargetDetail'; +import WebSocketRPC from '@overflow/commons/websocket/WebSocketRPC'; +import AppContext from '@overflow/commons/context'; +import inject from '@overflow/commons/context/decorator/inject'; + +class TargetDetail 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 ( + + ); + } +} + + +export default TargetDetail; + diff --git a/src/ts/@overflow/app/views/layout/AppLayout.tsx b/src/ts/@overflow/app/views/layout/AppLayout.tsx index 65628b2..1114aa2 100644 --- a/src/ts/@overflow/app/views/layout/AppLayout.tsx +++ b/src/ts/@overflow/app/views/layout/AppLayout.tsx @@ -8,6 +8,7 @@ import LeftMenu from './LeftMenu'; import Home from '../Home'; import ProbeList from '../../views/monitoring/probe/List'; +import TargetList from '../../views/infrastructure/target/List'; import SensorList from '../monitoring/sensor/List'; export interface Props extends RouteComponentProps { @@ -41,6 +42,7 @@ export class AppLayout extends React.Component { + diff --git a/src/ts/@overflow/app/views/layout/LeftMenu.tsx b/src/ts/@overflow/app/views/layout/LeftMenu.tsx index 671bc10..4f7177f 100644 --- a/src/ts/@overflow/app/views/layout/LeftMenu.tsx +++ b/src/ts/@overflow/app/views/layout/LeftMenu.tsx @@ -61,8 +61,8 @@ class LeftMenu extends React.Component {
- Maps - Targets + Maps + this.props.onChangeUrl('/targets')} style={{ 'marginLeft': '30px' }}>Targets diff --git a/src/ts/@overflow/app/views/layout/TargetDetailLayout.tsx b/src/ts/@overflow/app/views/layout/TargetDetailLayout.tsx new file mode 100644 index 0000000..ac1b1af --- /dev/null +++ b/src/ts/@overflow/app/views/layout/TargetDetailLayout.tsx @@ -0,0 +1,56 @@ +import * as React from 'react'; +import { Redirect, RouteComponentProps, RouteProps, Route, Switch } from 'react-router-dom'; +import { Container, Menu, Sidebar, Segment, Icon, Breadcrumb, Grid, Dropdown } from 'semantic-ui-react'; +import { Header } from './Header'; +import { Footer } from './Footer'; +import { TitleBar } from './TitleBar'; +import LeftMenu from './LeftMenu'; + +import TargetDetail from '../../views/infrastructure/target/Detail'; +import ProbeHistory from '../../views/monitoring/probe/History'; + + +export interface Props extends RouteComponentProps { +} +export interface State { +} + +export class TargetDetailLayout extends React.Component { + + constructor(props: Props, context: State) { + super(props, context); + this.state = { + }; + } + + + public render(): JSX.Element { + const sub = [ + { + 'name': 'Info', + 'path': `${this.props.location.pathname}`, + }, + { + 'name': 'History', + 'path': `${this.props.location.pathname}/history`, + }, + ]; + return ( + + + +
+ + + + + +