Skip to content

Commit

Permalink
show upgrade title when no policy present (#117134) (#117214)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Hopkin <[email protected]>
  • Loading branch information
kibanamachine and hop-dev authored Nov 2, 2021
1 parent 33d4617 commit adab369
Showing 1 changed file with 27 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,33 @@ export const CreatePackagePolicyPageLayout: React.FunctionComponent<{
);
}

return isEdit ? (
<EuiText>
<h1 data-test-subj={`${dataTestSubj}_pageTitle`}>
<FormattedMessage
id="xpack.fleet.editPackagePolicy.pageTitle"
defaultMessage="Edit integration"
/>
</h1>
</EuiText>
) : (
if (isEdit) {
return (
<EuiText>
<h1 data-test-subj={`${dataTestSubj}_pageTitle`}>
<FormattedMessage
id="xpack.fleet.editPackagePolicy.pageTitle"
defaultMessage="Edit integration"
/>
</h1>
</EuiText>
);
}

if (isUpgrade) {
return (
<EuiText>
<h1 data-test-subj={`${dataTestSubj}_pageTitle`}>
<FormattedMessage
id="xpack.fleet.upgradePackagePolicy.pageTitle"
defaultMessage="Upgrade integration"
/>
</h1>
</EuiText>
);
}

return (
<EuiText>
<h1>
<FormattedMessage
Expand Down

0 comments on commit adab369

Please sign in to comment.