Skip to content

Commit 9ca02da

Browse files
author
OpenShift Bot
authored
Merge pull request #1647 from benjaminapetersen/bpeterse/issue/1352/length-service-routes
Merged by openshift-bot
2 parents c8e8103 + cd152e3 commit 9ca02da

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/scripts/services/routes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ angular.module("openshiftConsole")
3333

3434
var targetPort = route.spec.port ? route.spec.port.targetPort : null;
3535
if (!targetPort) {
36-
if (service.spec.ports.length > 1) {
36+
if (_.size(service.spec.ports) > 1) {
3737
warnings.push('Route has no target port, but service "' + service.metadata.name + '" has multiple ports. ' +
3838
'The route will round robin traffic across all exposed ports on the service.');
3939
}

dist/scripts/scripts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2760,7 +2760,7 @@ if ("Service" === d.kind) {
27602760
var g = _.get(e, [ d.name ]);
27612761
if (!g) return void f.push('Routes to service "' + d.name + '", but service does not exist.');
27622762
var h = a.spec.port ? a.spec.port.targetPort :null;
2763-
if (!h) return void (g.spec.ports.length > 1 && f.push('Route has no target port, but service "' + g.metadata.name + '" has multiple ports. The route will round robin traffic across all exposed ports on the service.'));
2763+
if (!h) return void (_.size(g.spec.ports) > 1 && f.push('Route has no target port, but service "' + g.metadata.name + '" has multiple ports. The route will round robin traffic across all exposed ports on the service.'));
27642764
var i = c(h, g);
27652765
i || (b(h) ? f.push('Route target port is set to "' + h + '", but service "' + g.metadata.name + '" has no port with that name.') :f.push('Route target port is set to "' + h + '", but service "' + g.metadata.name + '" does not expose that port.'));
27662766
}

0 commit comments

Comments
 (0)