This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git

commit 09ad7055008316a4904da2fee0595274bc6bd1a7
Author: Alex Heneveld <[email protected]>
AuthorDate: Mon Nov 18 13:50:18 2019 +0000

    in quick launch, if any app is tagged catalog_quick_launch, then only apps 
with that tags will be shown. as before in all cases this only shows those apps 
marked as templates.
---
 ui-modules/home/app/views/main/main.controller.js | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/ui-modules/home/app/views/main/main.controller.js 
b/ui-modules/home/app/views/main/main.controller.js
index 1c7360b..e967953 100644
--- a/ui-modules/home/app/views/main/main.controller.js
+++ b/ui-modules/home/app/views/main/main.controller.js
@@ -42,6 +42,13 @@ export const mainState = {
         }],
         catalogApps: ['catalogApi', (catalogApi) => {
             return catalogApi.getTypes({params: {supertype: 
'org.apache.brooklyn.api.entity.Application'}}).then(applications => {
+                // optionally tag things with 'catalog_quick_launch': if any 
apps are so tagged, 
+                // then only apps with such tags will be shown;
+                // in all cases only show those marked as templates
+                var appsWithTag = applications.filter(application => 
application.tags && application.tags.indexOf("catalog_quick_launch")>=0);
+                if (appsWithTag.length) {
+                    applications = appsWithTag;
+                }
                 return applications.filter(application => 
application.template);
             });
         }]

Reply via email to