Update mattermost redux to latest (#6846)
* Update to latest mattermost-redux * Add back recent and new users to team analytics page * Update to latest
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
5bd60a4d1e
Коммит
0a1b34366b
@@ -4,6 +4,7 @@
|
||||
import {connect} from 'react-redux';
|
||||
import {bindActionCreators} from 'redux';
|
||||
import {getTeams} from 'mattermost-redux/actions/teams';
|
||||
import {getProfilesInTeam} from 'mattermost-redux/actions/users';
|
||||
|
||||
import {getTeamsList} from 'mattermost-redux/selectors/entities/teams';
|
||||
import BrowserStore from 'stores/browser_store.jsx';
|
||||
@@ -26,7 +27,8 @@ function mapStateToProps(state, ownProps) {
|
||||
function mapDispatchToProps(dispatch) {
|
||||
return {
|
||||
actions: bindActionCreators({
|
||||
getTeams
|
||||
getTeams,
|
||||
getProfilesInTeam
|
||||
}, dispatch)
|
||||
};
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import BrowserStore from 'stores/browser_store.jsx';
|
||||
|
||||
import * as AdminActions from 'actions/admin_actions.jsx';
|
||||
import {StatTypes} from 'utils/constants.jsx';
|
||||
import {General} from 'mattermost-redux/constants';
|
||||
|
||||
import LineChart from 'components/analytics/line_chart.jsx';
|
||||
import StatisticCount from 'components/analytics/statistic_count.jsx';
|
||||
@@ -39,7 +40,12 @@ export default class TeamAnalytics extends React.Component {
|
||||
/*
|
||||
* Function to get teams
|
||||
*/
|
||||
getTeams: PropTypes.func.isRequired
|
||||
getTeams: PropTypes.func.isRequired,
|
||||
|
||||
/*
|
||||
* Function to get users in a team
|
||||
*/
|
||||
getProfilesInTeam: PropTypes.func.isRequired
|
||||
}).isRequired
|
||||
}
|
||||
|
||||
@@ -50,7 +56,9 @@ export default class TeamAnalytics extends React.Component {
|
||||
|
||||
this.state = {
|
||||
team: props.initialTeam,
|
||||
stats: AnalyticsStore.getAllTeam(teamId)
|
||||
stats: AnalyticsStore.getAllTeam(teamId),
|
||||
recentlyActiveUsers: [],
|
||||
newUsers: []
|
||||
};
|
||||
}
|
||||
|
||||
@@ -70,10 +78,17 @@ export default class TeamAnalytics extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
getData(id) {
|
||||
getData = async (id) => {
|
||||
AdminActions.getStandardAnalytics(id);
|
||||
AdminActions.getPostsPerDayAnalytics(id);
|
||||
AdminActions.getUsersPerDayAnalytics(id);
|
||||
const recentlyActiveUsers = await this.props.actions.getProfilesInTeam(id, 0, General.PROFILE_CHUNK_SIZE, 'last_activity_at');
|
||||
const newUsers = await this.props.actions.getProfilesInTeam(id, 0, General.PROFILE_CHUNK_SIZE, 'create_at');
|
||||
|
||||
this.setState({
|
||||
recentlyActiveUsers,
|
||||
newUsers
|
||||
});
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
@@ -200,8 +215,8 @@ export default class TeamAnalytics extends React.Component {
|
||||
);
|
||||
}
|
||||
|
||||
const recentActiveUsers = formatRecentUsersData(stats[StatTypes.RECENTLY_ACTIVE_USERS]);
|
||||
const newlyCreatedUsers = formatNewUsersData(stats[StatTypes.NEWLY_CREATED_USERS]);
|
||||
const recentActiveUsers = formatRecentUsersData(this.state.recentlyActiveUsers);
|
||||
const newlyCreatedUsers = formatNewUsersData(this.state.newUsers);
|
||||
|
||||
const teams = this.props.teams.map((team) => {
|
||||
return (
|
||||
|
||||
@@ -5043,7 +5043,7 @@ math-expression-evaluator@^1.2.14:
|
||||
|
||||
mattermost-redux@mattermost/mattermost-redux#webapp-master:
|
||||
version "0.0.1"
|
||||
resolved "https://codeload.github.com/mattermost/mattermost-redux/tar.gz/36bdc456028c19605263958ecb2e5b9612b4a67f"
|
||||
resolved "https://codeload.github.com/mattermost/mattermost-redux/tar.gz/dd48556075c8be41aa5ac4a0165bbe830d496875"
|
||||
dependencies:
|
||||
deep-equal "1.0.1"
|
||||
harmony-reflect "1.5.1"
|
||||
|
||||
Ссылка в новой задаче
Block a user