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:
parent
16166c3367
commit
b8803f380b
10 changed files with 113 additions and 21 deletions
|
@ -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;
|
||||
}]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue