diff --git a/services/frontend-service/src/ui/components/CommitInfo/CommitInfo.scss b/services/frontend-service/src/ui/components/CommitInfo/CommitInfo.scss index a5e4187ca..8feed6c87 100644 --- a/services/frontend-service/src/ui/components/CommitInfo/CommitInfo.scss +++ b/services/frontend-service/src/ui/components/CommitInfo/CommitInfo.scss @@ -25,6 +25,11 @@ Copyright 2023 freiheit.com*/ padding: 5px; } + .history-text-container { + width: auto; + padding: 5px; + } + table, th, td { diff --git a/services/frontend-service/src/ui/components/CommitInfo/CommitInfo.tsx b/services/frontend-service/src/ui/components/CommitInfo/CommitInfo.tsx index ad1dc83b8..ccc80d091 100644 --- a/services/frontend-service/src/ui/components/CommitInfo/CommitInfo.tsx +++ b/services/frontend-service/src/ui/components/CommitInfo/CommitInfo.tsx @@ -37,8 +37,29 @@ export const CommitInfo: React.FC = (props) => { const nextPrevMessage = 'Note that kuberpult links to the next commit in the repository that it is aware of.' + 'This is not necessarily the next/previous commit that touches the desired microservice.'; - const tooltipMsg = ' Limitation: Currently only commits that touch exactly one app are linked.'; + const tooltipMsg = + ' Limitation: Currently only commits that touch exactly one app are linked. Additionally, kuberpult can only link commits if the previous commit hash is supplied to the /release endpoint.'; const showInfo = !commitInfo.nextCommitHash || !commitInfo.previousCommitHash; + const previousButton = + commitInfo.previousCommitHash !== '' ? ( +
+ + Previous Commit + +
+ ) : ( +
Previous commit not found  
+ ); + const nextButton = + commitInfo.nextCommitHash !== '' ? ( +
+ + Next Commit + +
+ ) : ( +
Next commit not found  
+ ); return (
@@ -73,24 +94,9 @@ export const CommitInfo: React.FC = (props) => {
{commitInfo.touchedApps.length < 2 && (
- {commitInfo.previousCommitHash !== '' && ( - - )} - - {commitInfo.nextCommitHash !== '' && ( - - )} + {previousButton} + {nextButton} {showInfo &&
}
)}