summaryrefslogtreecommitdiffstats
path: root/web/react/components/admin_console/statistic_count.jsx
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2016-02-03 10:45:58 -0800
committer=Corey Hulen <corey@hulen.com>2016-02-03 10:45:58 -0800
commitbdfa4715d65ed4b4e903a1eb4c83eba6c95455d1 (patch)
tree1626d089802a92ee208b6e7fa056378e40568a92 /web/react/components/admin_console/statistic_count.jsx
parent581785f5044eecdc7cf664e4c7fc59efc6babc96 (diff)
parent9bba6c79882d1f5d14b98052caf59a11fc2388d5 (diff)
downloadchat-bdfa4715d65ed4b4e903a1eb4c83eba6c95455d1.tar.gz
chat-bdfa4715d65ed4b4e903a1eb4c83eba6c95455d1.tar.bz2
chat-bdfa4715d65ed4b4e903a1eb4c83eba6c95455d1.zip
Merge branch 'master' into PLT-1429
Diffstat (limited to 'web/react/components/admin_console/statistic_count.jsx')
-rw-r--r--web/react/components/admin_console/statistic_count.jsx37
1 files changed, 37 insertions, 0 deletions
diff --git a/web/react/components/admin_console/statistic_count.jsx b/web/react/components/admin_console/statistic_count.jsx
new file mode 100644
index 000000000..57af0ed1b
--- /dev/null
+++ b/web/react/components/admin_console/statistic_count.jsx
@@ -0,0 +1,37 @@
+// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+import {FormattedMessage} from 'mm-intl';
+
+export default class StatisticCount extends React.Component {
+ constructor(props) {
+ super(props);
+ }
+
+ render() {
+ let loading = (
+ <FormattedMessage
+ id='admin.analytics.loading'
+ defaultMessage='Loading...'
+ />
+ );
+
+ return (
+ <div className='col-sm-3'>
+ <div className='total-count'>
+ <div className='title'>
+ {this.props.title}
+ <i className={'fa ' + this.props.icon}/>
+ </div>
+ <div className='content'>{this.props.count == null ? loading : this.props.count}</div>
+ </div>
+ </div>
+ );
+ }
+}
+
+StatisticCount.propTypes = {
+ title: React.PropTypes.string.isRequired,
+ icon: React.PropTypes.string.isRequired,
+ count: React.PropTypes.number
+};