Skip to content

Commit

Permalink
Merge pull request #2360 from spadgett/list-status
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue.

Use correct HTTP status from failed DataService.list

Bumps origin-web-common to 0.0.69

Requires openshift/origin-web-common#236
Fixes #2354
  • Loading branch information
openshift-merge-robot committed Oct 24, 2017
2 parents 3c607a7 + 09e6f73 commit 8ba070b
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 16 deletions.
4 changes: 2 additions & 2 deletions app/scripts/controllers/addConfigVolume.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ angular.module('openshiftConsole')
DataService.list($scope.configMapVersion, context, null, { errorNotification: false }).then(function(configMapData) {
$scope.configMaps = orderByDisplayName(configMapData.by("metadata.name"));
}, function(e) {
if (e.code === 403) {
if (e.status === 403) {
$scope.configMaps = [];
return;
}
Expand All @@ -154,7 +154,7 @@ angular.module('openshiftConsole')
DataService.list($scope.secretVersion, context, null, { errorNotification: false }).then(function(secretData) {
$scope.secrets = orderByDisplayName(secretData.by("metadata.name"));
}, function(e) {
if (e.code === 403) {
if (e.status === 403) {
$scope.secrets = [];
return;
}
Expand Down
4 changes: 2 additions & 2 deletions app/scripts/controllers/edit/deploymentConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ angular.module('openshiftConsole')
$scope.availableConfigMaps = configMapDataOrdered;
$scope.valueFromObjects = configMapDataOrdered.concat(secretDataOrdered);
}, function(e) {
if (e.code === 403) {
if (e.status === 403) {
return;
}

Expand All @@ -173,7 +173,7 @@ angular.module('openshiftConsole')
secretsArray.unshift("");
});
}, function(e) {
if (e.code === 403) {
if (e.status === 403) {
return;
}

Expand Down
4 changes: 2 additions & 2 deletions app/scripts/directives/deployImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ angular.module("openshiftConsole")
configMapDataOrdered = orderByDisplayName(configMapData.by("metadata.name"));
$scope.valueFromNamespace[project.metadata.name] = configMapDataOrdered.concat(secretDataOrdered);
}, function(e) {
if (e.code === 403) {
if (e.status === 403) {
return;
}

Expand All @@ -250,7 +250,7 @@ angular.module("openshiftConsole")
secretDataOrdered = orderByDisplayName(secretData.by("metadata.name"));
$scope.valueFromNamespace[project.metadata.name] = secretDataOrdered.concat(configMapDataOrdered);
}, function(e) {
if (e.code === 403) {
if (e.status === 403) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"angular-moment": "1.0.0",
"angular-utf8-base64": "0.0.5",
"file-saver": "1.3.3",
"origin-web-common": "0.0.68",
"origin-web-common": "0.0.69",
"origin-web-catalog": "0.0.58"
},
"devDependencies": {
Expand Down
12 changes: 6 additions & 6 deletions dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -7358,7 +7358,7 @@ errorNotification: !1
}).then(function(t) {
b = g(t.by("metadata.name")), e.availableConfigMaps = b, e.valueFromObjects = b.concat(S);
}, function(e) {
403 !== e.code && h("Could not load config maps", v(e));
403 !== e.status && h("Could not load config maps", v(e));
}), c.list("secrets", r, null, {
errorNotification: !1
}).then(function(t) {
Expand All @@ -7370,7 +7370,7 @@ e.secretsByType = _.each(a, function(e) {
e.unshift("");
});
}, function(e) {
403 !== e.code && h("Could not load secrets", v(e));
403 !== e.status && h("Could not load secrets", v(e));
}), y.push(c.watchObject("deploymentconfigs", a.deploymentconfig, r, function(t, n) {
"MODIFIED" === n && (e.alerts["updated/deleted"] = {
type: "warning",
Expand Down Expand Up @@ -8674,13 +8674,13 @@ errorNotification: !1
}).then(function(e) {
a.configMaps = o(e.by("metadata.name"));
}, function(e) {
403 !== e.code ? b("Could not load config maps", d(e)) : a.configMaps = [];
403 !== e.status ? b("Could not load config maps", d(e)) : a.configMaps = [];
}), c.list(a.secretVersion, r, null, {
errorNotification: !1
}).then(function(e) {
a.secrets = o(e.by("metadata.name"));
}, function(e) {
403 !== e.code ? b("Could not load secrets", d(e)) : a.secrets = [];
403 !== e.status ? b("Could not load secrets", d(e)) : a.secrets = [];
});
var f = function(e) {
return a.attach.allContainers || a.attach.containers[e.name];
Expand Down Expand Up @@ -14041,7 +14041,7 @@ errorNotification: !1
}).then(function(r) {
t = f(r.by("metadata.name")), n.valueFromNamespace[e.metadata.name] = t.concat(a);
}, function(e) {
403 !== e.code && c.addNotification({
403 !== e.status && c.addNotification({
id: "deploy-image-list-config-maps-error",
type: "error",
message: "Could not load config maps.",
Expand All @@ -14054,7 +14054,7 @@ errorNotification: !1
}).then(function(r) {
a = f(r.by("metadata.name")), n.valueFromNamespace[e.metadata.name] = a.concat(t);
}, function(e) {
403 !== e.code && c.addNotification({
403 !== e.status && c.addNotification({
id: "deploy-image-list-secrets-error",
type: "error",
message: "Could not load secrets.",
Expand Down
16 changes: 13 additions & 3 deletions dist/scripts/vendor.js
Original file line number Diff line number Diff line change
Expand Up @@ -73974,7 +73974,7 @@ return e.reject(i);
} ]), angular.module("openshiftCommonServices").factory("AuthorizationService", [ "$q", "$cacheFactory", "Logger", "$interval", "APIService", "DataService", function(e, t, n, i, r, o) {
var a = null, s = t("rulesCache", {
number: 10
}), l = !1, c = [ "localresourceaccessreviews", "localsubjectaccessreviews", "resourceaccessreviews", "selfsubjectaccessreviews", "selfsubjectrulesreviews", "subjectaccessreviews" ], u = function(e) {
}), l = !1, c = [ "localresourceaccessreviews", "localsubjectaccessreviews", "resourceaccessreviews", "selfsubjectaccessreviews", "selfsubjectrulesreviews", "subjectaccessreviews", "subjectrulesreviews", "podsecuritypolicyreviews", "podsecuritypolicysubjectreviews", "podsecuritypolicyselfsubjectreviews", "tokenreviews" ], u = function(e) {
var t = {};
return _.each(e, function(e) {
_.each(e.apiGroups, function(n) {
Expand Down Expand Up @@ -74589,7 +74589,12 @@ s._listOpComplete(o, e, n, i, t);
}).error(function(t, n, r, a) {
s._listInFlight(o, !1);
var l = s._listDeferred(o);
delete s._listDeferredMap[o], l.reject(t, n, r, a), _.get(i, "errorNotification", !0) && b("Failed to list " + e, n);
delete s._listDeferredMap[o], l.reject({
data: t,
status: n,
headers: r,
config: a
}), _.get(i, "errorNotification", !0) && b("Failed to list " + e, n);
});
}) : t({
method: "GET",
Expand All @@ -74601,7 +74606,12 @@ s._listOpComplete(o, e, n, i, t);
}).error(function(t, n, r, a) {
s._listInFlight(o, !1);
var l = s._listDeferred(o);
delete s._listDeferredMap[o], l.reject(t, n, r, a), _.get(i, "errorNotification", !0) && b("Failed to list " + e, n);
delete s._listDeferredMap[o], l.reject({
data: t,
status: n,
headers: r,
config: a
}), _.get(i, "errorNotification", !0) && b("Failed to list " + e, n);
});
}, f.prototype._listOpComplete = function(e, t, n, i, r) {
r.items || console.warn("List request for " + t + " returned a null items array. This is an invalid API response.");
Expand Down

0 comments on commit 8ba070b

Please sign in to comment.