mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 12:25:22 +02:00
feat(stacks): add the ability to specify env vars when deploying stacks (#1345)
This commit is contained in:
parent
42347d714f
commit
693f1319a4
11 changed files with 173 additions and 30 deletions
18
app/helpers/formHelper.js
Normal file
18
app/helpers/formHelper.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
angular.module('portainer.helpers')
|
||||
.factory('FormHelper', [function FormHelperFactory() {
|
||||
'use strict';
|
||||
var helper = {};
|
||||
|
||||
helper.removeInvalidEnvVars = function(env) {
|
||||
for (var i = env.length - 1; i >= 0; i--) {
|
||||
var envvar = env[i];
|
||||
if (!envvar.value || !envvar.name) {
|
||||
env.splice(i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
return env;
|
||||
};
|
||||
|
||||
return helper;
|
||||
}]);
|
Loading…
Add table
Add a link
Reference in a new issue