Skip to content

Commit

Permalink
Merge pull request #1776 from jwforres/instance-row-bugs
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored Jun 28, 2017
2 parents a16c85b + fedc937 commit 2fb6223
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/scripts/controllers/overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ function OverviewController($scope,

state.orderedServiceInstances = _.sortByAll(state.serviceInstances,
function(item) {
return _.get(state.serviceClasses, [item.spec.serviceClassName, 'osbMetadata', 'displayName']) || item.spec.serviceClassName;
return _.get(state.serviceClasses, [item.spec.serviceClassName, 'externalMetadata', 'displayName']) || item.spec.serviceClassName;
},
function(item) {
return _.get(item, 'metadata.name', '');
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/directives/bindService.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
if (ctrl.serviceClasses && ctrl.serviceInstances) {
ctrl.orderedServiceInstances = _.sortByAll(ctrl.serviceInstances,
function(item) {
return _.get(ctrl.serviceClasses, [item.spec.serviceClassName, 'osbMetadata', 'displayName']) || item.spec.serviceClassName;
return _.get(ctrl.serviceClasses, [item.spec.serviceClassName, 'externalMetadata', 'displayName']) || item.spec.serviceClassName;
},
function(item) {
return _.get(item, 'metadata.name', '');
Expand Down
5 changes: 2 additions & 3 deletions app/scripts/directives/overview/serviceInstanceRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@

row.$doCheck = function() {
row.notifications = ListRowUtils.getNotifications(row.apiObject, row.state);
row.displayName = serviceInstanceDisplayName(row.apiObject, row.serviceClasses);
row.displayName = serviceInstanceDisplayName(row.apiObject, row.state.serviceClasses);
row.isBindable = BindingService.isServiceBindable(row.apiObject, row.state.serviceClasses);
row.description = getDescription();
};

Expand All @@ -55,8 +56,6 @@
return binding && _.get(row, ['state', 'secrets', binding.spec.secretName]);
};

row.isBindable = BindingService.isServiceBindable(row.apiObject, row.state.serviceClasses);

row.actionsDropdownVisible = function() {
// We can create bindings
if (row.isBindable && AuthorizationService.canI({resource: 'bindings', group: 'servicecatalog.k8s.io'}, 'create')) {
Expand Down
8 changes: 4 additions & 4 deletions dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ return c || a.metadata.name;
return Q.serviceInstances || Q.serviceClasses ? (Q.bindableServiceInstances = _.filter(Q.serviceInstances, function(a) {
return w.isServiceBindable(a, Q.serviceClasses);
}), void (Q.orderedServiceInstances = _.sortByAll(Q.serviceInstances, function(a) {
return _.get(Q.serviceClasses, [ a.spec.serviceClassName, "osbMetadata", "displayName" ]) || a.spec.serviceClassName;
return _.get(Q.serviceClasses, [ a.spec.serviceClassName, "externalMetadata", "displayName" ]) || a.spec.serviceClassName;
}, function(a) {
return _.get(a, "metadata.name", "");
}))) :void (Q.bindableServiceInstances = null);
Expand Down Expand Up @@ -12268,7 +12268,7 @@ d && (!a || c.metadata.creationTimestamp > a.metadata.creationTimestamp) && (a =
}), l.serviceToBind = a || b;
}, o = function() {
l.serviceClasses && l.serviceInstances && (l.orderedServiceInstances = _.sortByAll(l.serviceInstances, function(a) {
return _.get(l.serviceClasses, [ a.spec.serviceClassName, "osbMetadata", "displayName" ]) || a.spec.serviceClassName;
return _.get(l.serviceClasses, [ a.spec.serviceClassName, "externalMetadata", "displayName" ]) || a.spec.serviceClassName;
}, function(a) {
return _.get(a, "metadata.name", "");
}));
Expand Down Expand Up @@ -13131,12 +13131,12 @@ var a = h.apiObject.spec.serviceClassName;
return _.get(h, [ "state", "serviceClasses", a, "description" ]);
};
h.$doCheck = function() {
h.notifications = e.getNotifications(h.apiObject, h.state), h.displayName = j(h.apiObject, h.serviceClasses), h.description = k();
h.notifications = e.getNotifications(h.apiObject, h.state), h.displayName = j(h.apiObject, h.state.serviceClasses), h.isBindable = d.isServiceBindable(h.apiObject, h.state.serviceClasses), h.description = k();
}, h.$onChanges = function(a) {
a.bindings && (h.deleteableBindings = _.reject(h.bindings, "metadata.deletionTimestamp"));
}, h.getSecretForBinding = function(a) {
return a && _.get(h, [ "state", "secrets", a.spec.secretName ]);
}, h.isBindable = d.isServiceBindable(h.apiObject, h.state.serviceClasses), h.actionsDropdownVisible = function() {
}, h.actionsDropdownVisible = function() {
return !(!h.isBindable || !g.canI({
resource:"bindings",
group:"servicecatalog.k8s.io"
Expand Down

0 comments on commit 2fb6223

Please sign in to comment.