mirror of https://github.com/rancher/ui.git
commit
c2a68413aa
|
|
@ -8,6 +8,7 @@ function convert(obj, intl) {
|
|||
return {
|
||||
group: intl.t('allWorkloads.namespace', { name: namespace }),
|
||||
combined: namespace + '/' + name,
|
||||
namespace: namespace,
|
||||
id: get(obj, 'id'),
|
||||
clusterIp: get(obj, 'clusterIp'),
|
||||
name: name,
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@
|
|||
<table class="table fixed no-lines small mb-10">
|
||||
<thead>
|
||||
<tr class="hidden-sm">
|
||||
<th width="200" class="{{unless editing 'acc-label'}}">{{t 'formPorts.kind.label'}}</th>
|
||||
<th width="220" class="{{unless editing 'acc-label'}}">{{t 'formPorts.kind.label'}}</th>
|
||||
<th width="10"></th>
|
||||
<th class="{{unless editing 'acc-label'}}">{{t 'formPorts.sourcePort.label'}}</th>
|
||||
<th class="{{unless editing 'acc-label'}}">{{t 'formPorts.sourcePort.label'}}{{#if editing}}{{field-required}}{{/if}}</th>
|
||||
<th width="10"></th>
|
||||
<th class="{{unless editing 'acc-label'}}">{{t 'formPorts.containerPort.label'}}{{#if editing}}{{field-required}}{{/if}}</th>
|
||||
<th width="10"></th>
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@
|
|||
{{/form-value-array}}
|
||||
{{else if (eq recordType "workload")}}
|
||||
{{#form-value-array
|
||||
editing=(not isView)
|
||||
initialValues=model.targetWorkloadIds
|
||||
addActionLabel='editDns.add.workload'
|
||||
changed=(action "setWorkload")
|
||||
|
|
@ -105,6 +106,7 @@
|
|||
value=row.value
|
||||
showProTip=false
|
||||
editing=editing
|
||||
disabled=isView
|
||||
}}
|
||||
{{/form-value-array}}
|
||||
{{else if (eq recordType "selector")}}
|
||||
|
|
|
|||
|
|
@ -50,9 +50,9 @@
|
|||
|
||||
<td class="divided p-5" data-title="{{t (concat-str 'formIngressBackends' path.backendType 'label' character='.')}}">
|
||||
{{#if (eq path.backendType 'service')}}
|
||||
{{schema/input-dns-record selectClass="input-sm" selected=path.serviceId disabled=(not editing) culsterIpNotNull=false}}
|
||||
{{schema/input-dns-record selectClass="input-sm" selectedNamespace=ingress.namespace selected=path.serviceId disabled=(not editing) culsterIpNotNull=false}}
|
||||
{{else if (eq path.backendType 'workload')}}
|
||||
{{schema/input-workload selectClass="input-sm" selected=path.serviceId readOnly=(not editing)}}
|
||||
{{schema/input-workload selectClass="input-sm" selectedNamespace=ingress.namespace selected=path.serviceId readOnly=(not editing)}}
|
||||
{{/if}}
|
||||
</td>
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ export default Component.extend({
|
|||
selected: null, // Selected dnsRecord ID
|
||||
selectClass: 'form-control',
|
||||
exclude: null, // ID or array of IDs to exclude from list
|
||||
selectedNamespace: null,
|
||||
culsterIpNotNull: false,
|
||||
disabled: false,
|
||||
|
||||
|
|
@ -26,7 +27,7 @@ export default Component.extend({
|
|||
}
|
||||
},
|
||||
|
||||
grouped: computed('allDnsRecords.list.[]', function () {
|
||||
grouped: computed('allDnsRecords.list.[]', 'selectedNamespace', function () {
|
||||
let list = get(this, 'allDnsRecords.list');
|
||||
|
||||
let exclude = get(this, 'exclude');
|
||||
|
|
@ -42,6 +43,10 @@ export default Component.extend({
|
|||
list = list.filter(x => x.clusterIp !== null);
|
||||
}
|
||||
|
||||
if (this.get('selectedNamespace')) {
|
||||
list = list.filter(x => x.namespace === this.get('selectedNamespace.id'));
|
||||
}
|
||||
|
||||
let out = get(this, 'allDnsRecords').group(list);
|
||||
let selected = get(this, 'allDnsRecords').byId(get(this, 'selected'));
|
||||
if (selected && !list.findBy('id', get(selected, 'id'))) {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export default Component.extend({
|
|||
withPods: false,
|
||||
readOnly: false,
|
||||
exclude: null, // ID or array of IDs to exclude from list
|
||||
|
||||
selectedNamespace: null,
|
||||
// For use as a catalog question
|
||||
field: null, // Read default from a schema resourceField
|
||||
value: null, // namespace/workloadName string output
|
||||
|
|
@ -58,6 +58,10 @@ export default Component.extend({
|
|||
list = list.filter(x => !exclude.includes(x.id));
|
||||
}
|
||||
|
||||
if (this.get('selectedNamespace')) {
|
||||
list = list.filter(x => x.stackName === this.get('selectedNamespace.id'));
|
||||
}
|
||||
|
||||
let out = this.get('allWorkloads').group(list);
|
||||
let selected = this.get('allWorkloads').byId(this.get('selected'));
|
||||
if ( selected && !list.findBy('id', selected.get('id')) ) {
|
||||
|
|
@ -70,7 +74,7 @@ export default Component.extend({
|
|||
}
|
||||
|
||||
return out;
|
||||
}.property('allWorkloads.list.[]'),
|
||||
}.property('allWorkloads.list.[]', 'selectedNamespace'),
|
||||
|
||||
selectedChanged: function() {
|
||||
let id = this.get('selected');
|
||||
|
|
|
|||
|
|
@ -2410,8 +2410,8 @@ formPorts:
|
|||
noPorts: This container has no port maps.
|
||||
error:
|
||||
privateRequired: Private Container Port is required for each port rule.
|
||||
publicRequired: Public Host Port is required if Host IP is specified.
|
||||
sourcePortRequired: Public Host Port is required for Nodes running a pod.
|
||||
publicRequired: Source Port is required if Host IP is specified.
|
||||
sourcePortRequired: Source Port is required for Nodes running a pod.
|
||||
mixedIpPort: "Port {ip}:{port}/{proto} has more than one mapping."
|
||||
mixedPort: "Port {port}/{proto} has more than one mapping."
|
||||
showAdvanced: Show Port Naming Options
|
||||
|
|
|
|||
Loading…
Reference in New Issue