diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-06-14 08:56:56 -0400 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-06-14 08:56:56 -0400 |
commit | 1138dd67705829a6af0d6c610cf3dbe09082187c (patch) | |
tree | 23bdc3db76221bead172be1c51eb52a4987636f1 /webapp/components/admin_console/audits.jsx | |
parent | 40efd8367a85e3333e9b7cc45c390259d412088c (diff) | |
download | chat-1138dd67705829a6af0d6c610cf3dbe09082187c.tar.gz chat-1138dd67705829a6af0d6c610cf3dbe09082187c.tar.bz2 chat-1138dd67705829a6af0d6c610cf3dbe09082187c.zip |
PLT-6657 Move system console to use v4 endpoints and redux (#6572)
* Move system console to use v4 endpoints and redux
* Rename logs dir to get past gitignore
* Fix test email
* Update brand unit test
* Updates per feedback
Diffstat (limited to 'webapp/components/admin_console/audits.jsx')
-rw-r--r-- | webapp/components/admin_console/audits.jsx | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/webapp/components/admin_console/audits.jsx b/webapp/components/admin_console/audits.jsx deleted file mode 100644 index 594e55e39..000000000 --- a/webapp/components/admin_console/audits.jsx +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved. -// See License.txt for license information. - -import LoadingScreen from '../loading_screen.jsx'; -import AuditTable from '../audit_table.jsx'; -import ComplianceReports from './compliance_reports.jsx'; - -import AdminStore from 'stores/admin_store.jsx'; - -import * as AsyncClient from 'utils/async_client.jsx'; - -import {FormattedMessage} from 'react-intl'; - -import React from 'react'; - -export default class Audits extends React.Component { - constructor(props) { - super(props); - - this.onAuditListenerChange = this.onAuditListenerChange.bind(this); - this.reload = this.reload.bind(this); - - this.state = { - audits: AdminStore.getAudits() - }; - } - - componentDidMount() { - AdminStore.addAuditChangeListener(this.onAuditListenerChange); - AsyncClient.getServerAudits(); - } - - componentWillUnmount() { - AdminStore.removeAuditChangeListener(this.onAuditListenerChange); - } - - onAuditListenerChange() { - this.setState({ - audits: AdminStore.getAudits() - }); - } - - reload() { - AdminStore.saveAudits(null); - this.setState({ - audits: null - }); - - AsyncClient.getServerAudits(); - } - - render() { - var content = null; - - if (global.window.mm_license.IsLicensed !== 'true') { - return <div/>; - } - - if (this.state.audits === null) { - content = <LoadingScreen/>; - } else { - content = ( - <div style={{margin: '10px'}}> - <AuditTable - audits={this.state.audits} - showUserId={true} - showIp={true} - showSession={true} - /> - </div> - ); - } - - return ( - <div> - <ComplianceReports/> - - <div className='panel audit-panel'> - <h3 className='admin-console-header'> - <FormattedMessage - id='admin.audits.title' - defaultMessage='User Activity Logs' - /> - <button - type='submit' - className='btn btn-link pull-right' - onClick={this.reload} - > - <i className='fa fa-refresh'/> - <FormattedMessage - id='admin.audits.reload' - defaultMessage='Reload User Activity Logs' - /> - </button> - </h3> - <div className='audit-panel__table'> - {content} - </div> - </div> - </div> - ); - } -} |