Skip to content

Commit ce35daa

Browse files
author
OpenShift Bot
authored
Merge pull request #1354 from MarkDeMaria/promisesBrowseCategory
Merged by openshift-bot
2 parents 264b265 + a27581c commit ce35daa

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

app/scripts/controllers/create/browseCategory.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ angular.module('openshiftConsole')
101101

102102
// List image streams and templates in the both the shared `openshift`
103103
// namespace and the project namespace.
104-
DataService.list("imagestreams", {namespace: "openshift"}, function(imageStreams) {
105-
$scope.openshiftImageStreams = imageStreams.by("metadata.name");
104+
DataService.list("imagestreams", {namespace: "openshift"}).then(function(resp) {
105+
$scope.openshiftImageStreams = resp.by("metadata.name");
106106
});
107107

108-
DataService.list("templates", {namespace: "openshift"}, function(templates) {
109-
$scope.openshiftTemplates = templates.by("metadata.name");
108+
DataService.list("templates", {namespace: "openshift"}).then(function(resp) {
109+
$scope.openshiftTemplates = resp.by("metadata.name");
110110
});
111111

112112
// If the current namespace is `openshift`, don't request the same
@@ -115,12 +115,12 @@ angular.module('openshiftConsole')
115115
$scope.projectImageStreams = [];
116116
$scope.projectTemplates = [];
117117
} else {
118-
DataService.list("imagestreams", context, function(imageStreams) {
119-
$scope.projectImageStreams = imageStreams.by("metadata.name");
118+
DataService.list("imagestreams", context).then(function(resp) {
119+
$scope.projectImageStreams = resp.by("metadata.name");
120120
});
121121

122-
DataService.list("templates", context, function(templates) {
123-
$scope.projectTemplates = templates.by("metadata.name");
122+
DataService.list("templates", context).then(function(resp) {
123+
$scope.projectTemplates = resp.by("metadata.name");
124124
});
125125
}
126126
}));

dist/scripts/scripts.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -8132,15 +8132,15 @@ title:a.category.label
81328132
}), void l.get(e.project).then(_.spread(function(c, d) {
81338133
a.project = c, a.context = d, a.breadcrumbs[0].title = b("displayName")(c), i.list("imagestreams", {
81348134
namespace:"openshift"
8135-
}, function(b) {
8135+
}).then(function(b) {
81368136
a.openshiftImageStreams = b.by("metadata.name");
81378137
}), i.list("templates", {
81388138
namespace:"openshift"
8139-
}, function(b) {
8139+
}).then(function(b) {
81408140
a.openshiftTemplates = b.by("metadata.name");
8141-
}), "openshift" === e.project ? (a.projectImageStreams = [], a.projectTemplates = []) :(i.list("imagestreams", d, function(b) {
8141+
}), "openshift" === e.project ? (a.projectImageStreams = [], a.projectTemplates = []) :(i.list("imagestreams", d).then(function(b) {
81428142
a.projectImageStreams = b.by("metadata.name");
8143-
}), i.list("templates", d, function(b) {
8143+
}), i.list("templates", d).then(function(b) {
81448144
a.projectTemplates = b.by("metadata.name");
81458145
}));
81468146
})));

0 commit comments

Comments
 (0)