fabric8-analytics-dep-editor
Version:
65 lines • 2.17 kB
JavaScript
import { Component, Input } from '@angular/core';
var SecurityComponent = /** @class */ (function () {
function SecurityComponent() {
this.title = 'Security Alert';
this.icon = 'fa fa-shield';
this.noOfCves = 0;
this.hasIssue = false;
this.toHave = false;
this.secureIssue = false;
this.itSecurity = true;
this.cveName = [];
}
SecurityComponent.prototype.ngOnChanges = function () {
var _this = this;
this.hasIssue = false;
this.secureIssue = false;
this.cveName = [];
if (this.cveData) {
this.noOfCves = 0;
var count_1 = -1;
this.itSecurity = true;
this.cveData.result.forEach(function (item) {
count_1++;
if (item.cve) {
_this.noOfCves++;
_this.hasIssue = true;
_this.secureIssue = true;
if (item.cve !== null) {
_this.cveName.push([
item.cve.details,
item.package
]);
}
}
});
if (this.noOfCves > 0) {
this.itSecurity = false;
}
}
else {
this.noOfCves = null;
}
};
SecurityComponent.prototype.ngOnInit = function () {
};
SecurityComponent.prototype.getShow = function (event) {
this.toHave = event.toShow;
};
SecurityComponent.decorators = [
{ type: Component, args: [{
selector: 'app-security',
styles: [require('./security.component.less').toString()],
template: require('./security.component.html')
},] },
];
/** @nocollapse */
SecurityComponent.ctorParameters = function () { return []; };
SecurityComponent.propDecorators = {
'cveData': [{ type: Input },],
'boosterInfo': [{ type: Input },],
};
return SecurityComponent;
}());
export { SecurityComponent };
//# sourceMappingURL=security.component.js.map