Skip to content

Commit

Permalink
Reorders when service catalog filter is built
Browse files Browse the repository at this point in the history
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1536385

Async fun!  Looks like we were building the filter before we had what we needed, now we wait.
  • Loading branch information
AllenBW committed Jan 19, 2018
1 parent 09f39ad commit 4fffefb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client/app/catalogs/catalog-explorer.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,14 @@ function ComponentController ($state, CatalogsState, ListView, EventNotification
return CatalogsState.getServiceTemplates(limit, offset).then(success, failure)

function success (response) {
const serviceTemplateResultsCount = response.subquery_count
CatalogsState.getCatalogs(limit, offset).then((response) => {
vm.catalogsList = response.resources
vm.toolbarConfig.filterConfig = getFilterConfig()
vm.toolbarConfig.filterConfig.resultsCount = serviceTemplateResultsCount
vm.loading = false
})
vm.serviceTemplateList = response.resources
vm.toolbarConfig.filterConfig = getFilterConfig()
vm.toolbarConfig.filterConfig.resultsCount = response.subquery_count
}

function failure (_error) {
Expand Down

0 comments on commit 4fffefb

Please sign in to comment.