Skip to content

Commit

Permalink
apply mesos#826
Browse files Browse the repository at this point in the history
  • Loading branch information
vixns committed Apr 30, 2017
1 parent bc24484 commit d08e078
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions src/main/resources/ui/components/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,37 @@ export default class Main extends React.Component {
derp(event) {
console.log(event)
}

constructor(props) {
super(props);
this.state = {
filterString: '',
};
this.handleFilterChange = this.handleFilterChange.bind(this);
}

handleFilterChange(event) {
this.setState({filterString: event.target.value});
}

render() {
const jobSummaryStore = this.props.jobSummaryStore
return (
<div className="container">
<div className="panel panel-default">
<div className="panel-heading">
<JobEditor jobSummaryStore={jobSummaryStore} />
<div className="container-fluid panel-heading">
<div className="pull-left">
<JobEditor jobSummaryStore={jobSummaryStore}/>
</div>
<div className="pull-right">
<label>
Filter Jobs:
<input
type="text"
value={ this.state.filterString }
onChange={this.handleFilterChange}/>
</label>
</div>
</div>
<div className="panel-body">
<div className="row">
Expand All @@ -32,7 +56,7 @@ export default class Main extends React.Component {
<div className="col-md-1 bg-success">{jobSummaryStore.idleCount}</div>
</div>
</div>
<JobSummaryView jobs={this.getVisibleJobs()} />
<JobSummaryView jobs={this.getVisibleJobs().filter(e => e.name.includes(this.state.filterString))}/>
</div>
</div>
)
Expand Down

0 comments on commit d08e078

Please sign in to comment.