From 1ee657e2ebd1b99ce6ccb36e5f26ee458b749b7e Mon Sep 17 00:00:00 2001 From: snoop Date: Tue, 11 Jul 2017 12:26:05 +0900 Subject: [PATCH 1/2] fixed --- src/ts/containers/test/ProbeDown.tsx | 16 ++++++++------ src/ts/containers/test/SignIn.tsx | 13 ++++++++---- src/ts/containers/test/TopBar.tsx | 31 +++++++++------------------- 3 files changed, 29 insertions(+), 31 deletions(-) diff --git a/src/ts/containers/test/ProbeDown.tsx b/src/ts/containers/test/ProbeDown.tsx index b201938..5019a9f 100644 --- a/src/ts/containers/test/ProbeDown.tsx +++ b/src/ts/containers/test/ProbeDown.tsx @@ -11,13 +11,13 @@ export interface Props { } -const osNames = ["Windows","Debian","Ubuntu","Fedora"]; +const osNames = ["Windows","Debian","Ubuntu","Fedora", "CentOS"]; export class ProbeDown extends React.Component { constructor(props: any, context: any) { super(props, context); - this.state = { activeItem: 'Windows' } + this.state = { activeItem: osNames[0] } } @@ -35,10 +35,14 @@ const { activeItem } = this.state - - - - + {osNames.map((os: string) => { + return ( + + ) + })} + + + diff --git a/src/ts/containers/test/SignIn.tsx b/src/ts/containers/test/SignIn.tsx index 94176f9..9531a06 100644 --- a/src/ts/containers/test/SignIn.tsx +++ b/src/ts/containers/test/SignIn.tsx @@ -15,12 +15,16 @@ export class SignIn extends React.Component { constructor(props: any, context: any) { super(props, context); + + this.state = { forgotPopup: false, }; } +forgotPopupOpen = () => this.setState({ forgotPopup: true }); + forgotPopupClose = () => this.setState({ forgotPopup: false }); render() { @@ -35,7 +39,8 @@ export class SignIn extends React.Component {
- Forgot Password}> + + Change your password Enter email address. @@ -43,14 +48,14 @@ export class SignIn extends React.Component { - - + +
- + diff --git a/src/ts/containers/test/TopBar.tsx b/src/ts/containers/test/TopBar.tsx index dbaf348..38cf881 100644 --- a/src/ts/containers/test/TopBar.tsx +++ b/src/ts/containers/test/TopBar.tsx @@ -46,31 +46,20 @@ export class TopBar extends React.Component { return (
- Home + Home - Monitoring - - - Probe - - Mens - Shirts - Pants - Jeans - Shoes - - Womens - Dresses - Shoes - Bags - - + Probe Sensors - - Infrastructure + + + + Maps + Targets + + Dashboard Metrics Alert @@ -114,7 +103,7 @@ export class TopBar extends React.Component { icon='labeled' vertical inverted - + > From 13b317309121239ce2da8fa470f939f00ba86588 Mon Sep 17 00:00:00 2001 From: insanity Date: Tue, 11 Jul 2017 14:21:06 +0900 Subject: [PATCH 2/2] . --- src/ts/containers/test/ProbeDetails.tsx | 4 +- src/ts/containers/test/Sensors.tsx | 126 +++++++++++++++++++++++ src/ts/containers/test/TargetDetails.tsx | 60 ++++++++++- src/ts/containers/test/Targets.tsx | 44 +++++++- 4 files changed, 226 insertions(+), 8 deletions(-) create mode 100644 src/ts/containers/test/Sensors.tsx diff --git a/src/ts/containers/test/ProbeDetails.tsx b/src/ts/containers/test/ProbeDetails.tsx index e4171b1..bf29304 100644 --- a/src/ts/containers/test/ProbeDetails.tsx +++ b/src/ts/containers/test/ProbeDetails.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { Button, Table, Label } from 'semantic-ui-react'; -import { Targets } from './Targets'; +import { TargetTable } from './Targets'; export class ProbeDetails extends React.Component { @@ -85,7 +85,7 @@ export class ProbeDetails extends React.Component {
; } return ( diff --git a/src/ts/containers/test/Sensors.tsx b/src/ts/containers/test/Sensors.tsx new file mode 100644 index 0000000..fdbd8d3 --- /dev/null +++ b/src/ts/containers/test/Sensors.tsx @@ -0,0 +1,126 @@ +import * as React from 'react'; +import { Table, Button } from 'semantic-ui-react'; + + +export class Sensors extends React.Component { + + private data: any; + + constructor(props: any, context: any) { + super(props, context); + this.state = { + selected: null, + }; + } + + componentWillMount() { + this.data = [ + { + "id": "111", + "metaSensorStatus": { + "name": "NORMAL" + }, + "target": { + "id": "1", + }, + "metaCrawler": { + "name": "WMI", + "description": "WMI description", + }, + "crawlerInputItems": "json value", + "description": "description1111111111", + }, + { + "id": "222", + "metaSensorStatus": { + "name": "NORMAL" + }, + "target": { + "id": "1", + }, + "metaCrawler": { + "name": "SNMP", + "description": "SNMP description", + }, + "crawlerInputItems": "json value", + "description": "description1111111111", + }, + { + "id": "333", + "metaSensorStatus": { + "name": "NORMAL" + }, + "target": { + "id": "1", + }, + "metaCrawler": { + "name": "JMX", + "description": "JMX description", + }, + "crawlerInputItems": "json value", + "description": "description1111111111", + }, + ]; + } + + handleSelect(selectedProbe: object) { + this.setState({ + selected: selectedProbe, + }); + } + + checkCellStatus(status: any): boolean { + if (status.name === 'STOPPED') { + return true; + } + return false; + } + + showStartStopBtn(status: any) { + if (status.name === 'STARTED') { + return + + + + ); } } diff --git a/src/ts/containers/test/Targets.tsx b/src/ts/containers/test/Targets.tsx index 0f5e183..1418d1d 100644 --- a/src/ts/containers/test/Targets.tsx +++ b/src/ts/containers/test/Targets.tsx @@ -1,7 +1,47 @@ import * as React from 'react'; -import { Table } from 'semantic-ui-react'; +import { Table, Grid, Segment, Button, Container } from 'semantic-ui-react'; +import { TargetDetails } from './TargetDetails'; export class Targets extends React.Component { + + constructor(props: any, context: any) { + super(props, context); + this.state = { + }; + } + + componentWillMount() { + + } + + handleAddTarget() { + alert('Add a Target'); + } + + render() { + + return ( + + + + + SEARCH AREA + + + +