-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace View Instance with instance dropdown
* makes it clear what you're viewing * allows to quickly change the instance * instance management icon was removed, can be reached via dropdown Fixes #590
- Loading branch information
Showing
4 changed files
with
75 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from 'react'; | ||
import MenuItem from 'material-ui/MenuItem'; | ||
import { hashHistory } from 'react-router'; | ||
|
||
import { encodeURIs } from '../common/request'; | ||
|
||
export default class InstanceItem extends React.Component { | ||
|
||
constructor(props, context) { | ||
super(props, context); | ||
this.handleClick = this.handleClick.bind(this); | ||
} | ||
|
||
handleClick() { | ||
const url = encodeURIs`/instances/select/${this.props.id}`; | ||
hashHistory.push(url); | ||
} | ||
|
||
render() { | ||
return ( | ||
<MenuItem primaryText={this.props.name} onClick={this.handleClick} /> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters