mirror of
https://github.com/portainer/portainer.git
synced 2025-07-29 10:19:41 +02:00
feat(templates): new templates capabilities (#862)
This commit is contained in:
parent
c3363604ac
commit
0579251c70
10 changed files with 276 additions and 159 deletions
|
@ -28,7 +28,7 @@ angular.module('portainer.helpers')
|
|||
};
|
||||
ports.forEach(function (p) {
|
||||
if (p.containerPort) {
|
||||
var key = p.containerPort + "/" + p.protocol;
|
||||
var key = p.containerPort + '/' + p.protocol;
|
||||
var binding = {};
|
||||
if (p.hostPort) {
|
||||
binding.HostPort = p.hostPort;
|
||||
|
@ -60,7 +60,7 @@ angular.module('portainer.helpers')
|
|||
value = $filter('swarmcontainername')(envvar.value);
|
||||
}
|
||||
}
|
||||
env.push(envvar.name + "=" + value);
|
||||
env.push(envvar.name + '=' + value);
|
||||
}
|
||||
});
|
||||
return env;
|
||||
|
@ -108,8 +108,8 @@ angular.module('portainer.helpers')
|
|||
helper.filterLinuxServerIOTemplates = function(templates) {
|
||||
return templates.filter(function f(template) {
|
||||
var valid = false;
|
||||
if (template.Category) {
|
||||
angular.forEach(template.Category, function(category) {
|
||||
if (template.Categories) {
|
||||
angular.forEach(template.Categories, function(category) {
|
||||
if (_.startsWith(category, 'Network')) {
|
||||
valid = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue