mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-885 allow single select of stats page
This commit is contained in:
@@ -6,6 +6,7 @@ var AdminStore = require('../../stores/admin_store.jsx');
|
||||
var TeamStore = require('../../stores/team_store.jsx');
|
||||
var AsyncClient = require('../../utils/async_client.jsx');
|
||||
var LoadingScreen = require('../loading_screen.jsx');
|
||||
var Utils = require('../../utils/utils.jsx');
|
||||
|
||||
var EmailSettingsTab = require('./email_settings.jsx');
|
||||
var LogSettingsTab = require('./log_settings.jsx');
|
||||
@@ -46,7 +47,8 @@ export default class AdminController extends React.Component {
|
||||
};
|
||||
|
||||
if (!props.tab) {
|
||||
history.replaceState(null, null, `/admin_console/${this.state.selected}`);
|
||||
var tokenIndex = Utils.getUrlParameter('session_token_index');
|
||||
history.replaceState(null, null, `/admin_console/${this.state.selected}?session_token_index=${tokenIndex}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
var AdminSidebarHeader = require('./admin_sidebar_header.jsx');
|
||||
var SelectTeamModal = require('./select_team_modal.jsx');
|
||||
var Utils = require('../../utils/utils.jsx');
|
||||
|
||||
export default class AdminSidebar extends React.Component {
|
||||
constructor(props) {
|
||||
@@ -24,12 +25,13 @@ export default class AdminSidebar extends React.Component {
|
||||
handleClick(name, teamId, e) {
|
||||
e.preventDefault();
|
||||
this.props.selectTab(name, teamId);
|
||||
history.pushState({name, teamId}, null, `/admin_console/${name}/${teamId || ''}`);
|
||||
var tokenIndex = Utils.getUrlParameter('session_token_index');
|
||||
history.pushState({name, teamId}, null, `/admin_console/${name}/${teamId || ''}?session_token_index=${tokenIndex}`);
|
||||
}
|
||||
|
||||
isSelected(name, teamId) {
|
||||
if (this.props.selected === name) {
|
||||
if (name === 'team_users') {
|
||||
if (name === 'team_users' || name === 'team_analytics') {
|
||||
if (this.props.selectedTeam != null && this.props.selectedTeam === teamId) {
|
||||
return 'active';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user