File tree Expand file tree Collapse file tree 2 files changed +16
-11
lines changed
packages/manager/apps/public-cloud/src Expand file tree Collapse file tree 2 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -7,16 +7,17 @@ export default class PublicCloud {
77 }
88
99 getProjects ( filters = [ ] ) {
10- let promise = this
11- . iceberg ( '/cloud/project' )
12- . query ( )
13- . expand ( 'CachedObjectList-Cursor' ) ;
14-
15- filters . forEach ( ( { field, comparator, reference } ) => {
16- promise = promise . addFilter ( field , comparator , reference ) ;
17- } ) ;
18-
19- return promise
10+ return filters . reduce (
11+ ( promise , {
12+ field,
13+ comparator,
14+ reference,
15+ } ) => promise . addFilter ( field , comparator , reference ) ,
16+ this
17+ . iceberg ( '/cloud/project' )
18+ . query ( )
19+ . expand ( 'CachedObjectList-Cursor' ) ,
20+ )
2021 . sort ( 'description' ) // Doesn't work as long as cache is not enabled
2122 . execute ( )
2223 . $promise
Original file line number Diff line number Diff line change @@ -13,7 +13,11 @@ export default class ProjectListController {
1313 this . isLoading = true ;
1414 this
1515 . publicCloud
16- . getProjects ( )
16+ . getProjects ( [ {
17+ field : 'status' ,
18+ comparator : 'in' ,
19+ reference : [ 'creating' , 'ok' ] ,
20+ } ] )
1721 . then ( ( projects ) => {
1822 this . projects = projects ;
1923 } )
You can’t perform that action at this time.
0 commit comments