Skip to content

Commit

Permalink
Update other widgets to new function results
Browse files Browse the repository at this point in the history
  • Loading branch information
rajbos committed Dec 3, 2023
1 parent 8cada72 commit 677f4cf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion vss-extension-dev.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifestVersion": 1,
"id": "GHAzDoWidget-DEV",
"version": "0.2.299",
"version": "0.2.300",
"public": false,
"name": "Advanced Security dashboard Widgets [DEV]",
"description": "[DEV] GitHub Advanced Security for Azure DevOps dashboard widgets",
Expand Down
8 changes: 4 additions & 4 deletions widgets/widgets/widget_1x1/widget_1x1.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function loadWidget(widgetSettings, organization, projectName, VSS, Servic
repoName = data.repo
consoleLog(`loaded repoName from widgetSettings_1x1: [${repoName}] and id [${repoId}]`);

alerts = await getAlerts(organization, projectName, repoId);
alerts = (await getAlerts(organization, projectName, repoId)).values;
}
else {
// load alerts for ALL repos in the project
Expand All @@ -36,9 +36,9 @@ async function loadWidget(widgetSettings, organization, projectName, VSS, Servic
// call and let the promise handle the rest
const repoAlerts = await getAlerts(organization, projectName, repo.id)

alerts.codeAlerts += repoAlerts.codeAlerts;
alerts.dependencyAlerts += repoAlerts.dependencyAlerts;
alerts.secretAlerts += repoAlerts.secretAlerts;
alerts.codeAlerts += repoAlerts.values.codeAlerts;
alerts.dependencyAlerts += repoAlerts.values.dependencyAlerts;
alerts.secretAlerts += repoAlerts.values.secretAlerts;
}
}
consoleLog('alerts: ' + JSON.stringify(alerts));
Expand Down
2 changes: 1 addition & 1 deletion widgets/widgets/widget_2x1/widget_2x1.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async function loadWidget(widgetSettings, organization, projectName) {
var title = $('h2.ghazdo-title');
title.text(`Security Alerts for ${repoName}`);
title.attr('title', repoName);
alerts = await getAlerts(organization, projectName, repoId);
alerts = (await getAlerts(organization, projectName, repoId)).values;
consoleLog('alerts: ' + JSON.stringify(alerts));

// GHAS is only available on the SaaS version, so we can hardcode the domain
Expand Down

0 comments on commit 677f4cf

Please sign in to comment.