Revision 57617
Added by Andreas Mantas over 4 years ago
compatibility-validation-results.component.ts | ||
---|---|---|
6 | 6 |
noUsageRulesResults } from '../../domain/shared-messages'; |
7 | 7 |
import { ConfirmationDialogComponent } from '../../shared/reusablecomponents/confirmation-dialog.component'; |
8 | 8 |
import { AuthenticationService } from '../../services/authentication.service'; |
9 |
import * as Highcharts from 'highcharts'; |
|
10 |
import {text} from '@angular/core/src/render3/instructions'; |
|
9 | 11 |
|
10 | 12 |
@Component({ |
11 | 13 |
selector: 'app-compatibility-validation-results', |
... | ... | |
27 | 29 |
modalTitle: string; |
28 | 30 |
isModalShown: boolean; |
29 | 31 |
|
32 |
index = 0; |
|
33 |
ruleName: string[] = []; |
|
34 |
unprocessedData: string[] = []; |
|
35 |
processedData: number[] = []; |
|
36 |
|
|
37 |
Highcharts: typeof Highcharts = Highcharts; |
|
38 |
chartOptions: Highcharts.Options; |
|
39 |
|
|
30 | 40 |
@ViewChild('checkErrors') |
31 | 41 |
public checkErrors: ConfirmationDialogComponent; |
32 | 42 |
|
... | ... | |
59 | 69 |
entry => { |
60 | 70 |
if (entry.type === 'content') { |
61 | 71 |
this.contentResults.push(entry); |
72 |
this.ruleName.push(entry.name); |
|
73 |
this.unprocessedData.push(entry.successes.split('/')[0]); |
|
62 | 74 |
} else if (entry.type === 'usage') { |
63 | 75 |
this.usageResults.push(entry); |
64 | 76 |
} |
... | ... | |
75 | 87 |
this.loadingMessage = ''; |
76 | 88 |
if (!this.contentResults.length) { |
77 | 89 |
this.noContent = noContentRulesResults; |
90 |
} else { |
|
91 |
this.processedData = this.unprocessedData.map(Number); |
|
92 |
this.chartOptions = { |
|
93 |
title: { text: 'Number of records'}, |
|
94 |
yAxis: { title: { text: 'Number of records' } }, |
|
95 |
xAxis: { categories: this.ruleName }, |
|
96 |
series: [{ name: 'For content', data: this.processedData, type: 'column' }] |
|
97 |
}; |
|
78 | 98 |
} |
79 | 99 |
if (!this.usageResults.length) { |
80 | 100 |
this.noUsage = noUsageRulesResults; |
Also available in: Unified diff
Highcharts added to validations results page, displaying number of records for content