Revision 57617
Added by Andreas Mantas over 4 years ago
modules/uoa-repository-dashboard-gui/branches/new-ui/package.json | ||
---|---|---|
25 | 25 |
"angular2-cookie-law": "^6.0.4", |
26 | 26 |
"bootstrap": "^4.1.3", |
27 | 27 |
"core-js": "^2.5.4", |
28 |
"highcharts": "^7.2.1", |
|
29 |
"highcharts-angular": "^2.4.0", |
|
28 | 30 |
"jquery": "^3.4.1", |
29 | 31 |
"jquery-bez": "^1.0.11", |
30 | 32 |
"ngx-bootstrap": "^3.0.1", |
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/pages/dashboard/dashboard.component.ts | ||
---|---|---|
184 | 184 |
console.log(error); |
185 | 185 |
} , |
186 | 186 |
() => { |
187 |
this.shortSelectedRepoId = selectedRepo.id.replace('____', '').replace('_____', '').replace('::', ':');
|
|
187 |
this.shortSelectedRepoId = selectedRepo.id.replace(/_/g, '').replace('::', ':');
|
|
188 | 188 |
this.loadingUsageStatsMessage = ''; |
189 | 189 |
this.errorUsageStatsMessage = ''; |
190 | 190 |
} |
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/pages/compatibility/compatibility.module.ts | ||
---|---|---|
16 | 16 |
import { CompatibilityValidateStep2Component } from './compatibility-validate-forms/compatibility-validate-step2.component'; |
17 | 17 |
import { CompatibilityValidateStep3Component } from './compatibility-validate-forms/compatibility-validate-step3.component'; |
18 | 18 |
import { CompatibilityValidateStep3CrisComponent } from './compatibility-validate-forms/compatibility-validate-step3-cris.component'; |
19 |
import {HighchartsChartModule} from 'highcharts-angular'; |
|
19 | 20 |
|
20 | 21 |
@NgModule ({ |
21 | 22 |
imports: [ |
... | ... | |
24 | 25 |
FormsModule, |
25 | 26 |
ReactiveFormsModule, |
26 | 27 |
CompatibilityRouting, |
27 |
ReusableComponentsModule |
|
28 |
ReusableComponentsModule, |
|
29 |
HighchartsChartModule |
|
28 | 30 |
], |
29 | 31 |
declarations: [ |
30 | 32 |
CompatibilityComponent, |
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/pages/compatibility/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; |
modules/uoa-repository-dashboard-gui/branches/new-ui/src/app/pages/compatibility/compatibility-validation-results.component.html | ||
---|---|---|
36 | 36 |
<div class="uk-margin-small">by {{jobSummary.userEmail}}</div> |
37 | 37 |
</div> |
38 | 38 |
|
39 |
<div id="container" class="md-card tabs"> |
|
40 |
<highcharts-chart |
|
41 |
[Highcharts] = "Highcharts" |
|
42 |
[options] = "chartOptions" |
|
43 |
style="width: 100%; height: 400px; display: block;" |
|
44 |
></highcharts-chart> |
|
45 |
</div> |
|
46 |
|
|
39 | 47 |
<div class="md-card tabs"> |
40 | 48 |
<div class="md-card-content"> |
41 | 49 |
|
Also available in: Unified diff
Highcharts added to validations results page, displaying number of records for content