-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Show pipeline description (#1303)
Co-authored-by: Vonny Jap <[email protected]>
- Loading branch information
Showing
5 changed files
with
181 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,98 @@ | ||
<div id="pipeline-header" {{did-insert this.getPipelinesWithSameRepo}}> | ||
<LinkTo | ||
id="pipeline-link" | ||
class="header-item pipeline-name" | ||
@route="v2.pipeline" | ||
@model={{@pipeline.id}} | ||
> | ||
{{@pipeline.scmRepo.name}} | ||
</LinkTo> | ||
|
||
{{#if @pipeline.configPipelineId}} | ||
<div class="header-main"> | ||
<LinkTo | ||
id="parent-pipeline-link" | ||
class="header-item" | ||
id="pipeline-link" | ||
class="header-item pipeline-name" | ||
@route="v2.pipeline" | ||
@model={{@pipeline.configPipelineId}} | ||
@model={{@pipeline.id}} | ||
> | ||
<FaIcon @icon="cog" /> | ||
Parent Pipeline | ||
{{@pipeline.scmRepo.name}} | ||
</LinkTo> | ||
{{/if}} | ||
|
||
{{#if @pipeline.badges.sonar}} | ||
{{#if @pipeline.configPipelineId}} | ||
<LinkTo | ||
id="parent-pipeline-link" | ||
class="header-item" | ||
@route="v2.pipeline" | ||
@model={{@pipeline.configPipelineId}} | ||
> | ||
<FaIcon @icon="cog" /> | ||
Parent Pipeline | ||
</LinkTo> | ||
{{/if}} | ||
|
||
{{#if @pipeline.badges.sonar}} | ||
<a | ||
id="sonarqube-link" | ||
class="header-item" | ||
href={{this.sonarBadgeUri}} | ||
title={{this.sonarBadgeDescription}} | ||
target="_blank" | ||
rel="noopener" | ||
> | ||
{{svg-jar "sonarqube" class="img sonarqube"}} | ||
</a> | ||
{{/if}} | ||
|
||
<a | ||
id="sonarqube-link" | ||
class="header-item" | ||
href={{this.sonarBadgeUri}} | ||
title={{this.sonarBadgeDescription}} | ||
target="_blank" | ||
rel="noopener" | ||
id="scm-link" | ||
href="{{branch-url-encode @pipeline.scmRepo.url}}" | ||
class="header-item scm" | ||
> | ||
{{svg-jar "sonarqube" class="img sonarqube"}} | ||
<FaIcon @icon={{this.scmContext.scmIcon}} @prefix="fab" /> | ||
{{this.scmContext.scm}} | ||
</a> | ||
{{/if}} | ||
|
||
<a | ||
id="scm-link" | ||
href="{{branch-url-encode @pipeline.scmRepo.url}}" | ||
class="header-item scm" | ||
> | ||
<FaIcon @icon={{this.scmContext.scmIcon}} @prefix="fab" /> | ||
{{this.scmContext.scm}} | ||
</a> | ||
|
||
<BsDropdown id='repo-pipelines' class="header-item" as |dd|> | ||
<dd.toggle> | ||
<FaIcon @icon="code-branch" @title="Source code" /> | ||
<span class="branch"> | ||
{{@pipeline.scmRepo.branch}} | ||
</span> | ||
<BsTooltip @placement="bottom" @renderInPlace={{false}} @triggerEvents="hover" class="tooltip"> | ||
Switch to another Pipeline with the same repository | ||
</BsTooltip> | ||
</dd.toggle> | ||
<dd.menu as |ddm|> | ||
{{#each (await this.sameRepoPipeline) as |pipe|}} | ||
<ddm.item> | ||
<LinkTo | ||
@route="v2.pipeline" | ||
@model={{pipe.id}} | ||
> | ||
{{svg-jar "link" class="img"}} {{pipe.branchAndRootDir}} | ||
</LinkTo> | ||
</ddm.item> | ||
{{else}} | ||
<span> | ||
<BsDropdown id='repo-pipelines' class="header-item" as |dd|> | ||
<dd.toggle> | ||
<FaIcon @icon="code-branch" @title="Source code" /> | ||
<span class="branch"> | ||
{{@pipeline.scmRepo.branch}} | ||
</span> | ||
<BsTooltip @placement="bottom" @renderInPlace={{false}} @triggerEvents="hover" class="tooltip"> | ||
Switch to another Pipeline with the same repository | ||
</BsTooltip> | ||
</dd.toggle> | ||
<dd.menu as |ddm|> | ||
{{#each (await this.sameRepoPipeline) as |pipe|}} | ||
<ddm.item> | ||
<LinkTo | ||
@route="v2.pipeline" | ||
@model={{pipe.id}} | ||
> | ||
{{svg-jar "link" class="img"}} {{pipe.branchAndRootDir}} | ||
</LinkTo> | ||
</ddm.item> | ||
{{else}} | ||
<span> | ||
No other Pipelines with the same repository | ||
</span> | ||
{{/each}} | ||
</dd.menu> | ||
</BsDropdown> | ||
{{/each}} | ||
</dd.menu> | ||
</BsDropdown> | ||
|
||
<BsButton | ||
id="add-to-collection" | ||
class="confirm" | ||
@defaultText="Add to collection" | ||
@type="primary" | ||
@outline={{true}} | ||
@onClick={{this.openAddToCollectionModal}} | ||
/> | ||
<BsButton | ||
id="add-to-collection" | ||
class="confirm" | ||
@defaultText="Add to collection" | ||
@type="primary" | ||
@outline={{true}} | ||
@onClick={{this.openAddToCollectionModal}} | ||
> | ||
{{#if this.addToCollectionModalOpen}} | ||
<Pipeline::Modal::AddToCollection | ||
@pipeline={{@pipeline}} | ||
@collections={{this.collections}} | ||
@errorMessage={{this.errorMessage}} | ||
@closeModal={{this.closeAddToCollectionModal}} | ||
/> | ||
{{/if}} | ||
</BsButton> | ||
</div> | ||
|
||
{{#if this.addToCollectionModalOpen}} | ||
<Pipeline::Modal::AddToCollection | ||
@pipeline={{@pipeline}} | ||
@collections={{this.collections}} | ||
@errorMessage={{this.errorMessage}} | ||
@closeModal={{this.closeAddToCollectionModal}} | ||
/> | ||
{{#if this.pipelineDescription}} | ||
<div class="pipeline-description"> | ||
{{this.pipelineDescription}} | ||
</div> | ||
{{/if}} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.