Skip to content

Commit

Permalink
Merge pull request #336 from gruebel/reduce-codebuild-invocation
Browse files Browse the repository at this point in the history
reduce CodeBuild calls
  • Loading branch information
iann0036 committed Jul 7, 2023
2 parents 5c38cf3 + d6e10f1 commit a10059c
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions js/services/codebuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,22 +214,22 @@ async function updateDatatableDeveloperToolsCodeBuild() {
}, true).then(async (data) => {
$('#section-developertools-codebuild-projects-datatable').deferredBootstrapTable('removeAll');

await Promise.all(data.projects.map(project => {
return sdkcall("CodeBuild", "batchGetProjects", {
names: [project]
}, true).then((data) => {
await sdkcall("CodeBuild", "batchGetProjects", {
names: data.projects
}, true).then((data) => {
data.projects.forEach(project => {
$('#section-developertools-codebuild-projects-datatable').deferredBootstrapTable('append', [{
f2id: data.projects[0].arn,
f2id: project.arn,
f2type: 'codebuild.project',
f2data: data.projects[0],
f2data: project,
f2region: region,
name: data.projects[0].name,
description: data.projects[0].description,
timeout: data.projects[0].timeoutInMinutes + " minutes",
creationtime: data.projects[0].created
name: project.name,
description: project.description,
timeout: project.timeoutInMinutes + " minutes",
creationtime: project.created
}]);
});
}));
})
});
});

await sdkcall("CodeBuild", "listSourceCredentials", {
Expand Down

0 comments on commit a10059c

Please sign in to comment.