mirror of https://github.com/rancher/ui.git
132 lines
4.7 KiB
Handlebars
132 lines
4.7 KiB
Handlebars
{{#if statusFetching}}
|
|
<i class="icon icon-spinner icon-spin"></i>
|
|
{{else}}
|
|
<div class="pt-20"></div>
|
|
<div class="inline-form">
|
|
<label>{{t 'newPipelineStep.stepType.scm.user'}}{{field-required}}</label>
|
|
{{#if (eq modalOpts.type 'review')}}
|
|
<div class="row">
|
|
<div class="col span-12">
|
|
{{#identity-block
|
|
principal=profileComponent
|
|
link=false
|
|
}}
|
|
{{/identity-block}}
|
|
</div>
|
|
</div>
|
|
{{else}}
|
|
{{#if accountsInfo}}
|
|
<div class="row">
|
|
<div class="col span-12">
|
|
{{#identity-block
|
|
principal=profileComponent
|
|
link=false
|
|
}}
|
|
{{/identity-block}}
|
|
</div>
|
|
</div>
|
|
{{else}}
|
|
<div class="row">
|
|
{{#unless testing}}
|
|
<button class="btn bg-primary"
|
|
{{action "authenticate"}}
|
|
>
|
|
<i class="icon icon-github"></i> {{t 'generic.loginIn'}}
|
|
</button>
|
|
{{else}}
|
|
<button class="btn bg-primary"
|
|
disabled="disabled"
|
|
>
|
|
<i class="icon icon-spinner icon-spin"></i> {{t 'authPage.github.testAuth.buttonText.post'}}
|
|
</button>
|
|
{{/unless}}
|
|
</div>
|
|
{{/if}}
|
|
{{/if}}
|
|
</div>
|
|
|
|
<hr/>
|
|
|
|
<div class="row">
|
|
<div class="col span-6">
|
|
<label>
|
|
{{t 'pipelineHistories.repository'}}{{field-required}}
|
|
{{#if (not-eq modalOpts.type 'review')}}
|
|
{{#unless state.repoRefresh}}
|
|
{{#tooltip-element
|
|
type="tooltip-basic"
|
|
model='Refresh repository'
|
|
tooltipTemplate='tooltip-static'
|
|
aria-describedby="tooltip-base"
|
|
tooltipFor="audit-log"}}
|
|
<button {{action "reloadRepo"}} class="btn bg-transparent pt-0 pb-0"><i class="icon icon-refresh"></i></button>
|
|
{{/tooltip-element}}
|
|
{{/unless}}
|
|
{{/if}}
|
|
</label>
|
|
<div class="pt-10"></div>
|
|
{{#if (eq modalOpts.type 'review')}}
|
|
{{input class="form-control" value=selectedModel.sourceCodeConfig.url disabled=(if (eq modalOpts.type 'review') true false)}}
|
|
{{else}}
|
|
{{#if state.repoRefresh}}
|
|
<i class="icon icon-spinner icon-spin"></i>
|
|
{{else}}
|
|
{{searchable-select
|
|
content=repositories
|
|
value=selectedModel.sourceCodeConfig.url
|
|
optionLabelPath="url"
|
|
optionValuePath="url"
|
|
readOnly=readOnly
|
|
}}
|
|
<button {{action "fetchPipelineFromRepo"}}
|
|
disabled={{if selectedModel.sourceCodeConfig.url fetchPipelineFromRepoState true}}
|
|
class="mt-10 btn bg-info"
|
|
style="color:white;"
|
|
>
|
|
{{#if fetchPipelineFromRepoState}}
|
|
<i class="icon icon-spin icon-spinner"></i>
|
|
{{/if}}
|
|
{{t 'newPipelineStep.stepType.scm.importFromRepo'}}
|
|
</button>
|
|
{{#if fetchPipelineFromRepoMessageShow}}
|
|
{{#if fetchPipelineFromRepoMessageSuccess}}
|
|
{{banner-message color='bg-success mb-0 mt-10' message=(t 'newPipelineStep.stepType.scm.importPipelineSuccess' htmlSafe=true branch=importFromBranch)}}
|
|
{{else}}
|
|
{{banner-message color='bg-warning mb-0 mt-10' message=(t 'newPipelineStep.stepType.scm.importPipelineFail') }}
|
|
{{/if}}
|
|
{{/if}}
|
|
{{/if}}
|
|
{{/if}}
|
|
</div>
|
|
|
|
<div class="col span-6">
|
|
<label>{{t 'newPipelineStep.stepType.scm.branch'}}{{field-required}}</label>
|
|
<div class="pt-10"></div>
|
|
{{#each branchTypes as |type| }}
|
|
<div class="pipeline-input-group">
|
|
<div class="label-wrap">
|
|
{{radio-button disabled=(or (eq modalOpts.type 'review') (and (not-eq type.value 'only') allowOnly)) id=type.value selection=selectedModel.sourceCodeConfig.branchCondition value=type.value}}
|
|
<label class="acc-label" for={{type.value}}>
|
|
{{type.label}}
|
|
</label>
|
|
</div>
|
|
{{#if (not-eq type.value 'all')}}
|
|
<div class="input-wrap">
|
|
{{input class="form-control js-disable-hint js-auto-focus" value=selectedModel.sourceCodeConfig.branch placeholder="master" disabled=(if (eq modalOpts.type 'review') true (if (eq type.value selectedModel.sourceCodeConfig.branchCondition) false true))}}
|
|
</div>
|
|
{{/if}}
|
|
</div>
|
|
{{/each}}
|
|
</div>
|
|
</div>
|
|
|
|
{{#pipeline-trigger
|
|
selectedModel=selectedModel
|
|
modalOpts=modalOpts
|
|
selectedRepo=selectedRepo
|
|
triggerOptionsChange=(action 'triggerOptionsChange')
|
|
disabled=(if (eq modalOpts.type 'review') true false)
|
|
}}
|
|
{{/pipeline-trigger}}
|
|
{{/if}}
|