Skip to content

Commit b3337f4

Browse files
author
OpenShift Bot
authored
Merge pull request #1359 from MarkDeMaria/promisesQuota
Merged by openshift-bot
2 parents ffa2a4b + e33a598 commit b3337f4

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

app/scripts/controllers/quota.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,14 @@ angular.module('openshiftConsole')
101101
.then(_.spread(function(project, context) {
102102
$scope.project = project;
103103

104-
DataService.list("resourcequotas", context, function(quotas) {
105-
$scope.quotas = _.sortBy(quotas.by("metadata.name"), "metadata.name");
104+
DataService.list("resourcequotas", context).then(function(resp) {
105+
$scope.quotas = _.sortBy(resp.by("metadata.name"), "metadata.name");
106106
$scope.orderedTypesByQuota = orderTypes($scope.quotas);
107107
Logger.log("quotas", $scope.quotas);
108108
});
109109

110-
DataService.list("appliedclusterresourcequotas", context, function(quotas) {
111-
$scope.clusterQuotas = _.sortBy(quotas.by("metadata.name"), "metadata.name");
110+
DataService.list("appliedclusterresourcequotas", context).then(function(resp) {
111+
$scope.clusterQuotas = _.sortBy(resp.by("metadata.name"), "metadata.name");
112112
$scope.orderedTypesByClusterQuota = orderTypes($scope.clusterQuotas);
113113
$scope.namespaceUsageByClusterQuota = {};
114114
_.each($scope.clusterQuotas, function(quota) {
@@ -120,8 +120,8 @@ angular.module('openshiftConsole')
120120
Logger.log("cluster quotas", $scope.clusterQuotas);
121121
});
122122

123-
DataService.list("limitranges", context, function(limitRanges) {
124-
$scope.limitRanges = _.sortBy(limitRanges.by("metadata.name"), "metadata.name");
123+
DataService.list("limitranges", context).then(function(resp) {
124+
$scope.limitRanges = _.sortBy(resp.by("metadata.name"), "metadata.name");
125125
$scope.emptyMessageLimitRanges = "There are no limit ranges set on this project.";
126126
// Convert to a sane format for a view to a build a table with rows per resource type
127127
angular.forEach($scope.limitRanges, function(limitRange){

dist/scripts/scripts.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5104,9 +5104,9 @@ b[a.metadata.name] = d;
51045104
}), b;
51055105
};
51065106
e.get(b.project).then(_.spread(function(a, e) {
5107-
c.project = a, d.list("resourcequotas", e, function(a) {
5107+
c.project = a, d.list("resourcequotas", e).then(function(a) {
51085108
c.quotas = _.sortBy(a.by("metadata.name"), "metadata.name"), c.orderedTypesByQuota = k(c.quotas), f.log("quotas", c.quotas);
5109-
}), d.list("appliedclusterresourcequotas", e, function(a) {
5109+
}), d.list("appliedclusterresourcequotas", e).then(function(a) {
51105110
c.clusterQuotas = _.sortBy(a.by("metadata.name"), "metadata.name"), c.orderedTypesByClusterQuota = k(c.clusterQuotas), c.namespaceUsageByClusterQuota = {}, _.each(c.clusterQuotas, function(a) {
51115111
if (a.status) {
51125112
var d = _.find(a.status.namespaces, {
@@ -5115,7 +5115,7 @@ namespace:b.project
51155115
c.namespaceUsageByClusterQuota[a.metadata.name] = d.status;
51165116
}
51175117
}), f.log("cluster quotas", c.clusterQuotas);
5118-
}), d.list("limitranges", e, function(a) {
5118+
}), d.list("limitranges", e).then(function(a) {
51195119
c.limitRanges = _.sortBy(a.by("metadata.name"), "metadata.name"), c.emptyMessageLimitRanges = "There are no limit ranges set on this project.", angular.forEach(c.limitRanges, function(a) {
51205120
var b = a.metadata.name;
51215121
c.limitsByType[b] = {}, angular.forEach(a.spec.limits, function(a) {

0 commit comments

Comments
 (0)