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