From bc75a8e7b8a5474625ddb6ae25f197ecaa3a98f0 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Mon, 6 Jan 2020 15:27:31 +0100 Subject: [PATCH] Add search field in apps view --- src/js/index.js | 9 +++++++++ src/views/apps.html | 9 ++++++--- src/views/apps.js | 3 +++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/js/index.js b/src/js/index.js index 9659f42bc..7c25e5ddb 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -272,6 +272,15 @@ app.filter('selectedDomainFilter', function () { }; }); +app.filter('appSearchFilter', function () { + return function appSearchFilter(apps, appSearch) { + return apps.filter(function (app) { + if (!appSearch) return true; + return app.fqdn.indexOf(appSearch) !== -1; + }); + }; +}); + app.filter('prettyDomains', function () { return function prettyDomains(domains) { return domains.map(function (d) { return d.domain; }).join(', '); diff --git a/src/views/apps.html b/src/views/apps.html index 4fdb0ff97..169fcdddc 100644 --- a/src/views/apps.html +++ b/src/views/apps.html @@ -66,15 +66,18 @@

Your Apps
- - +
+ + + +