...
|
...
|
@@ -8441,49 +8441,51 @@ return void Logger.error("Unknown deployment strategy type: " + a);
|
8441
|
8441
|
}
|
8442
|
8442
|
};
|
8443
|
8443
|
k.get(d.project).then(_.spread(function(c, e) {
|
8444
|
|
-return a.project = c, a.context = e, g.canI("deploymentconfigs", "update", d.project) ? void i.get("deploymentconfigs", d.deploymentconfig, e).then(function(b) {
|
8445
|
|
-a.deploymentConfig = b, a.breadcrumbs = h.getBreadcrumbs({
|
8446
|
|
-object:b,
|
|
8444
|
+return a.project = c, a.context = e, g.canI("deploymentconfigs", "update", d.project) ? void i.get("deploymentconfigs", d.deploymentconfig, e).then(function(f) {
|
|
8445
|
+a.deploymentConfig = f, a.breadcrumbs = h.getBreadcrumbs({
|
|
8446
|
+object:f,
|
8447
|
8447
|
project:c,
|
8448
|
8448
|
subpage:"Edit",
|
8449
|
8449
|
includeProject:!0
|
8450
|
8450
|
});
|
8451
|
|
-var f = function(b, c) {
|
8452
|
|
-var d = {}, e = _.filter(c, {
|
|
8451
|
+var g = function(c, d) {
|
|
8452
|
+var e = {}, f = _.filter(d, {
|
8453
|
8453
|
type:"ImageChange"
|
8454
|
8454
|
});
|
8455
|
|
-return _.each(b, function(b) {
|
8456
|
|
-var c = _.find(e, function(a) {
|
8457
|
|
-return _.includes(a.imageChangeParams.containerNames, b.name);
|
8458
|
|
-}), f = {};
|
8459
|
|
-if (d[b.name] = {
|
8460
|
|
-env:b.env || [],
|
8461
|
|
-image:b.image,
|
8462
|
|
-hasDeploymentTrigger:!_.isEmpty(c)
|
8463
|
|
-}, c) {
|
8464
|
|
-var g = c.imageChangeParams.from, h = g.name.split(":");
|
8465
|
|
-f = {
|
8466
|
|
-data:c,
|
|
8455
|
+return _.each(c, function(c) {
|
|
8456
|
+var d = _.find(f, function(a) {
|
|
8457
|
+return _.includes(a.imageChangeParams.containerNames, c.name);
|
|
8458
|
+}), g = {};
|
|
8459
|
+if (c.env = c.env || [], _.each(c.env, function(a) {
|
|
8460
|
+b("altTextForValueFrom")(a);
|
|
8461
|
+}), e[c.name] = {
|
|
8462
|
+env:c.env,
|
|
8463
|
+image:c.image,
|
|
8464
|
+hasDeploymentTrigger:!_.isEmpty(d)
|
|
8465
|
+}, d) {
|
|
8466
|
+var h = d.imageChangeParams.from, i = h.name.split(":");
|
|
8467
|
+g = {
|
|
8468
|
+data:d,
|
8467
|
8469
|
istag:{
|
8468
|
|
-namespace:g.namespace || a.projectName,
|
8469
|
|
-imageStream:h[0],
|
|
8470
|
+namespace:h.namespace || a.projectName,
|
|
8471
|
+imageStream:i[0],
|
8470
|
8472
|
tagObject:{
|
8471
|
|
-tag:h[1]
|
|
8473
|
+tag:i[1]
|
8472
|
8474
|
}
|
8473
|
8475
|
},
|
8474
|
|
-automatic:_.get(c, "imageChangeParams.automatic", !1)
|
|
8476
|
+automatic:_.get(d, "imageChangeParams.automatic", !1)
|
8475
|
8477
|
};
|
8476
|
|
-} else f = {
|
|
8478
|
+} else g = {
|
8477
|
8479
|
istag:{
|
8478
|
8480
|
namespace:"",
|
8479
|
8481
|
imageStream:""
|
8480
|
8482
|
},
|
8481
|
8483
|
automatic:!0
|
8482
|
8484
|
};
|
8483
|
|
-_.set(d, [ b.name, "triggerData" ], f);
|
8484
|
|
-}), d;
|
|
8485
|
+_.set(e, [ c.name, "triggerData" ], g);
|
|
8486
|
+}), e;
|
8485
|
8487
|
};
|
8486
|
|
-a.updatedDeploymentConfig = angular.copy(a.deploymentConfig), a.containerNames = _.map(a.deploymentConfig.spec.template.spec.containers, "name"), a.containerConfigByName = f(a.updatedDeploymentConfig.spec.template.spec.containers, a.updatedDeploymentConfig.spec.triggers), a.secrets = {
|
|
8488
|
+a.updatedDeploymentConfig = angular.copy(a.deploymentConfig), a.containerNames = _.map(a.deploymentConfig.spec.template.spec.containers, "name"), a.containerConfigByName = g(a.updatedDeploymentConfig.spec.template.spec.containers, a.updatedDeploymentConfig.spec.triggers), a.secrets = {
|
8487
|
8489
|
pullSecrets:angular.copy(a.deploymentConfig.spec.template.spec.imagePullSecrets) || [ {
|
8488
|
8490
|
name:""
|
8489
|
8491
|
} ]
|