Skip to content

Commit

Permalink
Fix link to Cloud deployment URL in upgrade step. (elastic#109528)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjcenizal authored and sabarasaba committed Oct 26, 2021
1 parent 9c92ac8 commit 05d2572
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ describe('Overview - Upgrade Step', () => {
servicesOverrides: {
cloud: {
isCloudEnabled: true,
baseUrl: 'https://test.com',
cloudId: '1234',
deploymentUrl:
'https://cloud.elastic.co./deployments/bfdad4ef99a24212a06d387593686d63',
},
},
});
Expand All @@ -49,7 +49,9 @@ describe('Overview - Upgrade Step', () => {
expect(exists('upgradeSetupCloudLink')).toBe(true);
expect(exists('upgradeSetupDocsLink')).toBe(true);

expect(find('upgradeSetupCloudLink').props().href).toBe('https://test.com/deployments/1234');
expect(find('upgradeSetupCloudLink').props().href).toBe(
'https://cloud.elastic.co./deployments/bfdad4ef99a24212a06d387593686d63'
);
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,15 @@ const i18nTexts = {

const UpgradeStep = ({ docLinks }: { docLinks: DocLinksStart }) => {
const { cloud } = useKibana().services;

const isCloudEnabled: boolean = Boolean(cloud?.isCloudEnabled);
const cloudDeploymentUrl: string = `${cloud?.baseUrl ?? ''}/deployments/${cloud?.cloudId ?? ''}`;

let callToAction;

if (isCloudEnabled) {
callToAction = (
<EuiFlexGroup alignItems="center" gutterSize="s">
<EuiFlexItem grow={false}>
<EuiButton
href={cloudDeploymentUrl}
href={cloud!.deploymentUrl}
target="_blank"
data-test-subj="upgradeSetupCloudLink"
iconSide="right"
Expand Down

0 comments on commit 05d2572

Please sign in to comment.