test
This commit is contained in:
parent
d7264c4258
commit
ffc08ce4ad
|
@ -1,5 +1,5 @@
|
|||
import * as React from 'react';
|
||||
import { Grid, Container, Breadcrumb, Header, Menu, Input, Segment } from 'semantic-ui-react';
|
||||
import { Grid, Container, Breadcrumb, Header, Menu, Input, Segment, Dropdown } from 'semantic-ui-react';
|
||||
|
||||
|
||||
export interface StateProps {
|
||||
|
@ -49,7 +49,8 @@ export class TitleBar extends React.Component<Props, State> {
|
|||
public showTitle(): string {
|
||||
let elems: JSX.Element[] = new Array();
|
||||
let pathArr = this.props.location.split('/');
|
||||
return this.capitalizeFirst(pathArr[1]);
|
||||
let title = pathArr[1].replace(/_/g, ' ');
|
||||
return title.toUpperCase();
|
||||
}
|
||||
|
||||
public handleBreadcrumb = (path: string) => {
|
||||
|
@ -59,6 +60,22 @@ export class TitleBar extends React.Component<Props, State> {
|
|||
|
||||
// temporary
|
||||
public renderBreadcrumb(): JSX.Element[] {
|
||||
|
||||
let options = [
|
||||
{
|
||||
text: 'Probes',
|
||||
value: 'probes',
|
||||
},
|
||||
{
|
||||
text: 'Targets',
|
||||
value: 'targets',
|
||||
},
|
||||
{
|
||||
text: 'Sensors',
|
||||
value: 'sensors',
|
||||
},
|
||||
];
|
||||
|
||||
let elems: JSX.Element[] = new Array();
|
||||
let pathArr = this.props.location.split('/');
|
||||
let index: number = 0;
|
||||
|
@ -69,6 +86,7 @@ export class TitleBar extends React.Component<Props, State> {
|
|||
elems.push(
|
||||
<Breadcrumb.Section key={index++} onClick={this.handleBreadcrumb.bind(this, path)}>
|
||||
{this.capitalizeFirst(item)}
|
||||
{/* <Dropdown inline options={options} defaultValue={this.capitalizeFirst(item)}/> */}
|
||||
</Breadcrumb.Section>);
|
||||
elems.push(<Breadcrumb.Divider key={index++} />);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user