UI: Show Ref on build(set) result page if no branch is set

When a build was triggered by a tag (e.g. release pipeline) the branch
field is not set. To avoid showing an empty branch value, we could fall
back to the ref value instead.

Change-Id: Ic73f942ef34cf5b3d66e90197b53a9d42698de50
This commit is contained in:
Felix Edel
2020-08-21 10:43:09 +02:00
parent 2d46288a25
commit 35572d2057
2 changed files with 18 additions and 6 deletions

View File

@@ -101,9 +101,15 @@ function Build(props) {
WrapElement={ListItem}
icon={<CodeBranchIcon />}
value={
<>
<strong>Branch </strong> {build.branch}
</>
build.branch ? (
<>
<strong>Branch </strong> {build.branch}
</>
) : (
<>
<strong>Ref </strong> {build.ref}
</>
)
}
/>
<IconProperty

View File

@@ -79,9 +79,15 @@ function Buildset(props) {
WrapElement={ListItem}
icon={<CodeBranchIcon />}
value={
<>
<strong>Branch </strong> {buildset.branch}
</>
buildset.branch ? (
<>
<strong>Branch </strong> {buildset.branch}
</>
) : (
<>
<strong>Ref </strong> {buildset.ref}
</>
)
}
/>
<IconProperty