diff --git a/lib/shared/addon/all-dns-records/service.js b/lib/shared/addon/all-dns-records/service.js index da7437309..2692a2b9f 100644 --- a/lib/shared/addon/all-dns-records/service.js +++ b/lib/shared/addon/all-dns-records/service.js @@ -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, diff --git a/lib/shared/addon/components/container/form-ports/template.hbs b/lib/shared/addon/components/container/form-ports/template.hbs index b4fb7468d..8fec95153 100644 --- a/lib/shared/addon/components/container/form-ports/template.hbs +++ b/lib/shared/addon/components/container/form-ports/template.hbs @@ -4,9 +4,9 @@ - + - + diff --git a/lib/shared/addon/components/cru-dns/template.hbs b/lib/shared/addon/components/cru-dns/template.hbs index 40f068802..3de2b8251 100644 --- a/lib/shared/addon/components/cru-dns/template.hbs +++ b/lib/shared/addon/components/cru-dns/template.hbs @@ -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")}} diff --git a/lib/shared/addon/components/form-ingress-backends/template.hbs b/lib/shared/addon/components/form-ingress-backends/template.hbs index 7f404eac2..3ac98ece8 100644 --- a/lib/shared/addon/components/form-ingress-backends/template.hbs +++ b/lib/shared/addon/components/form-ingress-backends/template.hbs @@ -50,9 +50,9 @@ diff --git a/lib/shared/addon/components/schema/input-dns-record/component.js b/lib/shared/addon/components/schema/input-dns-record/component.js index 6a9590eb7..2b4e4d0ad 100644 --- a/lib/shared/addon/components/schema/input-dns-record/component.js +++ b/lib/shared/addon/components/schema/input-dns-record/component.js @@ -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'))) { diff --git a/lib/shared/addon/components/schema/input-workload/component.js b/lib/shared/addon/components/schema/input-workload/component.js index 1c123ab76..3f33484c4 100644 --- a/lib/shared/addon/components/schema/input-workload/component.js +++ b/lib/shared/addon/components/schema/input-workload/component.js @@ -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'); diff --git a/translations/en-us.yaml b/translations/en-us.yaml index a1654e3ab..1c3e5e5ec 100644 --- a/translations/en-us.yaml +++ b/translations/en-us.yaml @@ -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