File tree Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Expand file tree Collapse file tree 2 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -141,5 +141,13 @@ export default {
141
141
responseType : 'json' ,
142
142
} ) ) . data ;
143
143
} ,
144
+
145
+ async loadProjectResources ( name ) {
146
+ return ( await axios ( {
147
+ method : 'get' ,
148
+ url : `/api/project/${ this . projectId } /${ name } ` ,
149
+ responseType : 'json' ,
150
+ } ) ) . data ;
151
+ } ,
144
152
} ,
145
153
} ;
Original file line number Diff line number Diff line change @@ -501,23 +501,15 @@ export default {
501
501
},
502
502
503
503
async loadData () {
504
- this .inventory = (await axios ({
505
- method: ' get' ,
506
- url: ` /api/project/${ this .projectId } /inventory` ,
507
- responseType: ' json' ,
508
- })).data ;
509
-
510
- this .environment = (await axios ({
511
- method: ' get' ,
512
- url: ` /api/project/${ this .projectId } /environment` ,
513
- responseType: ' json' ,
514
- })).data ;
515
-
516
- this .repositories = (await axios ({
517
- method: ' get' ,
518
- url: ` /api/project/${ this .projectId } /repositories` ,
519
- responseType: ' json' ,
520
- })).data ;
504
+ [
505
+ this .inventory ,
506
+ this .environment ,
507
+ this .repositories ,
508
+ ] = await Promise .all ([
509
+ this .loadProjectResources (' inventory' ),
510
+ this .loadProjectResources (' environment' ),
511
+ this .loadProjectResources (' repositories' ),
512
+ ]);
521
513
},
522
514
523
515
onTableSettingsChange ({ headers }) {
You can’t perform that action at this time.
0 commit comments