Add search field in apps view

This commit is contained in:
Johannes Zellner
2020-01-06 15:27:31 +01:00
parent e4f16ae520
commit bc75a8e7b8
3 changed files with 18 additions and 3 deletions

View File

@@ -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(', ');