diff options
Diffstat (limited to 'server')
137 files changed, 440 insertions, 440 deletions
diff --git a/server/sonar-web/src/main/js/app/components/AdminContainer.js b/server/sonar-web/src/main/js/app/components/AdminContainer.js index e56d6374458..f0830c3b9a3 100644 --- a/server/sonar-web/src/main/js/app/components/AdminContainer.js +++ b/server/sonar-web/src/main/js/app/components/AdminContainer.js @@ -38,8 +38,8 @@ class AdminContainer extends React.Component { loadData () { getSettingsNavigation().then( - r => this.props.setAdminPages(r.extensions), - onFail(this.props.dispatch) + r => this.props.setAdminPages(r.extensions), + onFail(this.props.dispatch) ); } diff --git a/server/sonar-web/src/main/js/app/components/App.js b/server/sonar-web/src/main/js/app/components/App.js index fbe4deded29..db7f3aecaa2 100644 --- a/server/sonar-web/src/main/js/app/components/App.js +++ b/server/sonar-web/src/main/js/app/components/App.js @@ -71,6 +71,6 @@ class App extends React.Component { } export default connect( - null, + null, { fetchAppState, fetchCurrentUser, fetchLanguages, fetchOrganizations } )(App); diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNav.js b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNav.js index bd9ccd72f5c..d0e02dcbae8 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNav.js +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNav.js @@ -56,10 +56,10 @@ export default React.createClass({ const { qualifier } = breadcrumbs[breadcrumbs.length - 1]; if (['TRK', 'VW', 'DEV'].indexOf(qualifier) !== -1) { RecentHistory.add( - this.props.component.key, - this.props.component.name, - qualifier.toLowerCase(), - this.props.component.organization + this.props.component.key, + this.props.component.name, + qualifier.toLowerCase(), + this.props.component.organization ); } }, diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.js b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.js index 22e969235d4..bd2273f9662 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.js +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavMeta.js @@ -34,7 +34,7 @@ export default React.createClass({ translateWithParameters('component_navigation.status.in_progress.admin', backgroundTasksUrl) : translate('component_navigation.status.in_progress'); metaList.push( - <li key="isInProgress" data-toggle="tooltip" title={tooltip}> + <li key="isInProgress" data-toggle="tooltip" title={tooltip}> <i className="spinner" style={{ marginTop: '-1px' }}/> {' '} <span className="text-info">{translate('background_task.status.IN_PROGRESS')}</span> @@ -45,7 +45,7 @@ export default React.createClass({ translateWithParameters('component_navigation.status.pending.admin', backgroundTasksUrl) : translate('component_navigation.status.pending'); metaList.push( - <li key="isPending" data-toggle="tooltip" title={tooltip}> + <li key="isPending" data-toggle="tooltip" title={tooltip}> <PendingIcon/> <span>{translate('background_task.status.PENDING')}</span> </li> ); @@ -54,7 +54,7 @@ export default React.createClass({ translateWithParameters('component_navigation.status.failed.admin', backgroundTasksUrl) : translate('component_navigation.status.failed'); metaList.push( - <li key="isFailed" data-toggle="tooltip" title={tooltip}> + <li key="isFailed" data-toggle="tooltip" title={tooltip}> <span className="badge badge-danger">{translate('background_task.status.FAILED')}</span> </li> ); diff --git a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBreadcrumbs-test.js b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBreadcrumbs-test.js index 046bd3a34f0..e8c6e930bd0 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBreadcrumbs-test.js +++ b/server/sonar-web/src/main/js/app/components/nav/component/__tests__/ComponentNavBreadcrumbs-test.js @@ -31,7 +31,7 @@ it('should render organization', () => { const breadcrumbs = [{ key: 'my-project', name: 'My Project', qualifier: 'TRK' }]; const organization = { key: 'foo', name: 'The Foo Organization' }; const result = shallow( - <Unconnected + <Unconnected breadcrumbs={breadcrumbs} organization={organization} shouldOrganizationBeDisplayed={true}/>); diff --git a/server/sonar-web/src/main/js/app/components/nav/global/SearchView.js b/server/sonar-web/src/main/js/app/components/nav/global/SearchView.js index 46946e22548..cf711c889e8 100644 --- a/server/sonar-web/src/main/js/app/components/nav/global/SearchView.js +++ b/server/sonar-web/src/main/js/app/components/nav/global/SearchView.js @@ -110,8 +110,8 @@ export default Marionette.LayoutView.extend({ this.favorite = []; if (this.model.get('currentUser').isLoggedIn) { this.fetchFavorite().then( - () => this.resetResultsToDefault(), - () => this.resetResultsToDefault() + () => this.resetResultsToDefault(), + () => this.resetResultsToDefault() ); } else { this.resetResultsToDefault(); diff --git a/server/sonar-web/src/main/js/apps/account/components/Security.js b/server/sonar-web/src/main/js/apps/account/components/Security.js index 5c049e9cc9a..f4f05a1a3c5 100644 --- a/server/sonar-web/src/main/js/apps/account/components/Security.js +++ b/server/sonar-web/src/main/js/apps/account/components/Security.js @@ -53,5 +53,5 @@ class Security extends React.Component { } export default connect( - state => ({ user: getCurrentUser(state) }) + state => ({ user: getCurrentUser(state) }) )(Security); diff --git a/server/sonar-web/src/main/js/apps/account/notifications/Projects.js b/server/sonar-web/src/main/js/apps/account/notifications/Projects.js index 8794a712f87..cf2796cf022 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/Projects.js +++ b/server/sonar-web/src/main/js/apps/account/notifications/Projects.js @@ -51,9 +51,9 @@ class Projects extends React.Component { componentWillReceiveProps (nextProps: Props) { // remove all projects from `this.state.addedProjects` that already exist in `nextProps.projects` const nextAddedProjects = differenceBy( - this.state.addedProjects, - nextProps.projects, - project => project.key + this.state.addedProjects, + nextProps.projects, + project => project.key ); if (nextAddedProjects.length !== this.state.addedProjects) { diff --git a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/GlobalNotifications-test.js b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/GlobalNotifications-test.js index 45d61dcf2b3..764a499eec8 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/GlobalNotifications-test.js +++ b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/GlobalNotifications-test.js @@ -31,7 +31,7 @@ it('should match snapshot', () => { ]; expect(shallow( - <UnconnectedGlobalNotifications + <UnconnectedGlobalNotifications notifications={notifications} channels={channels} types={types} diff --git a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/Notifications-test.js b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/Notifications-test.js index c33ea8b1cdc..69ccb43e7f0 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/Notifications-test.js +++ b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/Notifications-test.js @@ -23,6 +23,6 @@ import { UnconnectedNotifications } from '../Notifications'; it('should match snapshot', () => { expect(shallow( - <UnconnectedNotifications fetchNotifications={jest.fn()}/> + <UnconnectedNotifications fetchNotifications={jest.fn()}/> )).toMatchSnapshot(); }); diff --git a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/NotificationsList-test.js b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/NotificationsList-test.js index b3e647690de..2fafd101315 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/NotificationsList-test.js +++ b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/NotificationsList-test.js @@ -33,7 +33,7 @@ const checkboxId = (t, c) => `checkbox-io-${t}-${c}`; it('should match snapshot', () => { expect(shallow( - <NotificationsList + <NotificationsList onAdd={jest.fn()} onRemove={jest.fn()} channels={channels} @@ -47,7 +47,7 @@ it('should call `onAdd` and `onRemove`', () => { const onAdd = jest.fn(); const onRemove = jest.fn(); const wrapper = shallow( - <NotificationsList + <NotificationsList onAdd={onAdd} onRemove={onRemove} channels={channels} diff --git a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/ProjectNotifications-test.js b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/ProjectNotifications-test.js index 59f4aa05736..300e6bd2e74 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/ProjectNotifications-test.js +++ b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/ProjectNotifications-test.js @@ -32,7 +32,7 @@ const notifications = [ it('should match snapshot', () => { expect(shallow( - <UnconnectedProjectNotifications + <UnconnectedProjectNotifications project={{ key: 'foo', name: 'Foo' }} notifications={notifications} channels={channels} @@ -46,7 +46,7 @@ it('should call `addNotification` and `removeNotification`', () => { const addNotification = jest.fn(); const removeNotification = jest.fn(); const wrapper = shallow( - <UnconnectedProjectNotifications + <UnconnectedProjectNotifications project={{ key: 'foo', name: 'Foo' }} notifications={notifications} channels={channels} diff --git a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/Projects-test.js b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/Projects-test.js index be06ca976f4..eb9d5b4c3b3 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/__tests__/Projects-test.js +++ b/server/sonar-web/src/main/js/apps/account/notifications/__tests__/Projects-test.js @@ -30,7 +30,7 @@ const newProject = { key: 'qux', name: 'Qux' }; it('should render projects', () => { const wrapper = shallow( - <UnconnectedProjects projects={projects}/> + <UnconnectedProjects projects={projects}/> ); expect(wrapper).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/account/notifications/actions.js b/server/sonar-web/src/main/js/apps/account/notifications/actions.js index 9562cbef45f..053a7aab6c4 100644 --- a/server/sonar-web/src/main/js/apps/account/notifications/actions.js +++ b/server/sonar-web/src/main/js/apps/account/notifications/actions.js @@ -36,10 +36,10 @@ export const fetchNotifications = () => (dispatch: Function) => { dispatch(fetchOrganizations(organizations)).then(() => { dispatch(receiveNotifications( - response.notifications, - response.channels, - response.globalTypes, - response.perProjectTypes + response.notifications, + response.channels, + response.globalTypes, + response.perProjectTypes )); }); }; @@ -49,14 +49,14 @@ export const fetchNotifications = () => (dispatch: Function) => { export const addNotification = (n: Notification) => (dispatch: Function) => ( api.addNotification(n.channel, n.type, n.project).then( - () => dispatch(addNotificationAction(n)), - onFail(dispatch) + () => dispatch(addNotificationAction(n)), + onFail(dispatch) ) ); export const removeNotification = (n: Notification) => (dispatch: Function) => ( api.removeNotification(n.channel, n.type, n.project).then( - () => dispatch(removeNotificationAction(n)), - onFail(dispatch) + () => dispatch(removeNotificationAction(n)), + onFail(dispatch) ) ); diff --git a/server/sonar-web/src/main/js/apps/account/projects/ProjectCard.js b/server/sonar-web/src/main/js/apps/account/projects/ProjectCard.js index 6013216f50b..ad0fb0caf15 100644 --- a/server/sonar-web/src/main/js/apps/account/projects/ProjectCard.js +++ b/server/sonar-web/src/main/js/apps/account/projects/ProjectCard.js @@ -43,8 +43,8 @@ export default class ProjectCard extends React.Component { <div className="account-project-analysis" title={analysisMoment.format('LLL')}> {translateWithParameters( - 'my_account.projects.analyzed_x', - analysisMoment.fromNow() + 'my_account.projects.analyzed_x', + analysisMoment.fromNow() )} </div> ) : ( diff --git a/server/sonar-web/src/main/js/apps/account/projects/__tests__/ProjectCard-test.js b/server/sonar-web/src/main/js/apps/account/projects/__tests__/ProjectCard-test.js index 85a8fe5cf95..9378a023f7a 100644 --- a/server/sonar-web/src/main/js/apps/account/projects/__tests__/ProjectCard-test.js +++ b/server/sonar-web/src/main/js/apps/account/projects/__tests__/ProjectCard-test.js @@ -61,7 +61,7 @@ it('should not render analysis date', () => { it('should render quality gate status', () => { const project = { ...BASE, qualityGate: 'ERROR' }; const output = shallow( - <ProjectCard project={project}/> + <ProjectCard project={project}/> ); expect(output.find('.account-project-quality-gate').find(Level).prop('level')).toBe('ERROR'); }); diff --git a/server/sonar-web/src/main/js/apps/account/projects/__tests__/Projects-test.js b/server/sonar-web/src/main/js/apps/account/projects/__tests__/Projects-test.js index 6e72afb8e13..470050668ca 100644 --- a/server/sonar-web/src/main/js/apps/account/projects/__tests__/Projects-test.js +++ b/server/sonar-web/src/main/js/apps/account/projects/__tests__/Projects-test.js @@ -30,7 +30,7 @@ it('should render list of ProjectCards', () => { ]; const output = shallow( - <Projects + <Projects projects={projects} total={5} loading={false} @@ -49,7 +49,7 @@ it('should render ListFooter', () => { const loadMore = jest.fn(); const footer = shallow( - <Projects + <Projects projects={projects} total={5} loading={false} @@ -65,7 +65,7 @@ it('should render ListFooter', () => { it('should render when no results', () => { const output = shallow( - <Projects + <Projects projects={[]} total={0} loading={false} diff --git a/server/sonar-web/src/main/js/apps/coding-rules/bulk-change-modal-view.js b/server/sonar-web/src/main/js/apps/coding-rules/bulk-change-modal-view.js index ae7d89af658..3611d044d44 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/bulk-change-modal-view.js +++ b/server/sonar-web/src/main/js/apps/coding-rules/bulk-change-modal-view.js @@ -35,14 +35,14 @@ export default ModalFormView.extend({ showSuccessMessage (profile, succeeded) { const profileBase = this.options.app.qualityProfiles.find(p => p.key === profile); const message = translateWithParameters('coding_rules.bulk_change.success', - profileBase.name, profileBase.language, succeeded); + profileBase.name, profileBase.language, succeeded); this.ui.messagesContainer.append(`<div class="alert alert-success">${message}</div>`); }, showWarnMessage (profile, succeeded, failed) { const profileBase = this.options.app.qualityProfiles.find(p => p.key === profile); const message = translateWithParameters('coding_rules.bulk_change.warning', - profileBase.name, profileBase.language, succeeded, failed); + profileBase.name, profileBase.language, succeeded, failed); this.ui.messagesContainer.append(`<div class="alert alert-warning">${message}</div>`); }, diff --git a/server/sonar-web/src/main/js/apps/component-measures/app/AppContainer.js b/server/sonar-web/src/main/js/apps/component-measures/app/AppContainer.js index a5ce1d8ea62..316314122fa 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/app/AppContainer.js +++ b/server/sonar-web/src/main/js/apps/component-measures/app/AppContainer.js @@ -35,6 +35,6 @@ const mapDispatchToProps = dispatch => { }; export default connect( - mapStateToProps, - mapDispatchToProps + mapStateToProps, + mapDispatchToProps )(App); diff --git a/server/sonar-web/src/main/js/apps/component-measures/components/bubbleChart/MeasureBubbleChartContainer.js b/server/sonar-web/src/main/js/apps/component-measures/components/bubbleChart/MeasureBubbleChartContainer.js index 50faab5adef..edaea8a2855 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/components/bubbleChart/MeasureBubbleChartContainer.js +++ b/server/sonar-web/src/main/js/apps/component-measures/components/bubbleChart/MeasureBubbleChartContainer.js @@ -33,6 +33,6 @@ const mapDispatchToProps = () => { }; export default connect( - mapStateToProps, - mapDispatchToProps + mapStateToProps, + mapDispatchToProps )(MeasureBubbleChart); diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/MeasureDetailsContainer.js b/server/sonar-web/src/main/js/apps/component-measures/details/MeasureDetailsContainer.js index 451e03e64e6..604aa4c3c6d 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/details/MeasureDetailsContainer.js +++ b/server/sonar-web/src/main/js/apps/component-measures/details/MeasureDetailsContainer.js @@ -43,6 +43,6 @@ const mapStateToProps = state => { const mapDispatchToProps = { fetchMeasure }; export default connect( - mapStateToProps, - mapDispatchToProps + mapStateToProps, + mapDispatchToProps )(MeasureDetails); diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/actions.js b/server/sonar-web/src/main/js/apps/component-measures/details/actions.js index 77dcc98ba09..8c858bad657 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/details/actions.js +++ b/server/sonar-web/src/main/js/apps/component-measures/details/actions.js @@ -65,8 +65,8 @@ export function fetchMeasure (metricKey, periodIndex = 1) { dispatch(requestMeasure(metric)); return getMeasuresAndMeta( - component.key, - metricsToRequest, + component.key, + metricsToRequest, { additionalFields: 'periods' } ).then(r => { const measures = enhanceWithLeak(r.component.measures, periodIndex); diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ListViewContainer.js b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ListViewContainer.js index 5c8189bc355..3304447f550 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ListViewContainer.js +++ b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/ListViewContainer.js @@ -55,6 +55,6 @@ const mapDispatchToProps = dispatch => { }; export default connect( - mapStateToProps, - mapDispatchToProps + mapStateToProps, + mapDispatchToProps )(ListView); diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/TreeViewContainer.js b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/TreeViewContainer.js index 79e88b4e036..1111d3c3afc 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/TreeViewContainer.js +++ b/server/sonar-web/src/main/js/apps/component-measures/details/drilldown/TreeViewContainer.js @@ -67,6 +67,6 @@ const mapDispatchToProps = dispatch => { }; export default connect( - mapStateToProps, - mapDispatchToProps + mapStateToProps, + mapDispatchToProps )(TreeView); diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/history/MeasureHistoryContainer.js b/server/sonar-web/src/main/js/apps/component-measures/details/history/MeasureHistoryContainer.js index 66a93eeb196..2da90ca76d4 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/details/history/MeasureHistoryContainer.js +++ b/server/sonar-web/src/main/js/apps/component-measures/details/history/MeasureHistoryContainer.js @@ -33,6 +33,6 @@ const mapDispatchToProps = () => { }; export default connect( - mapStateToProps, - mapDispatchToProps + mapStateToProps, + mapDispatchToProps )(MeasureHistory); diff --git a/server/sonar-web/src/main/js/apps/component-measures/details/treemap/MeasureTreemapContainer.js b/server/sonar-web/src/main/js/apps/component-measures/details/treemap/MeasureTreemapContainer.js index 17a777ec776..a9057d5f4ad 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/details/treemap/MeasureTreemapContainer.js +++ b/server/sonar-web/src/main/js/apps/component-measures/details/treemap/MeasureTreemapContainer.js @@ -33,6 +33,6 @@ const mapDispatchToProps = () => { }; export default connect( - mapStateToProps, - mapDispatchToProps + mapStateToProps, + mapDispatchToProps )(MeasureTreemap); diff --git a/server/sonar-web/src/main/js/apps/component-measures/home/AllMeasuresContainer.js b/server/sonar-web/src/main/js/apps/component-measures/home/AllMeasuresContainer.js index 1c351f23fc5..c33daf93fcb 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/home/AllMeasuresContainer.js +++ b/server/sonar-web/src/main/js/apps/component-measures/home/AllMeasuresContainer.js @@ -34,5 +34,5 @@ const mapStateToProps = state => { }; export default connect( - mapStateToProps + mapStateToProps )(AllMeasures); diff --git a/server/sonar-web/src/main/js/apps/component-measures/home/DomainMeasuresContainer.js b/server/sonar-web/src/main/js/apps/component-measures/home/DomainMeasuresContainer.js index 707817ab330..15f4dd192bb 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/home/DomainMeasuresContainer.js +++ b/server/sonar-web/src/main/js/apps/component-measures/home/DomainMeasuresContainer.js @@ -34,5 +34,5 @@ const mapStateToProps = state => { }; export default connect( - mapStateToProps + mapStateToProps )(DomainMeasures); diff --git a/server/sonar-web/src/main/js/apps/component-measures/home/HomeContainer.js b/server/sonar-web/src/main/js/apps/component-measures/home/HomeContainer.js index 17706f7140f..e1c85edfce0 100644 --- a/server/sonar-web/src/main/js/apps/component-measures/home/HomeContainer.js +++ b/server/sonar-web/src/main/js/apps/component-measures/home/HomeContainer.js @@ -43,6 +43,6 @@ const mapDispatchToProps = dispatch => { }; export default connect( - mapStateToProps, - mapDispatchToProps + mapStateToProps, + mapDispatchToProps )(Home); diff --git a/server/sonar-web/src/main/js/apps/issues/BulkChangeForm.js b/server/sonar-web/src/main/js/apps/issues/BulkChangeForm.js index d531971ef52..d7d1a67ebf3 100644 --- a/server/sonar-web/src/main/js/apps/issues/BulkChangeForm.js +++ b/server/sonar-web/src/main/js/apps/issues/BulkChangeForm.js @@ -203,15 +203,15 @@ export default ModalForm.extend({ const issueKeys = this.issues.map(issue => issue.key); bulkChangeIssues(issueKeys, query).then( - () => { - this.destroy(); - this.options.onChange(); - }, - (e: Object) => { - this.enableForm(); - this.hideSpinner(); - e.response.json().then(r => this.showErrors(r.errors, r.warnings)); - } + () => { + this.destroy(); + this.options.onChange(); + }, + (e: Object) => { + this.enableForm(); + this.hideSpinner(); + e.response.json().then(r => this.showErrors(r.errors, r.warnings)); + } ); }, diff --git a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationAdmin-test.js b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationAdmin-test.js index 9d65c83b5ca..340f760d386 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationAdmin-test.js +++ b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationAdmin-test.js @@ -24,7 +24,7 @@ import { UnconnectedOrganizationAdmin } from '../OrganizationAdmin'; it('should render children', () => { const organization = { canAdmin: true }; expect(shallow( - <UnconnectedOrganizationAdmin organization={organization}> + <UnconnectedOrganizationAdmin organization={organization}> <div>hello</div> </UnconnectedOrganizationAdmin> )).toMatchSnapshot(); @@ -33,7 +33,7 @@ it('should render children', () => { it('should not render anything', () => { const organization = { canAdmin: false }; expect(shallow( - <UnconnectedOrganizationAdmin organization={organization}> + <UnconnectedOrganizationAdmin organization={organization}> <div>hello</div> </UnconnectedOrganizationAdmin> )).toMatchSnapshot(); diff --git a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationPage-test.js b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationPage-test.js index 3fde2d682ef..01ffd045378 100644 --- a/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationPage-test.js +++ b/server/sonar-web/src/main/js/apps/organizations/components/__tests__/OrganizationPage-test.js @@ -23,7 +23,7 @@ import { UnconnectedOrganizationPage } from '../OrganizationPage'; it('smoke test', () => { const wrapper = shallow( - <UnconnectedOrganizationPage> + <UnconnectedOrganizationPage> <div>hello</div> </UnconnectedOrganizationPage> ); @@ -36,7 +36,7 @@ it('smoke test', () => { it('not found', () => { const wrapper = shallow( - <UnconnectedOrganizationPage> + <UnconnectedOrganizationPage> <div>hello</div> </UnconnectedOrganizationPage> ); diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigation-test.js b/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigation-test.js index 20d01e6f04b..938d00665d1 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigation-test.js +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigation-test.js @@ -24,20 +24,20 @@ import OrganizationNavigation from '../OrganizationNavigation'; it('regular user', () => { const organization = { key: 'foo', name: 'Foo', canAdmin: false, canDelete: false }; expect(shallow( - <OrganizationNavigation location={{ pathname: '/organizations/foo' }} organization={organization}/> + <OrganizationNavigation location={{ pathname: '/organizations/foo' }} organization={organization}/> )).toMatchSnapshot(); }); it('admin', () => { const organization = { key: 'foo', name: 'Foo', canAdmin: true, canDelete: true }; expect(shallow( - <OrganizationNavigation location={{ pathname: '/organizations/foo' }} organization={organization}/> + <OrganizationNavigation location={{ pathname: '/organizations/foo' }} organization={organization}/> )).toMatchSnapshot(); }); it('undeletable org', () => { const organization = { key: 'foo', name: 'Foo', canAdmin: true, canDelete: false }; expect(shallow( - <OrganizationNavigation location={{ pathname: '/organizations/foo' }} organization={organization}/> + <OrganizationNavigation location={{ pathname: '/organizations/foo' }} organization={organization}/> )).toMatchSnapshot(); }); diff --git a/server/sonar-web/src/main/js/apps/overview/actions.js b/server/sonar-web/src/main/js/apps/overview/actions.js index 562f861bfb0..4647b6ac94c 100644 --- a/server/sonar-web/src/main/js/apps/overview/actions.js +++ b/server/sonar-web/src/main/js/apps/overview/actions.js @@ -26,7 +26,7 @@ const PAGE_SIZE = 5; export const fetchRecentProjectActivity = (project: string) => (dispatch: Function) => ( api.getProjectActivity(project, { pageSize: PAGE_SIZE }).then( - ({ analyses, paging }) => dispatch(receiveProjectActivity(project, analyses, paging)), - onFail(dispatch) + ({ analyses, paging }) => dispatch(receiveProjectActivity(project, analyses, paging)), + onFail(dispatch) ) ); diff --git a/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.js b/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.js index 4064b6b49d7..4de489272c2 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.js +++ b/server/sonar-web/src/main/js/apps/overview/components/OverviewApp.js @@ -119,8 +119,8 @@ export default class OverviewApp extends React.Component { this.setState({ loading: true }); return getMeasuresAndMeta( - component.key, - METRICS, + component.key, + METRICS, { additionalFields: 'metrics,periods' } ).then(r => { if (this.mounted) { diff --git a/server/sonar-web/src/main/js/apps/overview/components/Timeline.js b/server/sonar-web/src/main/js/apps/overview/components/Timeline.js index 1ad08824d9b..f1ded836d83 100644 --- a/server/sonar-web/src/main/js/apps/overview/components/Timeline.js +++ b/server/sonar-web/src/main/js/apps/overview/components/Timeline.js @@ -27,7 +27,7 @@ const HEIGHT = 80; export default class Timeline extends React.Component { static propTypes = { history: React.PropTypes.arrayOf( - React.PropTypes.object + React.PropTypes.object ).isRequired, before: React.PropTypes.object, after: React.PropTypes.object diff --git a/server/sonar-web/src/main/js/apps/overview/main/CodeSmells.js b/server/sonar-web/src/main/js/apps/overview/main/CodeSmells.js index 60b0870f3a9..826f71bbf98 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/CodeSmells.js +++ b/server/sonar-web/src/main/js/apps/overview/main/CodeSmells.js @@ -30,8 +30,8 @@ import CodeSmellIcon from '../../../components/ui/CodeSmellIcon'; class CodeSmells extends React.Component { renderHeader () { return this.props.renderHeader( - 'Maintainability', - translate('metric.code_smells.name')); + 'Maintainability', + translate('metric.code_smells.name')); } renderDebt (metric, type) { @@ -46,7 +46,7 @@ class CodeSmells extends React.Component { const formattedSnapshotDate = moment(component.snapshotDate).format('LLL'); const tooltip = translateWithParameters('widget.as_calculated_on_x', - formattedSnapshotDate); + formattedSnapshotDate); return ( <Link to={getComponentIssuesUrl(component.key, params)}> @@ -69,9 +69,9 @@ class CodeSmells extends React.Component { renderTimeline (range, displayDate) { return this.props.renderTimeline( - 'sqale_index', - range, - displayDate ? this.renderTimelineStartDate() : null); + 'sqale_index', + range, + displayDate ? this.renderTimelineStartDate() : null); } renderLeak () { diff --git a/server/sonar-web/src/main/js/apps/overview/main/Coverage.js b/server/sonar-web/src/main/js/apps/overview/main/Coverage.js index eff433ac792..aa9a34d38e9 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/Coverage.js +++ b/server/sonar-web/src/main/js/apps/overview/main/Coverage.js @@ -44,8 +44,8 @@ class Coverage extends React.Component { renderHeader () { return this.props.renderHeader( - 'Coverage', - translate('metric.coverage.name')); + 'Coverage', + translate('metric.coverage.name')); } renderTimeline (range) { diff --git a/server/sonar-web/src/main/js/apps/overview/main/Duplications.js b/server/sonar-web/src/main/js/apps/overview/main/Duplications.js index 9cc786e48ca..cb1d98832e5 100644 --- a/server/sonar-web/src/main/js/apps/overview/main/Duplications.js +++ b/server/sonar-web/src/main/js/apps/overview/main/Duplications.js @@ -28,8 +28,8 @@ import DuplicationsRating from '../../../components/ui/DuplicationsRating'; class Duplications extends React.Component { renderHeader () { return this.props.renderHeader( - 'Duplications', - translate('overview.domain.duplications')); + 'Duplications', + translate('overview.domain.duplications')); } renderTimeline (range) { diff --git a/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaLink-test.js b/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaLink-test.js index 21ff71aee19..f661877b510 100644 --- a/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaLink-test.js +++ b/server/sonar-web/src/main/js/apps/overview/meta/__tests__/MetaLink-test.js @@ -31,7 +31,7 @@ it('should match snapshot', () => { }; expect(shallow( - <MetaLink link={link}/> + <MetaLink link={link}/> )).toMatchSnapshot(); }); diff --git a/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateCondition.js b/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateCondition.js index 363730eed2e..064c3d2b447 100644 --- a/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateCondition.js +++ b/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateCondition.js @@ -100,8 +100,8 @@ export default class QualityGateCondition extends React.Component { const periodDate = getPeriodDate(period); const className = classNames( - 'overview-quality-gate-condition', - 'overview-quality-gate-condition-' + condition.level.toLowerCase(), + 'overview-quality-gate-condition', + 'overview-quality-gate-condition-' + condition.level.toLowerCase(), { 'overview-quality-gate-condition-leak': period != null } ); @@ -155,7 +155,7 @@ export default class QualityGateCondition extends React.Component { translate('quality_gates.operator', condition.op); return this.wrapWithLink( - <div className="overview-quality-gate-condition-container"> + <div className="overview-quality-gate-condition-container"> <div className="overview-quality-gate-condition-value"> <Measure measure={{ value: actual, leak: actual }} metric={metric}/> </div> diff --git a/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateConditions.js b/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateConditions.js index 92c0215d0f6..e689587fcb2 100644 --- a/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateConditions.js +++ b/server/sonar-web/src/main/js/apps/overview/qualityGate/QualityGateConditions.js @@ -70,8 +70,8 @@ export default class QualityGateConditions extends React.Component { if (failedConditions.length > 0) { const metrics = failedConditions.map(condition => condition.metric); getMeasuresAndMeta( - component.key, - metrics, + component.key, + metrics, { additionalFields: 'metrics' } ).then(r => { if (this.mounted) { @@ -96,9 +96,9 @@ export default class QualityGateConditions extends React.Component { } const sortedConditions = sortBy( - conditions, - condition => LEVEL_ORDER.indexOf(condition.level), - condition => condition.metric.name + conditions, + condition => LEVEL_ORDER.indexOf(condition.level), + condition => condition.metric.name ); return ( diff --git a/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/QualityGateCondition-test.js b/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/QualityGateCondition-test.js index 8a854c3b03f..6b9323eafcc 100644 --- a/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/QualityGateCondition-test.js +++ b/server/sonar-web/src/main/js/apps/overview/qualityGate/__tests__/QualityGateCondition-test.js @@ -54,7 +54,7 @@ it('open_issues', () => { op: 'GT' }; expect(shallow( - <QualityGateCondition component={{ key: 'abcd-key' }} periods={[]} condition={condition}/> + <QualityGateCondition component={{ key: 'abcd-key' }} periods={[]} condition={condition}/> )).toMatchSnapshot(); }); @@ -75,48 +75,48 @@ it('new_open_issues', () => { op: 'GT' }; expect(shallow( - <QualityGateCondition component={{ key: 'abcd-key' }} periods={[]} condition={condition}/> + <QualityGateCondition component={{ key: 'abcd-key' }} periods={[]} condition={condition}/> )).toMatchSnapshot(); }); it('reliability_rating', () => { const condition = mockRatingCondition('reliability_rating'); expect(shallow( - <QualityGateCondition component={{ key: 'abcd-key' }} periods={[]} condition={condition}/> + <QualityGateCondition component={{ key: 'abcd-key' }} periods={[]} condition={condition}/> )).toMatchSnapshot(); }); it('security_rating', () => { const condition = mockRatingCondition('security_rating'); expect(shallow( - <QualityGateCondition component={{ key: 'abcd-key' }} periods={[]} condition={condition}/> + <QualityGateCondition component={{ key: 'abcd-key' }} periods={[]} condition={condition}/> )).toMatchSnapshot(); }); it('sqale_rating', () => { const condition = mockRatingCondition('sqale_rating'); expect(shallow( - <QualityGateCondition component={{ key: 'abcd-key' }} periods={[]} condition={condition}/> + <QualityGateCondition component={{ key: 'abcd-key' }} periods={[]} condition={condition}/> )).toMatchSnapshot(); }); it('new_reliability_rating', () => { const condition = mockRatingCondition('new_reliability_rating'); expect(shallow( - <QualityGateCondition component={{ key: 'abcd-key' }} periods={[]} condition={condition}/> + <QualityGateCondition component={{ key: 'abcd-key' }} periods={[]} condition={condition}/> )).toMatchSnapshot(); }); it('new_security_rating', () => { const condition = mockRatingCondition('new_security_rating'); expect(shallow( - <QualityGateCondition component={{ key: 'abcd-key' }} periods={[]} condition={condition}/> + <QualityGateCondition component={{ key: 'abcd-key' }} periods={[]} condition={condition}/> )).toMatchSnapshot(); }); it('new_sqale_rating', () => { const condition = mockRatingCondition('new_sqale_rating'); expect(shallow( - <QualityGateCondition component={{ key: 'abcd-key' }} periods={[]} condition={condition}/> + <QualityGateCondition component={{ key: 'abcd-key' }} periods={[]} condition={condition}/> )).toMatchSnapshot(); }); diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.js b/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.js index 8e73b76f64f..2119972b66e 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/ActionsCell.js @@ -69,8 +69,8 @@ export default class ActionsCell extends React.Component { setDefault (qualifier, e) { e.preventDefault(); setDefaultPermissionTemplate( - this.props.permissionTemplate.id, - qualifier + this.props.permissionTemplate.id, + qualifier ).then(this.props.refresh); } @@ -122,7 +122,7 @@ export default class ActionsCell extends React.Component { renderIfSingleTopQualifier (availableQualifiers) { return availableQualifiers.map(qualifier => ( this.renderSetDefaultLink(qualifier, ( - <span>{translate('permission_templates.set_default')}</span> + <span>{translate('permission_templates.set_default')}</span> ))) ); } @@ -130,7 +130,7 @@ export default class ActionsCell extends React.Component { renderIfMultipleTopQualifiers (availableQualifiers) { return availableQualifiers.map(qualifier => ( this.renderSetDefaultLink(qualifier, ( - <span> + <span> {translate('permission_templates.set_default_for')} {' '} <QualifierIcon qualifier={qualifier}/> diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/App.js b/server/sonar-web/src/main/js/apps/permission-templates/components/App.js index 3502b83d4a0..0bf2c2fa669 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/App.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/App.js @@ -61,8 +61,8 @@ export default class App extends React.Component { if (this.mounted) { const permissions = sortPermissions(r.permissions); const permissionTemplates = mergeDefaultsToTemplates( - mergePermissionsToTemplates(r.permissionTemplates, permissions), - r.defaultTemplates + mergePermissionsToTemplates(r.permissionTemplates, permissions), + r.defaultTemplates ); this.setState({ ready: true, diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/AppContainer.js b/server/sonar-web/src/main/js/apps/permission-templates/components/AppContainer.js index e085e38a1d3..4a62e4c7c7a 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/AppContainer.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/AppContainer.js @@ -27,5 +27,5 @@ const mapStateToProps = state => ({ }); export default connect( - mapStateToProps + mapStateToProps )(App); diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/List.js b/server/sonar-web/src/main/js/apps/permission-templates/components/List.js index e36666005d7..30d2de1feb0 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/List.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/List.js @@ -26,7 +26,7 @@ export default class List extends React.Component { static propTypes = { organization: React.PropTypes.object, permissionTemplates: React.PropTypes.arrayOf( - PermissionTemplateType).isRequired, + PermissionTemplateType).isRequired, permissions: React.PropTypes.array.isRequired, topQualifiers: React.PropTypes.array.isRequired, refresh: CallbackType diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/Template.js b/server/sonar-web/src/main/js/apps/permission-templates/components/Template.js index 099ac2ccc6c..2ee080765c7 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/Template.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/Template.js @@ -67,14 +67,14 @@ class Template extends React.Component { if (filter !== 'groups') { requests.push(api.getPermissionTemplateUsers( - template.id, finalQuery, selectedPermission)); + template.id, finalQuery, selectedPermission)); } else { requests.push(Promise.resolve([])); } if (filter !== 'users') { requests.push(api.getPermissionTemplateGroups( - template.id, finalQuery, selectedPermission)); + template.id, finalQuery, selectedPermission)); } else { requests.push(Promise.resolve([])); } @@ -97,9 +97,9 @@ class Template extends React.Component { const hasPermission = user.permissions.includes(permission); const request = hasPermission ? api.revokeTemplatePermissionFromUser( - template.id, user.login, permission) : + template.id, user.login, permission) : api.grantTemplatePermissionToUser( - template.id, user.login, permission); + template.id, user.login, permission); request.then(() => this.requestHolders()).then(this.props.refresh); } diff --git a/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/ActionsCell-test.js b/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/ActionsCell-test.js index 0204d186524..c2e83d5c093 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/ActionsCell-test.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/components/__tests__/ActionsCell-test.js @@ -30,7 +30,7 @@ const SAMPLE = { function renderActionsCell (props) { return shallow( - <ActionsCell + <ActionsCell permissionTemplate={SAMPLE} topQualifiers={['TRK', 'VW']} refresh={() => true} diff --git a/server/sonar-web/src/main/js/apps/permission-templates/views/CreateView.js b/server/sonar-web/src/main/js/apps/permission-templates/views/CreateView.js index e68ba050cc4..f46d91ca715 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/views/CreateView.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/views/CreateView.js @@ -33,14 +33,14 @@ export default FormView.extend({ Object.assign(data, { organization: this.options.organization.key }); } createPermissionTemplate(data).then( - r => { - this.trigger('done', r); - this.destroy(); - }, - e => { - this.enableForm(); - parseError(e).then(message => this.showSingleError(message)); - } + r => { + this.trigger('done', r); + this.destroy(); + }, + e => { + this.enableForm(); + parseError(e).then(message => this.showSingleError(message)); + } ); } }); diff --git a/server/sonar-web/src/main/js/apps/permission-templates/views/DeleteView.js b/server/sonar-web/src/main/js/apps/permission-templates/views/DeleteView.js index 1386d682372..b1a7f1f30da 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/views/DeleteView.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/views/DeleteView.js @@ -32,14 +32,14 @@ export default ModalForm.extend({ sendRequest () { deletePermissionTemplate({ templateId: this.model.id }).then( - () => { - this.trigger('done'); - this.destroy(); - }, - e => { - this.enableForm(); - parseError(e).then(message => this.showSingleError(message)); - } + () => { + this.trigger('done'); + this.destroy(); + }, + e => { + this.enableForm(); + parseError(e).then(message => this.showSingleError(message)); + } ); } }); diff --git a/server/sonar-web/src/main/js/apps/permission-templates/views/UpdateView.js b/server/sonar-web/src/main/js/apps/permission-templates/views/UpdateView.js index 39f41950491..094feb677d8 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/views/UpdateView.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/views/UpdateView.js @@ -30,14 +30,14 @@ export default FormView.extend({ description: this.$('#permission-template-description').val(), projectKeyPattern: this.$('#permission-template-project-key-pattern').val() }).then( - () => { - this.options.refresh(); - this.destroy(); - }, - e => { - this.enableForm(); - parseError(e).then(message => this.showSingleError(message)); - } + () => { + this.options.refresh(); + this.destroy(); + }, + e => { + this.enableForm(); + parseError(e).then(message => this.showSingleError(message)); + } ); } }); diff --git a/server/sonar-web/src/main/js/apps/permission-templates/views/UsersView.js b/server/sonar-web/src/main/js/apps/permission-templates/views/UsersView.js index 75304fa9a08..ee25cb2fa23 100644 --- a/server/sonar-web/src/main/js/apps/permission-templates/views/UsersView.js +++ b/server/sonar-web/src/main/js/apps/permission-templates/views/UsersView.js @@ -39,12 +39,12 @@ export default Modal.extend({ const checked = this.$('#grant-to-project-creators').is(':checked'); if (checked) { addProjectCreatorToTemplate( - this.options.permissionTemplate.name, - this.options.permission.key); + this.options.permissionTemplate.name, + this.options.permission.key); } else { removeProjectCreatorFromTemplate( - this.options.permissionTemplate.name, - this.options.permission.key); + this.options.permissionTemplate.name, + this.options.permission.key); } }, diff --git a/server/sonar-web/src/main/js/apps/permissions/global/components/AllHoldersList.js b/server/sonar-web/src/main/js/apps/permissions/global/components/AllHoldersList.js index a41bb63c58c..d94862233a2 100644 --- a/server/sonar-web/src/main/js/apps/permissions/global/components/AllHoldersList.js +++ b/server/sonar-web/src/main/js/apps/permissions/global/components/AllHoldersList.js @@ -145,6 +145,6 @@ const mapDispatchToProps = (dispatch, ownProps: OwnProps) => { }; export default connect( - mapStateToProps, - mapDispatchToProps + mapStateToProps, + mapDispatchToProps )(AllHoldersList); diff --git a/server/sonar-web/src/main/js/apps/permissions/global/components/PageHeader.js b/server/sonar-web/src/main/js/apps/permissions/global/components/PageHeader.js index 54c2f7a6068..7d58a7b12f6 100644 --- a/server/sonar-web/src/main/js/apps/permissions/global/components/PageHeader.js +++ b/server/sonar-web/src/main/js/apps/permissions/global/components/PageHeader.js @@ -60,5 +60,5 @@ const mapStateToProps = state => ({ }); export default connect( - mapStateToProps + mapStateToProps )(PageHeader); diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/AllHoldersList.js b/server/sonar-web/src/main/js/apps/permissions/project/components/AllHoldersList.js index 8a6e2bdede0..507cd76849a 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/AllHoldersList.js +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/AllHoldersList.js @@ -64,15 +64,15 @@ class AllHoldersList extends React.Component { if (hasPermission) { this.props.revokePermissionFromUser( - this.props.project.key, - user.login, - permission + this.props.project.key, + user.login, + permission ); } else { this.props.grantPermissionToUser( - this.props.project.key, - user.login, - permission + this.props.project.key, + user.login, + permission ); } } @@ -82,15 +82,15 @@ class AllHoldersList extends React.Component { if (hasPermission) { this.props.revokePermissionFromGroup( - this.props.project.key, - group.name, - permission + this.props.project.key, + group.name, + permission ); } else { this.props.grantPermissionToGroup( - this.props.project.key, - group.name, - permission + this.props.project.key, + group.name, + permission ); } } @@ -159,6 +159,6 @@ const mapDispatchToProps = (dispatch, ownProps: OwnProps) => ({ }); export default connect( - mapStateToProps, - mapDispatchToProps + mapStateToProps, + mapDispatchToProps )(AllHoldersList); diff --git a/server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.js b/server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.js index bc97d1c6ddf..74816c0fef9 100644 --- a/server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.js +++ b/server/sonar-web/src/main/js/apps/permissions/project/components/PageHeader.js @@ -88,6 +88,6 @@ const mapDispatchToProps = (dispatch, ownProps) => ({ }); export default connect( - mapStateToProps, - mapDispatchToProps + mapStateToProps, + mapDispatchToProps )(PageHeader); diff --git a/server/sonar-web/src/main/js/apps/permissions/shared/components/PageError.js b/server/sonar-web/src/main/js/apps/permissions/shared/components/PageError.js index 569e183a98c..c7faca28cd3 100644 --- a/server/sonar-web/src/main/js/apps/permissions/shared/components/PageError.js +++ b/server/sonar-web/src/main/js/apps/permissions/shared/components/PageError.js @@ -46,5 +46,5 @@ const mapStateToProps = state => ({ }); export default connect( - mapStateToProps + mapStateToProps )(PageError); diff --git a/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdate.js b/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdate.js index ece2e7b689f..0e04b507be6 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdate.js +++ b/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdate.js @@ -65,7 +65,7 @@ class BulkUpdate extends React.Component { } this.props.addGlobalSuccessMessage( - translate('update_key.key_updated.reload')); + translate('update_key.key_updated.reload')); this.setState({ updating: false }); reloadUpdateKeyPage(newComponentKey); }).catch(e => { @@ -114,9 +114,9 @@ class BulkUpdate extends React.Component { </div> <div> {translateWithParameters( - 'update_key.current_key_for_project_x_is_x', - component.name, - component.key + 'update_key.current_key_for_project_x_is_x', + component.name, + component.key )} </div> </header> @@ -136,9 +136,9 @@ class BulkUpdate extends React.Component { } export default connect( - null, { - addGlobalErrorMessage, - addGlobalSuccessMessage, - closeAllGlobalMessages - } + null, { + addGlobalErrorMessage, + addGlobalSuccessMessage, + closeAllGlobalMessages + } )(BulkUpdate); diff --git a/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateResults.js b/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateResults.js index e9099daa502..546a803dc25 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateResults.js +++ b/server/sonar-web/src/main/js/apps/project-admin/key/BulkUpdateResults.js @@ -44,8 +44,8 @@ export default class BulkUpdateResults extends React.Component { {isEmpty && ( <div id="bulk-update-nothing" className="spacer-bottom"> {translateWithParameters( - 'update_key.no_key_to_update', - replace + 'update_key.no_key_to_update', + replace )} </div> )} @@ -53,9 +53,9 @@ export default class BulkUpdateResults extends React.Component { {hasDuplications && ( <div id="bulk-update-duplicate" className="spacer-bottom"> {translateWithParameters( - 'update_key.cant_update_because_duplicate_keys', - replace, - by + 'update_key.cant_update_because_duplicate_keys', + replace, + by )} </div> )} diff --git a/server/sonar-web/src/main/js/apps/project-admin/key/Key.js b/server/sonar-web/src/main/js/apps/project-admin/key/Key.js index 4e95d344f26..42c3929bb5f 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/key/Key.js +++ b/server/sonar-web/src/main/js/apps/project-admin/key/Key.js @@ -62,12 +62,12 @@ class Key extends React.Component { return this.props.changeKey(key, newKey).then(() => { if (key === this.props.component.key) { this.props.addGlobalSuccessMessage( - translate('update_key.key_updated.reload')); + translate('update_key.key_updated.reload')); RecentHistory.remove(key); reloadUpdateKeyPage(newKey); } else { this.props.addGlobalSuccessMessage( - translate('update_key.key_updated')); + translate('update_key.key_updated')); } }).catch(e => { parseError(e).then(this.props.addGlobalErrorMessage); @@ -153,11 +153,11 @@ const mapStateToProps = (state, ownProps) => ({ }); export default connect( - mapStateToProps, { - fetchProjectModules, - changeKey, - addGlobalErrorMessage, - addGlobalSuccessMessage, - closeAllGlobalMessages - } + mapStateToProps, { + fetchProjectModules, + changeKey, + addGlobalErrorMessage, + addGlobalSuccessMessage, + closeAllGlobalMessages + } )(Key); diff --git a/server/sonar-web/src/main/js/apps/project-admin/links/Links.js b/server/sonar-web/src/main/js/apps/project-admin/links/Links.js index 9184e13ff20..e25ed2cc587 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/links/Links.js +++ b/server/sonar-web/src/main/js/apps/project-admin/links/Links.js @@ -78,6 +78,6 @@ const mapStateToProps = (state, ownProps) => ({ }); export default connect( - mapStateToProps, + mapStateToProps, { fetchProjectLinks, createProjectLink, deleteProjectLink } )(Links); diff --git a/server/sonar-web/src/main/js/apps/project-admin/quality-gate/QualityGate.js b/server/sonar-web/src/main/js/apps/project-admin/quality-gate/QualityGate.js index 51054db43de..5b29ac2b0f1 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/quality-gate/QualityGate.js +++ b/server/sonar-web/src/main/js/apps/project-admin/quality-gate/QualityGate.js @@ -64,6 +64,6 @@ const mapStateToProps = (state, ownProps) => ({ }); export default connect( - mapStateToProps, + mapStateToProps, { fetchProjectGate, setProjectGate } )(QualityGate); diff --git a/server/sonar-web/src/main/js/apps/project-admin/quality-profiles/QualityProfiles.js b/server/sonar-web/src/main/js/apps/project-admin/quality-profiles/QualityProfiles.js index 9f348351573..eee707639ac 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/quality-profiles/QualityProfiles.js +++ b/server/sonar-web/src/main/js/apps/project-admin/quality-profiles/QualityProfiles.js @@ -75,6 +75,6 @@ const mapStateToProps = (state, ownProps) => ({ }); export default connect( - mapStateToProps, + mapStateToProps, { fetchProjectProfiles, setProjectProfile } )(QualityProfiles); diff --git a/server/sonar-web/src/main/js/apps/project-admin/store/actions.js b/server/sonar-web/src/main/js/apps/project-admin/store/actions.js index 5bee0be32d4..9cb5cd83fea 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/store/actions.js +++ b/server/sonar-web/src/main/js/apps/project-admin/store/actions.js @@ -73,9 +73,9 @@ export const setProjectProfile = (projectKey, oldKey, newKey) => request.then(() => { dispatch(setProjectProfileAction(projectKey, oldKey, newKey)); dispatch(addGlobalSuccessMessage( - translateWithParameters( - 'project_quality_profile.successfully_updated', - newProfile.languageName))); + translateWithParameters( + 'project_quality_profile.successfully_updated', + newProfile.languageName))); }); }; @@ -118,7 +118,7 @@ export const setProjectGate = (projectKey, oldId, newId) => dispatch => { request.then(() => { dispatch(setProjectGateAction(projectKey, newId)); dispatch(addGlobalSuccessMessage( - translate('project_quality_gate.successfully_updated'))); + translate('project_quality_gate.successfully_updated'))); }); }; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/actions.js b/server/sonar-web/src/main/js/apps/projectActivity/actions.js index 25cf7760bc4..ed8971d762d 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/actions.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/actions.js @@ -37,8 +37,8 @@ const rejectOnFail = (dispatch: Function) => (error: Object) => { export const fetchProjectActivity = (project: string, filter: ?string) => (dispatch: Function): void => { api.getProjectActivity(project, { category: filter }).then( - ({ analyses, paging }) => dispatch(receiveProjectActivity(project, analyses, paging)), - onFail(dispatch) + ({ analyses, paging }) => dispatch(receiveProjectActivity(project, analyses, paging)), + onFail(dispatch) ); }; @@ -48,23 +48,23 @@ export const fetchMoreProjectActivity = (project: string, filter: ?string) => const { pageIndex } = getPaging(projectActivity, project); api.getProjectActivity(project, { category: filter, pageIndex: pageIndex + 1 }).then( - ({ analyses, paging }) => dispatch(receiveProjectActivity(project, analyses, paging)), - onFail(dispatch) + ({ analyses, paging }) => dispatch(receiveProjectActivity(project, analyses, paging)), + onFail(dispatch) ); }; export const addCustomEvent = (analysis: string, name: string, category?: string) => (dispatch: Function): Promise<*> => { return api.createEvent(analysis, name, category).then( - ({ analysis, ...event }) => dispatch(addEvent(analysis, event)), - rejectOnFail(dispatch) + ({ analysis, ...event }) => dispatch(addEvent(analysis, event)), + rejectOnFail(dispatch) ); }; export const deleteEvent = (analysis: string, event: string) => (dispatch: Function): Promise<*> => { return api.deleteEvent(event).then( - () => dispatch(deleteEventAction(analysis, event)), - rejectOnFail(dispatch) + () => dispatch(deleteEventAction(analysis, event)), + rejectOnFail(dispatch) ); }; @@ -74,14 +74,14 @@ export const addVersion = (analysis: string, version: string) => (dispatch: Func export const changeEvent = (event: string, name: string) => (dispatch: Function): Promise<*> => { return api.changeEvent(event, name).then( - () => dispatch(changeEventAction(event, { name })), - rejectOnFail(dispatch) + () => dispatch(changeEventAction(event, { name })), + rejectOnFail(dispatch) ); }; export const deleteAnalysis = (project: string, analysis: string) => (dispatch: Function): Promise<*> => { return api.deleteAnalysis(analysis).then( - () => dispatch(deleteAnalysisAction(project, analysis)), - rejectOnFail(dispatch) + () => dispatch(deleteAnalysisAction(project, analysis)), + rejectOnFail(dispatch) ); }; diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/Events.js b/server/sonar-web/src/main/js/apps/projectActivity/components/Events.js index 5a892780fb8..d2b5eb0b0c5 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/Events.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/Events.js @@ -33,11 +33,11 @@ export default class Events extends React.Component { render () { const sortedEvents: Array<EventType> = sortBy( - this.props.events, + this.props.events, // versions first - (event: EventType) => event.category === 'VERSION' ? 0 : 1, + (event: EventType) => event.category === 'VERSION' ? 0 : 1, // then the rest sorted by category - 'category' + 'category' ); return ( diff --git a/server/sonar-web/src/main/js/apps/projects-admin/AppContainer.js b/server/sonar-web/src/main/js/apps/projects-admin/AppContainer.js index 322402067e8..baca690631f 100644 --- a/server/sonar-web/src/main/js/apps/projects-admin/AppContainer.js +++ b/server/sonar-web/src/main/js/apps/projects-admin/AppContainer.js @@ -48,5 +48,5 @@ const mapStateToProps = state => ({ }); export default connect( - mapStateToProps + mapStateToProps )(AppContainer); diff --git a/server/sonar-web/src/main/js/apps/projects-admin/main.js b/server/sonar-web/src/main/js/apps/projects-admin/main.js index 3daf99929a8..c683e7d0c28 100644 --- a/server/sonar-web/src/main/js/apps/projects-admin/main.js +++ b/server/sonar-web/src/main/js/apps/projects-admin/main.js @@ -130,7 +130,7 @@ export default React.createClass({ loadMore () { this.setState({ ready: false, page: this.state.page + 1 }, - this.requestProjects); + this.requestProjects); }, onSearch (query) { diff --git a/server/sonar-web/src/main/js/apps/projects/components/AllProjectsContainer.js b/server/sonar-web/src/main/js/apps/projects/components/AllProjectsContainer.js index 4dc095c83d6..1230fca10d3 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/AllProjectsContainer.js +++ b/server/sonar-web/src/main/js/apps/projects/components/AllProjectsContainer.js @@ -28,6 +28,6 @@ const mapStateToProps = state => ({ }); export default connect( - mapStateToProps, + mapStateToProps, { fetchProjects } )(AllProjects); diff --git a/server/sonar-web/src/main/js/apps/projects/components/FavoriteFilterContainer.js b/server/sonar-web/src/main/js/apps/projects/components/FavoriteFilterContainer.js index 9ce4dda7448..7ffbb1b2c36 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/FavoriteFilterContainer.js +++ b/server/sonar-web/src/main/js/apps/projects/components/FavoriteFilterContainer.js @@ -26,5 +26,5 @@ const mapStateToProps = state => ({ }); export default connect( - mapStateToProps + mapStateToProps )(FavoriteFilter); diff --git a/server/sonar-web/src/main/js/apps/projects/components/FavoriteProjectsContainer.js b/server/sonar-web/src/main/js/apps/projects/components/FavoriteProjectsContainer.js index bda8338492d..d0afc946ca0 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/FavoriteProjectsContainer.js +++ b/server/sonar-web/src/main/js/apps/projects/components/FavoriteProjectsContainer.js @@ -28,6 +28,6 @@ const mapStateToProps = state => ({ }); export default connect( - mapStateToProps, + mapStateToProps, { fetchProjects } )(AllProjects); diff --git a/server/sonar-web/src/main/js/apps/projects/components/PageHeaderContainer.js b/server/sonar-web/src/main/js/apps/projects/components/PageHeaderContainer.js index dbd04081b3b..eb0cce97447 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/PageHeaderContainer.js +++ b/server/sonar-web/src/main/js/apps/projects/components/PageHeaderContainer.js @@ -22,5 +22,5 @@ import PageHeader from './PageHeader'; import { getProjectsAppState } from '../../../store/rootReducer'; export default connect( - state => getProjectsAppState(state) + state => getProjectsAppState(state) )(PageHeader); diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardContainer.js b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardContainer.js index 022bc3b39ec..f03bd24cc57 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardContainer.js +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardContainer.js @@ -22,8 +22,8 @@ import ProjectCard from './ProjectCard'; import { getComponent, getComponentMeasures } from '../../../store/rootReducer'; export default connect( - (state, ownProps) => ({ - project: getComponent(state, ownProps.projectKey), - measures: getComponentMeasures(state, ownProps.projectKey) - }) + (state, ownProps) => ({ + project: getComponent(state, ownProps.projectKey), + measures: getComponentMeasures(state, ownProps.projectKey) + }) )(ProjectCard); diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectsListContainer.js b/server/sonar-web/src/main/js/apps/projects/components/ProjectsListContainer.js index c84c8162c20..a9efaeb3bde 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectsListContainer.js +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectsListContainer.js @@ -22,8 +22,8 @@ import ProjectsList from './ProjectsList'; import { getProjects, getProjectsAppState } from '../../../store/rootReducer'; export default connect( - state => ({ - projects: getProjects(state), - total: getProjectsAppState(state).total - }) + state => ({ + projects: getProjects(state), + total: getProjectsAppState(state).total + }) )(ProjectsList); diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectsListFooterContainer.js b/server/sonar-web/src/main/js/apps/projects/components/ProjectsListFooterContainer.js index 1ce74de10fe..4fafc66df07 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectsListFooterContainer.js +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectsListFooterContainer.js @@ -37,6 +37,6 @@ const mapDispatchToProps = (dispatch, ownProps) => ({ }); export default connect( - mapStateToProps, - mapDispatchToProps + mapStateToProps, + mapDispatchToProps )(ProjectsListFooter); diff --git a/server/sonar-web/src/main/js/apps/projects/store/facetsDuck.js b/server/sonar-web/src/main/js/apps/projects/store/facetsDuck.js index 93ca4348b8c..03640a8b2f4 100644 --- a/server/sonar-web/src/main/js/apps/projects/store/facetsDuck.js +++ b/server/sonar-web/src/main/js/apps/projects/store/facetsDuck.js @@ -70,9 +70,9 @@ const getFacetsMap = facets => { }; const reducer = createMap( - (state, action) => action.type === actions.RECEIVE_PROJECTS, - () => false, - (state, action) => getFacetsMap(action.facets) + (state, action) => action.type === actions.RECEIVE_PROJECTS, + () => false, + (state, action) => getFacetsMap(action.facets) ); export default reducer; diff --git a/server/sonar-web/src/main/js/apps/projects/store/stateDuck.js b/server/sonar-web/src/main/js/apps/projects/store/stateDuck.js index dd7ba0ca1e4..b2f0da3c31a 100644 --- a/server/sonar-web/src/main/js/apps/projects/store/stateDuck.js +++ b/server/sonar-web/src/main/js/apps/projects/store/stateDuck.js @@ -30,13 +30,13 @@ export const updateState = changes => ({ export default createValue( // should update - (state, action) => action.type === actions.UPDATE_STATE, + (state, action) => action.type === actions.UPDATE_STATE, // should reset - () => false, + () => false, // get next value - (state, action) => ({ ...state, ...action.changes }), + (state, action) => ({ ...state, ...action.changes }), // default value {} diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/ThresholdInput-test.js b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/ThresholdInput-test.js index 750ba758022..b0ca0801102 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/ThresholdInput-test.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/ThresholdInput-test.js @@ -26,7 +26,7 @@ import { change } from '../../../../helpers/testUtils'; describe('on strings', () => { it('should render text input', () => { const input = shallow( - <ThresholdInput + <ThresholdInput name="foo" value="2" metric={{ type: 'INTEGER' }} @@ -40,7 +40,7 @@ describe('on strings', () => { it('should change', () => { const onChange = jest.fn(); const input = shallow( - <ThresholdInput + <ThresholdInput name="foo" value="2" metric={{ type: 'INTEGER' }} @@ -54,7 +54,7 @@ describe('on strings', () => { describe('on ratings', () => { it('should render Select', () => { const select = shallow( - <ThresholdInput + <ThresholdInput name="foo" value="2" metric={{ type: 'RATING' }} @@ -67,7 +67,7 @@ describe('on ratings', () => { it('should set', () => { const onChange = jest.fn(); const select = shallow( - <ThresholdInput + <ThresholdInput name="foo" value="2" metric={{ type: 'RATING' }} @@ -80,7 +80,7 @@ describe('on ratings', () => { it('should unset', () => { const onChange = jest.fn(); const select = shallow( - <ThresholdInput + <ThresholdInput name="foo" value="2" metric={{ type: 'RATING' }} diff --git a/server/sonar-web/src/main/js/apps/quality-gates/containers/DetailsContainer.js b/server/sonar-web/src/main/js/apps/quality-gates/containers/DetailsContainer.js index 3d6d1ae7a11..623b238d399 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/containers/DetailsContainer.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/containers/DetailsContainer.js @@ -49,6 +49,6 @@ const mapDispatchToProps = dispatch => ({ }); export default connect( - mapStateToProps, - mapDispatchToProps + mapStateToProps, + mapDispatchToProps )(Details); diff --git a/server/sonar-web/src/main/js/apps/quality-gates/containers/QualityGatesAppContainer.js b/server/sonar-web/src/main/js/apps/quality-gates/containers/QualityGatesAppContainer.js index 39603aa242e..27a4c349117 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/containers/QualityGatesAppContainer.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/containers/QualityGatesAppContainer.js @@ -33,6 +33,6 @@ const mapDispatchToProps = dispatch => ({ }); export default connect( - mapStateToProps, - mapDispatchToProps + mapStateToProps, + mapDispatchToProps )(QualityGateApp); diff --git a/server/sonar-web/src/main/js/apps/quality-gates/views/copy-view.js b/server/sonar-web/src/main/js/apps/quality-gates/views/copy-view.js index 717afaf9e3c..684f33a882f 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/views/copy-view.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/views/copy-view.js @@ -36,14 +36,14 @@ export default ModalForm.extend({ const name = this.$('#quality-gate-form-name').val(); copyQualityGate(id, name).then( - qualityGate => { - this.destroy(); - this.options.onCopy(qualityGate); - }, - error => { - this.enableForm(); - parseError(error).then(msg => this.showErrors([{ msg }])); - } + qualityGate => { + this.destroy(); + this.options.onCopy(qualityGate); + }, + error => { + this.enableForm(); + parseError(error).then(msg => this.showErrors([{ msg }])); + } ); }, diff --git a/server/sonar-web/src/main/js/apps/quality-gates/views/create-view.js b/server/sonar-web/src/main/js/apps/quality-gates/views/create-view.js index a081f2d011b..ba8bb4ec3fc 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/views/create-view.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/views/create-view.js @@ -35,14 +35,14 @@ export default ModalForm.extend({ const name = this.$('#quality-gate-form-name').val(); createQualityGate(name).then( - qualityGate => { - this.destroy(); - this.options.onAdd(qualityGate); - }, - error => { - this.enableForm(); - parseError(error).then(msg => this.showErrors([{ msg }])); - } + qualityGate => { + this.destroy(); + this.options.onAdd(qualityGate); + }, + error => { + this.enableForm(); + parseError(error).then(msg => this.showErrors([{ msg }])); + } ); }, diff --git a/server/sonar-web/src/main/js/apps/quality-gates/views/delete-view.js b/server/sonar-web/src/main/js/apps/quality-gates/views/delete-view.js index 935647dee31..097193486c9 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/views/delete-view.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/views/delete-view.js @@ -35,14 +35,14 @@ export default ModalForm.extend({ const { id } = this.options.qualityGate; deleteQualityGate(id).then( - () => { - this.destroy(); - this.options.onDelete(this.options.qualityGate); - }, - error => { - this.enableForm(); - parseError(error).then(msg => this.showErrors([{ msg }])); - } + () => { + this.destroy(); + this.options.onDelete(this.options.qualityGate); + }, + error => { + this.enableForm(); + parseError(error).then(msg => this.showErrors([{ msg }])); + } ); }, diff --git a/server/sonar-web/src/main/js/apps/quality-gates/views/gate-conditions-delete-view.js b/server/sonar-web/src/main/js/apps/quality-gates/views/gate-conditions-delete-view.js index ca074b298f7..8a2e78abbe9 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/views/gate-conditions-delete-view.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/views/gate-conditions-delete-view.js @@ -34,14 +34,14 @@ export default ModalForm.extend({ sendRequest () { return deleteCondition(this.options.condition.id).then( - () => { - this.destroy(); - this.options.onDelete(); - }, - error => { - this.enableForm(); - parseError(error).then(msg => this.showErrors([{ msg }])); - } + () => { + this.destroy(); + this.options.onDelete(); + }, + error => { + this.enableForm(); + parseError(error).then(msg => this.showErrors([{ msg }])); + } ); }, diff --git a/server/sonar-web/src/main/js/apps/quality-gates/views/rename-view.js b/server/sonar-web/src/main/js/apps/quality-gates/views/rename-view.js index 4a54eb289c6..75ffc986086 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/views/rename-view.js +++ b/server/sonar-web/src/main/js/apps/quality-gates/views/rename-view.js @@ -36,14 +36,14 @@ export default ModalForm.extend({ const name = this.$('#quality-gate-form-name').val(); renameQualityGate(id, name).then( - () => { - this.destroy(); - this.options.onRename(this.options.qualityGate, name); - }, - error => { - this.enableForm(); - parseError(error).then(msg => this.showErrors([{ msg }])); - } + () => { + this.destroy(); + this.options.onRename(this.options.qualityGate, name); + }, + error => { + this.enableForm(); + parseError(error).then(msg => this.showErrors([{ msg }])); + } ); }, diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/__tests__/utils-test.js b/server/sonar-web/src/main/js/apps/quality-profiles/__tests__/utils-test.js index d95c7849844..fa80a900211 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/__tests__/utils-test.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/__tests__/utils-test.js @@ -34,7 +34,7 @@ describe('#sortProfiles', () => { const profile2 = createProfile('profile2'); const profile3 = createProfile('profile3'); checkOrder( - sortProfiles([profile1, profile2, profile3]), + sortProfiles([profile1, profile2, profile3]), ['profile1', 'profile2', 'profile3'] ); }); @@ -44,7 +44,7 @@ describe('#sortProfiles', () => { const profile2 = createProfile('profile2'); const profile3 = createProfile('profile3'); checkOrder( - sortProfiles([profile3, profile1, profile2]), + sortProfiles([profile3, profile1, profile2]), ['profile1', 'profile2', 'profile3'] ); }); @@ -54,7 +54,7 @@ describe('#sortProfiles', () => { const child2 = createProfile('child2', 'parent'); const parent = createProfile('parent'); checkOrder( - sortProfiles([child1, child2, parent]), + sortProfiles([child1, child2, parent]), ['parent', 'child1', 'child2'] ); }); @@ -64,7 +64,7 @@ describe('#sortProfiles', () => { const profile2 = createProfile('profile2', 'profile3'); const profile3 = createProfile('profile3', 'profile1'); checkOrder( - sortProfiles([profile3, profile2, profile1]), + sortProfiles([profile3, profile2, profile1]), ['profile1', 'profile3', 'profile2'] ); }); diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ParameterChange.js b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ParameterChange.js index ffa410509f4..f57f20c32ee 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ParameterChange.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ParameterChange.js @@ -33,8 +33,8 @@ export default class ParameterChange extends React.Component { return ( <div style={{ whiteSpace: 'normal' }}> {translateWithParameters( - 'quality_profiles.changelog.parameter_reset_to_default_value', - name + 'quality_profiles.changelog.parameter_reset_to_default_value', + name )} </div> ); @@ -43,9 +43,9 @@ export default class ParameterChange extends React.Component { return ( <div style={{ whiteSpace: 'normal' }}> {translateWithParameters( - 'quality_profiles.parameter_set_to', - name, - value + 'quality_profiles.parameter_set_to', + name, + value )} </div> ); diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogSearch-test.js b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogSearch-test.js index c65144e8df3..3a22a61a706 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogSearch-test.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/ChangelogSearch-test.js @@ -27,7 +27,7 @@ it('should render DateInput', () => { const onFromDateChange = jest.fn(); const onToDateChange = jest.fn(); const output = shallow( - <ChangelogSearch + <ChangelogSearch fromDate="2016-01-01" toDate="2016-05-05" onFromDateChange={onFromDateChange} @@ -45,7 +45,7 @@ it('should render DateInput', () => { it('should reset', () => { const onReset = jest.fn(); const output = shallow( - <ChangelogSearch + <ChangelogSearch fromDate="2016-01-01" toDate="2016-05-05" onFromDateChange={jest.fn()} diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.js b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.js index a4e4eb88881..9a147f55b9b 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/ComparisonResults.js @@ -73,8 +73,8 @@ export default class ComparisonResults extends React.Component { <td> <h6> {translateWithParameters( - 'quality_profiles.x_rules_only_in', - this.props.inLeft.length + 'quality_profiles.x_rules_only_in', + this.props.inLeft.length )} {' '} {this.props.left.name} @@ -102,8 +102,8 @@ export default class ComparisonResults extends React.Component { <td> <h6> {translateWithParameters( - 'quality_profiles.x_rules_only_in', - this.props.inRight.length + 'quality_profiles.x_rules_only_in', + this.props.inRight.length )} {' '} {this.props.right.name} @@ -130,8 +130,8 @@ export default class ComparisonResults extends React.Component { <td colSpan="2" className="text-center"> <h6> {translateWithParameters( - 'quality_profiles.x_rules_have_different_configuration', - this.props.modified.length + 'quality_profiles.x_rules_have_different_configuration', + this.props.modified.length )} </h6> </td> diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonForm-test.js b/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonForm-test.js index 087b80f9e78..b4fbaa0d9d0 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonForm-test.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonForm-test.js @@ -32,7 +32,7 @@ it('should render Select with right options', () => { ]; const output = shallow( - <ComparisonForm + <ComparisonForm withKey="another" profile={profile} profiles={profiles} diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResults-test.js b/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResults-test.js index 8cd5df5f218..e76bed9d67a 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResults-test.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/compare/__tests__/ComparisonResults-test.js @@ -26,7 +26,7 @@ import SeverityIcon from '../../../../components/shared/severity-icon'; it('should render ComparisonEmpty', () => { const output = shallow( - <ComparisonResults + <ComparisonResults left={{ name: 'left' }} right={{ name: 'right' }} inLeft={[]} @@ -60,7 +60,7 @@ it('should compare', () => { ]; const output = shallow( - <ComparisonResults + <ComparisonResults left={{ name: 'left' }} right={{ name: 'right' }} inLeft={inLeft} diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/AppContainer.js b/server/sonar-web/src/main/js/apps/quality-profiles/components/AppContainer.js index 9a55fce03f0..c2d4e81eccf 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/AppContainer.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/AppContainer.js @@ -22,8 +22,8 @@ import App from './App'; import { getLanguages, getCurrentUser } from '../../../store/rootReducer'; export default connect( - state => ({ - currentUser: getCurrentUser(state), - languages: getLanguages(state) - }) + state => ({ + currentUser: getCurrentUser(state), + languages: getLanguages(state) + }) )(App); diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.js b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.js index bf57ee241a1..5a56dd90eac 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/ProfileContainer.js @@ -42,7 +42,7 @@ export default class ProfileContainer extends React.Component { } const child = React.cloneElement( - this.props.children, + this.props.children, { profile, profiles, ...other }); const title = translate('quality_profiles.page') + ' - ' + profile.name; diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileContainer-test.js b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileContainer-test.js index fe285d031f9..0e3fe8f2209 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileContainer-test.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/components/__tests__/ProfileContainer-test.js @@ -33,7 +33,7 @@ it('should render ProfileHeader', () => { ]; const updateProfiles = jest.fn(); const output = shallow( - <ProfileContainer + <ProfileContainer location={{ query: { key: 'profile1' } }} profiles={profiles} canAdmin={false} @@ -54,7 +54,7 @@ it('should render ProfileNotFound', () => { createFakeProfile({ key: 'profile2' }) ]; const output = shallow( - <ProfileContainer + <ProfileContainer location={{ query: { key: 'random' } }} profiles={profiles} canAdmin={false} @@ -71,7 +71,7 @@ it('should render Helmet', () => { ]; const updateProfiles = jest.fn(); const output = shallow( - <ProfileContainer + <ProfileContainer location={{ query: { key: 'profile1' } }} profiles={profiles} canAdmin={false} diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritanceBox.js b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritanceBox.js index 360e0b69237..651f768ef5c 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritanceBox.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileInheritanceBox.js @@ -56,8 +56,8 @@ export default class ProfileInheritanceBox extends React.Component { <td> {translateWithParameters( - 'quality_profile.x_active_rules', - profile.activeRuleCount + 'quality_profile.x_active_rules', + profile.activeRuleCount )} </td> @@ -65,8 +65,8 @@ export default class ProfileInheritanceBox extends React.Component { {profile.overridingRuleCount != null && ( <p> {translateWithParameters( - 'quality_profiles.x_overridden_rules', - profile.overridingRuleCount + 'quality_profiles.x_overridden_rules', + profile.overridingRuleCount )} </p> )} diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.js b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.js index 67ea38cde67..0185bbc5af2 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/details/ProfileRules.js @@ -98,9 +98,9 @@ export default class ProfileRules extends React.Component { } return translateWithParameters( - 'quality_profiles.x_activated_out_of_y', - formatMeasure(count, 'INT'), - formatMeasure(total, 'INT')); + 'quality_profiles.x_activated_out_of_y', + formatMeasure(count, 'INT'), + formatMeasure(total, 'INT')); } renderActiveTitle () { @@ -148,8 +148,8 @@ export default class ProfileRules extends React.Component { <Link to={rulesUrl} className="small text-muted"> <strong> {formatMeasure( - this.state.total - this.state.activatedTotal, - 'SHORT_INT' + this.state.total - this.state.activatedTotal, + 'SHORT_INT' )} </strong> </Link> diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionDeprecated.js b/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionDeprecated.js index 25991716aba..cb8cd4a54de 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionDeprecated.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionDeprecated.js @@ -49,8 +49,8 @@ export default class EvolutionDeprecated extends React.Component { </div> <div className="spacer-bottom"> {translateWithParameters( - 'quality_profiles.deprecated_rules_are_still_activated', - profilesWithDeprecations.length + 'quality_profiles.deprecated_rules_are_still_activated', + profilesWithDeprecations.length )} </div> <ul> @@ -68,8 +68,8 @@ export default class EvolutionDeprecated extends React.Component { {', '} <Link to={getDeprecatedActiveRulesUrl({ qprofile: profile.key })} className="text-muted"> {translateWithParameters( - 'quality_profile.x_rules', - profile.activeDeprecatedRuleCount + 'quality_profile.x_rules', + profile.activeDeprecatedRuleCount )} </Link> </div> diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionRules.js b/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionRules.js index 91d6d18f135..fcf766eca58 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionRules.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/EvolutionRules.js @@ -96,14 +96,14 @@ export default class EvolutionRules extends React.Component { <div className="note"> {rule.activations ? ( translateWithParameters( - 'quality_profiles.latest_new_rules.activated', - rule.langName, - rule.activations + 'quality_profiles.latest_new_rules.activated', + rule.langName, + rule.activations ) ) : ( translateWithParameters( - 'quality_profiles.latest_new_rules.not_activated', - rule.langName + 'quality_profiles.latest_new_rules.not_activated', + rule.langName ) )} </div> diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.js b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.js index 920a6b73b40..d92018fa184 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesList.js @@ -55,8 +55,8 @@ export default class ProfilesList extends React.Component { {language.name} {', '} {translateWithParameters( - 'quality_profiles.x_profiles', - profilesCount + 'quality_profiles.x_profiles', + profilesCount )} </th> <th className="text-right nowrap"> @@ -109,8 +109,8 @@ export default class ProfilesList extends React.Component { className="data zebra zebra-hover"> {this.renderHeader( - languageKey, - profilesToShow[languageKey].length)} + languageKey, + profilesToShow[languageKey].length)} <TooltipsContainer> <tbody> diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListHeader.js b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListHeader.js index af71430ffc1..b655f5e5a88 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListHeader.js +++ b/server/sonar-web/src/main/js/apps/quality-profiles/home/ProfilesListHeader.js @@ -35,8 +35,8 @@ export default class ProfilesListHeader extends React.Component { const label = currentFilter ? translateWithParameters( - 'quality_profiles.x_Profiles', - currentLanguage.name) : + 'quality_profiles.x_Profiles', + currentLanguage.name) : translate('quality_profiles.all_profiles'); return ( diff --git a/server/sonar-web/src/main/js/apps/sessions/components/LoginFormContainer.js b/server/sonar-web/src/main/js/apps/sessions/components/LoginFormContainer.js index 3152b581109..69554d224e5 100644 --- a/server/sonar-web/src/main/js/apps/sessions/components/LoginFormContainer.js +++ b/server/sonar-web/src/main/js/apps/sessions/components/LoginFormContainer.js @@ -53,8 +53,8 @@ class LoginFormContainer extends React.Component { handleSubmit = (login: string, password: string) => { this.props.doLogin(login, password).then( - this.handleSuccessfulLogin, - () => { /* do nothing */ } + this.handleSuccessfulLogin, + () => { /* do nothing */ } ); }; diff --git a/server/sonar-web/src/main/js/apps/settings/components/AllCategoriesList.js b/server/sonar-web/src/main/js/apps/settings/components/AllCategoriesList.js index 51d42bca0a9..63ec0cd750f 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/AllCategoriesList.js +++ b/server/sonar-web/src/main/js/apps/settings/components/AllCategoriesList.js @@ -34,5 +34,5 @@ const mapStateToProps = state => ({ }); export default connect( - mapStateToProps + mapStateToProps )(AllCategoriesList); diff --git a/server/sonar-web/src/main/js/apps/settings/components/App.js b/server/sonar-web/src/main/js/apps/settings/components/App.js index 0cd991f2e62..f8324cd2675 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/App.js +++ b/server/sonar-web/src/main/js/apps/settings/components/App.js @@ -105,7 +105,7 @@ const mapStateToProps = state => ({ }); export default connect( - mapStateToProps, + mapStateToProps, { fetchSettings } )(App); diff --git a/server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.js b/server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.js index bb45681c3ce..56f2fbd056f 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.js +++ b/server/sonar-web/src/main/js/apps/settings/components/CategoryDefinitionsList.js @@ -35,5 +35,5 @@ const mapStateToProps = (state, ownProps) => ({ }); export default connect( - mapStateToProps + mapStateToProps )(CategoryDefinitionsList); diff --git a/server/sonar-web/src/main/js/apps/settings/components/Definition.js b/server/sonar-web/src/main/js/apps/settings/components/Definition.js index e914ea0ff0a..3b1605e94b8 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/Definition.js +++ b/server/sonar-web/src/main/js/apps/settings/components/Definition.js @@ -195,6 +195,6 @@ const mapStateToProps = (state, ownProps) => ({ }); export default connect( - mapStateToProps, + mapStateToProps, { changeValue, saveValue, resetValue, passValidation, cancelChange } )(Definition); diff --git a/server/sonar-web/src/main/js/apps/settings/components/EmailForm.js b/server/sonar-web/src/main/js/apps/settings/components/EmailForm.js index faad508a88b..ea88bfe84df 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/EmailForm.js +++ b/server/sonar-web/src/main/js/apps/settings/components/EmailForm.js @@ -42,8 +42,8 @@ class EmailForm extends React.Component { this.setState({ success: false, error: null, loading: true }); const { recipient, subject, message } = this.state; sendTestEmail(recipient, subject, message).then( - () => this.setState({ success: true, loading: false }), - error => parseError(error).then(message => this.setState({ error: message, loading: false })) + () => this.setState({ success: true, loading: false }), + error => parseError(error).then(message => this.setState({ error: message, loading: false })) ); } diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForBoolean-test.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForBoolean-test.js index 14c8e1e2c84..828421df435 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForBoolean-test.js +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForBoolean-test.js @@ -25,7 +25,7 @@ import Toggle from '../../../../../components/controls/Toggle'; it('should render Toggle', () => { const onChange = jest.fn(); const toggle = shallow( - <InputForBoolean + <InputForBoolean name="foo" value={true} isDefault={false} @@ -40,7 +40,7 @@ it('should render Toggle', () => { it('should render Toggle without value', () => { const onChange = jest.fn(); const input = shallow( - <InputForBoolean + <InputForBoolean name="foo" isDefault={false} onChange={onChange}/> @@ -56,7 +56,7 @@ it('should render Toggle without value', () => { it('should call onChange', () => { const onChange = jest.fn(); const input = shallow( - <InputForBoolean + <InputForBoolean name="foo" value={true} isDefault={false} diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForNumber-test.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForNumber-test.js index 93068a00797..bad8f9de1b7 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForNumber-test.js +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForNumber-test.js @@ -25,7 +25,7 @@ import SimpleInput from '../SimpleInput'; it('should render SimpleInput', () => { const onChange = jest.fn(); const simpleInput = shallow( - <InputForNumber + <InputForNumber name="foo" value={17} isDefault={false} diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForPassword-test.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForPassword-test.js index de8f561d72c..02156f5ef5e 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForPassword-test.js +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForPassword-test.js @@ -25,7 +25,7 @@ import { click, change, submit } from '../../../../../helpers/testUtils'; it('should render lock icon, but no form', () => { const onChange = jest.fn(); const input = shallow( - <InputForPassword + <InputForPassword name="foo" value="bar" isDefault={false} @@ -38,7 +38,7 @@ it('should render lock icon, but no form', () => { it('should open form', () => { const onChange = jest.fn(); const input = shallow( - <InputForPassword + <InputForPassword name="foo" value="bar" isDefault={false} @@ -54,7 +54,7 @@ it('should open form', () => { it('should close form', () => { const onChange = jest.fn(); const input = shallow( - <InputForPassword + <InputForPassword name="foo" value="bar" isDefault={false} @@ -73,7 +73,7 @@ it('should close form', () => { it('should set value', () => { const onChange = jest.fn(() => Promise.resolve()); const input = shallow( - <InputForPassword + <InputForPassword name="foo" value="bar" isDefault={false} diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForSingleSelectList-test.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForSingleSelectList-test.js index 58be19c6a83..5c50d24d4e9 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForSingleSelectList-test.js +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForSingleSelectList-test.js @@ -25,7 +25,7 @@ import InputForSingleSelectList from '../InputForSingleSelectList'; it('should render Select', () => { const onChange = jest.fn(); const select = shallow( - <InputForSingleSelectList + <InputForSingleSelectList name="foo" value="bar" options={['foo', 'bar', 'baz']} @@ -46,7 +46,7 @@ it('should render Select', () => { it('should call onChange', () => { const onChange = jest.fn(); const select = shallow( - <InputForSingleSelectList + <InputForSingleSelectList name="foo" value="bar" options={['foo', 'bar', 'baz']} diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForString-test.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForString-test.js index 1f300b81053..65a81bba419 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForString-test.js +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForString-test.js @@ -25,7 +25,7 @@ import SimpleInput from '../SimpleInput'; it('should render SimpleInput', () => { const onChange = jest.fn(); const simpleInput = shallow( - <InputForString + <InputForString name="foo" value="bar" isDefault={false} diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForText-test.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForText-test.js index 63ad65dbed7..c3834d557ce 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForText-test.js +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/InputForText-test.js @@ -25,7 +25,7 @@ import { change } from '../../../../../helpers/testUtils'; it('should render textarea', () => { const onChange = jest.fn(); const textarea = shallow( - <InputForText + <InputForText name="foo" value="bar" isDefault={false} @@ -40,7 +40,7 @@ it('should render textarea', () => { it('should call onChange', () => { const onChange = jest.fn(); const textarea = shallow( - <InputForText + <InputForText name="foo" value="bar" isDefault={false} diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/MultiValueInput-test.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/MultiValueInput-test.js index 778e11e9450..57c982dfd28 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/MultiValueInput-test.js +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/MultiValueInput-test.js @@ -41,7 +41,7 @@ it('should render one value', () => { it('should render several values', () => { const multiValueInput = shallow( - <MultiValueInput setting={{ definition }} value={['foo', 'bar', 'baz']} onChange={jest.fn()}/>); + <MultiValueInput setting={{ definition }} value={['foo', 'bar', 'baz']} onChange={jest.fn()}/>); const stringInputs = multiValueInput.find(PrimitiveInput); expect(stringInputs.length).toBe(3 + 1); assertValues(stringInputs, ['foo', 'bar', 'baz', '']); @@ -50,7 +50,7 @@ it('should render several values', () => { it('should remove value', () => { const onChange = jest.fn(); const multiValueInput = shallow( - <MultiValueInput setting={{ definition }} value={['foo', 'bar', 'baz']} onChange={onChange}/>); + <MultiValueInput setting={{ definition }} value={['foo', 'bar', 'baz']} onChange={onChange}/>); click(multiValueInput.find('.js-remove-value').at(1)); expect(onChange).toBeCalledWith(['foo', 'baz']); }); @@ -58,7 +58,7 @@ it('should remove value', () => { it('should change existing value', () => { const onChange = jest.fn(); const multiValueInput = shallow( - <MultiValueInput setting={{ definition }} value={['foo', 'bar', 'baz']} onChange={onChange}/>); + <MultiValueInput setting={{ definition }} value={['foo', 'bar', 'baz']} onChange={onChange}/>); multiValueInput.find(PrimitiveInput).at(1).prop('onChange')('qux'); expect(onChange).toBeCalledWith(['foo', 'qux', 'baz']); }); diff --git a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/SimpleInput-test.js b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/SimpleInput-test.js index 1e71396a32d..38b0f22f73d 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/SimpleInput-test.js +++ b/server/sonar-web/src/main/js/apps/settings/components/inputs/__tests__/SimpleInput-test.js @@ -25,7 +25,7 @@ import { change } from '../../../../../helpers/testUtils'; it('should render input', () => { const onChange = jest.fn(); const input = shallow( - <SimpleInput + <SimpleInput type="text" className="input-large" name="foo" @@ -44,7 +44,7 @@ it('should render input', () => { it('should call onChange', () => { const onChange = jest.fn(); const input = shallow( - <SimpleInput + <SimpleInput type="text" className="input-large" name="foo" diff --git a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionAppContainer.js b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionAppContainer.js index 1b827f336ea..24efcbfe2c8 100644 --- a/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionAppContainer.js +++ b/server/sonar-web/src/main/js/apps/settings/encryption/EncryptionAppContainer.js @@ -23,6 +23,6 @@ import { checkSecretKey, generateSecretKey, encryptValue, startGeneration } from import { getSettingsAppEncryptionState } from '../../../store/rootReducer'; export default connect( - state => getSettingsAppEncryptionState(state), + state => getSettingsAppEncryptionState(state), { checkSecretKey, generateSecretKey, encryptValue, startGeneration } )(EncryptionApp); diff --git a/server/sonar-web/src/main/js/apps/settings/licenses/LicenseRowContainer.js b/server/sonar-web/src/main/js/apps/settings/licenses/LicenseRowContainer.js index e602b782e14..807848b84c4 100644 --- a/server/sonar-web/src/main/js/apps/settings/licenses/LicenseRowContainer.js +++ b/server/sonar-web/src/main/js/apps/settings/licenses/LicenseRowContainer.js @@ -27,6 +27,6 @@ const mapStateToProps = (state, ownProps) => ({ }); export default connect( - mapStateToProps, + mapStateToProps, { setLicense } )(LicenseRow); diff --git a/server/sonar-web/src/main/js/apps/settings/licenses/LicensesListContainer.js b/server/sonar-web/src/main/js/apps/settings/licenses/LicensesListContainer.js index f59a4f3ff55..dd5745986b4 100644 --- a/server/sonar-web/src/main/js/apps/settings/licenses/LicensesListContainer.js +++ b/server/sonar-web/src/main/js/apps/settings/licenses/LicensesListContainer.js @@ -27,6 +27,6 @@ const mapStateToProps = state => ({ }); export default connect( - mapStateToProps, + mapStateToProps, { fetchLicenses } )(LicensesList); diff --git a/server/sonar-web/src/main/js/apps/settings/serverId/ServerIdAppContainer.js b/server/sonar-web/src/main/js/apps/settings/serverId/ServerIdAppContainer.js index 0b7816fe3f8..7a05c325f7c 100644 --- a/server/sonar-web/src/main/js/apps/settings/serverId/ServerIdAppContainer.js +++ b/server/sonar-web/src/main/js/apps/settings/serverId/ServerIdAppContainer.js @@ -22,6 +22,6 @@ import ServerIdApp from './ServerIdApp'; import { addGlobalErrorMessage, closeAllGlobalMessages } from '../../../store/globalMessages/duck'; export default connect( - () => ({}), + () => ({}), { addGlobalErrorMessage, closeAllGlobalMessages } )(ServerIdApp); diff --git a/server/sonar-web/src/main/js/apps/settings/store/definitions/reducer.js b/server/sonar-web/src/main/js/apps/settings/store/definitions/reducer.js index 27cc382f520..62feda90947 100644 --- a/server/sonar-web/src/main/js/apps/settings/store/definitions/reducer.js +++ b/server/sonar-web/src/main/js/apps/settings/store/definitions/reducer.js @@ -49,8 +49,8 @@ export const getDefinitionsForCategory = (state: State, category: string) => getAllDefinitions(state).filter(definition => definition.category.toLowerCase() === category.toLowerCase()); export const getAllCategories = (state: State) => uniqBy( - getAllDefinitions(state).map(definition => definition.category), - category => category.toLowerCase()); + getAllDefinitions(state).map(definition => definition.category), + category => category.toLowerCase()); export const getDefaultCategory = (state: State) => { const categories = getAllCategories(state); diff --git a/server/sonar-web/src/main/js/components/charts/__tests__/bar-chart-test.js b/server/sonar-web/src/main/js/components/charts/__tests__/bar-chart-test.js index 604598cd596..377e3b34e4a 100644 --- a/server/sonar-web/src/main/js/components/charts/__tests__/bar-chart-test.js +++ b/server/sonar-web/src/main/js/components/charts/__tests__/bar-chart-test.js @@ -28,7 +28,7 @@ it('should display bars', () => { { x: 3, y: 20 } ]; const chart = shallow( - <BarChart + <BarChart data={data} width={100} height={100} @@ -44,7 +44,7 @@ it('should display ticks', () => { ]; const ticks = ['A', 'B', 'C']; const chart = shallow( - <BarChart + <BarChart data={data} xTicks={ticks} width={100} @@ -61,7 +61,7 @@ it('should display values', () => { ]; const values = ['A', 'B', 'C']; const chart = shallow( - <BarChart + <BarChart data={data} xValues={values} width={100} @@ -79,7 +79,7 @@ it('should display bars, ticks and values', () => { const ticks = ['A', 'B', 'C']; const values = ['A', 'B', 'C']; const chart = shallow( - <BarChart + <BarChart data={data} xTicks={ticks} xValues={values} diff --git a/server/sonar-web/src/main/js/components/charts/__tests__/line-chart-test.js b/server/sonar-web/src/main/js/components/charts/__tests__/line-chart-test.js index 901cc09a8b4..566b1eb833d 100644 --- a/server/sonar-web/src/main/js/components/charts/__tests__/line-chart-test.js +++ b/server/sonar-web/src/main/js/components/charts/__tests__/line-chart-test.js @@ -39,7 +39,7 @@ it('should display ticks', () => { ]; const ticks = ['A', 'B', 'C']; const chart = shallow( - <LineChart + <LineChart data={data} xTicks={ticks} width={100} @@ -55,7 +55,7 @@ it('should display values', () => { ]; const values = ['A', 'B', 'C']; const chart = shallow( - <LineChart + <LineChart data={data} xValues={values} width={100} diff --git a/server/sonar-web/src/main/js/components/charts/__tests__/treemap-test.js b/server/sonar-web/src/main/js/components/charts/__tests__/treemap-test.js index 3fe09eff2ee..453bba4daee 100644 --- a/server/sonar-web/src/main/js/components/charts/__tests__/treemap-test.js +++ b/server/sonar-web/src/main/js/components/charts/__tests__/treemap-test.js @@ -28,7 +28,7 @@ it('should display', () => { { size: 20, color: '#777', label: 'SonarQube :: Search' } ]; const chart = shallow( - <Treemap + <Treemap items={items} width={100} height={100} diff --git a/server/sonar-web/src/main/js/components/controls/FavoriteContainer.js b/server/sonar-web/src/main/js/components/controls/FavoriteContainer.js index dd1f2a94ccf..bfbc383d7ad 100644 --- a/server/sonar-web/src/main/js/components/controls/FavoriteContainer.js +++ b/server/sonar-web/src/main/js/components/controls/FavoriteContainer.js @@ -53,6 +53,6 @@ const mapDispatchToProps = (dispatch, ownProps) => ({ }); export default connect( - mapStateToProps, - mapDispatchToProps + mapStateToProps, + mapDispatchToProps )(FavoriteBaseStateless); diff --git a/server/sonar-web/src/main/js/components/controls/ListFooter.js b/server/sonar-web/src/main/js/components/controls/ListFooter.js index 3c6be7d64a1..504bd99accd 100644 --- a/server/sonar-web/src/main/js/components/controls/ListFooter.js +++ b/server/sonar-web/src/main/js/components/controls/ListFooter.js @@ -63,9 +63,9 @@ export default class ListFooter extends React.Component { return ( <footer className={className}> {translateWithParameters( - 'x_of_y_shown', - formatMeasure(this.props.count, 'INT'), - formatMeasure(this.props.total, 'INT') + 'x_of_y_shown', + formatMeasure(this.props.count, 'INT'), + formatMeasure(this.props.total, 'INT') )} {this.canLoadMore() && hasMore ? loadMoreLink : null} </footer> diff --git a/server/sonar-web/src/main/js/components/controls/__tests__/FavoriteBase-test.js b/server/sonar-web/src/main/js/components/controls/__tests__/FavoriteBase-test.js index 95b51552fab..5d54221e049 100644 --- a/server/sonar-web/src/main/js/components/controls/__tests__/FavoriteBase-test.js +++ b/server/sonar-web/src/main/js/components/controls/__tests__/FavoriteBase-test.js @@ -24,7 +24,7 @@ import { click } from '../../../helpers/testUtils'; function renderFavoriteBase (props) { return shallow( - <FavoriteBase + <FavoriteBase favorite={true} addFavorite={jest.fn()} removeFavorite={jest.fn()} diff --git a/server/sonar-web/src/main/js/components/shared/__tests__/Organization-test.js b/server/sonar-web/src/main/js/components/shared/__tests__/Organization-test.js index 22a153b90c8..bfbd0c6d03f 100644 --- a/server/sonar-web/src/main/js/components/shared/__tests__/Organization-test.js +++ b/server/sonar-web/src/main/js/components/shared/__tests__/Organization-test.js @@ -25,17 +25,17 @@ const organization = { key: 'foo', name: 'foo' }; it('should match snapshot', () => { expect(shallow( - <UnconnectedOrganization organization={organization} shouldBeDisplayed={true}/> + <UnconnectedOrganization organization={organization} shouldBeDisplayed={true}/> )).toMatchSnapshot(); }); it('should not be displayed', () => { expect(shallow( - <UnconnectedOrganization organization={organization} shouldBeDisplayed={false}/> + <UnconnectedOrganization organization={organization} shouldBeDisplayed={false}/> )).toMatchSnapshot(); expect(shallow( - <UnconnectedOrganization organization={null} shouldBeDisplayed={true}/> + <UnconnectedOrganization organization={null} shouldBeDisplayed={true}/> )).toMatchSnapshot(); }); diff --git a/server/sonar-web/src/main/js/components/shared/drilldown-link.js b/server/sonar-web/src/main/js/components/shared/drilldown-link.js index dff3fd1177b..c9c13688af2 100644 --- a/server/sonar-web/src/main/js/components/shared/drilldown-link.js +++ b/server/sonar-web/src/main/js/components/shared/drilldown-link.js @@ -112,8 +112,8 @@ export const DrilldownLink = React.createClass({ renderIssuesLink () { const url = getComponentIssuesUrl( - this.props.component, - this.propsToIssueParams()); + this.props.component, + this.propsToIssueParams()); return ( <Link to={url} className={this.props.className}>{this.props.children}</Link> diff --git a/server/sonar-web/src/main/js/components/source-viewer/measures-overlay.js b/server/sonar-web/src/main/js/components/source-viewer/measures-overlay.js index a931d6e8836..a01d69b0f85 100644 --- a/server/sonar-web/src/main/js/components/source-viewer/measures-overlay.js +++ b/server/sonar-web/src/main/js/components/source-viewer/measures-overlay.js @@ -134,13 +134,13 @@ export default ModalView.extend({ prepareMetrics (metrics) { metrics = metrics.filter(metric => metric.value != null); return sortBy( - toPairs(groupBy(metrics, 'domain')).map(domain => { - return { - name: domain[0], - metrics: domain[1] - }; - }), - 'name' + toPairs(groupBy(metrics, 'domain')).map(domain => { + return { + name: domain[0], + metrics: domain[1] + }; + }), + 'name' ); }, diff --git a/server/sonar-web/src/main/js/components/ui/__tests__/Avatar-test.js b/server/sonar-web/src/main/js/components/ui/__tests__/Avatar-test.js index 5e7a33d28a6..e6cbac9a939 100644 --- a/server/sonar-web/src/main/js/components/ui/__tests__/Avatar-test.js +++ b/server/sonar-web/src/main/js/components/ui/__tests__/Avatar-test.js @@ -25,7 +25,7 @@ const gravatarServerUrl = 'http://example.com/{EMAIL_MD5}.jpg?s={SIZE}'; it('should render', () => { const avatar = shallow( - <Avatar enableGravatar={true} gravatarServerUrl={gravatarServerUrl} email="mail@example.com" size={20}/> + <Avatar enableGravatar={true} gravatarServerUrl={gravatarServerUrl} email="mail@example.com" size={20}/> ); expect(avatar.is('img')).toBe(true); expect(avatar.prop('width')).toBe(20); @@ -36,7 +36,7 @@ it('should render', () => { it('should not render', () => { const avatar = shallow( - <Avatar enableGravatar={false} gravatarServerUrl={gravatarServerUrl} email="mail@example.com" size={20}/> + <Avatar enableGravatar={false} gravatarServerUrl={gravatarServerUrl} email="mail@example.com" size={20}/> ); expect(avatar.is('img')).toBe(false); }); diff --git a/server/sonar-web/src/main/js/helpers/__tests__/urls-test.js b/server/sonar-web/src/main/js/helpers/__tests__/urls-test.js index 8bb991a8390..730cea9ef83 100644 --- a/server/sonar-web/src/main/js/helpers/__tests__/urls-test.js +++ b/server/sonar-web/src/main/js/helpers/__tests__/urls-test.js @@ -52,22 +52,22 @@ describe('#getComponentUrl', () => { describe('#getComponentIssuesUrl', () => { it('should work without parameters', () => { expect(getComponentIssuesUrl(SIMPLE_COMPONENT_KEY, {})).toBe( - '/component_issues?id=' + SIMPLE_COMPONENT_KEY + '#'); + '/component_issues?id=' + SIMPLE_COMPONENT_KEY + '#'); }); it('should encode component key', () => { expect(getComponentIssuesUrl(COMPLEX_COMPONENT_KEY, {})).toBe( - '/component_issues?id=' + COMPLEX_COMPONENT_KEY_ENCODED + '#'); + '/component_issues?id=' + COMPLEX_COMPONENT_KEY_ENCODED + '#'); }); it('should work with parameters', () => { expect(getComponentIssuesUrl(SIMPLE_COMPONENT_KEY, { resolved: 'false' })).toBe( - '/component_issues?id=' + SIMPLE_COMPONENT_KEY + '#resolved=false'); + '/component_issues?id=' + SIMPLE_COMPONENT_KEY + '#resolved=false'); }); it('should encode parameters', () => { expect(getComponentIssuesUrl(SIMPLE_COMPONENT_KEY, { componentUuids: COMPLEX_COMPONENT_KEY })).toBe( - '/component_issues?id=' + SIMPLE_COMPONENT_KEY + '#componentUuids=' + COMPLEX_COMPONENT_KEY_ENCODED); + '/component_issues?id=' + SIMPLE_COMPONENT_KEY + '#componentUuids=' + COMPLEX_COMPONENT_KEY_ENCODED); }); }); diff --git a/server/sonar-web/src/main/js/helpers/handlebars/changelog.js b/server/sonar-web/src/main/js/helpers/handlebars/changelog.js index 5fec0d145aa..3ccf6a9be07 100644 --- a/server/sonar-web/src/main/js/helpers/handlebars/changelog.js +++ b/server/sonar-web/src/main/js/helpers/handlebars/changelog.js @@ -32,10 +32,10 @@ module.exports = function (diff) { formatMeasure(diff.newValue, 'WORK_DUR') : diff.newValue; message = translateWithParameters('issue.changelog.changed_to', - translate('issue.changelog.field', diff.key), newValue); + translate('issue.changelog.field', diff.key), newValue); } else { message = translateWithParameters('issue.changelog.removed', - translate('issue.changelog.field', diff.key)); + translate('issue.changelog.field', diff.key)); } if (diff.oldValue != null) { diff --git a/server/sonar-web/src/main/js/helpers/measures.js b/server/sonar-web/src/main/js/helpers/measures.js index 73c89985ed3..69593cecf53 100644 --- a/server/sonar-web/src/main/js/helpers/measures.js +++ b/server/sonar-web/src/main/js/helpers/measures.js @@ -261,12 +261,12 @@ function formatDuration (isNegative, days, hours, minutes) { if (shouldDisplayHours(days, hours)) { formatted = addSpaceIfNeeded(formatted); formatted += translateWithParameters('work_duration.x_hours', - isNegative && formatted.length === 0 ? -1 * hours : hours); + isNegative && formatted.length === 0 ? -1 * hours : hours); } if (shouldDisplayMinutes(days, hours, minutes)) { formatted = addSpaceIfNeeded(formatted); formatted += translateWithParameters('work_duration.x_minutes', - isNegative && formatted.length === 0 ? -1 * minutes : minutes); + isNegative && formatted.length === 0 ? -1 * minutes : minutes); } return formatted; } @@ -370,17 +370,17 @@ function getMaintainabilityRatingTooltip (rating) { if (rating < 2) { return translateWithParameters( - 'metric.sqale_rating.tooltip.A', - formatMeasure(maintainabilityGrid[0] * 100, 'PERCENT') + 'metric.sqale_rating.tooltip.A', + formatMeasure(maintainabilityGrid[0] * 100, 'PERCENT') ); } const ratingLetter = formatMeasure(rating, 'RATING'); return translateWithParameters( - 'metric.sqale_rating.tooltip', - ratingLetter, - formatMeasure(maintainabilityRatingThreshold * 100, 'PERCENT') + 'metric.sqale_rating.tooltip', + ratingLetter, + formatMeasure(maintainabilityRatingThreshold * 100, 'PERCENT') ); } diff --git a/server/sonar-web/src/main/js/helpers/urls.js b/server/sonar-web/src/main/js/helpers/urls.js index 50cf5344589..52b155d1d47 100644 --- a/server/sonar-web/src/main/js/helpers/urls.js +++ b/server/sonar-web/src/main/js/helpers/urls.js @@ -119,7 +119,7 @@ export function getRulesUrl (query) { if (query) { const serializedQuery = Object.keys(query).map(criterion => ( `${encodeURIComponent(criterion)}=${encodeURIComponent( - query[criterion])}` + query[criterion])}` )).join('|'); // return a string (not { pathname }) to help react-router's Link handle this properly diff --git a/server/sonar-web/src/main/js/store/notifications/duck.js b/server/sonar-web/src/main/js/store/notifications/duck.js index c1a737db837..81523b81eef 100644 --- a/server/sonar-web/src/main/js/store/notifications/duck.js +++ b/server/sonar-web/src/main/js/store/notifications/duck.js @@ -148,12 +148,12 @@ export const getGlobal = (state: State): NotificationsState => ( export const getProjects = (state: State): Array<string> => ( uniqBy( - state.notifications.filter(n => n.project).map(n => ({ - key: n.project, - name: n.projectName, - organization: n.organization - })), - project => project.key + state.notifications.filter(n => n.project).map(n => ({ + key: n.project, + name: n.projectName, + organization: n.organization + })), + project => project.key ) ); diff --git a/server/sonar-web/src/main/js/store/rootActions.js b/server/sonar-web/src/main/js/store/rootActions.js index 8daf6579ac5..d9bd1d97e05 100644 --- a/server/sonar-web/src/main/js/store/rootActions.js +++ b/server/sonar-web/src/main/js/store/rootActions.js @@ -34,22 +34,22 @@ export const onFail = dispatch => error => ( export const fetchAppState = () => dispatch => ( getGlobalNavigation().then( - appState => dispatch(setAppState(appState)), - onFail(dispatch) + appState => dispatch(setAppState(appState)), + onFail(dispatch) ) ); export const fetchLanguages = () => dispatch => { return getLanguages().then( - languages => dispatch(receiveLanguages(languages)), - onFail(dispatch) + languages => dispatch(receiveLanguages(languages)), + onFail(dispatch) ); }; export const fetchOrganizations = (organizations?: Array<string>) => dispatch => ( getOrganizations(organizations).then( - r => dispatch(receiveOrganizations(r.organizations)), - onFail(dispatch) + r => dispatch(receiveOrganizations(r.organizations)), + onFail(dispatch) ) ); @@ -60,30 +60,30 @@ const addQualifier = project => ({ export const fetchProject = key => dispatch => ( getComponentNavigation(key).then( - component => { - dispatch(receiveComponents([addQualifier(component)])); - if (component.organization != null) { - dispatch(fetchOrganizations([component.organization])); - } - }) + component => { + dispatch(receiveComponents([addQualifier(component)])); + if (component.organization != null) { + dispatch(fetchOrganizations([component.organization])); + } + }) ); export const doLogin = (login, password) => dispatch => ( auth.login(login, password).then( - () => { /* everything is fine */ }, - () => { - dispatch(addGlobalErrorMessage('Authentication failed')); - return Promise.reject(); - } + () => { /* everything is fine */ }, + () => { + dispatch(addGlobalErrorMessage('Authentication failed')); + return Promise.reject(); + } ) ); export const doLogout = () => dispatch => ( auth.logout().then( - () => { /* everything is fine */ }, - () => { - dispatch(addGlobalErrorMessage('Logout failed')); - return Promise.reject(); - } + () => { /* everything is fine */ }, + () => { + dispatch(addGlobalErrorMessage('Logout failed')); + return Promise.reject(); + } ) ); diff --git a/server/sonar-web/src/main/js/store/utils/configureStore.js b/server/sonar-web/src/main/js/store/utils/configureStore.js index ef5e9f53737..35d6a7ee916 100644 --- a/server/sonar-web/src/main/js/store/utils/configureStore.js +++ b/server/sonar-web/src/main/js/store/utils/configureStore.js @@ -31,8 +31,8 @@ if (process.env.NODE_ENV !== 'production') { } const finalCreateStore = compose( - applyMiddleware(...middlewares), - ...composed + applyMiddleware(...middlewares), + ...composed )(createStore); export default function configureStore (rootReducer, initialState) { |