Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Commit

Permalink
fix(bug): cve not getting updated and outliers are not getting updated
Browse files Browse the repository at this point in the history
  • Loading branch information
arunkumars08 committed Aug 31, 2017
1 parent 85047c6 commit 6fb8574
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ <h3>
Out of date
</div>
<div class="metric">
<span>03</span>
<span>{{licenseOutliers}}</span>
</div>
</div>
<div class="conflict-license flex-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export class StackReportInShortComponent implements OnChanges {
public stackLevelOutliers: any;
public dataLoaded: boolean = false;
public error: any;
public licenseOutliers: number = 0;

private cache: string = '';

Expand Down Expand Up @@ -147,7 +148,7 @@ export class StackReportInShortComponent implements OnChanges {
let otherLicensesRatio: any = 0;

let temp: Array<any> = [];

this.licenseOutliers = 0;
tab.dependencies.forEach((t) => {
t.licenses.forEach((license) => {
if (!licenses[license]) {
Expand All @@ -156,6 +157,9 @@ export class StackReportInShortComponent implements OnChanges {
++ licenses[license];
}
});
if (t.license_analysis && t.license_analysis.status && t.license_analysis.status.toLowerCase() === 'unknown') {
++ this.licenseOutliers;
}
});
for (let i in licenses) {
if (licenses.hasOwnProperty(i)) {
Expand Down Expand Up @@ -218,7 +222,14 @@ export class StackReportInShortComponent implements OnChanges {
};
}

private resetFields(): void {
this.securityInfo = null;
this.stackLevelOutliers = null;
this.stackLevel = null;
}

private buildReportInShort(): void {
this.resetFields();
let resultInformation: Array<ResultInformationModel> = this.result.result;
if (resultInformation && resultInformation.length > 0) {
resultInformation.forEach((one: ResultInformationModel, index: number) => {
Expand Down

0 comments on commit 6fb8574

Please sign in to comment.