Этот коммит содержится в:
Christopher Speller
2016-05-12 12:11:02 -04:00
родитель 3f0325fd22 9a701b7e5b
Коммит d1efb66ad7
28 изменённых файлов: 421 добавлений и 276 удалений

Просмотреть файл

@@ -75,24 +75,25 @@ export default class Audits extends React.Component {
<div>
<ComplianceReports/>
<div className='panel'>
<div className='panel audit-panel'>
<h3>
<FormattedMessage
id='admin.audits.title'
defaultMessage='User Activity'
defaultMessage='User Activity Logs'
/>
<button
type='submit'
className='btn btn-link pull-right'
onClick={this.reload}
>
<i className='fa fa-refresh'></i>
<FormattedMessage
id='admin.audits.reload'
defaultMessage='Reload User Activity Logs'
/>
</button>
</h3>
<button
type='submit'
className='btn btn-primary'
onClick={this.reload}
>
<FormattedMessage
id='admin.audits.reload'
defaultMessage='Reload'
/>
</button>
<div className='audit__panel'>
<div className='audit-panel__table'>
{content}
</div>
</div>

Просмотреть файл

@@ -266,121 +266,120 @@ export default class ComplianceReports extends React.Component {
}
return (
<div className='panel'>
<div className='panel compliance-panel'>
<h3>
<FormattedMessage
id='admin.compliance_reports.title'
defaultMessage='Compliance Reports'
/>
</h3>
<table>
<tbody>
<tr>
<td
colSpan='5'
style={{paddingBottom: '6px'}}
>
<FormattedMessage
id='admin.compliance_reports.desc'
defaultMessage='Job Name:'
/>
<input
style={{width: '425px'}}
type='text'
className='form-control'
id='desc'
ref='desc'
placeholder={Utils.localizeMessage('admin.compliance_reports.desc_placeholder', 'Ex "Audit 445 for HR"')}
/>
</td>
</tr>
<tr>
<td>
<FormattedMessage
id='admin.compliance_reports.from'
defaultMessage='From:'
/>
<input
type='text'
className='form-control'
id='from'
ref='from'
placeholder={Utils.localizeMessage('admin.compliance_reports.from_placeholder', 'Ex "2016-03-11"')}
/>
</td>
<td style={{paddingLeft: '4px'}}>
<FormattedMessage
id='admin.compliance_reports.to'
defaultMessage='To:'
/>
<input
type='text'
className='form-control'
id='to'
ref='to'
placeholder={Utils.localizeMessage('admin.compliance_reports.to_placeholder', 'Ex "2016-03-15"')}
/>
</td>
<td style={{paddingLeft: '4px'}}>
<FormattedMessage
id='admin.compliance_reports.emails'
defaultMessage='Emails:'
/>
<input
style={{width: '325px'}}
type='text'
className='form-control'
id='emails'
ref='emails'
placeholder={Utils.localizeMessage('admin.compliance_reports.emails_placeholder', 'Ex "bill@example.com, bob@example.com"')}
/>
</td>
<td style={{paddingLeft: '4px'}}>
<FormattedMessage
id='admin.compliance_reports.keywords'
defaultMessage='Keywords:'
/>
<input
style={{width: '250px'}}
type='text'
className='form-control'
id='keywords'
ref='keywords'
placeholder={Utils.localizeMessage('admin.compliance_reports.keywords_placeholder', 'Ex "shorting stock"')}
/>
</td>
<td>
<button
id='run-button'
type='submit'
className='btn btn-primary'
onClick={this.runReport}
style={{marginTop: '20px', marginLeft: '20px'}}
>
<FormattedMessage
id='admin.compliance_reports.run'
defaultMessage='Run'
/>
</button>
</td>
</tr>
</tbody>
</table>
{serverError}
<div style={{marginTop: '20px'}}>
<div className='row'>
<div className='col-sm-6 col-md-4 form-group'>
<label>
<FormattedMessage
id='admin.compliance_reports.desc'
defaultMessage='Job Name:'
/>
</label>
<input
type='text'
className='form-control'
id='desc'
ref='desc'
placeholder={Utils.localizeMessage('admin.compliance_reports.desc_placeholder', 'E.g. "Audit 445 for HR"')}
/>
</div>
<div className='col-sm-3 col-md-2 form-group'>
<label>
<FormattedMessage
id='admin.compliance_reports.from'
defaultMessage='From:'
/>
</label>
<input
type='text'
className='form-control'
id='from'
ref='from'
placeholder={Utils.localizeMessage('admin.compliance_reports.from_placeholder', 'E.g. "2016-03-11"')}
/>
</div>
<div className='col-sm-3 col-md-2 form-group'>
<label>
<FormattedMessage
id='admin.compliance_reports.to'
defaultMessage='To:'
/>
</label>
<input
type='text'
className='form-control'
id='to'
ref='to'
placeholder={Utils.localizeMessage('admin.compliance_reports.to_placeholder', 'E.g. "2016-03-15"')}
/>
</div>
</div>
<div className='row'>
<div className='col-sm-6 col-md-4 form-group'>
<label>
<FormattedMessage
id='admin.compliance_reports.emails'
defaultMessage='Emails:'
/>
</label>
<input
type='text'
className='form-control'
id='emails'
ref='emails'
placeholder={Utils.localizeMessage('admin.compliance_reports.emails_placeholder', 'E.g. "bill@example.com, bob@example.com"')}
/>
</div>
<div className='col-sm-6 col-md-4 form-group'>
<label>
<FormattedMessage
id='admin.compliance_reports.keywords'
defaultMessage='Keywords:'
/>
</label>
<input
type='text'
className='form-control'
id='keywords'
ref='keywords'
placeholder={Utils.localizeMessage('admin.compliance_reports.keywords_placeholder', 'E.g. "shorting stock"')}
/>
</div>
</div>
<div className='clearfix'>
<button
id='run-button'
type='submit'
className='btn btn-primary'
onClick={this.reload}
onClick={this.runReport}
>
<FormattedMessage
id='admin.compliance_reports.reload'
defaultMessage='Reload'
id='admin.compliance_reports.run'
defaultMessage='Run Compliance Report'
/>
</button>
</div>
<div className='compliance__panel'>
{serverError}
<div className='text-right'>
<button
type='submit'
className='btn btn-link'
onClick={this.reload}
>
<i className='fa fa-refresh'></i>
<FormattedMessage
id='admin.compliance_reports.reload'
defaultMessage='Reload Completed Compliance Reports'
/>
</button>
</div>
<div className='compliance-panel__table'>
{content}
</div>
</div>

Просмотреть файл

@@ -5,6 +5,7 @@ import React from 'react';
import * as AsyncClient from 'utils/async_client.jsx';
import IntegrationStore from 'stores/integration_store.jsx';
import TeamStore from 'stores/team_store.jsx';
import * as Utils from 'utils/utils.jsx';
import {FormattedMessage} from 'react-intl';
@@ -20,16 +21,18 @@ export default class InstalledCommands extends React.Component {
this.regenCommandToken = this.regenCommandToken.bind(this);
this.deleteCommand = this.deleteCommand.bind(this);
const teamId = TeamStore.getCurrentId();
this.state = {
commands: IntegrationStore.getCommands(),
loading: !IntegrationStore.hasReceivedCommands()
commands: IntegrationStore.getCommands(teamId),
loading: !IntegrationStore.hasReceivedCommands(teamId)
};
}
componentDidMount() {
IntegrationStore.addChangeListener(this.handleIntegrationChange);
if (window.mm_config.EnableCommands === 'true' && this.state.loading) {
if (window.mm_config.EnableCommands === 'true') {
AsyncClient.listTeamCommands();
}
}
@@ -39,9 +42,11 @@ export default class InstalledCommands extends React.Component {
}
handleIntegrationChange() {
const teamId = TeamStore.getCurrentId();
this.setState({
commands: IntegrationStore.getCommands(),
loading: !IntegrationStore.hasReceivedCommands()
commands: IntegrationStore.getCommands(teamId),
loading: !IntegrationStore.hasReceivedCommands(teamId)
});
}

Просмотреть файл

@@ -5,6 +5,7 @@ import React from 'react';
import * as AsyncClient from 'utils/async_client.jsx';
import IntegrationStore from 'stores/integration_store.jsx';
import TeamStore from 'stores/team_store.jsx';
import * as Utils from 'utils/utils.jsx';
import {FormattedMessage} from 'react-intl';
@@ -19,16 +20,18 @@ export default class InstalledIncomingWebhooks extends React.Component {
this.deleteIncomingWebhook = this.deleteIncomingWebhook.bind(this);
const teamId = TeamStore.getCurrentId();
this.state = {
incomingWebhooks: IntegrationStore.getIncomingWebhooks(),
loading: !IntegrationStore.hasReceivedIncomingWebhooks()
incomingWebhooks: IntegrationStore.getIncomingWebhooks(teamId),
loading: !IntegrationStore.hasReceivedIncomingWebhooks(teamId)
};
}
componentDidMount() {
IntegrationStore.addChangeListener(this.handleIntegrationChange);
if (window.mm_config.EnableIncomingWebhooks === 'true' && this.state.loading) {
if (window.mm_config.EnableIncomingWebhooks === 'true') {
AsyncClient.listIncomingHooks();
}
}
@@ -38,9 +41,11 @@ export default class InstalledIncomingWebhooks extends React.Component {
}
handleIntegrationChange() {
const teamId = TeamStore.getCurrentId();
this.setState({
incomingWebhooks: IntegrationStore.getIncomingWebhooks(),
loading: !IntegrationStore.hasReceivedIncomingWebhooks()
incomingWebhooks: IntegrationStore.getIncomingWebhooks(teamId),
loading: !IntegrationStore.hasReceivedIncomingWebhooks(teamId)
});
}

Просмотреть файл

@@ -5,6 +5,7 @@ import React from 'react';
import * as AsyncClient from 'utils/async_client.jsx';
import IntegrationStore from 'stores/integration_store.jsx';
import TeamStore from 'stores/team_store.jsx';
import * as Utils from 'utils/utils.jsx';
import {FormattedMessage} from 'react-intl';
@@ -20,16 +21,18 @@ export default class InstalledOutgoingWebhooks extends React.Component {
this.regenOutgoingWebhookToken = this.regenOutgoingWebhookToken.bind(this);
this.deleteOutgoingWebhook = this.deleteOutgoingWebhook.bind(this);
const teamId = TeamStore.getCurrentId();
this.state = {
outgoingWebhooks: IntegrationStore.getOutgoingWebhooks(),
loading: !IntegrationStore.hasReceivedOutgoingWebhooks()
outgoingWebhooks: IntegrationStore.getOutgoingWebhooks(teamId),
loading: !IntegrationStore.hasReceivedOutgoingWebhooks(teamId)
};
}
componentDidMount() {
IntegrationStore.addChangeListener(this.handleIntegrationChange);
if (window.mm_config.EnableOutgoingWebhooks === 'true' && this.state.loading) {
if (window.mm_config.EnableOutgoingWebhooks === 'true') {
AsyncClient.listOutgoingHooks();
}
}
@@ -39,9 +42,11 @@ export default class InstalledOutgoingWebhooks extends React.Component {
}
handleIntegrationChange() {
const teamId = TeamStore.getCurrentId();
this.setState({
outgoingWebhooks: IntegrationStore.getOutgoingWebhooks(),
loading: !IntegrationStore.hasReceivedOutgoingWebhooks()
outgoingWebhooks: IntegrationStore.getOutgoingWebhooks(teamId),
loading: !IntegrationStore.hasReceivedOutgoingWebhooks(teamId)
});
}

Просмотреть файл

@@ -85,8 +85,7 @@ export default class Login extends React.Component {
browserHistory.push('/should_verify_email?&email=' + encodeURIComponent(loginId));
return;
} else if (err.id === 'store.sql_user.get_for_login.app_error' ||
err.id === 'ent.ldap.do_login.user_not_registered.app_error' ||
err.id === 'ent.ldap.do_login.user_filtered.app_error') {
err.id === 'ent.ldap.do_login.user_not_registered.app_error') {
this.setState({
showMfa: false,
serverError: (
@@ -98,6 +97,7 @@ export default class Login extends React.Component {
});
} else if (err.id === 'api.user.check_user_password.invalid.app_error' || err.id === 'ent.ldap.do_login.invalid_password.app_error') {
this.setState({
showMfa: false,
serverError: (
<FormattedMessage
id='login.invalidPassword'

Просмотреть файл

@@ -514,7 +514,7 @@ export default class Sidebar extends React.Component {
<div className='sidebar__divider__text'>
<FormattedMessage
id='sidebar.otherMembers'
defaultMessage='Other teams'
defaultMessage='Outside this team'
/>
</div>
</div>);