bugfix
This commit is contained in:
parent
61627664a4
commit
4926f74986
|
@ -3,7 +3,7 @@ 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 TitleBarContainer from './TitleBarContainer';
|
||||
import LeftMenu from './LeftMenu';
|
||||
|
||||
import Home from '../Home';
|
||||
|
@ -38,7 +38,7 @@ export class AppLayout extends React.Component<Props, State> {
|
|||
<LeftMenu />
|
||||
<Segment vertical style={{ margin: '0 0 0 210px', padding: '0' }}>
|
||||
<Header />
|
||||
<TitleBar />
|
||||
<TitleBarContainer />
|
||||
<Switch>
|
||||
<Route exact={true} path={`${this.props.match.url}`} component={Home}/>
|
||||
<Route exact={true} path={`${this.props.match.url}probes`} component={ProbeList}/>
|
||||
|
|
|
@ -13,6 +13,7 @@ import ProbeHistory from '../../views/monitoring/probe/History';
|
|||
export interface Props extends RouteComponentProps<any> {
|
||||
}
|
||||
export interface State {
|
||||
currUrl: string;
|
||||
}
|
||||
|
||||
export class ProbeDetailLayout extends React.Component<Props, State> {
|
||||
|
@ -20,6 +21,7 @@ export class ProbeDetailLayout extends React.Component<Props, State> {
|
|||
constructor(props: Props, context: State) {
|
||||
super(props, context);
|
||||
this.state = {
|
||||
currUrl: this.props.location.pathname,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -28,11 +30,11 @@ export class ProbeDetailLayout extends React.Component<Props, State> {
|
|||
const sub = [
|
||||
{
|
||||
'name': 'Info',
|
||||
'path': `${this.props.location.pathname}`,
|
||||
'path': this.state.currUrl,
|
||||
},
|
||||
{
|
||||
'name': 'History',
|
||||
'path': `${this.props.location.pathname}/history`,
|
||||
'path': this.state.currUrl + '/history',
|
||||
},
|
||||
];
|
||||
return (
|
||||
|
|
|
@ -24,7 +24,6 @@ export class TitleBar extends React.Component<Props, State> {
|
|||
}
|
||||
|
||||
public handleMenu(menu:any): any {
|
||||
console.log(menu.path);
|
||||
this.props.onRedirect(menu.path);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user