1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-31 03:09:44 +02:00

feat(templates): LinuxServer.io templates integration (#761)

This commit is contained in:
Anthony Lapenna 2017-04-05 10:13:32 +02:00 committed by GitHub
parent 16166c3367
commit b8803f380b
10 changed files with 113 additions and 21 deletions

View file

@ -93,5 +93,22 @@ angular.module('portainer.helpers')
return count;
};
helper.filterLinuxServerIOTemplates = function(templates) {
return templates.filter(function f(template) {
var valid = false;
if (template.Category) {
angular.forEach(template.Category, function(category) {
if (_.startsWith(category, 'Network')) {
valid = true;
}
});
}
return valid;
}).map(function(template, idx) {
template.index = idx;
return template;
});
};
return helper;
}]);