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

Commit

Permalink
fix(bug): corrected texts/labels in stack report
Browse files Browse the repository at this point in the history
Signed-off-by: invinciblejai <[email protected]>
  • Loading branch information
invincibleJai authored and arunkumars08 committed Nov 23, 2017
1 parent 232d16d commit 7421913
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 50 deletions.
4 changes: 2 additions & 2 deletions src/app/stack/component-level/component-level.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ export class ComponentLevelComponent implements OnChanges {
let dependency: any, eachOne: ComponentInformationModel;
this.headers = [
{
name: 'Package name',
name: 'Package Name',
class: 'medium',
order: 1
}, {
Expand Down Expand Up @@ -377,7 +377,7 @@ export class ComponentLevelComponent implements OnChanges {
class: 'small',
order: 8
}, {
name: 'Github Dependants',
name: 'Github Dependents',
class: 'large',
order: 9
}, {
Expand Down
6 changes: 3 additions & 3 deletions src/app/stack/stack-details/stack-details.component.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="stack-report">
<a class="stack-reports-btn" (click)="showStackModal($event)">{{displayName}}</a>
<modal #stackModule title="Report title on Application - {{appName}}, Build #{{buildNumber}}" modalClass="modal-lg modal-fullscreen modal-width-class" (onClose)="handleModalClose();" (onOpen)="init();">
<modal #stackModule title="Stack report for {{appName}}, Build #{{buildNumber}}" modalClass="modal-lg modal-fullscreen modal-width-class" (onClose)="handleModalClose();" (onOpen)="init();">
<modal-header>
{{modalHeader}}
</modal-header>
Expand All @@ -19,7 +19,7 @@
[isDisabled]="true">
<div accordion-heading>
<div class="accordion-heading" accordion-heading>
Stack report
Stack summary
</div>
<div class="accordion-sub-heading">
[Components: <b>{{analysis && analysis.stackLevel}}</b>]
Expand All @@ -30,7 +30,7 @@
<accordion-group #grouped [isOpen]="true" [panelClass]="customClass">
<div accordion-heading>
<div class="accordion-heading" accordion-heading>
Detail analysis of your stack components
Detailed analysis of your stack components
</div>
<i class="pull-right accordion-indicator float-xs-right glyphicon"
[ngClass]="{'glyphicon-chevron-down': grouped?.isOpen, 'glyphicon-chevron-right': !grouped?.isOpen}"></i>
Expand Down
52 changes: 27 additions & 25 deletions src/app/stack/stack-level/stack-level.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="stat-container security-issues-stat">
<div class="stat-box">
<h3>
<span>Security Alert</span>
<span>Security Issues</span>
</h3>
<div class="stat-content">
<div *ngIf="securityInfo" class="col-xs-12">
Expand Down Expand Up @@ -37,12 +37,12 @@ <h3>
<div class="stat-container outlier-stat">
<div class="stat-box">
<h3>
<span>Usage</span>
<span>Usage Outliers</span>
</h3>
<div class="stat-content usage-outlier">
<div class="metric-container">
<div class="metric-desc">
Components that aren't commonly used in your stack
Components not used together
</div>
<div class="metric">
<span>{{stackLevelOutliers && stackLevelOutliers.usage && stackLevelOutliers.usage.length}}</span>
Expand All @@ -59,63 +59,65 @@ <h3>
<div class="stat-content license-area" *ngIf="licenseAnalysis && licenseAnalysis.status.toLowerCase() !== 'failure' && licenseAnalysis && licenseAnalysis.status.toLowerCase() !== 'nolicensedata'">
<div class="stack-license-text flex-3" *ngIf="licenseAnalysis.status.toLowerCase() === 'successful'">
<div class="metric-desc">
Suggested Stack License
Stack level license
</div>
<div class="metric metric-license-status">
<span>{{licenseAnalysis.stackLicenseText}}</span>
</div>
</div>
<div class="outlier-license flex-3" *ngIf="licenseAnalysis && licenseAnalysis.status.toLowerCase() === 'successful'">
<div class="metric-desc">
No. of outliers
Restrictive license(s)
</div>
<div class="metric">
<span>{{licenseAnalysis.licenseOutliersCount}}</span>
</div>
</div>
<div class="conflict-license flex-3" *ngIf="licenseAnalysis && licenseAnalysis.status.toLowerCase() === 'stackconflict'">
<div class="conflict-license flex-3" *ngIf="licenseAnalysis && (licenseAnalysis.status.toLowerCase() === 'stackconflict' ||
licenseAnalysis.status.toLowerCase() === 'conflict')">
<div class="metric-desc">
Result
Stack level license
</div>
<div class="metric metric-license-status">
<span>
Stack Conflict
None
</span>
</div>
</div>
<div
<!--<div
class="conflict-license flex-3"
*ngIf="licenseAnalysis && licenseAnalysis.status.toLowerCase() === 'stackconflict' && licenseAnalysis.licenseStackConflictCount"
*ngIf="licenseAnalysis && (licenseAnalysis.status.toLowerCase() === 'stackconflict' || licenseAnalysis.status.toLowerCase() === 'conflict')
&& licenseAnalysis.licenseStackConflictCount"
[popover]="popLicenseTemplate"
popoverTitle="All Stack License Conflicts"
placement="left"
containerClass="conflict-license-container"
triggers="mouseenter:mouseleave">
<div class="metric-desc">
No. of conflicts
License(s) can not be used together
</div>
<div class="metric">
<span>
{{licenseAnalysis.licenseStackConflictCount}}
</span>
</div>
</div>
</div>-->
<div
class="conflict-license flex-3"
*ngIf="licenseAnalysis && licenseAnalysis.status.toLowerCase() === 'stackconflict' && licenseAnalysis.licenseStackConflictCount === 0">
*ngIf="licenseAnalysis && (licenseAnalysis.status.toLowerCase() === 'stackconflict' || licenseAnalysis.status.toLowerCase() === 'conflict')">
<div class="metric-desc">
No. of conflicts
Licenses that can't be used together
</div>
<div class="metric">
<span>
{{licenseAnalysis.licenseStackConflictCount}}
</span>
</div>
</div>
<ng-template #popLicenseTemplate>
<!--<ng-template #popLicenseTemplate>
<div
class="license-template flex-4"
*ngIf="licenseAnalysis && licenseAnalysis.status.toLowerCase() === 'stackconflict'">
*ngIf="licenseAnalysis && (licenseAnalysis.status.toLowerCase() === 'stackconflict' || licenseAnalysis.status.toLowerCase() === 'conflict')">
<div class="packages flex-2">
<div *ngFor="let conflict of licenseAnalysis.licenseConflictsFull" class="conflict-group">
<div><span>{{conflict.package1}}</span><span class="fa fa-arrow-right"></span></div>
Expand All @@ -129,20 +131,20 @@ <h3>
</div>
</div>
</div>
</ng-template>
</ng-template>-->
<div class="conflict-license flex-3" *ngIf="licenseAnalysis && licenseAnalysis.status.toLowerCase() === 'componentconflict'">
<div class="metric-desc">
Result
Stack level license
</div>
<div class="metric metric-license-status">
<span>
Component Conflict
None
</span>
</div>
</div>
<div class="conflict-license flex-3" *ngIf="licenseAnalysis && licenseAnalysis.status.toLowerCase() === 'componentconflict'">
<div class="metric-desc">
No. of conflicts
Licenses that can't be used together
</div>
<div class="metric">
<span>
Expand All @@ -152,17 +154,17 @@ <h3>
</div>
<div class="unknown-license flex-3" *ngIf="licenseAnalysis && licenseAnalysis.status.toLowerCase() === 'unknown'">
<div class="metric-desc">
Result
Stack level license
</div>
<div class="metric metric-license-status">
<span>
Unknown
None
</span>
</div>
</div>
<div class="unknown-license flex-3" *ngIf="licenseAnalysis && licenseAnalysis.status.toLowerCase() === 'unknown'">
<div class="metric-desc">
No Of Unknowns
Unknown license(s)
</div>
<div class="metric">
<span>
Expand All @@ -172,10 +174,10 @@ <h3>
</div>
</div>
<div class="stat-content center-text" *ngIf="licenseAnalysis && licenseAnalysis.status && licenseAnalysis.status.toLowerCase() === 'failure'">
Could not get license data for this stack. This may be due to some failure.
Sorry! we were unable to get license data for this stack.
</div>
<div class="stat-content center-text" *ngIf="licenseAnalysis && licenseAnalysis.status && licenseAnalysis.status.toLowerCase() === 'nolicensedata'">
No license data available.
Sorry! we were unable to get license data for this stack.
</div>
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion src/app/stack/stack-level/stack-level.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ export class StackLevelComponent {

if (tab.license_analysis.status) {
this.licenseAnalysis.status = tab.license_analysis.status;

if (this.licenseAnalysis.status.toLowerCase() === 'stackconflict' &&
tab.license_analysis.conflict_packages &&
tab.license_analysis.conflict_packages.length) {
Expand Down
Loading

0 comments on commit 7421913

Please sign in to comment.