From 32078e8732f311583ffe4cb116e56ec9245e1737 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Fri, 14 Jul 2023 18:22:25 +0300 Subject: [PATCH] Added validation history and validation analysis pages and updated validatorAPI to use the new version using camel. --- package.json | 2 +- src/app/app-routing.module.ts | 15 ++ src/app/app.module.ts | 12 +- src/app/pages/entities/Issue.ts | 4 + src/app/pages/entities/JobResult.ts | 23 ++ src/app/pages/entities/RulePerJob.ts | 20 ++ .../oaipmh-analysis.component.html | 249 ++++++++++++++++++ .../oaipmh-analysis.component.less | 56 ++++ .../oaipmh-analysis.component.ts | 178 +++++++++++++ .../oaipmh-history.component.html | 189 +++++++++++++ .../oaipmh-history.component.less | 4 + .../oaipmh-history.component.ts | 53 ++++ .../oaipmh-validator.component.html | 1 + .../oaipmh-validator.component.less | 0 .../oaipmh-validator.component.ts | 15 ++ .../single-record-validator.component.ts | 2 +- src/app/services/oaipmh-validator.service.ts | 31 +++ .../single-record-validator.service.ts | 2 +- src/app/shared/topmenu/topmenu.component.html | 15 +- .../breadcrumbs/breadcrumbs.component.ts | 24 ++ .../utils/breadcrumbs/breadcrumbs.module.ts | 11 + src/assets/common-assets | 2 +- src/assets/openaire-theme | 2 +- src/assets/validator-custom.less | 3 + src/environments/environment.ts | 2 +- 25 files changed, 906 insertions(+), 9 deletions(-) create mode 100644 src/app/pages/entities/Issue.ts create mode 100644 src/app/pages/entities/JobResult.ts create mode 100644 src/app/pages/entities/RulePerJob.ts create mode 100644 src/app/pages/oaipmh-validator/validation-analysis/oaipmh-analysis.component.html create mode 100644 src/app/pages/oaipmh-validator/validation-analysis/oaipmh-analysis.component.less create mode 100644 src/app/pages/oaipmh-validator/validation-analysis/oaipmh-analysis.component.ts create mode 100644 src/app/pages/oaipmh-validator/validation-history/oaipmh-history.component.html create mode 100644 src/app/pages/oaipmh-validator/validation-history/oaipmh-history.component.less create mode 100644 src/app/pages/oaipmh-validator/validation-history/oaipmh-history.component.ts create mode 100644 src/app/pages/oaipmh-validator/validation-settings/oaipmh-validator.component.html create mode 100644 src/app/pages/oaipmh-validator/validation-settings/oaipmh-validator.component.less create mode 100644 src/app/pages/oaipmh-validator/validation-settings/oaipmh-validator.component.ts create mode 100644 src/app/services/oaipmh-validator.service.ts rename src/app/{pages/single-record-validator => services}/single-record-validator.service.ts (94%) create mode 100644 src/app/shared/utils/breadcrumbs/breadcrumbs.component.ts create mode 100644 src/app/shared/utils/breadcrumbs/breadcrumbs.module.ts diff --git a/package.json b/package.json index 56149d6..c2f24ae 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "rxjs": "~7.5.0", "tslib": "^2.3.0", "zone.js": "~0.11.4", - "uikit": "3.12.0" + "uikit": "3.13.10" }, "devDependencies": { "@angular-devkit/build-angular": "^14.1.0", diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index c0877f2..9a3bb01 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -1,6 +1,9 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { SingleRecordValidatorComponent } from "./pages/single-record-validator/single-record-validator.component"; +import {OaipmhValidatorComponent} from "./pages/oaipmh-validator/validation-settings/oaipmh-validator.component"; +import {OaipmhHistoryComponent} from "./pages/oaipmh-validator/validation-history/oaipmh-history.component"; +import {OaipmhAnalysisComponent} from "./pages/oaipmh-validator/validation-analysis/oaipmh-analysis.component"; const routes: Routes = [ { @@ -12,6 +15,18 @@ const routes: Routes = [ path: 'single-record-validate', component: SingleRecordValidatorComponent }, + { + path: 'oaipmh-analysis', + component: OaipmhAnalysisComponent + }, + { + path: 'oaipmh-history', + component: OaipmhHistoryComponent + }, + { + path: 'oaipmh', + component: OaipmhValidatorComponent + } ]; @NgModule({ diff --git a/src/app/app.module.ts b/src/app/app.module.ts index d857f1a..51d16ef 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -11,13 +11,20 @@ import {HttpClient, HttpClientModule} from "@angular/common/http"; import {InputModule} from "./shared/utils/input/input.module"; import {AlertModalModule} from "./shared/utils/modal/alertModal.module"; import {IconsModule} from "./shared/utils/icons/icons.module"; +import {OaipmhValidatorComponent} from "./pages/oaipmh-validator/validation-settings/oaipmh-validator.component"; +import {OaipmhHistoryComponent} from "./pages/oaipmh-validator/validation-history/oaipmh-history.component"; +import {OaipmhAnalysisComponent} from "./pages/oaipmh-validator/validation-analysis/oaipmh-analysis.component"; +import {BreadcrumbsModule} from "./shared/utils/breadcrumbs/breadcrumbs.module"; @NgModule({ declarations: [ AppComponent, TopmenuComponent, SidebarComponent, - SingleRecordValidatorComponent + SingleRecordValidatorComponent, + OaipmhValidatorComponent, + OaipmhHistoryComponent, + OaipmhAnalysisComponent ], imports: [ BrowserModule, @@ -27,7 +34,8 @@ import {IconsModule} from "./shared/utils/icons/icons.module"; HttpClientModule, InputModule, AlertModalModule, - IconsModule + IconsModule, + BreadcrumbsModule ], providers: [], bootstrap: [AppComponent] diff --git a/src/app/pages/entities/Issue.ts b/src/app/pages/entities/Issue.ts new file mode 100644 index 0000000..ed90a26 --- /dev/null +++ b/src/app/pages/entities/Issue.ts @@ -0,0 +1,4 @@ +export class Issue { + description: string; + records: string[]; +} diff --git a/src/app/pages/entities/JobResult.ts b/src/app/pages/entities/JobResult.ts new file mode 100644 index 0000000..ab81f91 --- /dev/null +++ b/src/app/pages/entities/JobResult.ts @@ -0,0 +1,23 @@ +export class JobResult { + id: string; + baseUrl: string; + numberOfRecords: number; + guidelines: string; + startDate: Date; + endDate: Date; + recordsTested: number; + progress: Progress; + status: Status; + score: number; +} + +export enum Status { + SUCCESS = "SUCCESS", + FAILURE = "FAILURE" +} + +export enum Progress { + IN_PROGRESS = "IN_PROGRESS", + COMPLETED = "COMPLETED", + STOPPED = "STOPPED" +} diff --git a/src/app/pages/entities/RulePerJob.ts b/src/app/pages/entities/RulePerJob.ts new file mode 100644 index 0000000..3ab9b1a --- /dev/null +++ b/src/app/pages/entities/RulePerJob.ts @@ -0,0 +1,20 @@ +export class RulePerJob { + rule_name: string; + rule_description: string; + rule_weight: number; + guidelines: string; + rule_status: Status; + passed_records: number; + failed_records: number; + // warnings: string[]; + // errors: string[]; + internal_error: string; + has_errors: boolean; + has_warnings: boolean; +} + +export enum Status { + SUCCESS = "SUCCESS", + FAILURE = "FAILURE", + ERROR = "ERROR" +} diff --git a/src/app/pages/oaipmh-validator/validation-analysis/oaipmh-analysis.component.html b/src/app/pages/oaipmh-validator/validation-analysis/oaipmh-analysis.component.html new file mode 100644 index 0000000..e9b9aa1 --- /dev/null +++ b/src/app/pages/oaipmh-validator/validation-analysis/oaipmh-analysis.component.html @@ -0,0 +1,249 @@ + +
No rules available
+ + + + + + + + + + + + + + + + + + + + + + + +
Rule NameFAIR PrinciplesSuccess RateStatusIssues
+
{{ruleResult.rule_name ? ruleResult.rule_name : '-'}}
+
{{ruleResult.rule_description}}
+
+ + + + + + + + - + +
{{ruleResult.passed_records | number}}/{{jobResult.numberOfRecords | number}}
+
+ +
{{ruleResult.passed_records*100/jobResult.numberOfRecords}}%
+
+
+ {{ruleResult.rule_status}} + + Warnings +
&
+ Errors + +
+ +
+
+
+ +
+
+
+
+
+ + + +
+

Validation Result Analysis

+
+ +
+ No validated metadata record yet +
+ + + +
+
No warnings available
+ +
+
+ + +
+
No errors available
+
+
Internal error
+
{{internal_error}}
+
+ +
+
Errors list ({{errors.length | number}} errors)
+ +
+ +
+
+
+
+
+ +
+
+
+
+
+
+ +
+
Guidelines
+
{{jobResult.guidelines}}
+
+
+
+
+
+
+
+ +
+
Started
+
{{jobResult.startDate | date: 'yyyy-MM-dd, HH:mm:ss'}}
+
Not yet Ended
+
{{jobResult.endDate | date: 'yyyy-MM-dd, HH:mm:ss'}}
+
+
+
+
+
+
+
+ +
+
Duration
+
+ {{jobDuration.years}} years + & + {{jobDuration.months}} months + & + {{jobDuration.days}} days + & + {{jobDuration.hours}} hours + & + {{jobDuration.minutes}} minutes + & + {{jobDuration.seconds}} seconds +
+
+
+
+
+ + + + + + + + + + + + +
+
+
+
+
+
diff --git a/src/app/pages/oaipmh-validator/validation-analysis/oaipmh-analysis.component.less b/src/app/pages/oaipmh-validator/validation-analysis/oaipmh-analysis.component.less new file mode 100644 index 0000000..3499709 --- /dev/null +++ b/src/app/pages/oaipmh-validator/validation-analysis/oaipmh-analysis.component.less @@ -0,0 +1,56 @@ +@import "~src/assets/openaire-theme/less/_import-variables"; + +@accordion-warning-border: @warning-border-color; +@accordion-danger-border: @danger-border-color; + +@analysis-portal-color: @global-primary-background; +@analysis-right-sidebar-min-width: 360px; +@analysis-right-sidebar-background: @default-color; +@analysis-right-sidebar-border-width: 2px; +@analysis-right-sidebar-border: fade(@analysis-portal-color, @global-opacity); +@analysis-header-height: @global-header-height; +@analysis-sidebar-height: calc(100vh - @analysis-header-height); + +#page_content { + background-color: #fff; +} + +.accordion-warning { + border: 1px solid @accordion-warning-border; +} + +.accordion-danger { + border: 1px solid @accordion-danger-border; +} + + +.analysis { + #analysis-center-content { + min-height: @analysis-sidebar-height; + } + + #analysis-right-sidebar { + min-width: @analysis-right-sidebar-min-width; + background: @analysis-right-sidebar-background; + border-left: @analysis-right-sidebar-border-width solid @analysis-right-sidebar-border; + + & > .uk-sticky { + height: @analysis-sidebar-height; + } + } + + & #analysis_icon .start { + stop-color: #1F88BE; + } + + & #analysis_icon .end { + stop-color: darkblue; + } + + //& .analysis-progress:extend(.uk-progress all) { + // height: 19px; + // &::-webkit-progress-value,&::-moz-progress-bar { + // background-color: @global-muted-color; + // } + //} +} diff --git a/src/app/pages/oaipmh-validator/validation-analysis/oaipmh-analysis.component.ts b/src/app/pages/oaipmh-validator/validation-analysis/oaipmh-analysis.component.ts new file mode 100644 index 0000000..8231891 --- /dev/null +++ b/src/app/pages/oaipmh-validator/validation-analysis/oaipmh-analysis.component.ts @@ -0,0 +1,178 @@ +import {Component, OnInit, ViewChild} from '@angular/core'; +import {UntypedFormGroup} from "@angular/forms"; +import {OaipmhValidatorService} from "../../../services/oaipmh-validator.service"; +import {Subscriber} from "rxjs"; +import {ActivatedRoute} from "@angular/router"; +import {RulePerJob, Status} from "../../entities/RulePerJob"; +import {Breadcrumb} from "../../../shared/utils/breadcrumbs/breadcrumbs.component"; +import {Issue} from "../../entities/Issue"; +import {JobResult} from "../../entities/JobResult"; + +export class Duration { + years: number; + months: number; + days: number; + hours: number; + minutes: number; + seconds: number; +} + +@Component({ + selector: 'app-oaipmh-analysis', + templateUrl: './oaipmh-analysis.component.html', + styleUrls: ['./oaipmh-analysis.component.less'] +}) +export class OaipmhAnalysisComponent implements OnInit { + public form: UntypedFormGroup; + public jobResult: JobResult = null; + public jobDuration: Duration = null; + public validationResult: Map; + // public analysisResult: RulePerJob[] = []; + // public successfulAnalysisResult: RulePerJob[] = []; + // public warningAnalysisResult: RulePerJob[] = []; + // public failedAnalysisResult: RulePerJob[] = []; + public warningsModalOpen: boolean = false; + public errorsModalOpen: boolean = false; + public warnings: Issue[]; + public errors: Issue[]; + public internal_error: string; + @ViewChild('warningsModal') warningsModal; + @ViewChild('errorsModal') errorsModal; + + public offset: number; + + public jobId: string = ""; + public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'Validator\'s History', route: '/oaipmh-history'}, {name: 'Result for ...'}]; + + subscriptions = []; + + constructor(private route: ActivatedRoute, private validator: OaipmhValidatorService) { + } + + ngOnInit(): void { + this.subscriptions.push(this.route.queryParams.subscribe(params => { + this.jobId = params['jobId']; + + this.validationResult = new Map; + // this.analysisResult = []; + // this.successfulAnalysisResult = []; + // this.warningAnalysisResult = []; + // this.failedAnalysisResult = []; + this.jobResult = null; + if(this.jobId) { + this.getAnalysis(); + this.getJobResult(); + } + })); + } + + ngAfterViewInit() { + if (typeof document !== 'undefined') { + if (document.getElementById("main-menu")) { + this.offset = Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--header-height')); + } else { + this.offset = 0; + } + } + } + + ngOnDestroy() { + this.subscriptions.forEach(subscription => { + if (subscription instanceof Subscriber) { + subscription.unsubscribe(); + } + }); + } + + + public getAnalysis() { + this.validator.getAnalysis(this.jobId).subscribe( + (result: RulePerJob[]) => { + console.log(result); + // this.analysisResult = result; + for(let rulePerJob of result) { + if(!this.validationResult.has(rulePerJob.guidelines)) { + this.validationResult.set(rulePerJob.guidelines, {analysisResult: [], successfulAnalysisResult: [], warningAnalysisResult: [], failedAnalysisResult: []}); + } + + this.validationResult.get(rulePerJob.guidelines).analysisResult.push(rulePerJob); + + if(rulePerJob.rule_status == Status.FAILURE || rulePerJob.rule_status == Status.ERROR) { + this.validationResult.get(rulePerJob.guidelines).failedAnalysisResult.push(rulePerJob); + } else { + if(rulePerJob.has_warnings || rulePerJob.has_errors || rulePerJob.internal_error) { + this.validationResult.get(rulePerJob.guidelines).warningAnalysisResult.push(rulePerJob); + } else { + this.validationResult.get(rulePerJob.guidelines).successfulAnalysisResult.push(rulePerJob); + } + } + } + } + ); + } + + public openWarningsModal(rule: RulePerJob) { + this.warningsModalOpen = true; + this.warningsModal.cancelButton = false; + this.warningsModal.okButton = false; + this.warningsModal.alertTitle = rule.rule_name; + this.warningsModal.open(); + } + + public openErrorsModal(rule: RulePerJob) { + this.errorsModalOpen = true; + this.errorsModal.cancelButton = false; + this.errorsModal.okButton = false; + this.errorsModal.alertTitle = rule.rule_name; + this.errorsModal.open(); + } + + getWarnings(rule: RulePerJob) { + this.warnings = []; + this.openWarningsModal(rule); + this.warningsModalOpen = true; + this.validator.getWarnings(this.jobId, rule.rule_name).subscribe( + result => { + this.warnings = result; + console.log(result); + // this.result = result; + } + ); + } + + getErrors(rule: RulePerJob) { + this.internal_error = rule.internal_error; + this.errors = []; + this.openErrorsModal(rule); + this.errorsModalOpen = true; + + if(rule.has_errors) { + this.validator.getErrors(this.jobId, rule.rule_name).subscribe( + result => { + this.errors = result; + console.log(result); + } + ); + } + } + + public getJobResult() { + this.validator.getJobResult(this.jobId).subscribe( + (result: JobResult) => { + this.jobResult = result; + let startDate = new Date(this.jobResult.startDate); + let endDate = this.jobResult.endDate ? new Date(this.jobResult.endDate) : new Date(); + this.jobDuration = new Duration(); + this.jobDuration.years = endDate.getFullYear() - startDate.getFullYear(); + this.jobDuration.months = endDate.getMonth() - startDate.getMonth(); + this.jobDuration.days = endDate.getDate() - startDate.getDate(); + this.jobDuration.hours = endDate.getHours() - startDate.getHours(); + this.jobDuration.minutes = endDate.getMinutes() - startDate.getMinutes(); + this.jobDuration.seconds = endDate.getSeconds() - startDate.getSeconds(); + console.log(this.jobDuration); + } + ); + } + + protected readonly Status = Status; +} diff --git a/src/app/pages/oaipmh-validator/validation-history/oaipmh-history.component.html b/src/app/pages/oaipmh-validator/validation-history/oaipmh-history.component.html new file mode 100644 index 0000000..508ecfc --- /dev/null +++ b/src/app/pages/oaipmh-validator/validation-history/oaipmh-history.component.html @@ -0,0 +1,189 @@ +
+
+
+
+ + +
+

Validator's History

+ +
+ No validated metadata record yet +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Base URLStartedGuidelinesStatusActions
{{result.baseUrl}}{{result.startDate | date:'yyyy-MM-dd, HH:mm:ss'}}{{result.guidelines}} + + {{result.status}} + + + {{result.progress}} + + + + + View Results + + +
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/app/pages/oaipmh-validator/validation-history/oaipmh-history.component.less b/src/app/pages/oaipmh-validator/validation-history/oaipmh-history.component.less new file mode 100644 index 0000000..3919ea2 --- /dev/null +++ b/src/app/pages/oaipmh-validator/validation-history/oaipmh-history.component.less @@ -0,0 +1,4 @@ +.uk-table-middle th { + vertical-align: middle !important; + display: table-cell; +} diff --git a/src/app/pages/oaipmh-validator/validation-history/oaipmh-history.component.ts b/src/app/pages/oaipmh-validator/validation-history/oaipmh-history.component.ts new file mode 100644 index 0000000..7c18be8 --- /dev/null +++ b/src/app/pages/oaipmh-validator/validation-history/oaipmh-history.component.ts @@ -0,0 +1,53 @@ +import {Component, OnInit, ViewChild} from '@angular/core'; +import {OaipmhValidatorService} from "../../../services/oaipmh-validator.service"; +import {Status} from "../../entities/RuleInfo"; +import {JobResult, Progress} from "../../entities/JobResult"; +import {ActivatedRoute} from "@angular/router"; +import {Breadcrumb} from "../../../shared/utils/breadcrumbs/breadcrumbs.component"; +import {Subscriber} from "rxjs"; + +@Component({ + selector: 'app-oaipmh-history', + templateUrl: './oaipmh-history.component.html', + styleUrls: ['./oaipmh-history.component.less'] +}) +export class OaipmhHistoryComponent implements OnInit { + public result: JobResult; + public jobId: string = ""; + public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'Validator\'s History'}]; + protected readonly Progress = Progress; + + subscriptions = []; + + constructor(private route: ActivatedRoute, private validator: OaipmhValidatorService) {} + + ngOnInit(): void { + this.subscriptions.push(this.route.queryParams.subscribe(params => { + this.jobId = params['jobId']; + this.result = null; + if(!this.jobId) { + this.jobId = "825"; + } + this.getJobResult(); + + })); + } + + ngOnDestroy() { + this.subscriptions.forEach(subscription => { + if (subscription instanceof Subscriber) { + subscription.unsubscribe(); + } + }); + } + + public getJobResult() { + this.validator.getJobResult(this.jobId).subscribe( + (result: JobResult) => { + this.result = result; + } + ); + } + + protected readonly Status = Status; +} diff --git a/src/app/pages/oaipmh-validator/validation-settings/oaipmh-validator.component.html b/src/app/pages/oaipmh-validator/validation-settings/oaipmh-validator.component.html new file mode 100644 index 0000000..f0644e4 --- /dev/null +++ b/src/app/pages/oaipmh-validator/validation-settings/oaipmh-validator.component.html @@ -0,0 +1 @@ +under development... diff --git a/src/app/pages/oaipmh-validator/validation-settings/oaipmh-validator.component.less b/src/app/pages/oaipmh-validator/validation-settings/oaipmh-validator.component.less new file mode 100644 index 0000000..e69de29 diff --git a/src/app/pages/oaipmh-validator/validation-settings/oaipmh-validator.component.ts b/src/app/pages/oaipmh-validator/validation-settings/oaipmh-validator.component.ts new file mode 100644 index 0000000..a7d4aa5 --- /dev/null +++ b/src/app/pages/oaipmh-validator/validation-settings/oaipmh-validator.component.ts @@ -0,0 +1,15 @@ +import {Component, OnInit, ViewChild} from '@angular/core'; +import {OaipmhValidatorService} from "../../../services/oaipmh-validator.service"; + +@Component({ + selector: 'app-oaipmh-validator', + templateUrl: './oaipmh-validator.component.html', + styleUrls: ['./oaipmh-validator.component.less'] +}) +export class OaipmhValidatorComponent implements OnInit { + constructor(private validator: OaipmhValidatorService) {} + + ngOnInit() { + console.log("under development..."); + } +} diff --git a/src/app/pages/single-record-validator/single-record-validator.component.ts b/src/app/pages/single-record-validator/single-record-validator.component.ts index 652e9b7..f721f26 100644 --- a/src/app/pages/single-record-validator/single-record-validator.component.ts +++ b/src/app/pages/single-record-validator/single-record-validator.component.ts @@ -1,6 +1,6 @@ import {Component, OnInit, ViewChild} from '@angular/core'; import {UntypedFormBuilder, UntypedFormGroup, Validators} from "@angular/forms"; -import {SingleRecordValidatorService} from "./single-record-validator.service"; +import {SingleRecordValidatorService} from "../../services/single-record-validator.service"; import {Option} from "../../shared/utils/input/input.component"; import {RuleInfo, Status} from "../entities/RuleInfo"; import {XmlValidationResponse} from "../entities/XmlValidationResponse"; diff --git a/src/app/services/oaipmh-validator.service.ts b/src/app/services/oaipmh-validator.service.ts new file mode 100644 index 0000000..49605fe --- /dev/null +++ b/src/app/services/oaipmh-validator.service.ts @@ -0,0 +1,31 @@ +import {Injectable} from "@angular/core"; +import {HttpClient} from "@angular/common/http"; +import {environment} from "../../environments/environment"; + +@Injectable({ + providedIn: "root" +}) +export class OaipmhValidatorService { + + constructor(private http: HttpClient) {} + + getAnalysis(jobId: string) { + let url: string = environment.validatorAPI + "reports/getResultsByJobId?jobId="+jobId; + return this.http.get(url); + } + + getWarnings(jobId: string, ruleName: string) { + let url: string = environment.validatorAPI + "reports/getWarningsReport?jobId="+jobId+"&ruleName="+ruleName; + return this.http.get(url); + } + + getErrors(jobId: string, ruleName: string) { + let url:string = environment.validatorAPI + "reports/getErrorsReport?jobId="+jobId+"&ruleName="+ruleName; + return this.http.get(url); + } + + getJobResult(jobId: string) { + let url: string = environment.validatorAPI + "reports/getJobResult?jobId="+jobId; + return this.http.get(url); + } +} diff --git a/src/app/pages/single-record-validator/single-record-validator.service.ts b/src/app/services/single-record-validator.service.ts similarity index 94% rename from src/app/pages/single-record-validator/single-record-validator.service.ts rename to src/app/services/single-record-validator.service.ts index f157745..9db9913 100644 --- a/src/app/pages/single-record-validator/single-record-validator.service.ts +++ b/src/app/services/single-record-validator.service.ts @@ -1,7 +1,7 @@ import {Injectable} from "@angular/core"; import {HttpClient, HttpHeaders} from "@angular/common/http"; import {Observable} from "rxjs"; -import {environment} from "../../../environments/environment"; +import {environment} from "../../environments/environment"; @Injectable({ providedIn: "root" diff --git a/src/app/shared/topmenu/topmenu.component.html b/src/app/shared/topmenu/topmenu.component.html index 6193646..eba980f 100644 --- a/src/app/shared/topmenu/topmenu.component.html +++ b/src/app/shared/topmenu/topmenu.component.html @@ -95,7 +95,20 @@ diff --git a/src/app/shared/utils/breadcrumbs/breadcrumbs.component.ts b/src/app/shared/utils/breadcrumbs/breadcrumbs.component.ts new file mode 100644 index 0000000..6c9803e --- /dev/null +++ b/src/app/shared/utils/breadcrumbs/breadcrumbs.component.ts @@ -0,0 +1,24 @@ +import {Component, Input} from "@angular/core"; + +export interface Breadcrumb { + name: string; + route?: string; + keepFormat?: boolean +} + +@Component({ + selector: 'breadcrumbs', + template: ` + ` +}) +export class BreadcrumbsComponent { + + @Input() public light: boolean = false; + @Input() public breadcrumbs: Breadcrumb[] = []; + @Input() public addClass = ""; +} diff --git a/src/app/shared/utils/breadcrumbs/breadcrumbs.module.ts b/src/app/shared/utils/breadcrumbs/breadcrumbs.module.ts new file mode 100644 index 0000000..47b8b56 --- /dev/null +++ b/src/app/shared/utils/breadcrumbs/breadcrumbs.module.ts @@ -0,0 +1,11 @@ +import {NgModule} from "@angular/core"; +import {CommonModule} from "@angular/common"; +import {BreadcrumbsComponent} from "./breadcrumbs.component"; +import {RouterModule} from "@angular/router"; + +@NgModule({ + imports: [CommonModule, RouterModule], + declarations: [BreadcrumbsComponent], + exports: [BreadcrumbsComponent] +}) +export class BreadcrumbsModule {} \ No newline at end of file diff --git a/src/assets/common-assets b/src/assets/common-assets index 9141b4c..2fd5784 160000 --- a/src/assets/common-assets +++ b/src/assets/common-assets @@ -1 +1 @@ -Subproject commit 9141b4c9c3363ceb8a690a361d483268eb7eabe4 +Subproject commit 2fd57843f85125e54adfb95b35776755037ea359 diff --git a/src/assets/openaire-theme b/src/assets/openaire-theme index 143c271..2fffe0f 160000 --- a/src/assets/openaire-theme +++ b/src/assets/openaire-theme @@ -1 +1 @@ -Subproject commit 143c2719ec972c8456817c7c1dd17f96593eeddf +Subproject commit 2fffe0fa672adcf5577461d10c30e34b00308c85 diff --git a/src/assets/validator-custom.less b/src/assets/validator-custom.less index 2ad0031..45919a4 100644 --- a/src/assets/validator-custom.less +++ b/src/assets/validator-custom.less @@ -2,6 +2,9 @@ @aggregator-secondary-background: #5ABDF9; @global-primary-gradient: linear-gradient(101deg, @aggregator-primary-background 0%, @aggregator-secondary-background 100%); +@progress-height: 20px; +@progress-bar-background: @global-muted-color; + //.sidebar_main_swipe #sidebar_main #sidebar_content { // width: 280px; // position: fixed; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 64c4651..27c36e9 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -4,7 +4,7 @@ export const environment = { production: false, - validatorAPI: "http://duffy.di.uoa.gr:19580/uoa-validator-api/" + validatorAPI: "http://rudie.di.uoa.gr:9200/" }; /*