mirror of https://github.com/rancher/ui.git
127 lines
5.3 KiB
Handlebars
127 lines
5.3 KiB
Handlebars
{{#accordion-list-item
|
|
title=(t 'formCommand.title')
|
|
detail=(t 'formCommand.detail' appName=settings.appName)
|
|
status=status
|
|
statusClass=statusClass
|
|
expandAll=expandAll
|
|
expand=(action expandFn)
|
|
}}
|
|
<div class="row">
|
|
<div class="col span-6 box">
|
|
<label class="acc-label">{{t 'formCommand.entryPoint.label'}}</label>
|
|
{{#input-or-display editable=editing value=instance.entryPoint}}
|
|
{{input-command class="form-control" type="text" changed=(action (mut instance.entryPoint)) initialValue=instance.entryPoint placeholder=(t 'formCommand.entryPoint.placeholder')}}
|
|
{{/input-or-display}}
|
|
</div>
|
|
<div class="col span-6 box">
|
|
<label class="acc-label">{{t 'formCommand.command.label'}}</label>
|
|
{{#input-or-display editable=editing value=instance.command classesForDisplay="clip"}}
|
|
{{input-command class="form-control" type="text" changed=(action (mut instance.command)) initialValue=instance.command placeholder=(t 'formCommand.command.placeholder')}}
|
|
{{/input-or-display}}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col span-6 box">
|
|
<label class="acc-label">{{t 'formCommand.workingDir.label'}}</label>
|
|
{{#input-or-display editable=editing value=instance.workingDir}}
|
|
{{input type="text" value=instance.workingDir classNames="form-control" placeholder=(t 'formCommand.workingDir.placeholder')}}
|
|
{{/input-or-display}}
|
|
</div>
|
|
<div class="col span-6 box">
|
|
<label class="acc-label">{{t 'formCommand.uid.label'}}</label>
|
|
{{#if editing}}
|
|
{{input type="text" value=instance.uid classNames="form-control" placeholder=(t 'formCommand.uid.placeholder')}}
|
|
{{else if instance.uid}}
|
|
<div>{{instance.uid}}</div>
|
|
{{else}}
|
|
<div class="text-muted">{{t 'generic.na'}}</div>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col span-6 box">
|
|
<label class="acc-label">{{t 'formCommand.console.label'}}</label>
|
|
{{#input-or-display editable=editing value=terminal.name}}
|
|
<div class="radio">
|
|
<label>{{radio-button selection=terminal.type value="both"}} {{t 'formCommand.console.both' htmlSafe=true}}</label>
|
|
</div>
|
|
<div class="radio">
|
|
<label>{{radio-button selection=terminal.type value="interactive"}} {{t 'formCommand.console.interactive' htmlSafe=true}}</label>
|
|
</div>
|
|
<div class="radio">
|
|
<label>{{radio-button selection=terminal.type value="terminal"}} {{t 'formCommand.console.terminal' htmlSafe=true}}</label>
|
|
</div>
|
|
<div class="radio">
|
|
<label>{{radio-button selection=terminal.type value="none"}} {{t 'formCommand.console.none' htmlSafe=true}}</label>
|
|
</div>
|
|
{{/input-or-display}}
|
|
</div>
|
|
|
|
<div class="col span-6 box">
|
|
<label class="acc-label">{{t 'formCommand.autoRestart.label'}}</label>
|
|
<div class="row {{unless editing 'inline-form'}}">
|
|
{{#if editing}}
|
|
<div class="radio">
|
|
<label>{{radio-button selection=restart value="no"}} {{t 'formCommand.autoRestart.no'}}</label>
|
|
</div>
|
|
|
|
<div class="radio">
|
|
<label>{{radio-button selection=restart value="always"}} {{t 'formCommand.autoRestart.always'}}</label>
|
|
</div>
|
|
|
|
<div class="radio">
|
|
<label>{{radio-button selection=restart value="on-failure"}} {{t 'formCommand.autoRestart.onFailure' htmlSafe=true}}</label>
|
|
</div>
|
|
|
|
<div class="radio pt-5">
|
|
<label>
|
|
{{radio-button selection=restart value="on-failure-cond"}}
|
|
<span class="with-input">
|
|
{{t 'formCommand.autoRestart.onFailureCondPrefix' limit=restartLimit}}
|
|
{{input-integer min=1 safeStyle="width: 60px; padding: 0 2px; display: inline-block;" class="form-control input-xs" value=restartLimit}}
|
|
{{t 'formCommand.autoRestart.onFailureCondSuffix' limit=restartLimit}}
|
|
</span>
|
|
</label>
|
|
</div>
|
|
|
|
{{else if (eq restart "on-failure-cond")}}
|
|
<div>
|
|
{{t 'formCommand.autoRestart.onFailureCondPrefix' limit=restartLimit}}
|
|
{{restartLimit}}
|
|
{{t 'formCommand.autoRestart.onFailureCondSuffix' limit=restartLimit}}
|
|
</div>
|
|
{{else if (eq restart "on-failure")}}
|
|
<div>
|
|
{{t 'formCommand.autoRestart.onFailure' htmlSafe=true}}
|
|
</div>
|
|
{{else if (eq restart "always")}}
|
|
<div>
|
|
{{t 'formCommand.autoRestart.always'}}
|
|
</div>
|
|
{{else if (eq restart "on-failure")}}
|
|
<div>
|
|
{{t 'formCommand.autoRestart.never'}}
|
|
</div>
|
|
{{else}}
|
|
<div>{{t 'generic.none'}}</div>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col span-6 box">
|
|
<label class="acc-label">{{t 'formCommand.terminationGracePeriodSeconds.label'}}</label>
|
|
{{#input-or-display editable=editing value=instance.terminationGracePeriodSeconds}}
|
|
<div class="input-group">
|
|
{{input-integer min=0 value=instance.terminationGracePeriodSeconds}}
|
|
<span class="input-group-addon bg-default">{{t 'generic.seconds'}}</span>
|
|
</div>
|
|
{{/input-or-display}}
|
|
<p class="help-block">{{t 'formCommand.terminationGracePeriodSeconds.helpText'}}</p>
|
|
</div>
|
|
</div>
|
|
{{/accordion-list-item}}
|