diff options
author | Grégoire Aubert <gregoire.aubert@sonarsource.com> | 2018-10-19 17:25:13 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-11-16 20:21:04 +0100 |
commit | 07546d5e1f4047a1030a91d0ffaa39fb96e66a41 (patch) | |
tree | 442327150154571ec1be84a47cf4c012f0ba50bc /server/sonar-web/src/main/js/apps/organizations | |
parent | 3ea9808248000c145f53a4f1cdb8711d63b97da4 (diff) | |
download | sonarqube-07546d5e1f4047a1030a91d0ffaa39fb96e66a41.tar.gz sonarqube-07546d5e1f4047a1030a91d0ffaa39fb96e66a41.zip |
SONAR-11323 Ease workflow to bind personal organizations
* Create withUserOrganizations and use it in create Orgs/Projects page
* Update ALM object format in api/navigation/component and api/organizations/search
Diffstat (limited to 'server/sonar-web/src/main/js/apps/organizations')
3 files changed, 9 insertions, 8 deletions
diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationHeader.tsx b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationHeader.tsx index d376085573a..4d7bb7f71e1 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationHeader.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/OrganizationNavigationHeader.tsx @@ -58,17 +58,17 @@ export default function OrganizationNavigationHeader({ organization, organizatio ) : ( <span className="spacer-left">{organization.name}</span> )} - {organization.almRepoUrl && ( + {organization.alm && ( <a className="link-no-underline" - href={organization.almRepoUrl} + href={organization.alm.url} rel="noopener noreferrer" target="_blank"> <img - alt={sanitizeAlmId(organization.almId)} + alt={sanitizeAlmId(organization.alm.key)} className="text-text-top spacer-left" height={16} - src={`${getBaseUrl()}/images/sonarcloud/${sanitizeAlmId(organization.almId)}.svg`} + src={`${getBaseUrl()}/images/sonarcloud/${sanitizeAlmId(organization.alm.key)}.svg`} width={16} /> </a> diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigationHeader-test.tsx b/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigationHeader-test.tsx index 021b80766e4..2d6853a617d 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigationHeader-test.tsx +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/OrganizationNavigationHeader-test.tsx @@ -38,8 +38,7 @@ it('renders with alm integration', () => { shallow( <OrganizationNavigationHeader organization={{ - almId: 'github', - almRepoUrl: 'https://github.com/foo', + alm: { key: 'github', url: 'https://github.com/foo' }, key: 'foo', name: 'Foo', projectVisibility: Visibility.Public diff --git a/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/__snapshots__/OrganizationNavigationHeader-test.tsx.snap b/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/__snapshots__/OrganizationNavigationHeader-test.tsx.snap index cf3e383e573..ca3bd2d87cd 100644 --- a/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/__snapshots__/OrganizationNavigationHeader-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/organizations/navigation/__tests__/__snapshots__/OrganizationNavigationHeader-test.tsx.snap @@ -70,8 +70,10 @@ exports[`renders with alm integration 1`] = ` <OrganizationAvatar organization={ Object { - "almId": "github", - "almRepoUrl": "https://github.com/foo", + "alm": Object { + "key": "github", + "url": "https://github.com/foo", + }, "key": "foo", "name": "Foo", "projectVisibility": "public", |