diff options
Diffstat (limited to 'server/sonar-web/src/main/js/apps/project-admin/store/rootReducer.js')
-rw-r--r-- | server/sonar-web/src/main/js/apps/project-admin/store/rootReducer.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/server/sonar-web/src/main/js/apps/project-admin/store/rootReducer.js b/server/sonar-web/src/main/js/apps/project-admin/store/rootReducer.js index 5f5dc3d7899..e8174f53aa0 100644 --- a/server/sonar-web/src/main/js/apps/project-admin/store/rootReducer.js +++ b/server/sonar-web/src/main/js/apps/project-admin/store/rootReducer.js @@ -23,10 +23,14 @@ import profiles, { getAllProfiles as nextGetAllProfiles } from './profiles'; import profilesByProject, { getProfiles } from './profilesByProject'; +import links, { getLink } from './links'; +import linksByProject, { getLinks } from './linksByProject'; const rootReducer = combineReducers({ profiles, - profilesByProject + profilesByProject, + links, + linksByProject }); export default rootReducer; @@ -40,3 +44,10 @@ export const getAllProfiles = state => export const getProjectProfiles = (state, projectKey) => getProfiles(state.profilesByProject, projectKey) .map(profileKey => getProfileByKey(state, profileKey)); + +export const getLinkById = (state, linkId) => + getLink(state.links, linkId); + +export const getProjectLinks = (state, projectKey) => + getLinks(state.linksByProject, projectKey) + .map(linkId => getLinkById(state, linkId)); |