diff options
author | Asaad Mahmood <Unknowngi@live.com> | 2015-10-19 22:59:01 +0500 |
---|---|---|
committer | Asaad Mahmood <Unknowngi@live.com> | 2015-10-19 22:59:01 +0500 |
commit | 5135986a3b13c0a4474dbbca683d89ffbc1dead5 (patch) | |
tree | 42e511c01a0e707356091fd4d09911eb18b8ca20 /web/react/components/admin_console | |
parent | 2d42aefeafd2a0bea6419a6ef79c0c9b1fd313eb (diff) | |
parent | fd69910fab332642a7793e64064169e89eb0c3de (diff) | |
download | chat-5135986a3b13c0a4474dbbca683d89ffbc1dead5.tar.gz chat-5135986a3b13c0a4474dbbca683d89ffbc1dead5.tar.bz2 chat-5135986a3b13c0a4474dbbca683d89ffbc1dead5.zip |
Merge branch 'master' of https://github.com/mattermost/platform into ui-improvements
Diffstat (limited to 'web/react/components/admin_console')
-rw-r--r-- | web/react/components/admin_console/admin_controller.jsx | 12 | ||||
-rw-r--r-- | web/react/components/admin_console/admin_sidebar.jsx | 1 |
2 files changed, 10 insertions, 3 deletions
diff --git a/web/react/components/admin_console/admin_controller.jsx b/web/react/components/admin_console/admin_controller.jsx index f2fb8ac78..f770d166c 100644 --- a/web/react/components/admin_console/admin_controller.jsx +++ b/web/react/components/admin_console/admin_controller.jsx @@ -40,9 +40,13 @@ export default class AdminController extends React.Component { config: AdminStore.getConfig(), teams: AdminStore.getAllTeams(), selectedTeams, - selected: 'service_settings', - selectedTeam: null + selected: props.tab || 'service_settings', + selectedTeam: props.teamId || null }; + + if (!props.tab) { + history.replaceState(null, null, `/admin_console/${this.state.selected}`); + } } componentDidMount() { @@ -142,7 +146,9 @@ export default class AdminController extends React.Component { } else if (this.state.selected === 'service_settings') { tab = <ServiceSettingsTab config={this.state.config} />; } else if (this.state.selected === 'team_users') { - tab = <TeamUsersTab team={this.state.teams[this.state.selectedTeam]} />; + if (this.state.teams) { + tab = <TeamUsersTab team={this.state.teams[this.state.selectedTeam]} />; + } } } diff --git a/web/react/components/admin_console/admin_sidebar.jsx b/web/react/components/admin_console/admin_sidebar.jsx index 24913ab87..b0e01ff17 100644 --- a/web/react/components/admin_console/admin_sidebar.jsx +++ b/web/react/components/admin_console/admin_sidebar.jsx @@ -24,6 +24,7 @@ export default class AdminSidebar extends React.Component { handleClick(name, teamId, e) { e.preventDefault(); this.props.selectTab(name, teamId); + history.pushState({name: name, teamId: teamId}, null, `/admin_console/${name}/${teamId || ''}`); } isSelected(name, teamId) { |