mirror of https://github.com/rancher/ui.git
132 lines
4.2 KiB
Handlebars
132 lines
4.2 KiB
Handlebars
<div class="pt-20"></div>
|
|
<div class="inline-form">
|
|
<label>Language Environment</label>
|
|
<div class="pt-10"></div>
|
|
{{#each environmentTypes as |envType| }}
|
|
{{radio-button id=envType.label selection=selectedType value=envType.label disabled=(if (eq modalOpts.type 'review') true false)}}
|
|
<label class="acc-label" for={{envType.label}}>
|
|
{{envType.label}}
|
|
</label>
|
|
<span class="mr-10"></span>
|
|
{{/each}}
|
|
</div>
|
|
|
|
<hr class="mt-30 mb-30" />
|
|
|
|
<div class="inline-form">
|
|
<label>{{t 'newPipelineStep.stepType.image'}}{{field-required}}</label>
|
|
<div class="pt-10"></div>
|
|
{{#if (eq modalOpts.type 'review')}}
|
|
{{input
|
|
value=runScriptConfig.image
|
|
disabled=true
|
|
}}
|
|
{{else}}
|
|
{{#if (eq selectedType 'custom')}}
|
|
{{input-suggest
|
|
value=runScriptConfig.image
|
|
choices=pipeline.images
|
|
placeholder="hello-world:latest"
|
|
disabled=(if (eq modalOpts.type 'review') true false)
|
|
}}
|
|
{{else}}
|
|
{{customImage.repo}}:
|
|
<div class="inline-block">
|
|
{{searchable-select
|
|
content=customImage.selectableTags
|
|
value=customImage.tag
|
|
allowCustom=true
|
|
}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{!-- (if (not-eq selectedType 'custom') true false) --}}
|
|
{{/if}}
|
|
</div>
|
|
|
|
|
|
{{!-- <div class="pt-20"></div>
|
|
<div class="inline-form">
|
|
<label>{{t 'newPipelineStep.stepType.image'}}{{field-required}}</label>
|
|
<div class="pt-10"></div>
|
|
{{#if (eq modalOpts.type 'review')}}
|
|
{{input
|
|
value=selectedModel.image
|
|
disabled=true
|
|
}}
|
|
{{else}}
|
|
{{searchable-select
|
|
content=environmentTypes
|
|
value=selectedModel.image
|
|
allowCustom=true
|
|
optionLabelPath="value"
|
|
}}
|
|
{{/if}}
|
|
</div>
|
|
--}}
|
|
<section class="header has-tabs clearfix p-0 pt-30">
|
|
<ul class="tab-nav">
|
|
<li {{action "changeTaskModel" true}}>
|
|
<a href="javascript:void(0);" class="{{if (eq runScriptConfig.isShell true) 'active' (if (eq modalOpts.type 'review') 'hide')}} ember-view">{{t 'newPipelineStep.stepType.task.shellScript'}}</a>
|
|
</li>
|
|
{{#if (eq selectedType 'custom')}}
|
|
<li {{action "changeTaskModel" false}}>
|
|
<a href="javascript:void(0);" class="{{if (eq runScriptConfig.isShell false) 'active' (if (eq modalOpts.type 'review') 'hide')}} ember-view">{{t 'newPipelineStep.stepType.task.customEntryPoint'}}</a>
|
|
</li>
|
|
{{/if}}
|
|
</ul>
|
|
</section>
|
|
|
|
{{#if runScriptConfig.isShell}}
|
|
<div class="inline-form">
|
|
<label>{{t 'newPipelineStep.stepType.task.command'}}(shell) {{field-required}}</label>
|
|
<div class="pt-10"></div>
|
|
{{pipeline-codemirror
|
|
value=runScriptConfig.shellScript
|
|
valueUpdated=(action (mut runScriptConfig.shellScript))
|
|
options=(hash autofocus=true theme="monokai" lineNumbers=true mode="shell" readOnly=(if (eq modalOpts.type 'review') true false))
|
|
}}
|
|
</div>
|
|
{{else}}
|
|
<div class="inline-form">
|
|
<label>{{t 'newPipelineStep.stepType.task.entryPoint'}}</label>
|
|
<div class="pt-10"></div>
|
|
{{input
|
|
value=runScriptConfig.entrypoint
|
|
placeholder="If you want use the default entrypoint, just leave me empty"
|
|
disabled=(if (eq modalOpts.type 'review') true false)
|
|
}}
|
|
</div>
|
|
<div class="pt-20"></div>
|
|
<div class="inline-form">
|
|
<label>{{t 'newPipelineStep.stepType.task.command'}}</label>
|
|
<div class="pt-10"></div>
|
|
{{input
|
|
value=runScriptConfig.command
|
|
placeholder="Arguments of entrypoint"
|
|
disabled=(if (eq modalOpts.type 'review') true false)
|
|
}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
{{#if (not-eq runScriptConfig.isShell true)}}
|
|
<div class="pt-20"></div>
|
|
<div class="inline-form">
|
|
<label>{{t 'newPipelineStep.stepType.env'}}</label>
|
|
<div class="pt-10"></div>
|
|
{{form-key-value
|
|
allowMultilineValue=false
|
|
initialMap=runScriptConfig.env
|
|
changed=(action (mut runScriptConfig.env))
|
|
allowEmptyValue=false
|
|
editing=(if (eq modalOpts.type 'review') false true)
|
|
normalHeader=(t 'newContainer.environment.label')
|
|
addActionLabel="newContainer.environment.addAction"
|
|
keyLabel="newContainer.environment.keyLabel"
|
|
keyPlaceholder="newContainer.environment.keyPlaceholder"
|
|
valueLabel="newContainer.environment.valueLabel"
|
|
valuePlaceholder="e.g. bar"
|
|
disabled=(if (eq modalOpts.type 'review') true false)
|
|
}}
|
|
</div>
|
|
{{/if}} |