mirror of https://github.com/rancher/ui.git
Show listeners on balancer edit (rancher/rancher#1625)
This commit is contained in:
parent
f86eb6e15c
commit
d41fb944c5
|
|
@ -33,6 +33,17 @@
|
|||
|
||||
{{partial "form-divider"}}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-md-2 form-label">
|
||||
<label>Listening Ports</label>
|
||||
</div>
|
||||
<div class="col-sm-12 col-md-8">
|
||||
{{partial "loadbalancer/edit-listeners"}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{partial "form-divider"}}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-6 col-md-2 form-label">
|
||||
<label>Targets</label>
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ export default Ember.View.extend(ThrottledResize,{
|
|||
unremovedServices.forEach((service) => {
|
||||
var externals = (service.get('consumedServicesWithNames')||[]).filter((linked) => {
|
||||
return linked.get('service.environmentId') !== this.get('context.model.id');
|
||||
}).map((linked) => { return linked.get('service') });
|
||||
}).map((linked) => { return linked.get('service'); });
|
||||
out.pushObjects(externals);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export default Ember.Mixin.create(EditHealthCheck,{
|
|||
initListeners: function() {
|
||||
var store = this.get('store');
|
||||
var out = [];
|
||||
var existingService = this.get('balancer.loadBalancerListeners');
|
||||
var existingService = this.get('model.service.loadBalancerListeners');
|
||||
var existingRegular = this.get('listeners');
|
||||
if ( existingService )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,9 +22,11 @@ var ServiceController = Ember.Controller.extend(CattleTransitioningController, {
|
|||
var type = this.get('model.type').toLowerCase();
|
||||
if ( type === 'loadbalancerservice' )
|
||||
{
|
||||
this.get('controllers.application').setProperties({
|
||||
editLoadBalancerService: true,
|
||||
originalModel: this.get('model'),
|
||||
this.get('model').importLink('loadBalancerListeners').then(() => {
|
||||
this.get('controllers.application').setProperties({
|
||||
editLoadBalancerService: true,
|
||||
originalModel: this.get('model'),
|
||||
});
|
||||
});
|
||||
}
|
||||
else if ( type === 'dnsservice' )
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
{{#if listenersArray.length}}
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Source Port*</th>
|
||||
<th>Source Port{{#unless editing}}*{{/unless}}</th>
|
||||
<th width="30"></th>
|
||||
<th>{{#if isAdvanced}}Default {{/if}}Target Port</th>
|
||||
<th width="30"></th>
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
<tbody>
|
||||
{{#each listenersArray as |listener|}}
|
||||
<tr>
|
||||
{{#if listener.id}}
|
||||
{{#if editing}}
|
||||
<td>{{listener.sourcePort}}</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
|
|
@ -29,9 +29,7 @@
|
|||
<td>{{listener.sourceProtocol}}</td>
|
||||
<td> </td>
|
||||
<td>{{listener.algorithm}}</td>
|
||||
<td class="text-right">
|
||||
<button {{action "removeListener" listener}} class="btn-circle-x" type="button" tabindex="-1"></button>
|
||||
</td>
|
||||
<td class="text-right"> </td>
|
||||
{{else}}
|
||||
<td>
|
||||
{{input type="text" classNames="form-control lb-listener-source-port input-sm" min="1" max="65535" step="1" value=listener.sourcePort placeholder="On Host, e.g. 80"}}
|
||||
|
|
@ -41,39 +39,39 @@
|
|||
{{input type="text" classNames="form-control lb-listener-target-port input-sm" min="1" max="65535" step="1" value=listener.targetPort placeholder="In Container, e.g. 8080"}}
|
||||
</td>
|
||||
<td> </td>
|
||||
{{/if}}
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle btn-sm" data-toggle="dropdown" aria-expanded="false">{{if listener.isPublic "Public" "Internal"}} <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li role="presentation" class="dropdown-header">
|
||||
Select access:
|
||||
</li>
|
||||
<li {{action "setPublic" listener true}}><a>Public</a></li>
|
||||
<li {{action "setPublic" listener false}}><a>Internal</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle btn-sm" data-toggle="dropdown" aria-expanded="false">{{listener.sourceProtocol}} <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li role="presentation" class="dropdown-header">
|
||||
Select a protocol:
|
||||
</li>
|
||||
{{#each sourceProtocolOptions as |choice|}}
|
||||
<li {{action "chooseProtocol" listener "sourceProtocol" choice}}>
|
||||
<a>{{choice}}</a>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle btn-sm" data-toggle="dropdown" aria-expanded="false">{{if listener.isPublic "Public" "Internal"}} <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li role="presentation" class="dropdown-header">
|
||||
Select access:
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td class="text-right">
|
||||
<button {{action "removeListener" listener}} class="btn-circle-x" type="button" tabindex="-1"></button>
|
||||
</td>
|
||||
<li {{action "setPublic" listener true}}><a>Public</a></li>
|
||||
<li {{action "setPublic" listener false}}><a>Internal</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle btn-sm" data-toggle="dropdown" aria-expanded="false">{{listener.sourceProtocol}} <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li role="presentation" class="dropdown-header">
|
||||
Select a protocol:
|
||||
</li>
|
||||
{{#each sourceProtocolOptions as |choice|}}
|
||||
<li {{action "chooseProtocol" listener "sourceProtocol" choice}}>
|
||||
<a>{{choice}}</a>
|
||||
</li>
|
||||
{{/each}}
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td class="text-right">
|
||||
<button {{action "removeListener" listener}} class="btn-circle-x" type="button" tabindex="-1"></button>
|
||||
</td>
|
||||
{{/if}}
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "ui",
|
||||
"version": "0.38.0",
|
||||
"version": "0.39.0",
|
||||
"private": true,
|
||||
"directories": {
|
||||
"doc": "doc",
|
||||
|
|
|
|||
Loading…
Reference in New Issue