diff --git a/src/ts/@overflow/app/router/index.tsx b/src/ts/@overflow/app/router/index.tsx
index f0e31f0..e48605a 100644
--- a/src/ts/@overflow/app/router/index.tsx
+++ b/src/ts/@overflow/app/router/index.tsx
@@ -55,11 +55,11 @@ const routes = (
-
+
-
+
diff --git a/src/ts/@overflow/app/views/App.tsx b/src/ts/@overflow/app/views/App.tsx
index 6805834..f7ec3e9 100644
--- a/src/ts/@overflow/app/views/App.tsx
+++ b/src/ts/@overflow/app/views/App.tsx
@@ -2,6 +2,7 @@ import * as React from 'react';
import { Route, Switch } from 'react-router-dom';
import AccountLayout from './layout/AccountLayout';
+import ProbeDetailLayout from './layout/ProbeDetailLayout';
import AppLayout from './layout/AppLayout';
import ErrorLayout from './layout/ErrorLayout';
@@ -24,8 +25,8 @@ class App extends React.Component {
return (
-
+
);
diff --git a/src/ts/@overflow/app/views/layout/AppLayout.tsx b/src/ts/@overflow/app/views/layout/AppLayout.tsx
index 8059018..1dc0363 100644
--- a/src/ts/@overflow/app/views/layout/AppLayout.tsx
+++ b/src/ts/@overflow/app/views/layout/AppLayout.tsx
@@ -3,9 +3,11 @@ import { Redirect, RouteComponentProps, RouteProps, Route, Switch } from 'react-
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 Home from '../Home';
+import ProbeList from '../../views/monitoring/probe/List';
export interface Props extends RouteComponentProps {
}
@@ -34,8 +36,10 @@ export class AppLayout extends React.Component {
+
+
diff --git a/src/ts/@overflow/app/views/layout/Header.tsx b/src/ts/@overflow/app/views/layout/Header.tsx
index 913d21e..1de4c3a 100644
--- a/src/ts/@overflow/app/views/layout/Header.tsx
+++ b/src/ts/@overflow/app/views/layout/Header.tsx
@@ -2,7 +2,6 @@ import * as React from 'react';
import { Container, Divider } from 'semantic-ui-react';
import { LogoBar } from './LogoBar';
-import { TitleBar } from './TitleBar';
export class Header extends React.Component {
@@ -16,7 +15,6 @@ export class Header extends React.Component {
return (
-
//
);
diff --git a/src/ts/@overflow/app/views/layout/LeftMenu.tsx b/src/ts/@overflow/app/views/layout/LeftMenu.tsx
index 4d4a991..671bc10 100644
--- a/src/ts/@overflow/app/views/layout/LeftMenu.tsx
+++ b/src/ts/@overflow/app/views/layout/LeftMenu.tsx
@@ -51,7 +51,7 @@ class LeftMenu extends React.Component {
- this.props.onChangeUrl('/temp/probe')} style={{ 'marginLeft': '30px' }}>Probe
+ this.props.onChangeUrl('/probes')} style={{ 'marginLeft': '30px' }}>Probe
Sensors
diff --git a/src/ts/@overflow/app/views/layout/ProbeDetailLayout.tsx b/src/ts/@overflow/app/views/layout/ProbeDetailLayout.tsx
new file mode 100644
index 0000000..7edd350
--- /dev/null
+++ b/src/ts/@overflow/app/views/layout/ProbeDetailLayout.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 ProbeDetail from '../../views/monitoring/probe/Detail';
+import ProbeHistory from '../../views/monitoring/probe/History';
+
+
+export interface Props extends RouteComponentProps {
+}
+export interface State {
+}
+
+export class ProbeDetailLayout 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 (
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+ }
+}
+
+export default ProbeDetailLayout;
+
diff --git a/src/ts/@overflow/app/views/layout/TitleBar.tsx b/src/ts/@overflow/app/views/layout/TitleBar.tsx
index 481af2c..09c7776 100644
--- a/src/ts/@overflow/app/views/layout/TitleBar.tsx
+++ b/src/ts/@overflow/app/views/layout/TitleBar.tsx
@@ -1,5 +1,6 @@
import * as React from 'react';
import { Grid, Container, Breadcrumb, Header, Menu, Input, Segment } from 'semantic-ui-react';
+import { Redirect } from 'react-router-dom';
export class TitleBar extends React.Component {
@@ -9,25 +10,27 @@ export class TitleBar extends React.Component {
};
}
+ public handleMenu(menu:any): JSX.Element {
+ console.log(menu.path);
+ return ;
+ }
+
+ public renderSubMenus(): JSX.Element {
+ let subMenus = this.props.sub;
+ if (!subMenus) {
+ return null;
+ }
+
+ return subMenus.map((menu: any, index: number) => (
+
+ ));
+ }
+
public render(): JSX.Element {
- let subMenus = [
- {
- 'name': 'Menu1',
- 'href': '#/test2',
- },
- {
- 'name': 'Menu2',
- 'href': '#/test3',
- },
- {
- 'name': 'Menu3',
- 'href': '#/test4',
- },
- ];
return (
);
}
diff --git a/src/ts/@overflow/app/views/monitoring/probe/History.tsx b/src/ts/@overflow/app/views/monitoring/probe/History.tsx
new file mode 100644
index 0000000..e2698ca
--- /dev/null
+++ b/src/ts/@overflow/app/views/monitoring/probe/History.tsx
@@ -0,0 +1,25 @@
+import * as React from 'react';
+import { RouteComponentProps } from 'react-router';
+import WebSocketRPC from '@overflow/commons/websocket/WebSocketRPC';
+import AppContext from '@overflow/commons/context';
+import inject from '@overflow/commons/context/decorator/inject';
+
+class ProbeHistory extends React.Component, object> {
+ @inject()
+ private client: WebSocketRPC;
+
+ public constructor(props?: RouteComponentProps