From 9d688821aa8bb8d766793aeaec6920f9985a30a3 Mon Sep 17 00:00:00 2001
From: =Corey Hulen <corey@hulen.com>
Date: Thu, 1 Oct 2015 13:02:04 -0700
Subject: PLT-462 Adding diagnostic info

---
 .../components/admin_console/privacy_settings.jsx  | 34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)

(limited to 'web/react/components/admin_console/privacy_settings.jsx')

diff --git a/web/react/components/admin_console/privacy_settings.jsx b/web/react/components/admin_console/privacy_settings.jsx
index affd8ae11..c74d321e6 100644
--- a/web/react/components/admin_console/privacy_settings.jsx
+++ b/web/react/components/admin_console/privacy_settings.jsx
@@ -30,6 +30,7 @@ export default class PrivacySettings extends React.Component {
         var config = this.props.config;
         config.PrivacySettings.ShowEmailAddress = React.findDOMNode(this.refs.ShowEmailAddress).checked;
         config.PrivacySettings.ShowFullName = React.findDOMNode(this.refs.ShowFullName).checked;
+        config.PrivacySettings.EnableDiagnostic = React.findDOMNode(this.refs.EnableDiagnostic).checked;
 
         Client.saveConfig(
             config,
@@ -136,6 +137,39 @@ export default class PrivacySettings extends React.Component {
                         </div>
                     </div>
 
+                    <div className='form-group'>
+                        <label
+                            className='control-label col-sm-4'
+                            htmlFor='EnableDiagnostic'
+                        >
+                            {'Send Error and Diagnostic: '}
+                        </label>
+                        <div className='col-sm-8'>
+                            <label className='radio-inline'>
+                                <input
+                                    type='radio'
+                                    name='EnableDiagnostic'
+                                    value='true'
+                                    ref='EnableDiagnostic'
+                                    defaultChecked={this.props.config.PrivacySettings.EnableDiagnostic}
+                                    onChange={this.handleChange}
+                                />
+                                    {'true'}
+                            </label>
+                            <label className='radio-inline'>
+                                <input
+                                    type='radio'
+                                    name='EnableDiagnostic'
+                                    value='false'
+                                    defaultChecked={!this.props.config.PrivacySettings.EnableDiagnostic}
+                                    onChange={this.handleChange}
+                                />
+                                    {'false'}
+                            </label>
+                            <p className='help-text'>{'When true, The server will periodically send error and diagnostic information to Mattermost.'}</p>
+                        </div>
+                    </div>
+
                     <div className='form-group'>
                         <div className='col-sm-12'>
                             {serverError}
-- 
cgit v1.2.3-1-g7c22

