diff options
author | Stas Vilchik <stas-vilchik@users.noreply.github.com> | 2017-03-31 13:54:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-31 13:54:46 +0200 |
commit | fe716c6dc43d4d7acb437136b1c87902e8ff0bc4 (patch) | |
tree | 6b8a18d7a8f76de1fd34be3235d1639477b75d71 /server/sonar-web/src/main/js/store | |
parent | e660d605a27992d82d901b8fe0b8938da7afb270 (diff) | |
download | sonarqube-fe716c6dc43d4d7acb437136b1c87902e8ff0bc4.tar.gz sonarqube-fe716c6dc43d4d7acb437136b1c87902e8ff0bc4.zip |
re-format js code (#1877)
Diffstat (limited to 'server/sonar-web/src/main/js/store')
5 files changed, 25 insertions, 12 deletions
diff --git a/server/sonar-web/src/main/js/store/globalMessages/duck.js b/server/sonar-web/src/main/js/store/globalMessages/duck.js index 367c8a61e36..ff028db274d 100644 --- a/server/sonar-web/src/main/js/store/globalMessages/duck.js +++ b/server/sonar-web/src/main/js/store/globalMessages/duck.js @@ -85,7 +85,8 @@ const globalMessages = (state: State = [], action: Action = {}) => { return [ { id: uniqueId('global-message-'), - message: 'You are not authorized to access this page. Please log in with more privileges and try again.', + message: 'You are not authorized to access this page. ' + + 'Please log in with more privileges and try again.', level: ERROR } ]; diff --git a/server/sonar-web/src/main/js/store/organizations/duck.js b/server/sonar-web/src/main/js/store/organizations/duck.js index 8c56380aa42..13671285423 100644 --- a/server/sonar-web/src/main/js/store/organizations/duck.js +++ b/server/sonar-web/src/main/js/store/organizations/duck.js @@ -109,7 +109,10 @@ export const receiveMyOrganizations = ( organizations }); -export const receiveOrganizationGroups = (key: string, groups: Array<OrgGroup>): receiveOrganizationGroups => ({ +export const receiveOrganizationGroups = ( + key: string, + groups: Array<OrgGroup> +): receiveOrganizationGroups => ({ type: 'RECEIVE_ORGANIZATION_GROUPS', key, groups @@ -191,7 +194,8 @@ export default combineReducers({ byKey, my, groups }); export const getOrganizationByKey = (state: State, key: string): Organization => state.byKey[key]; -export const getOrganizationGroupsByKey = (state: State, key: string): Array<OrgGroup> => state.groups[key] || []; +export const getOrganizationGroupsByKey = (state: State, key: string): Array<OrgGroup> => + state.groups[key] || []; export const getMyOrganizations = (state: State): Array<Organization> => state.my.map(key => getOrganizationByKey(state, key)); diff --git a/server/sonar-web/src/main/js/store/organizationsMembers/actions.js b/server/sonar-web/src/main/js/store/organizationsMembers/actions.js index dcd2312f9c9..abb41e71624 100644 --- a/server/sonar-web/src/main/js/store/organizationsMembers/actions.js +++ b/server/sonar-web/src/main/js/store/organizationsMembers/actions.js @@ -41,14 +41,22 @@ export const actions = { REMOVE_MEMBER: 'organizations/REMOVE_MEMBER' }; -export const receiveMembers = (organizationKey: string, members: Array<Member>, stateChanges: MembersState) => ({ +export const receiveMembers = ( + organizationKey: string, + members: Array<Member>, + stateChanges: MembersState +) => ({ type: actions.RECEIVE_MEMBERS, organization: organizationKey, members, stateChanges }); -export const receiveMoreMembers = (organizationKey: string, members: Array<Member>, stateChanges: MembersState) => ({ +export const receiveMoreMembers = ( + organizationKey: string, + members: Array<Member>, + stateChanges: MembersState +) => ({ type: actions.RECEIVE_MORE_MEMBERS, organization: organizationKey, members, @@ -67,10 +75,7 @@ export const removeMember = (organizationKey: string, member: Member) => ({ member }); -export const updateState = ( - organizationKey: string, - stateChanges: MembersState -) => ({ +export const updateState = (organizationKey: string, stateChanges: MembersState) => ({ type: actions.UPDATE_STATE, organization: organizationKey, stateChanges diff --git a/server/sonar-web/src/main/js/store/organizationsMembers/reducer.js b/server/sonar-web/src/main/js/store/organizationsMembers/reducer.js index 346b4a26a48..d5906cf3965 100644 --- a/server/sonar-web/src/main/js/store/organizationsMembers/reducer.js +++ b/server/sonar-web/src/main/js/store/organizationsMembers/reducer.js @@ -36,7 +36,11 @@ const organizationMembers = (state = {}, action = {}) => { case actions.UPDATE_STATE: return { ...state, ...action.stateChanges }; case actions.RECEIVE_MEMBERS: - return { ...state, ...action.stateChanges, members: action.members.map(member => member.login) }; + return { + ...state, + ...action.stateChanges, + members: action.members.map(member => member.login) + }; case actions.RECEIVE_MORE_MEMBERS: return { ...state, diff --git a/server/sonar-web/src/main/js/store/rootReducer.js b/server/sonar-web/src/main/js/store/rootReducer.js index 54a35fec2da..95db709a545 100644 --- a/server/sonar-web/src/main/js/store/rootReducer.js +++ b/server/sonar-web/src/main/js/store/rootReducer.js @@ -27,8 +27,7 @@ import languages, * as fromLanguages from './languages/reducer'; import measures, * as fromMeasures from './measures/reducer'; import notifications, * as fromNotifications from './notifications/duck'; import organizations, * as fromOrganizations from './organizations/duck'; -import organizationsMembers, * as fromOrganizationsMembers - from './organizationsMembers/reducer'; +import organizationsMembers, * as fromOrganizationsMembers from './organizationsMembers/reducer'; import globalMessages, * as fromGlobalMessages from './globalMessages/duck'; import projectActivity from './projectActivity/duck'; import measuresApp, * as fromMeasuresApp from '../apps/component-measures/store/rootReducer'; |