@@ -8324,7 +8324,7 @@ a.attach.items.push({}), v();
8324
8324
a.attach.items.splice(e, 1), v();
8325
8325
}, d.get(n.project).then(_.spread(function(t, r) {
8326
8326
if (a.project = t, i.canI(g, "update", n.project)) {
8327
- var o = e("orderByDisplayName"), d = e("getErrorDetails"), p = e("generateName");
8327
+ var d = e("orderByDisplayName"), p = e("getErrorDetails"), f = e("generateName");
8328
8328
c.get(g, n.name, r, {
8329
8329
errorNotification: !1
8330
8330
}).then(function(e) {
@@ -8335,64 +8335,64 @@ subpage: "Add Config Files"
8335
8335
});
8336
8336
}, function(e) {
8337
8337
a.error = e;
8338
- }), c.list("configmaps", r, null, {
8338
+ }), c.list(o.getPreferredVersion( "configmaps") , r, null, {
8339
8339
errorNotification: !1
8340
8340
}).then(function(e) {
8341
- a.configMaps = o (e.by("metadata.name"));
8341
+ a.configMaps = d (e.by("metadata.name"));
8342
8342
}, function(e) {
8343
- 403 !== e.code ? b("Could not load config maps", d (e)) : a.configMaps = [];
8344
- }), c.list("secrets", r, null, {
8343
+ 403 !== e.code ? b("Could not load config maps", p (e)) : a.configMaps = [];
8344
+ }), c.list(o.getPreferredVersion( "secrets") , r, null, {
8345
8345
errorNotification: !1
8346
8346
}).then(function(e) {
8347
- a.secrets = o (e.by("metadata.name"));
8347
+ a.secrets = d (e.by("metadata.name"));
8348
8348
}, function(e) {
8349
- 403 !== e.code ? b("Could not load secrets", d (e)) : a.secrets = [];
8349
+ 403 !== e.code ? b("Could not load secrets", p (e)) : a.secrets = [];
8350
8350
});
8351
- var f = function(e) {
8351
+ var v = function(e) {
8352
8352
return a.attach.allContainers || a.attach.containers[e.name];
8353
- }, v = function() {
8353
+ }, S = function() {
8354
8354
var e = _.get(a, "targetObject.spec.template");
8355
- a.existingMountPaths = m.getMountPaths(e, f );
8355
+ a.existingMountPaths = m.getMountPaths(e, v );
8356
8356
};
8357
- a.$watchGroup([ "targetObject", "attach.allContainers" ], v ), a.$watch("attach.containers", v , !0);
8357
+ a.$watchGroup([ "targetObject", "attach.allContainers" ], S ), a.$watch("attach.containers", S , !0);
8358
8358
a.$watch("attach.items", function() {
8359
8359
var e = _.map(a.attach.items, "path");
8360
8360
a.itemPaths = _.compact(e);
8361
8361
}, !0), a.addVolume = function() {
8362
8362
if (!a.forms.addConfigVolumeForm.$invalid) {
8363
- var t = a.targetObject, o = _.get(a, "attach.source"), i = _.get(t, "spec.template"), s = p ("volume-"), l = {
8363
+ var t = a.targetObject, o = _.get(a, "attach.source"), i = _.get(t, "spec.template"), s = f ("volume-"), l = {
8364
8364
name: s,
8365
8365
mountPath: _.get(a, "attach.mountPath")
8366
8366
};
8367
8367
"Secret" === o.kind && (l.readOnly = !0), _.each(i.spec.containers, function(e) {
8368
- f (e) && (e.volumeMounts = e.volumeMounts || [], e.volumeMounts.push(l));
8368
+ v (e) && (e.volumeMounts = e.volumeMounts || [], e.volumeMounts.push(l));
8369
8369
});
8370
- var m, h = {
8370
+ var d, m = {
8371
8371
name: s
8372
8372
};
8373
- switch (a.attach.pickKeys && (m = a.attach.items), o.kind) {
8373
+ switch (a.attach.pickKeys && (d = a.attach.items), o.kind) {
8374
8374
case "ConfigMap":
8375
- h .configMap = {
8375
+ m .configMap = {
8376
8376
name: o.metadata.name,
8377
- items: m
8377
+ items: d
8378
8378
};
8379
8379
break;
8380
8380
8381
8381
case "Secret":
8382
- h .secret = {
8382
+ m .secret = {
8383
8383
secretName: o.metadata.name,
8384
- items: m
8384
+ items: d
8385
8385
};
8386
8386
}
8387
- i.spec.volumes = i.spec.volumes || [], i.spec.volumes.push(h ), a.disableInputs = !0, C();
8388
- var v = e("humanizeKind"), S = v (o.kind), w = v (n.kind);
8387
+ i.spec.volumes = i.spec.volumes || [], i.spec.volumes.push(m ), a.disableInputs = !0, C();
8388
+ var h = e("humanizeKind"), S = h (o.kind), w = h (n.kind);
8389
8389
c.update(g, t.metadata.name, a.targetObject, r).then(function() {
8390
8390
u.addNotification({
8391
8391
type: "success",
8392
8392
message: "Successfully added " + S + " " + o.metadata.name + " to " + w + " " + n.name + "."
8393
8393
}), y();
8394
8394
}, function(e) {
8395
- a.disableInputs = !1, b("An error occurred attaching the " + S + " to the " + w + ".", d (e));
8395
+ a.disableInputs = !1, b("An error occurred attaching the " + S + " to the " + w + ".", p (e));
8396
8396
});
8397
8397
}
8398
8398
};
0 commit comments