mirror of https://github.com/rancher/ui.git
86 lines
3.3 KiB
Handlebars
86 lines
3.3 KiB
Handlebars
{{#accordion-list-item
|
|
title=(t 'formVolumes.title')
|
|
detail=(t 'formVolumes.detail' appName=settings.appName)
|
|
status=status
|
|
statusClass=statusClass
|
|
expandAll=expandAll
|
|
expand=(action expandFn)
|
|
}}
|
|
{{#if projects.current.isWindows}}
|
|
<div class="text-center p-20">Volume support is not currently available for Windows.</div>
|
|
{{else}}
|
|
<button class="btn bg-link icon-btn" {{action "addVolume"}}>
|
|
<span class="darken"><i class="icon icon-plus text-small"/></span>
|
|
<span>{{t 'formVolumes.addActionLabel'}}</span>
|
|
</button>
|
|
|
|
{{#if volumesArray.length}}
|
|
<div class="input-group mt-20">
|
|
{{#each volumesArray as |vol|}}
|
|
|
|
{{input type="text" class="volume-path form-control ml-5" value=vol.value placeholder="e.g. [volumename: or /path/on/host:]/path/in/container[:ro]"}}
|
|
|
|
<div class="input-group-addon p-0 input-group-btn bg-primary mr-5"><button class="btn" {{action "removeVolume" vol}}><i class="icon icon-minus"/></button></div>
|
|
|
|
{{/each}}
|
|
</div>
|
|
{{/if}}
|
|
|
|
<div class="mt-20">
|
|
<label class="acc-label">{{t 'formVolumes.volumesFrom'}}</label>
|
|
{{#if isService}}
|
|
{{#if volumesFromLaunchConfigChoices.length}}
|
|
{{#each volumesFromLaunchConfigChoices as |choice|}}
|
|
<label class="mr-10 radio small" style="color: inherit; text-transform: none;">{{input type="checkbox" checked=choice.enabled}} {{choice.displayName}}</label>
|
|
{{/each}}
|
|
{{else}}
|
|
<span class="text-muted">{{t 'formVolumes.noLaunchConfigs'}}</span>
|
|
{{/if}}
|
|
{{else}}
|
|
<div>
|
|
{{#if instance.requestedHostId}}
|
|
{{#if hostContainerChoices.length}}
|
|
<button class="btn bg-link icon-btn" {{action "addVolumeFrom"}}><i class="icon icon-plus text-small"/></button>
|
|
{{else}}
|
|
<span class="text-muted">{{t 'formVolumes.noHostContainers'}}</span>
|
|
{{/if}}
|
|
{{else}}
|
|
<span class="text-muted">{{t 'formVolumes.onlySingleHost'}}</span>
|
|
{{/if}}
|
|
</div>
|
|
{{#if volumesFromArray.length}}
|
|
<table class="table fixed no-lines no-top-padding tight">
|
|
{{#each volumesFromArray as |vol|}}
|
|
<tr>
|
|
<td>
|
|
{{new-select
|
|
classNames="form-control input-sm volumefrom-container"
|
|
prompt="formVolumes.value.prompt"
|
|
value=vol.value
|
|
content=hostContainerChoices
|
|
optionValuePath="id"
|
|
optionLabelPath="name"
|
|
optionGroupPath="group"
|
|
}}
|
|
</td>
|
|
<td width="30" class="text-right">
|
|
<button class="btn bg-primary btn-sm" {{action "removeVolumeFrom" vol}}><i class="icon icon-minus"/></button>
|
|
</td>
|
|
</tr>
|
|
{{/each}}
|
|
</table>
|
|
{{/if}}
|
|
{{/if}}
|
|
</div>
|
|
|
|
<div class="mt-20">
|
|
<label class="acc-label" for="volumeDriver">{{t 'formVolumes.volumeDriver.label'}}</label>
|
|
{{input-suggest
|
|
value=instance.volumeDriver
|
|
grouped=driverChoices
|
|
placeholder=(t 'formVolumes.volumeDriver.placeholder')
|
|
}}
|
|
</div>
|
|
{{/if}}
|
|
{{/accordion-list-item}}
|