diff --git a/app/components/container/form-ports/template.hbs b/app/components/container/form-ports/template.hbs index 44a29d17f..55ba599c1 100644 --- a/app/components/container/form-ports/template.hbs +++ b/app/components/container/form-ports/template.hbs @@ -1,83 +1,112 @@
| {{t 'formPorts.bindAddress.label'}} | -- {{/if}} - - | {{t 'formPorts.public.label'}} | -- | {{t 'formPorts.private.label'}}{{field-required}} | -- | {{t 'formPorts.protocol.label'}} | -- | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| - {{#if port.existing}} - {{#if port.bindAddress}} - {{port.bindAddress}} + | {{t 'formPorts.bindAddress.label'}} | ++ {{/if}} + + | {{t 'formPorts.public.label'}} | ++ | {{t 'formPorts.private.label'}}{{#if editing}}{{field-required}}{{/if}} | ++ | {{t 'formPorts.protocol.label'}} | ++ | ||||
| + {{#if port.existing}} + {{#if port.bindAddress}} + {{port.bindAddress}} + {{else}} + {{t 'generic.any'}} + {{/if}} {{else}} - {{t 'generic.any'}} + {{#if editing}} + {{input class="form-control input-sm" type="text" value=port.bindAddress placeholder=(t 'formPorts.bindAddress.placeholder')}} + {{else}} + {{#if port.bindAddress}} + {{port.bindAddress}} + {{else}} + {{t 'generic.na'}} + {{/if}} + {{/if}} + {{/if}} + | ++ {{/if}} + + | + {{#if editing}} + {{input-integer class="form-control input-sm public" min="1" max="65535" value=port.public placeholder=(t 'formPorts.public.placeholder')}} {{else}} - {{input class="form-control input-sm" type="text" value=port.bindAddress placeholder=(t 'formPorts.bindAddress.placeholder')}} + {{port.public}} {{/if}} | - {{/if}} - | - {{input-integer class="form-control input-sm public" min="1" max="65535" value=port.public placeholder=(t 'formPorts.public.placeholder')}} - | -+ |
+ {{#if port.existing}}
+ {{port.private}}
+ {{else}}
+ {{#if editing}}
+ {{input-integer class="form-control input-sm" min="1" max="65535" value=port.private placeholder=(t 'formPorts.private.placeholder')}}
+ {{else}}
+ {{port.private}}
+ {{/if}}
+ {{/if}}
+ |
+ - |
- {{#if port.existing}}
- {{port.private}}
- {{else}}
- {{input-integer class="form-control input-sm" min="1" max="65535" value=port.private placeholder=(t 'formPorts.private.placeholder')}}
- {{/if}}
- |
- + |
+ {{#if port.existing}}
+ {{upper-case port.protocol}}
+ {{else}}
+ {{#if editing}}
+ {{new-select
+ class="form-control input-sm"
+ content=protocolOptions
+ value=port.protocol
+ }}
+ {{else}}
+ {{port.protocol}}
+ {{/if}}
+ {{/if}}
+ |
-
- {{#if port.existing}}
- {{upper-case port.protocol}}
- {{else}}
- {{new-select
- class="form-control input-sm"
- content=protocolOptions
- value=port.protocol}}
- {{/if}}
- |
-
- - {{#if port.existing}} - - {{else}} - - {{/if}} - | -+ {{#if port.existing}} + + {{else}} + {{#if editing}} + + {{/if}} + {{/if}} + | + + {{/each}} +