Simplify the app grid filter to basic dropdowns for now
This commit is contained in:
@@ -209,6 +209,36 @@ app.filter('shortAppMessage', function () {
|
||||
};
|
||||
});
|
||||
|
||||
app.filter('selectedTagFilter', function () {
|
||||
return function selectedTagFilter(apps, selectedTags) {
|
||||
return apps.filter(function (app) {
|
||||
if (selectedTags.length === 0) return true;
|
||||
|
||||
return !!selectedTags.find(function (tag) {
|
||||
return !app.tags ? false : (app.tags.indexOf(tag) !== -1);
|
||||
});
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
app.filter('selectedDomainFilter', function () {
|
||||
return function selectedDomainFilter(apps, selectedDomains) {
|
||||
return apps.filter(function (app) {
|
||||
if (selectedDomains.length === 0) return true;
|
||||
|
||||
return !!selectedDomains.find(function (domain) {
|
||||
return app.domain === domain.domain;
|
||||
});
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
app.filter('prettyDomains', function () {
|
||||
return function prettyDomains(domains) {
|
||||
return domains.map(function (d) { return d.domain; }).join(', ');
|
||||
};
|
||||
});
|
||||
|
||||
app.filter('prettyMemory', function () {
|
||||
return function (memory) {
|
||||
// Adjust the default memory limit if it changes
|
||||
|
||||
Reference in New Issue
Block a user