Github user tbouron commented on a diff in the pull request:
https://github.com/apache/brooklyn-ui/pull/94#discussion_r228905605
--- Diff:
ui-modules/blueprint-composer/app/components/catalog-selector/catalog-selector.directive.js
---
@@ -230,16 +248,85 @@ function controller($scope, $element, $q, $uibModal,
$log, $templateCache, palet
});
$scope.items = items;
});
- // this can be overridden for third-party filters.
- // it receives result of filtering based on search so filters can
adjust based on number of search resullts
- $scope.filterPaletteItems = (items) => items;
+ $scope.lastUsedText = (item) => {
+ let l = (Number)(item.lastUsed);
+ if (!l || isNaN(l) || l<=0) return "";
+ if (l < 100000) return 'Preselected for inclusion in "Recent"
filter.';
--- End diff --
Could you use curly brackets for the `if` statements in order to be
consistent with the codebase please? It also makes it easier to read
---