-
Notifications
You must be signed in to change notification settings - Fork 55
Fix bugs sorting service instances #239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Don't return null if service classes aren't passed in - Pass an array to `_.sortBy` so that secondary sort on 'metadata.name' works
} | ||
var getServiceClassDisplayName = function(serviceInstance) { | ||
var serviceClassName = _.get(serviceInstance, 'spec.clusterServiceClassRef.name'); | ||
return _.get(serviceClasses, [serviceClassName, 'spec', 'externalMetadata', 'displayName']) || serviceInstance.spec.clusterServiceClassExternalName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just checking, external name is required right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah nevermind, forgot you were doing the secondary sort below
} | ||
|
||
if (failed) { | ||
deferred.reject(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think $q.all passes up the content from the failure when it does a reject, not positive. Not that we necessarily need that, but we should document above if it is a difference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, updated the comment.
Add a utility that always waits for all promises, even if one fails. (`$q.all` returns immediately when one fails.)
619a455
to
ccfee38
Compare
Automatic merge from submit-queue. Wait for service classes and plans to load Wait for all service classes and plans to load on the overview before checking bindability and sorting service instances. Fixes #2384 Requires openshift/origin-web-common#239 origin-web-common 0.0.70 -> 0.0.71 https://github.com/openshift/origin-web-common/releases/tag/v0.0.71
_.sortBy
so that we're correctly handling secondary sort.See openshift/origin-web-console#2384
See openshift/origin-web-console#2385