pipeline fixes

This commit is contained in:
lvuch 2018-02-28 13:15:32 -07:00
parent a5fd2fef38
commit 08945b09e7
9 changed files with 102 additions and 101 deletions

View File

@ -135,13 +135,11 @@
left: 0; left: 0;
right: 0; right: 0;
margin: auto; margin: auto;
z-index: -1;
} }
>.steps-wrap { >.steps-wrap {
padding: 4px; padding: 4px;
// margin-right: 10px; text-align: center;
// &.active{
// border: 2px dashed $border;
// }
} }
.step-content { .step-content {
position: relative; position: relative;
@ -291,6 +289,12 @@
position: relative; position: relative;
top: 0; top: 0;
height: 36.5px; height: 36.5px;
margin-bottom: 10px;
&:last-child {
margin-bottom: 0;
}
.label-wrap{ .label-wrap{
position: absolute; position: absolute;
left: 0; left: 0;
@ -306,4 +310,4 @@
} }
.timestamp{ .timestamp{
color: whitesmoke; color: whitesmoke;
} }

View File

@ -23,11 +23,11 @@
dragEndHook=(action "dragEnd") dragEndHook=(action "dragEnd")
}} }}
{{#if (eq index 0)}} {{#if (eq index 0)}}
<div class="stage-name text-muted clip"> <div class="stage-name clip">
{{index-add index}}. {{item.name}} {{index-add index}}. {{item.name}}
</div> </div>
{{else}} {{else}}
<div class="stage-name text-muted clip" style="curosor: pointer;" {{action 'editStage' index}}> <div class="stage-name clip" style="curosor: pointer;" {{action 'editStage' index}}>
<a href="javascript:void(0);">{{index-add index}}. {{item.name}}</a> <a href="javascript:void(0);">{{index-add index}}. {{item.name}}</a>
</div> </div>
{{/if}} {{/if}}
@ -69,7 +69,7 @@
{{else}} {{else}}
{{#each pipeline.stages as |item index|}} {{#each pipeline.stages as |item index|}}
<div class="stage-wrap"> <div class="stage-wrap">
<div class="stage-name text-muted clip" {{action 'editStage' index}}> <div class="stage-name clip" {{action 'editStage' index}}>
{{index-add index}}. {{item.name}} {{index-add index}}. {{item.name}}
</div> </div>
{{pipeline-steps {{pipeline-steps
@ -92,7 +92,7 @@
{{/each}} {{/each}}
{{/if}} {{/if}}
</section> </section>
{{!-- {{!--
{{pipeline-input-var-hint {{pipeline-input-var-hint
hintAry=envvars hintAry=envvars
loading=envvarsLoading loading=envvarsLoading

View File

@ -13,7 +13,7 @@
isDraggable=false isDraggable=false
class="step-content" class="step-content"
content=item content=item
overrideClass='sortObject' overrideClass='sortObject'
isSortable=true isSortable=true
sortingScope=sortingScope sortingScope=sortingScope
dragStartAction="dragStart" dragStartAction="dragStart"
@ -37,12 +37,11 @@
{{/if}} {{/if}}
{{#if editable}} {{#if editable}}
{{#unless (eq stepMode 'scm')}} {{#unless (eq stepMode 'scm')}}
<div class="step-add step-content" {{action 'addStep'}}> <button class="mt-10 btn bg-link icon-btn p-0" {{action 'addStep'}} style="margin: 0 auto;">
<a href="javascript:void(0);" class="text-small"> <span class="darken"><i class="icon icon-plus text-small"/></span>
{{t 'newPipelineStage.addStep'}} <span>{{t 'newPipelineStage.addStep'}}</span>
</a> </button>
</div>
{{/unless}} {{/unless}}
{{/if}} {{/if}}
</div> </div>
</div> </div>

View File

@ -1,16 +1,17 @@
<hr/>
<div class="inline-form"> <div class="inline-form">
<label>{{t 'newPipelineStep.stepType.scm.trigger'}}</label> <label>{{t 'newPipelineStep.stepType.scm.trigger'}}</label>
<div class="pt-10"></div> <div class="pt-10"></div>
<div class="inline-form"> <div class="inline-form">
{{input disabled=disabled type="checkbox" id="webhook" checked=pipeline.triggerWebhook}} {{input disabled=disabled type="checkbox" id="webhook" checked=pipeline.triggerWebhook}}
<label for="webhook"> <label class="acc-label" for="webhook">
{{t 'newPipelineStage.trigger.webhook'}} {{t 'newPipelineStage.trigger.webhook'}}
</label> </label>
</div> </div>
<div class="pt-10"></div> <div class="pt-10"></div>
<div class="inline-form"> <div class="inline-form">
{{input disabled=disabled type="checkbox" id="cron" checked=state.setCustomCron}} {{input disabled=disabled type="checkbox" id="cron" checked=state.setCustomCron}}
<label for="cron"> <label class="acc-label" for="cron">
{{t 'newPipelineStage.trigger.cron'}} {{t 'newPipelineStage.trigger.cron'}}
</label> </label>
</div> </div>
@ -29,16 +30,16 @@
<div class="inline-form pl-10"> <div class="inline-form pl-10">
{{radio-button id="everyday" disabled=disabled selection=cronType value="everyday"}} {{radio-button id="everyday" disabled=disabled selection=cronType value="everyday"}}
<label for="everyday"> <label for="everyday">
{{t 'newPipelineStage.trigger.everyday'}} <div class="inline-block">{{input {{t 'newPipelineStage.trigger.everyday'}} <div class="inline-block">{{input
class="form-control input-sm" class="form-control input-sm"
type="number" type="number"
min='0' min='0'
max='11' max='11'
value=cron.hour value=cron.hour
disabled=(if (eq cronType 'everyday') disabled true) disabled=(if (eq cronType 'everyday') disabled true)
}}</div> : <div class="inline-block">{{input }}</div> : <div class="inline-block">{{input
class="form-control input-sm" class="form-control input-sm"
type="number" type="number"
value=cron.min value=cron.min
min='0' min='0'
max='59' max='59'
@ -50,8 +51,8 @@
<div class="inline-form pl-10"> <div class="inline-form pl-10">
{{radio-button id="custom" disabled=disabled selection=cronType value="custom"}} {{radio-button id="custom" disabled=disabled selection=cronType value="custom"}}
<label for="custom"> <label for="custom">
{{t 'newPipelineStage.trigger.custom'}} <div class="inline-block" style="display: relative;top:0">{{input {{t 'newPipelineStage.trigger.custom'}} <div class="inline-block" style="display: relative;top:0">{{input
class="form-control input-sm" class="form-control input-sm"
type="text" type="text"
value=customCron value=customCron
disabled=(if (eq cronType 'custom') disabled true) disabled=(if (eq cronType 'custom') disabled true)
@ -63,6 +64,6 @@
{{/if}} {{/if}}
{{/if}} {{/if}}
</div> </div>
{{/if}} {{/if}}
</div> </div>

View File

@ -69,7 +69,7 @@
{{#unless model.githubConfig}} {{#unless model.githubConfig}}
<section class="box mt-30"> <section class="box mt-30">
<h3>{{t 'authPage.github.notAuthenticated.headerVariable' GitHub='GitHub'}}</h3> <h3>{{t 'authPage.github.notAuthenticated.headerVariable'}}</h3>
<hr/> <hr/>
<p> <p>
<ol class="alphalist ml-40"> <ol class="alphalist ml-40">
@ -98,7 +98,7 @@
{{#if (eq selectedOauthType 'gitlab')}} {{#if (eq selectedOauthType 'gitlab')}}
{{t 'authPage.github.notAuthenticated.ul.li2.ul.li1_2' appName="Rancher Pipeline" htmlSafe=true}} {{t 'authPage.github.notAuthenticated.ul.li2.ul.li1_2' appName="Rancher Pipeline" htmlSafe=true}}
{{/if}} {{/if}}
</li> </li>
{{#if (eq selectedOauthType 'github')}} {{#if (eq selectedOauthType 'github')}}
<li> <li>
@ -108,10 +108,10 @@
{{/if}} {{/if}}
<li> <li>
{{#if (eq selectedOauthType 'github')}} {{#if (eq selectedOauthType 'github')}}
<b>{{t 'authPage.github.notAuthenticated.ul.li2.ul.li4'}}</b> <b>{{t 'authPage.github.notAuthenticated.ul.li2.ul.li4'}}</b>
{{/if}} {{/if}}
{{#if (eq selectedOauthType 'gitlab')}} {{#if (eq selectedOauthType 'gitlab')}}
<b>{{t 'authPage.github.notAuthenticated.ul.li2.ul.li4_2'}}</b> <b>{{t 'authPage.github.notAuthenticated.ul.li2.ul.li4_2'}}</b>
{{/if}} {{/if}}
<span id="auth-callback-url">{{destinationUrl}} {{copy-to-clipboard size='small' clipboardText=destinationUrl}}</span></li> <span id="auth-callback-url">{{destinationUrl}} {{copy-to-clipboard size='small' clipboardText=destinationUrl}}</span></li>
</ul> </ul>
@ -154,7 +154,7 @@
{{#liquid-if isEnterprise}} {{#liquid-if isEnterprise}}
<label class="acc-label pb-5">{{t 'authPage.github.notAuthenticated.form.enterpriseHost.labelText'}}{{field-required}}</label> <label class="acc-label pb-5">{{t 'authPage.github.notAuthenticated.form.enterpriseHost.labelText'}}{{field-required}}</label>
{{#if (eq selectedOauthType 'github')}} {{input type="text" value=oauthModel.hostName classNames="form-control" placeholder=(t 'authPage.github.notAuthenticated.form.enterpriseHost.placeholder')}} {{#if (eq selectedOauthType 'github')}} {{input type="text" value=oauthModel.hostName classNames="form-control" placeholder=(t 'authPage.github.notAuthenticated.form.enterpriseHost.placeholder')}}
{{/if}} {{/if}}
{{#if (eq selectedOauthType 'gitlab')}} {{input type="text" value=oauthModel.hostName classNames="form-control" placeholder=(t 'authPage.github.notAuthenticated.form.enterpriseHost.placeholder2')}} {{#if (eq selectedOauthType 'gitlab')}} {{input type="text" value=oauthModel.hostName classNames="form-control" placeholder=(t 'authPage.github.notAuthenticated.form.enterpriseHost.placeholder2')}}
{{/if}} {{/if}}
{{/liquid-if}} {{/liquid-if}}

View File

@ -4,11 +4,11 @@
<div class="pt-20"></div> <div class="pt-20"></div>
<div class="inline-form"> <div class="inline-form">
<label>{{t 'newPipelineStep.stepType.scm.user'}}{{field-required}}</label> <label>{{t 'newPipelineStep.stepType.scm.user'}}{{field-required}}</label>
<div class="pt-10"></div>
{{#if accountsInfo}} {{#if accountsInfo}}
<div class="row"> <div class="row">
<div class="col span-12"> <div class="col span-12">
{{#identity-block {{#identity-block
principal=profileComponent principal=profileComponent
link=false link=false
}} }}
@ -33,63 +33,64 @@
{{/if}} {{/if}}
</div> </div>
<div class="pt-20"></div> <hr/>
<div class="inline-form">
<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"><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
}}
{{/if}}
{{/if}}
</div>
<div class="pt-20"></div>
<div class="inline-form">
<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=(if (eq modalOpts.type 'review') true false) id=type.value selection=selectedModel.sourceCodeConfig.branchCondition value=type.value}}
<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>
<div class="mb-10"></div>
{{/each}}
<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"><i class="icon icon-refresh"></i></button>
{{/tooltip-element}}
{{/unless}}
{{/if}}
</label>
{{#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
}}
{{/if}}
{{/if}}
</div>
<div class="col span-6">
<label>{{t 'newPipelineStep.stepType.scm.branch'}}{{field-required}}</label>
{{#each branchTypes as |type| }}
<div class="pipeline-input-group">
<div class="label-wrap">
{{radio-button disabled=(if (eq modalOpts.type 'review') true false) 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> </div>
<div class="pt-10"></div>
{{#pipeline-trigger {{#pipeline-trigger
selectedModel=selectedModel selectedModel=selectedModel
modalOpts=modalOpts modalOpts=modalOpts

View File

@ -64,8 +64,8 @@ let Pipeline = Resource.extend({
{ label: 'action.viewConfig', icon: 'icon icon-files', action: 'viewCode', enabled: !!l.exportConfig, bulkable: false }, { label: 'action.viewConfig', icon: 'icon icon-files', action: 'viewCode', enabled: !!l.exportConfig, bulkable: false },
{ label: 'action.exportConfig', icon: 'icon icon-download', action: 'exportConfig', enabled: !!l.exportConfig, bulkable: false }, { label: 'action.exportConfig', icon: 'icon icon-download', action: 'exportConfig', enabled: !!l.exportConfig, bulkable: false },
{ divider: true }, { divider: true },
{ label: 'action.activate', icon: 'icon icon-plus-circle', action: 'activate', enabled: !isActive, bulkable: !isActive}, { label: 'action.activate', icon: 'icon icon-play', action: 'activate', enabled: !isActive, bulkable: !isActive},
{ label: 'action.deactivate', icon: 'icon icon-minus-circle', action: 'deactivate', enabled: isActive, bulkable: isActive}, { label: 'action.deactivate', icon: 'icon icon-stop', action: 'deactivate', enabled: isActive, bulkable: isActive},
{ divider: true }, { divider: true },
{ label: 'action.remove', icon: 'icon icon-trash', action: 'remove', enabled: true, bulkable: true }, { label: 'action.remove', icon: 'icon icon-trash', action: 'remove', enabled: true, bulkable: true },
]; ];

View File

@ -1,11 +1,7 @@
{{#containers-header tags=tags simpleMode=true showGroup=false}} {{#containers-header tags=tags simpleMode=true showGroup=false}}
{{!-- {{#link-to "pipelines.project.import" classNames="btn btn-sm bg-default mr-10"}}{{t 'pipelinesPage.import'}}{{/link-to}} --}} {{#link-to "new-pipeline" class="btn bg-primary btn-sm"}}
<div class="btn bg-link btn-sm icon-btn p-0"> {{t 'pipelinesPage.add'}}
{{#link-to "new-pipeline" class="btn bg-link icon-btn p-0"}}
<span class="darken"><i class="icon icon-plus text-small"/></span>
<span>{{t 'pipelinesPage.add'}}</span>
{{/link-to}} {{/link-to}}
</div>
{{/containers-header}} {{/containers-header}}
<div class="mt-10"></div> <div class="mt-10"></div>

View File

@ -18,7 +18,7 @@ generic:
# Resource Actions # Resource Actions
############################## ##############################
action: action:
approve: Approve approve: Approve
rerun: Rerun rerun: Rerun
run: Run Once run: Run Once
@ -118,7 +118,7 @@ newPipelineStage:
modeSerial: serial modeSerial: serial
parallelTip: Make steps running simultaneously parallelTip: Make steps running simultaneously
serialTip: Make steps running sequentially serialTip: Make steps running sequentially
conditions: Conditions conditions: Conditions
requireApproval: Requires Approval requireApproval: Requires Approval
approvers: Approvers approvers: Approvers
env: Env env: Env
@ -152,7 +152,7 @@ newPipelineStep:
settingWarning2: click here settingWarning2: click here
settingWarning3: to load your repository settingWarning3: to load your repository
note: Note note: Note
finishOauth1: Have finished the OAuth? finishOauth1: Have finished the OAuth?
finishOauth2: click here finishOauth2: click here
finishOauth3: to load your repository finishOauth3: to load your repository
trigger: Optional build trigger trigger: Optional build trigger
@ -167,7 +167,7 @@ newPipelineStep:
buildPath: Build Context(relative to workspace) buildPath: Build Context(relative to workspace)
push: push to registry push: push to registry
pushTo: This image will be pushed to pushTo: This image will be pushed to
pushWarning1: The registry pushWarning1: The registry
pushWarning2: haven't been authenticated, click pushWarning2: haven't been authenticated, click
pushWarning3: to authenticate it. pushWarning3: to authenticate it.
scope: "Scope: Available to all namespaces in this project" scope: "Scope: Available to all namespaces in this project"
@ -200,7 +200,7 @@ authPage:
enterprise: GitHub Enterprise enterprise: GitHub Enterprise
header: header:
enabled: enabled:
label: "{github} is enabled" label: "GitHub is enabled"
required: | required: |
{appName} is configured to allow access to {orgs, plural, {appName} is configured to allow access to {orgs, plural,
=0 {no organizations} =0 {no organizations}
@ -241,7 +241,7 @@ authPage:
disable: Disable access control disable: Disable access control
notAuthenticated: notAuthenticated:
header: "1. Setup a GitHub Application" header: "1. Setup a GitHub Application"
headerVariable: "1. Setup a {GitHub} Application" headerVariable: "1. Setup a GitHub Application"
ul: ul:
li1: li1:
text: 'For standard GitHub, <a href="https://github.com/settings/developers" target="_blank">click here</a> to go applications settings in a new window.' text: 'For standard GitHub, <a href="https://github.com/settings/developers" target="_blank">click here</a> to go applications settings in a new window.'