@@ -8675,22 +8675,24 @@ kubernetes: n.VERSION.kubernetes
8675
8675
};
8676
8676
} ]), angular.module("openshiftConsole").controller("CommandLineController", [ "$scope", "DataService", "AuthService", "Constants", function(e, t, n, a) {
8677
8677
n.withUser(), e.cliDownloadURL = a.CLI, e.cliDownloadURLPresent = e.cliDownloadURL && !_.isEmpty(e.cliDownloadURL), e.loginBaseURL = t.openshiftAPIBaseUrl(), a.DISABLE_COPY_LOGIN_COMMAND || (e.sessionToken = n.UserStore().getToken());
8678
- } ]), angular.module("openshiftConsole").controller("CreatePersistentVolumeClaimController", [ "$filter", "$routeParams", "$scope", "$window", "ApplicationGenerator", "AuthorizationService", "DataService", "Navigate", "NotificationsService", "ProjectsService", "keyValueEditorUtils", function(e, t, n, a, r, o, i, s, c, l, u) {
8679
- n.projectName = t.project, n.accessModes = "ReadWriteOnce", n.claim = {}, n.breadcrumbs = [ {
8678
+ } ]), angular.module("openshiftConsole").controller("CreatePersistentVolumeClaimController", [ "$filter", "$routeParams", "$scope", "$window", "APIService", "ApplicationGenerator", "AuthorizationService", "DataService", "Navigate", "NotificationsService", "ProjectsService", "keyValueEditorUtils", function(e, t, n, a, r, o, i, s, c, l, u, d) {
8679
+ n.projectName = t.project, n.accessModes = "ReadWriteOnce", n.claim = {};
8680
+ var p = r.getPreferredVersion("buildconfigs");
8681
+ n.breadcrumbs = [ {
8680
8682
title: "Storage",
8681
8683
link: "project/" + n.projectName + "/browse/storage"
8682
8684
}, {
8683
8685
title: "Create Storage"
8684
8686
} ];
8685
- var d = function() {
8686
- c .hideNotification("create-pvc-error");
8687
+ var m = function() {
8688
+ l .hideNotification("create-pvc-error");
8687
8689
};
8688
- n.$on("$destroy", d );
8689
- var p = function() {
8690
+ n.$on("$destroy", m );
8691
+ var f = function() {
8690
8692
a.history.back();
8691
8693
};
8692
- n.cancel = p, l .get(t.project).then(_.spread(function(a, r) {
8693
- function l () {
8694
+ n.cancel = f, u .get(t.project).then(_.spread(function(a, r) {
8695
+ function o () {
8694
8696
var e = {
8695
8697
kind: "PersistentVolumeClaim",
8696
8698
apiVersion: "v1",
@@ -8708,30 +8710,30 @@ requests: {}
8708
8710
e.spec.accessModes = [ n.claim.accessModes || "ReadWriteOnce" ];
8709
8711
var t = n.claim.unit || "Mi";
8710
8712
if (e.spec.resources.requests.storage = n.claim.amount + t, n.claim.selectedLabels) {
8711
- var a = u .mapEntries(u .compactEntries(n.claim.selectedLabels));
8713
+ var a = d .mapEntries(d .compactEntries(n.claim.selectedLabels));
8712
8714
_.isEmpty(a) || _.set(e, "spec.selector.matchLabels", a);
8713
8715
}
8714
8716
return n.claim.storageClass && "No Storage Class" !== n.claim.storageClass.metadata.name && (e.metadata.annotations["volume.beta.kubernetes.io/storage-class"] = n.claim.storageClass.metadata.name), e;
8715
8717
}
8716
- n.project = a, o .canI("persistentvolumeclaims" , "create", t.project) ? n.createPersistentVolumeClaim = function() {
8717
- if (d (), n.createPersistentVolumeClaimForm.$valid) {
8718
+ n.project = a, i .canI(p , "create", t.project) ? n.createPersistentVolumeClaim = function() {
8719
+ if (m (), n.createPersistentVolumeClaimForm.$valid) {
8718
8720
n.disableInputs = !0;
8719
- var t = l ();
8720
- i .create("persistentvolumeclaims" , null, t, r).then(function(e) {
8721
- c .addNotification({
8721
+ var t = o ();
8722
+ s .create(p , null, t, r).then(function(e) {
8723
+ l .addNotification({
8722
8724
type: "success",
8723
8725
message: "Persistent volume claim " + e.metadata.name + " successfully created."
8724
- }), p ();
8726
+ }), f ();
8725
8727
}, function(t) {
8726
- n.disableInputs = !1, c .addNotification({
8728
+ n.disableInputs = !1, l .addNotification({
8727
8729
id: "create-pvc-error",
8728
8730
type: "error",
8729
8731
message: "An error occurred requesting storage.",
8730
8732
details: e("getErrorDetails")(t)
8731
8733
});
8732
8734
});
8733
8735
}
8734
- } : s .toErrorPage("You do not have authority to create persistent volume claims in project " + t.project + ".", "access_denied");
8736
+ } : c .toErrorPage("You do not have authority to create persistent volume claims in project " + t.project + ".", "access_denied");
8735
8737
}));
8736
8738
} ]), angular.module("openshiftConsole").directive("buildClose", [ "$window", function(e) {
8737
8739
var t = function(e) {
0 commit comments