@@ -52,27 +52,27 @@ angular.module('openshiftConsole')
52
52
53
53
// List image streams and templates in the both the shared `openshift`
54
54
// namespace and the project namespace.
55
- DataService . list ( "imagestreams" , { namespace : "openshift" } , function ( imageStreams ) {
56
- $scope . openshiftImageStreams = imageStreams . by ( "metadata.name" ) ;
57
- } ) ;
55
+ DataService . list ( "imagestreams" , { namespace : "openshift" } ) . then ( function ( resp ) {
56
+ $scope . openshiftImageStreams = resp . by ( "metadata.name" ) ;
57
+ } ) ;
58
58
59
- DataService . list ( "templates" , { namespace : "openshift" } , function ( templates ) {
60
- $scope . openshiftTemplates = templates . by ( "metadata.name" ) ;
61
- } ) ;
59
+ DataService . list ( "templates" , { namespace : "openshift" } ) . then ( function ( resp ) {
60
+ $scope . openshiftTemplates = resp . by ( "metadata.name" ) ;
61
+ } ) ;
62
62
63
63
// If the current namespace is `openshift`, don't request the same
64
64
// templates and image streams again.
65
65
if ( $routeParams . project === 'openshift' ) {
66
66
$scope . projectImageStreams = [ ] ;
67
67
$scope . projectTemplates = [ ] ;
68
68
} else {
69
- DataService . list ( "imagestreams" , context , function ( imageStreams ) {
70
- $scope . projectImageStreams = imageStreams . by ( "metadata.name" ) ;
71
- } ) ;
69
+ DataService . list ( "imagestreams" , context ) . then ( function ( resp ) {
70
+ $scope . projectImageStreams = resp . by ( "metadata.name" ) ;
71
+ } ) ;
72
72
73
- DataService . list ( "templates" , context , function ( templates ) {
74
- $scope . projectTemplates = templates . by ( "metadata.name" ) ;
75
- } ) ;
73
+ DataService . list ( "templates" , context ) . then ( function ( resp ) {
74
+ $scope . projectTemplates = resp . by ( "metadata.name" ) ;
75
+ } ) ;
76
76
}
77
77
} ) ) ;
78
78
} ) ;
0 commit comments