summaryrefslogtreecommitdiffstats
path: root/web/react/components/admin_console/system_analytics.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/components/admin_console/system_analytics.jsx')
-rw-r--r--web/react/components/admin_console/system_analytics.jsx36
1 files changed, 35 insertions, 1 deletions
diff --git a/web/react/components/admin_console/system_analytics.jsx b/web/react/components/admin_console/system_analytics.jsx
index 2dd833fb2..f983db177 100644
--- a/web/react/components/admin_console/system_analytics.jsx
+++ b/web/react/components/admin_console/system_analytics.jsx
@@ -140,6 +140,34 @@ class SystemAnalytics extends React.Component {
this.setState({serverError: err.message});
}
);
+
+ if (global.window.mm_license.IsLicensed === 'true') {
+ Client.getSystemAnalytics(
+ 'extra_counts',
+ (data) => {
+ for (var index in data) {
+ if (data[index].name === 'file_post_count') {
+ this.setState({file_post_count: data[index].value});
+ }
+
+ if (data[index].name === 'hashtag_post_count') {
+ this.setState({hashtag_post_count: data[index].value});
+ }
+
+ if (data[index].name === 'incoming_webhook_count') {
+ this.setState({incoming_webhook_count: data[index].value});
+ }
+
+ if (data[index].name === 'outgoing_webhook_count') {
+ this.setState({outgoing_webhook_count: data[index].value});
+ }
+ }
+ },
+ (err) => {
+ this.setState({serverError: err.message});
+ }
+ );
+ }
}
componentWillReceiveProps() {
@@ -160,10 +188,16 @@ class SystemAnalytics extends React.Component {
return (
<div>
<Analytics
+ intl={this.props.intl}
title={this.props.intl.formatMessage(labels.title)}
channelOpenCount={this.state.channel_open_count}
channelPrivateCount={this.state.channel_private_count}
postCount={this.state.post_count}
+ showAdvanced={global.window.mm_license.IsLicensed === 'true'}
+ filePostCount={this.state.file_post_count}
+ hashtagPostCount={this.state.hashtag_post_count}
+ incomingWebhookCount={this.state.incoming_webhook_count}
+ outgoingWebhookCount={this.state.outgoing_webhook_count}
postCountsDay={this.state.post_counts_day}
userCountsWithPostsDay={this.state.user_counts_with_posts_day}
uniqueUserCount={this.state.unique_user_count}
@@ -179,4 +213,4 @@ SystemAnalytics.propTypes = {
team: React.PropTypes.object
};
-export default injectIntl(SystemAnalytics); \ No newline at end of file
+export default injectIntl(SystemAnalytics);