From b43fe9cc63931f8c45f93261f235d0608a855a83 Mon Sep 17 00:00:00 2001 From: elinuxhenrik Date: Wed, 12 May 2021 15:19:32 +0200 Subject: [PATCH] Updated Control Panel for changed ECS NBI Change-Id: I7faf615fafda107e8b4dc5d2d97f1dbcd9297881 Isue-ID: NONRTRIC-514 Signed-off-by: elinuxhenrik --- nonrtric-gateway/config/application.yaml | 2 +- webapp-frontend/nginx.conf | 2 +- webapp-frontend/proxy.conf.json | 2 +- .../jobs-list/jobs-list.component.html | 10 +-- .../jobs-list/jobs-list.component.spec.ts | 52 ++++++------- .../jobs-list/jobs-list.component.ts | 42 +++++------ .../producers-list/producers-list.component.html | 10 +-- .../producers-list.component.spec.ts | 40 +++++----- .../producers-list/producers-list.component.ts | 64 ++++++++-------- webapp-frontend/src/app/interceptor.mock.ts | 85 +++++++++++----------- webapp-frontend/src/app/interceptor.spec.ts | 10 +-- .../interfaces/{ei.types.ts => producer.types.ts} | 16 ++-- webapp-frontend/src/app/mock/ei-producer1.json | 3 - webapp-frontend/src/app/mock/ei-producer2.json | 3 - ...{ei-jobs-producer1.json => jobs-producer1.json} | 18 ++--- ...{ei-jobs-producer2.json => jobs-producer2.json} | 12 +-- ...producer-status1.json => producer-status1.json} | 0 ...producer-status2.json => producer-status2.json} | 0 webapp-frontend/src/app/mock/producer1.json | 3 + webapp-frontend/src/app/mock/producer2.json | 3 + .../mock/{ei-producerids.json => producerids.json} | 0 .../policy-instance.component.spec.ts | 10 +-- .../policy/policy-type/policy-type.component.ts | 2 +- .../src/app/ric-config/ric-config.component.ts | 4 +- ...ei.service.spec.ts => producer.service.spec.ts} | 40 +++++----- .../ei/{ei.service.ts => producer.service.ts} | 24 +++--- .../src/app/services/policy/policy.service.spec.ts | 2 +- .../src/app/services/policy/policy.service.ts | 2 +- 28 files changed, 232 insertions(+), 229 deletions(-) rename webapp-frontend/src/app/interfaces/{ei.types.ts => producer.types.ts} (83%) delete mode 100644 webapp-frontend/src/app/mock/ei-producer1.json delete mode 100644 webapp-frontend/src/app/mock/ei-producer2.json rename webapp-frontend/src/app/mock/{ei-jobs-producer1.json => jobs-producer1.json} (68%) rename webapp-frontend/src/app/mock/{ei-jobs-producer2.json => jobs-producer2.json} (68%) rename webapp-frontend/src/app/mock/{ei-producer-status1.json => producer-status1.json} (100%) rename webapp-frontend/src/app/mock/{ei-producer-status2.json => producer-status2.json} (100%) create mode 100644 webapp-frontend/src/app/mock/producer1.json create mode 100644 webapp-frontend/src/app/mock/producer2.json rename webapp-frontend/src/app/mock/{ei-producerids.json => producerids.json} (100%) rename webapp-frontend/src/app/services/ei/{ei.service.spec.ts => producer.service.spec.ts} (78%) rename webapp-frontend/src/app/services/ei/{ei.service.ts => producer.service.ts} (70%) diff --git a/nonrtric-gateway/config/application.yaml b/nonrtric-gateway/config/application.yaml index 715e689..656ebaf 100644 --- a/nonrtric-gateway/config/application.yaml +++ b/nonrtric-gateway/config/application.yaml @@ -33,7 +33,7 @@ spring: - id: A1-EI uri: https://localhost:8434 predicates: - - Path=/ei-producer/** + - Path=/data-producer/** management: endpoint: gateway: diff --git a/webapp-frontend/nginx.conf b/webapp-frontend/nginx.conf index 2414bde..916caef 100644 --- a/webapp-frontend/nginx.conf +++ b/webapp-frontend/nginx.conf @@ -12,7 +12,7 @@ http { set $upstream nonrtric-gateway; proxy_pass http://$upstream:9090; } - location /ei-producer/{ + location /data-producer/{ set $upstream nonrtric-gateway; proxy_pass http://$upstream:9090; } diff --git a/webapp-frontend/proxy.conf.json b/webapp-frontend/proxy.conf.json index d704341..becd017 100644 --- a/webapp-frontend/proxy.conf.json +++ b/webapp-frontend/proxy.conf.json @@ -3,7 +3,7 @@ "target": "http://localhost:9090", "secure": false }, - "/ei-producer": { + "/data-producer": { "target": "http://localhost:9090", "secure": false } diff --git a/webapp-frontend/src/app/ei-coordinator/jobs-list/jobs-list.component.html b/webapp-frontend/src/app/ei-coordinator/jobs-list/jobs-list.component.html index 1f5fd43..aca0931 100644 --- a/webapp-frontend/src/app/ei-coordinator/jobs-list/jobs-list.component.html +++ b/webapp-frontend/src/app/ei-coordinator/jobs-list/jobs-list.component.html @@ -36,7 +36,7 @@ limitations under the License. - {{eiJob.jobId}} + {{job.jobId}} @@ -49,7 +49,7 @@ limitations under the License. - {{eiJob.prodId}} + {{job.prodId}} @@ -62,7 +62,7 @@ limitations under the License. - {{this.getJobTypeId(eiJob)}} + {{this.getJobTypeId(job)}} @@ -75,7 +75,7 @@ limitations under the License. - {{this.getJobOwner(eiJob)}} + {{this.getJobOwner(job)}} @@ -88,7 +88,7 @@ limitations under the License. - {{eiJob.targetUri}} + {{job.targetUri}} diff --git a/webapp-frontend/src/app/ei-coordinator/jobs-list/jobs-list.component.spec.ts b/webapp-frontend/src/app/ei-coordinator/jobs-list/jobs-list.component.spec.ts index e76f20b..f5021df 100644 --- a/webapp-frontend/src/app/ei-coordinator/jobs-list/jobs-list.component.spec.ts +++ b/webapp-frontend/src/app/ei-coordinator/jobs-list/jobs-list.component.spec.ts @@ -41,8 +41,8 @@ import { MatTableModule } from "@angular/material/table"; import { MatTableHarness } from "@angular/material/table/testing"; import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; import { of } from "rxjs/observable/of"; -import { EIJob } from "@interfaces/ei.types"; -import { EIService } from "@services/ei/ei.service"; +import { JobInfo } from "@interfaces/producer.types"; +import { ProducerService } from "@services/ei/producer.service"; import { UiService } from "@services/ui/ui.service"; import { Job, JobsListComponent } from "./jobs-list.component"; @@ -51,18 +51,18 @@ import { Subscription } from "rxjs"; let component: JobsListComponent; let fixture: ComponentFixture; -const eijob1 = { - ei_job_identity: "job1", - ei_type_identity: "type1", +const jobInfo1 = { + info_job_identity: "job1", + info_type_identity: "type1", owner: "owner1", target_uri: "http://one", -} as EIJob; -const eijob2 = { - ei_job_identity: "job2", - ei_type_identity: "type2", +} as JobInfo; +const jobInfo2 = { + info_job_identity: "job2", + info_type_identity: "type2", owner: "owner2", target_uri: "http://two", -} as EIJob; +} as JobInfo; const job1 = { jobId: "job1", @@ -115,7 +115,7 @@ describe("JobsListComponent", () => { ], schemas: [CUSTOM_ELEMENTS_SCHEMA], declarations: [JobsListComponent], - providers: [{ provide: EIService, useValue: spy }, UiService], + providers: [{ provide: ProducerService, useValue: spy }, UiService], }) .compileComponents() .then(() => { @@ -238,18 +238,18 @@ describe("JobsListComponent", () => { it("should display default values for non required properties ", fakeAsync(() => { const jobMissingProperties = { - ei_job_identity: "job1", - ei_job_data: { + info_job_identity: "job1", + info_job_data: { jobparam2: "value2_job2", jobparam3: "value3_job2", jobparam1: "value1_job2", }, target_uri: "http://one", - } as EIJob; + } as JobInfo; - let eiServiceSpy = TestBed.inject(EIService) as jasmine.SpyObj; - eiServiceSpy.getProducerIds.and.returnValue(of(["producer1"])); - eiServiceSpy.getJobsForProducer.and.returnValue( + let producerServiceSpy = TestBed.inject(ProducerService) as jasmine.SpyObj; + producerServiceSpy.getProducerIds.and.returnValue(of(["producer1"])); + producerServiceSpy.getJobsForProducer.and.returnValue( of([jobMissingProperties]) ); @@ -525,14 +525,14 @@ describe("JobsListComponent", () => { describe("#paging", () => { it("should work properly on the table", fakeAsync(() => { - let eiServiceSpy = TestBed.inject( - EIService - ) as jasmine.SpyObj; - eiServiceSpy.getProducerIds.and.returnValue( + let producerServiceSpy = TestBed.inject( + ProducerService + ) as jasmine.SpyObj; + producerServiceSpy.getProducerIds.and.returnValue( of(["producer1", "producer2"]) ); - eiServiceSpy.getJobsForProducer.and.returnValue( - of([eijob1, eijob2, eijob1]) + producerServiceSpy.getJobsForProducer.and.returnValue( + of([jobInfo1, jobInfo2, jobInfo1]) ); tick(0); @@ -570,7 +570,7 @@ describe("JobsListComponent", () => { }); function setServiceSpy() { - let eiServiceSpy = TestBed.inject(EIService) as jasmine.SpyObj; - eiServiceSpy.getProducerIds.and.returnValue(of(["producer1", "producer2"])); - eiServiceSpy.getJobsForProducer.and.returnValue(of([eijob1, eijob2])); + let producerServiceSpy = TestBed.inject(ProducerService) as jasmine.SpyObj; + producerServiceSpy.getProducerIds.and.returnValue(of(["producer1", "producer2"])); + producerServiceSpy.getJobsForProducer.and.returnValue(of([jobInfo1, jobInfo2])); } diff --git a/webapp-frontend/src/app/ei-coordinator/jobs-list/jobs-list.component.ts b/webapp-frontend/src/app/ei-coordinator/jobs-list/jobs-list.component.ts index 178400e..f06202c 100644 --- a/webapp-frontend/src/app/ei-coordinator/jobs-list/jobs-list.component.ts +++ b/webapp-frontend/src/app/ei-coordinator/jobs-list/jobs-list.component.ts @@ -25,8 +25,8 @@ import { MatTableDataSource } from "@angular/material/table"; import { EMPTY, forkJoin, Subscription, timer } from "rxjs"; import { BehaviorSubject } from "rxjs/BehaviorSubject"; import { mergeMap, finalize, map, tap, switchMap } from "rxjs/operators"; -import { EIJob } from "@interfaces/ei.types"; -import { EIService } from "@services/ei/ei.service"; +import { JobInfo } from "@interfaces/producer.types"; +import { ProducerService } from "@services/ei/producer.service"; import { UiService } from "@services/ui/ui.service"; export interface Job { @@ -58,7 +58,7 @@ export class JobsListComponent implements OnInit { checked: boolean = false; firstTime: boolean = true; - constructor(private eiSvc: EIService, private ui: UiService) { + constructor(private producerService: ProducerService, private ui: UiService) { this.jobForm = new FormGroup({ jobId: new FormControl(""), typeId: new FormControl(""), @@ -98,10 +98,10 @@ export class JobsListComponent implements OnInit { dataSubscription(): Subscription { let prodId = []; - const jobs$ = this.eiSvc.getProducerIds().pipe( + const jobs$ = this.producerService.getProducerIds().pipe( tap((data) => (prodId = data)), mergeMap((prodIds) => - forkJoin(prodIds.map((id) => this.eiSvc.getJobsForProducer(id))) + forkJoin(prodIds.map((id) => this.producerService.getJobsForProducer(id))) ), finalize(() => this.loadingSubject$.next(false)) ); @@ -180,16 +180,16 @@ export class JobsListComponent implements OnInit { return data.toLowerCase().includes(transformedFilter); } - getJobTypeId(eiJob: Job): string { - if (eiJob.typeId) { - return eiJob.typeId; + getJobTypeId(job: Job): string { + if (job.typeId) { + return job.typeId; } return "< No type >"; } - getJobOwner(eiJob: Job): string { - if (eiJob.owner) { - return eiJob.owner; + getJobOwner(job: Job): string { + if (job.owner) { + return job.owner; } return "< No owner >"; } @@ -198,7 +198,7 @@ export class JobsListComponent implements OnInit { return this.jobsSubject$.value; } - private extractJobs(prodId: number[], res: EIJob[][]) { + private extractJobs(prodId: number[], res: JobInfo[][]) { this.clearFilter(); let jobList = []; prodId.forEach((element, index) => { @@ -213,7 +213,7 @@ export class JobsListComponent implements OnInit { return jobList; } - createJobList(prodId: any[], result: EIJob[][]) { + createJobList(prodId: any[], result: JobInfo[][]) { let jobList = []; prodId.forEach((element, index) => { let jobs = result[index]; @@ -222,14 +222,14 @@ export class JobsListComponent implements OnInit { return jobList; } - createJob(element: any, job: EIJob): any { - let eiJob = {}; - eiJob.jobId = job.ei_job_identity; - eiJob.typeId = job.ei_type_identity; - eiJob.owner = job.owner; - eiJob.targetUri = job.target_uri; - eiJob.prodId = element; - return eiJob; + createJob(element: any, job: JobInfo): any { + let infoJob = {}; + infoJob.jobId = job.info_job_identity; + infoJob.typeId = job.info_type_identity; + infoJob.owner = job.owner; + infoJob.targetUri = job.target_uri; + infoJob.prodId = element; + return infoJob; } refreshDataClick() { diff --git a/webapp-frontend/src/app/ei-coordinator/producers-list/producers-list.component.html b/webapp-frontend/src/app/ei-coordinator/producers-list/producers-list.component.html index 8982c05..9246501 100644 --- a/webapp-frontend/src/app/ei-coordinator/producers-list/producers-list.component.html +++ b/webapp-frontend/src/app/ei-coordinator/producers-list/producers-list.component.html @@ -26,13 +26,13 @@ limitations under the License.
- + Producer ID
- {{eiProducer.ei_producer_id}} + {{producer.producer_id}} @@ -40,13 +40,13 @@ limitations under the License.
- + Producer types
- {{this.getProducerTypes(eiProducer)}} + {{this.getProducerTypes(producer)}}
@@ -60,7 +60,7 @@ limitations under the License. - {{this.getProducerStatus(eiProducer)}} + {{this.getProducerStatus(producer)}} diff --git a/webapp-frontend/src/app/ei-coordinator/producers-list/producers-list.component.spec.ts b/webapp-frontend/src/app/ei-coordinator/producers-list/producers-list.component.spec.ts index 77f1cb8..d7542e8 100644 --- a/webapp-frontend/src/app/ei-coordinator/producers-list/producers-list.component.spec.ts +++ b/webapp-frontend/src/app/ei-coordinator/producers-list/producers-list.component.spec.ts @@ -5,8 +5,8 @@ import { HarnessLoader } from '@angular/cdk/testing'; import { MatTableHarness } from '@angular/material/table/testing'; import { MatSortHarness } from '@angular/material/sort/testing'; import { ProducersListComponent } from "./producers-list.component"; -import { EIService } from '@services/ei/ei.service'; -import { EIProducer, OperationalState, ProducerRegistrationInfo, ProducerStatus } from '@interfaces/ei.types'; +import { ProducerService } from '@services/ei/producer.service'; +import { Producer, OperationalState, ProducerRegistrationInfo, ProducerStatus } from '@interfaces/producer.types'; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { ReactiveFormsModule } from '@angular/forms'; import { MatIconModule } from '@angular/material/icon'; @@ -42,7 +42,7 @@ describe('ProducersListComponent', () => { ProducersListComponent ], providers: [ - { provide: EIService, useValue: spy }, + { provide: ProducerService, useValue: spy }, UiService, ] }) @@ -62,19 +62,19 @@ describe('ProducersListComponent', () => { it('should loadProducers', () => { const producer1 = { - ei_producer_id: 'producer1', - ei_producer_types: ['type1', 'type2'], + producer_id: 'producer1', + producer_types: ['type1', 'type2'], status: 'ENABLED' - } as EIProducer; + } as Producer; const producer2 = { - ei_producer_id: 'producer2', - ei_producer_types: ['type2', 'type3'], + producer_id: 'producer2', + producer_types: ['type2', 'type3'], status: 'DISABLED' - } as EIProducer; + } as Producer; setServiceSpy(); component.loadProducers(); - const actualProducers: EIProducer[] = component.eiProducers(); + const actualProducers: Producer[] = component.producers(); expect(actualProducers).toEqual([producer1, producer2]); }); @@ -121,11 +121,11 @@ describe('ProducersListComponent', () => { }); it('should display defaults values for non required properties', async () => { - let eiServiceSpy = TestBed.inject(EIService) as jasmine.SpyObj; + let producerServiceSpy = TestBed.inject(ProducerService) as jasmine.SpyObj; - eiServiceSpy.getProducerIds.and.returnValue(of(['producer1'])); - eiServiceSpy.getProducer.and.returnValues(of({} as ProducerRegistrationInfo)); - eiServiceSpy.getProducerStatus.and.returnValues(of({} as ProducerStatus)); + producerServiceSpy.getProducerIds.and.returnValue(of(['producer1'])); + producerServiceSpy.getProducer.and.returnValues(of({} as ProducerRegistrationInfo)); + producerServiceSpy.getProducerStatus.and.returnValues(of({} as ProducerStatus)); component.ngOnInit(); const expectedProducerRow = { id: 'producer1', types: '< No types >', status: '< No status >' }; @@ -247,10 +247,10 @@ describe('ProducersListComponent', () => { function setServiceSpy() { let producerRegInfo1 = { - supported_ei_types: ['type1', 'type2'] + supported_info_types: ['type1', 'type2'] } as ProducerRegistrationInfo; let producerRegInfo2 = { - supported_ei_types: ['type2', 'type3'] + supported_info_types: ['type2', 'type3'] } as ProducerRegistrationInfo; let producerStatus1 = { operational_state: OperationalState.ENABLED @@ -259,11 +259,11 @@ function setServiceSpy() { operational_state: OperationalState.DISABLED } as ProducerStatus; - let eiServiceSpy = TestBed.inject(EIService) as jasmine.SpyObj; + let producerServiceSpy = TestBed.inject(ProducerService) as jasmine.SpyObj; - eiServiceSpy.getProducerIds.and.returnValue(of(['producer1', 'producer2'])); - eiServiceSpy.getProducer.and.returnValues(of(producerRegInfo1), of(producerRegInfo2)); - eiServiceSpy.getProducerStatus.and.returnValues(of(producerStatus1), of(producerStatus2)); + producerServiceSpy.getProducerIds.and.returnValue(of(['producer1', 'producer2'])); + producerServiceSpy.getProducer.and.returnValues(of(producerRegInfo1), of(producerRegInfo2)); + producerServiceSpy.getProducerStatus.and.returnValues(of(producerStatus1), of(producerStatus2)); } diff --git a/webapp-frontend/src/app/ei-coordinator/producers-list/producers-list.component.ts b/webapp-frontend/src/app/ei-coordinator/producers-list/producers-list.component.ts index fa4e609..725117d 100644 --- a/webapp-frontend/src/app/ei-coordinator/producers-list/producers-list.component.ts +++ b/webapp-frontend/src/app/ei-coordinator/producers-list/producers-list.component.ts @@ -24,8 +24,8 @@ import { MatTableDataSource } from '@angular/material/table'; import { forkJoin, of } from 'rxjs'; import { BehaviorSubject } from 'rxjs/BehaviorSubject'; import { mergeMap, finalize } from 'rxjs/operators'; -import { EIService } from '@services/ei/ei.service'; -import { EIProducer } from '@interfaces/ei.types'; +import { ProducerService } from '@services/ei/producer.service'; +import { Producer } from '@interfaces/producer.types'; import { UiService } from '@services/ui/ui.service'; @Component({ @@ -37,21 +37,21 @@ export class ProducersListComponent implements OnInit { @ViewChild(MatSort) sort: MatSort; - producersDataSource: MatTableDataSource; + producersDataSource: MatTableDataSource; producerForm: FormGroup; darkMode: boolean; private loadingSubject = new BehaviorSubject(false); - private producerSubject = new BehaviorSubject([]); + private producerSubject = new BehaviorSubject([]); public loading$ = this.loadingSubject.asObservable(); constructor( - private eiSvc: EIService, + private producerService: ProducerService, private ui: UiService) { this.producerForm = new FormGroup({ - ei_producer_id: new FormControl(''), - ei_producer_types: new FormControl(''), + producer_id: new FormControl(''), + producer_types: new FormControl(''), status: new FormControl('') }); } @@ -59,14 +59,14 @@ export class ProducersListComponent implements OnInit { ngOnInit(): void { this.loadProducers(); this.producerSubject.subscribe((data) => { - this.producersDataSource = new MatTableDataSource(data); + this.producersDataSource = new MatTableDataSource(data); this.producersDataSource.filterPredicate = ((data, filter) => { let searchTerms = JSON.parse(filter); - return this.isDataIncluding(data.ei_producer_id, searchTerms.ei_producer_id) - && this.isDataIncluding(data.ei_producer_types.join(','), searchTerms.ei_producer_types) + return this.isDataIncluding(data.producer_id, searchTerms.producer_id) + && this.isDataIncluding(data.producer_types.join(','), searchTerms.producer_types) && this.isDataIncluding(data.status, searchTerms.status); - }) as (data: EIProducer, filter: any) => boolean; + }) as (data: Producer, filter: any) => boolean; }); this.producerForm.valueChanges.subscribe(value => { @@ -90,18 +90,18 @@ export class ProducersListComponent implements OnInit { } clearFilter() { - this.producerForm.get('ei_producer_id').setValue(''); - this.producerForm.get('ei_producer_types').setValue(''); + this.producerForm.get('producer_id').setValue(''); + this.producerForm.get('producer_types').setValue(''); this.producerForm.get('status').setValue(''); } sortProducers(sort: Sort) { const data = this.producersDataSource.data - data.sort((a: EIProducer, b: EIProducer) => { + data.sort((a: Producer, b: Producer) => { const isAsc = sort.direction === 'asc'; switch (sort.active) { - case 'id': return this.compare(a.ei_producer_id, b.ei_producer_id, isAsc); - case 'types': return this.compare(a.ei_producer_types, b.ei_producer_types, isAsc); + case 'id': return this.compare(a.producer_id, b.producer_id, isAsc); + case 'types': return this.compare(a.producer_types, b.producer_types, isAsc); case 'status': return this.compare(a.status, b.status, isAsc); default: return 0; } @@ -117,21 +117,21 @@ export class ProducersListComponent implements OnInit { event.stopPropagation(); } - getProducerTypes(eiProducer: EIProducer): string[] { - if (eiProducer.ei_producer_types) { - return eiProducer.ei_producer_types; + getProducerTypes(producer: Producer): string[] { + if (producer.producer_types) { + return producer.producer_types; } return ['< No types >']; } - getProducerStatus(eiProducer: EIProducer): string { - if (eiProducer.status) { - return eiProducer.status; + getProducerStatus(producer: Producer): string { + if (producer.status) { + return producer.status; } return '< No status >'; } - public eiProducers(): EIProducer[] { + public producers(): Producer[] { return this.producerSubject.value; } @@ -139,28 +139,28 @@ export class ProducersListComponent implements OnInit { this.loadingSubject.next(true); let producers = []; - this.eiSvc.getProducerIds().pipe( + this.producerService.getProducerIds().pipe( mergeMap(prodIds => forkJoin(prodIds.map(id => { return forkJoin([ of(id), - this.eiSvc.getProducer(id), - this.eiSvc.getProducerStatus(id) + this.producerService.getProducer(id), + this.producerService.getProducerStatus(id) ]) }) )), finalize(() => this.loadingSubject.next(false)), ).subscribe(result => { producers = result.map(producer => { - let eiProducer = {}; - eiProducer.ei_producer_id = producer[0]; - if (producer[1].supported_ei_types) { - eiProducer.ei_producer_types = producer[1].supported_ei_types; + let producerObj = {}; + producerObj.producer_id = producer[0]; + if (producer[1].supported_info_types) { + producerObj.producer_types = producer[1].supported_info_types; } if (producer[2].operational_state) { - eiProducer.status = producer[2].operational_state.toString(); + producerObj.status = producer[2].operational_state.toString(); } - return eiProducer; + return producerObj; }); this.producerSubject.next(producers); }, err => { diff --git a/webapp-frontend/src/app/interceptor.mock.ts b/webapp-frontend/src/app/interceptor.mock.ts index b1b81eb..b0603c9 100644 --- a/webapp-frontend/src/app/interceptor.mock.ts +++ b/webapp-frontend/src/app/interceptor.mock.ts @@ -35,13 +35,13 @@ import * as policyinstance2 from "./mock/policy-instance-2.json"; import * as noTypePolicyinstance from "./mock/policy-instance-notype.json"; import * as policyinstance1Status from "./mock/policy-instance-1-status.json"; import * as policyinstance2Status from "./mock/policy-instance-2-status.json"; -import * as eijobsProd1 from "./mock/ei-jobs-producer1.json"; -import * as eijobsProd2 from "./mock/ei-jobs-producer2.json"; -import * as eiProducerIds from "./mock/ei-producerids.json"; -import * as eiproducer1 from "./mock/ei-producer1.json"; -import * as eiproducer2 from "./mock/ei-producer2.json"; -import * as eiproducerstatus1 from "./mock/ei-producer-status1.json"; -import * as eiproducerstatus2 from "./mock/ei-producer-status2.json"; +import * as jobsProd1 from "./mock/jobs-producer1.json"; +import * as jobsProd2 from "./mock/jobs-producer2.json"; +import * as producerIds from "./mock/producerids.json"; +import * as producer1 from "./mock/producer1.json"; +import * as producer2 from "./mock/producer2.json"; +import * as producerstatus1 from "./mock/producer-status1.json"; +import * as producerstatus2 from "./mock/producer-status2.json"; import * as policytypes1 from "./mock/policy-type1.json"; import * as policytypes0 from "./mock/policy-type0.json"; import * as policyinstanceedit from "./mock/policy-instance-edit.json"; @@ -50,110 +50,113 @@ import * as ric2 from "./mock/ric2.json"; import * as ricconfig from "./mock/ric-configuration.json"; import { delay } from "rxjs/operators"; +const POLICY_PATH = "/a1-policy/v2" +const INFO_PATH = "/data-producer/v1" + const urls = [ { - url: "/a1-policy/v2/policy-types/1", + url: POLICY_PATH + "/policy-types/1", json: policytypes1, }, { - url: "/a1-policy/v2/policy-types/0", + url: POLICY_PATH + "/policy-types/0", json: policytypes0, }, { - url: "/a1-policy/v2/policies?policytype_id=", + url: POLICY_PATH + "/policies?policytype_id=", json: noTypePolicies, }, { - url: "/a1-policy/v2/policies?policytype_id=0", + url: POLICY_PATH + "/policies?policytype_id=0", json: type0Policies, }, { - url: "/a1-policy/v2/policies?policytype_id=1", + url: POLICY_PATH + "/policies?policytype_id=1", json: type1Policies, }, { - url: "/a1-policy/v2/policies/2001", + url: POLICY_PATH + "/policies/2001", json: noTypePolicyinstance, }, { - url: "/a1-policy/v2/policies/2000", + url: POLICY_PATH + "/policies/2000", json: policyinstance1, }, { - url: "/a1-policy/v2/policies/2100", + url: POLICY_PATH + "/policies/2100", json: policyinstance2, }, { - url: "/a1-policy/v2/policies/2001/status", + url: POLICY_PATH + "/policies/2001/status", json: policyinstance1Status, }, { - url: "/a1-policy/v2/policies/2000/status", + url: POLICY_PATH + "/policies/2000/status", json: policyinstance1Status, }, { - url: "/a1-policy/v2/policies/2100/status", + url: POLICY_PATH + "/policies/2100/status", json: policyinstance2Status, }, { - url: "/a1-policy/v2/policies/2000?type=", + url: POLICY_PATH + "/policies/2000?type=", json: policyinstanceedit, }, { - url: "/a1-policy/v2/policies/2100?type=", + url: POLICY_PATH + "/policies/2100?type=", json: policyinstanceedit, }, { - url: "/a1-policy/v2/policies/2000?type=1", + url: POLICY_PATH + "/policies/2000?type=1", json: policyinstanceedit, }, { - url: "/a1-policy/v2/policies/2100?type=1", + url: POLICY_PATH + "/policies/2100?type=1", json: policyinstanceedit, }, { - url: "/a1-policy/v2/policies/2000?ric=ric1&type=1", + url: POLICY_PATH + "/policies/2000?ric=ric1&type=1", json: "", }, { - url: "/a1-policy/v2/rics?policytype_id=0", + url: POLICY_PATH + "/rics?policytype_id=0", json: ric1, }, { - url: "/a1-policy/v2/rics?policytype_id=1", + url: POLICY_PATH + "/rics?policytype_id=1", json: ric1, }, { - url: "/a1-policy/v2/rics?policytype_id=", + url: POLICY_PATH + "/rics?policytype_id=", json: ric2, }, { - url: "/ei-producer/v1/eiproducers", - json: eiProducerIds, + url: INFO_PATH + "/info-producers", + json: producerIds, }, { - url: "/ei-producer/v1/eiproducers/producer1", - json: eiproducer1, + url: INFO_PATH + "/info-producers/producer1", + json: producer1, }, { - url: "/ei-producer/v1/eiproducers/producer2", - json: eiproducer2, + url: INFO_PATH + "/info-producers/producer2", + json: producer2, }, { - url: "/ei-producer/v1/eiproducers/producer1/status", - json: eiproducerstatus1, + url: INFO_PATH + "/info-producers/producer1/status", + json: producerstatus1, }, { - url: "/ei-producer/v1/eiproducers/producer2/status", - json: eiproducerstatus2, + url: INFO_PATH + "/info-producers/producer2/status", + json: producerstatus2, }, { - url: "/ei-producer/v1/eiproducers/producer1/eijobs", - json: eijobsProd1, + url: INFO_PATH + "/info-producers/producer1/info-jobs", + json: jobsProd1, }, { - url: "/ei-producer/v1/eiproducers/producer2/eijobs", - json: eijobsProd2, + url: INFO_PATH + "/info-producers/producer2/info-jobs", + json: jobsProd2, }, { url: '/a1-policy/v2/configuration', @@ -176,7 +179,7 @@ export class HttpMockRequestInterceptor implements HttpInterceptor { result = new HttpResponse({ status: 200 }); } else if (request.method === "DELETE") { result = new HttpResponse({ status: 204 }); - } else if (request.url === "/a1-policy/v2/policy-types") { + } else if (request.url === POLICY_PATH + "/policy-types") { result = this.getAlternatingNoOfTypes(); } else { for (const element of urls) { diff --git a/webapp-frontend/src/app/interceptor.spec.ts b/webapp-frontend/src/app/interceptor.spec.ts index e299b64..2c44d13 100644 --- a/webapp-frontend/src/app/interceptor.spec.ts +++ b/webapp-frontend/src/app/interceptor.spec.ts @@ -26,11 +26,11 @@ import { import { HTTP_INTERCEPTORS } from '@angular/common/http'; import { HttpRequestInterceptor } from './interceptor'; import { NotificationService } from '@services/ui/notification.service'; -import { EIService } from '@services/ei/ei.service'; +import { ProducerService } from '@services/ei/producer.service'; import { of } from 'rxjs/observable/of'; describe(`HttpRequestInterceptor`, () => { - let service: EIService; + let service: ProducerService; const notificationServiceSpy = jasmine.createSpyObj('NotificationService', [ 'error' ]); let httpMock: HttpTestingController; @@ -47,12 +47,12 @@ describe(`HttpRequestInterceptor`, () => { useClass: HttpRequestInterceptor, multi: true, }, - EIService + ProducerService ] }); httpMock = TestBed.inject(HttpTestingController); - service = TestBed.inject(EIService); + service = TestBed.inject(ProducerService); }); it('should create', () => { @@ -85,7 +85,7 @@ describe(`HttpRequestInterceptor`, () => { const data = 'Invalid request parameters'; const mockErrorResponse = { status: 400, statusText: 'Bad Request' }; - httpMock.expectOne(`/ei-producer/v1/eiproducers`).flush(data, mockErrorResponse); + httpMock.expectOne(`/data-producer/v1/info-producers`).flush(data, mockErrorResponse); httpMock.verify(); diff --git a/webapp-frontend/src/app/interfaces/ei.types.ts b/webapp-frontend/src/app/interfaces/producer.types.ts similarity index 83% rename from webapp-frontend/src/app/interfaces/ei.types.ts rename to webapp-frontend/src/app/interfaces/producer.types.ts index 24f678c..1e80fdf 100644 --- a/webapp-frontend/src/app/interfaces/ei.types.ts +++ b/webapp-frontend/src/app/interfaces/producer.types.ts @@ -20,22 +20,22 @@ // Models of data used by the EI Coordinator -export interface EIJob { - ei_job_identity: string; - ei_job_data: any; - ei_type_identity: string; +export interface JobInfo { + info_job_identity: string; + info_job_data: any; + info_type_identity: string; target_uri: string; owner: string; } -export interface EIProducer { - ei_producer_id: string; - ei_producer_types: string[]; +export interface Producer { + producer_id: string; + producer_types: string[]; status: string; } export interface ProducerRegistrationInfo { - supported_ei_types: string[] + supported_info_types: string[] } export enum OperationalState { diff --git a/webapp-frontend/src/app/mock/ei-producer1.json b/webapp-frontend/src/app/mock/ei-producer1.json deleted file mode 100644 index 222cff9..0000000 --- a/webapp-frontend/src/app/mock/ei-producer1.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "supported_ei_types": [ "type1", "type2" ] -} \ No newline at end of file diff --git a/webapp-frontend/src/app/mock/ei-producer2.json b/webapp-frontend/src/app/mock/ei-producer2.json deleted file mode 100644 index c723167..0000000 --- a/webapp-frontend/src/app/mock/ei-producer2.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "supported_ei_types": [ "type3", "type4" ] -} \ No newline at end of file diff --git a/webapp-frontend/src/app/mock/ei-jobs-producer1.json b/webapp-frontend/src/app/mock/jobs-producer1.json similarity index 68% rename from webapp-frontend/src/app/mock/ei-jobs-producer1.json rename to webapp-frontend/src/app/mock/jobs-producer1.json index 2a910c1..746add9 100644 --- a/webapp-frontend/src/app/mock/ei-jobs-producer1.json +++ b/webapp-frontend/src/app/mock/jobs-producer1.json @@ -1,9 +1,9 @@ [ { - "ei_job_identity": "job1", - "ei_type_identity": "type1", + "info_job_identity": "job1", + "info_type_identity": "type1", "owner": "owner1", - "ei_job_data": { + "info_job_data": { "jobparam2": "value2_job1", "jobparam3": "value3_job1", "jobparam1": "value1_job1" @@ -11,10 +11,10 @@ "target_uri": "https://ricsim_g1_1:8185/datadelivery" }, { - "ei_job_identity": "job2", - "ei_type_identity": "type1", + "info_job_identity": "job2", + "info_type_identity": "type1", "owner": "owner2", - "ei_job_data": { + "info_job_data": { "jobparam2": "value2_job2", "jobparam3": "value3_job2", "jobparam1": "value1_job2" @@ -22,10 +22,10 @@ "target_uri": "https://ricsim_g2_1:8185/datadelivery" }, { - "ei_job_identity": "job4", - "ei_type_identity": "type1", + "info_job_identity": "job4", + "info_type_identity": "type1", "owner": "owner3", - "ei_job_data": { + "info_job_data": { "jobparam2": "value2_job2", "jobparam3": "value3_job2", "jobparam1": "value1_job2" diff --git a/webapp-frontend/src/app/mock/ei-jobs-producer2.json b/webapp-frontend/src/app/mock/jobs-producer2.json similarity index 68% rename from webapp-frontend/src/app/mock/ei-jobs-producer2.json rename to webapp-frontend/src/app/mock/jobs-producer2.json index fd6d2c8..bb4fe01 100644 --- a/webapp-frontend/src/app/mock/ei-jobs-producer2.json +++ b/webapp-frontend/src/app/mock/jobs-producer2.json @@ -1,9 +1,9 @@ [ { - "ei_job_identity": "job3", - "ei_type_identity": "type2", + "info_job_identity": "job3", + "info_type_identity": "type2", "owner": "owner1", - "ei_job_data": { + "info_job_data": { "jobparam2": "value2_job3", "jobparam3": "value3_job3", "jobparam1": "value1_job3" @@ -11,10 +11,10 @@ "target_uri": "https://ricsim_g3_1:8185/datadelivery" }, { - "ei_job_identity": "job5", - "ei_type_identity": "type2", + "info_job_identity": "job5", + "info_type_identity": "type2", "owner": "owner5", - "ei_job_data": { + "info_job_data": { "jobparam2": "value2_job2", "jobparam3": "value3_job2", "jobparam1": "value1_job2" diff --git a/webapp-frontend/src/app/mock/ei-producer-status1.json b/webapp-frontend/src/app/mock/producer-status1.json similarity index 100% rename from webapp-frontend/src/app/mock/ei-producer-status1.json rename to webapp-frontend/src/app/mock/producer-status1.json diff --git a/webapp-frontend/src/app/mock/ei-producer-status2.json b/webapp-frontend/src/app/mock/producer-status2.json similarity index 100% rename from webapp-frontend/src/app/mock/ei-producer-status2.json rename to webapp-frontend/src/app/mock/producer-status2.json diff --git a/webapp-frontend/src/app/mock/producer1.json b/webapp-frontend/src/app/mock/producer1.json new file mode 100644 index 0000000..2f49816 --- /dev/null +++ b/webapp-frontend/src/app/mock/producer1.json @@ -0,0 +1,3 @@ +{ + "supported_info_types": [ "type1", "type2" ] +} \ No newline at end of file diff --git a/webapp-frontend/src/app/mock/producer2.json b/webapp-frontend/src/app/mock/producer2.json new file mode 100644 index 0000000..6ad59a0 --- /dev/null +++ b/webapp-frontend/src/app/mock/producer2.json @@ -0,0 +1,3 @@ +{ + "supported_info_types": [ "type3", "type4" ] +} \ No newline at end of file diff --git a/webapp-frontend/src/app/mock/ei-producerids.json b/webapp-frontend/src/app/mock/producerids.json similarity index 100% rename from webapp-frontend/src/app/mock/ei-producerids.json rename to webapp-frontend/src/app/mock/producerids.json diff --git a/webapp-frontend/src/app/policy/policy-instance/policy-instance.component.spec.ts b/webapp-frontend/src/app/policy/policy-instance/policy-instance.component.spec.ts index f39592f..baaa80a 100644 --- a/webapp-frontend/src/app/policy/policy-instance/policy-instance.component.spec.ts +++ b/webapp-frontend/src/app/policy/policy-instance/policy-instance.component.spec.ts @@ -39,11 +39,11 @@ import { PolicyInstances, PolicyStatus, PolicyTypeSchema, -} from "@app/interfaces/policy.types"; -import { PolicyService } from "@app/services/policy/policy.service"; -import { ConfirmDialogService } from "@app/services/ui/confirm-dialog.service"; -import { NotificationService } from "@app/services/ui/notification.service"; -import { UiService } from "@app/services/ui/ui.service"; +} from "@interfaces/policy.types"; +import { PolicyService } from "@services/policy/policy.service"; +import { ConfirmDialogService } from "@services/ui/confirm-dialog.service"; +import { NotificationService } from "@services/ui/notification.service"; +import { UiService } from "@services/ui/ui.service"; import { ToastrModule } from "ngx-toastr"; import { Observable, of } from "rxjs"; import { PolicyInstanceDialogComponent } from "../policy-instance-dialog/policy-instance-dialog.component"; diff --git a/webapp-frontend/src/app/policy/policy-type/policy-type.component.ts b/webapp-frontend/src/app/policy/policy-type/policy-type.component.ts index 3e8a2ee..f6c8d2a 100644 --- a/webapp-frontend/src/app/policy/policy-type/policy-type.component.ts +++ b/webapp-frontend/src/app/policy/policy-type/policy-type.component.ts @@ -21,7 +21,7 @@ import { Component, Input, OnInit, OnChanges, SimpleChanges} from "@angular/core"; import { BehaviorSubject } from "rxjs"; import { PolicyType, PolicyTypeSchema } from "@interfaces/policy.types"; -import { PolicyService } from "@app/services/policy/policy.service"; +import { PolicyService } from "@services/policy/policy.service"; import "@policy/policy-control.component"; class PolicyTypeInfo { diff --git a/webapp-frontend/src/app/ric-config/ric-config.component.ts b/webapp-frontend/src/app/ric-config/ric-config.component.ts index cff6bd9..e9da08a 100644 --- a/webapp-frontend/src/app/ric-config/ric-config.component.ts +++ b/webapp-frontend/src/app/ric-config/ric-config.component.ts @@ -18,7 +18,7 @@ * ========================LICENSE_END=================================== */ import { Component, OnInit, Output } from "@angular/core"; -import { RicConfig } from "@app/interfaces/ric.config"; +import { RicConfig } from "@interfaces/ric.config"; import { AbstractControl, ControlContainer, @@ -30,7 +30,7 @@ import { } from "@angular/forms"; import { PolicyService } from "@services/policy/policy.service"; import { EventEmitter } from "@angular/core"; -import { NotificationService } from "@app/services/ui/notification.service"; +import { NotificationService } from "@services/ui/notification.service"; import { HttpResponse } from "@angular/common/http"; @Component({ diff --git a/webapp-frontend/src/app/services/ei/ei.service.spec.ts b/webapp-frontend/src/app/services/ei/producer.service.spec.ts similarity index 78% rename from webapp-frontend/src/app/services/ei/ei.service.spec.ts rename to webapp-frontend/src/app/services/ei/producer.service.spec.ts index 13d8698..61ba253 100644 --- a/webapp-frontend/src/app/services/ei/ei.service.spec.ts +++ b/webapp-frontend/src/app/services/ei/producer.service.spec.ts @@ -20,12 +20,12 @@ import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing' import { TestBed } from '@angular/core/testing'; -import { EIJob, ProducerStatus, OperationalState, ProducerRegistrationInfo } from '@interfaces/ei.types'; -import { EIService } from './ei.service'; +import { JobInfo, ProducerStatus, OperationalState, ProducerRegistrationInfo } from '@interfaces/producer.types'; +import { ProducerService } from './producer.service'; -describe('EIService', () => { - let basePath = '/ei-producer/v1'; - let service: EIService; +describe('ProducerService', () => { + let basePath = '/data-producer/v1'; + let service: ProducerService; let httpTestingController: HttpTestingController; beforeEach(() => TestBed.configureTestingModule({ @@ -33,12 +33,12 @@ describe('EIService', () => { HttpClientTestingModule ], providers: [ - EIService + ProducerService ] })); it('should be created', () => { - service = TestBed.inject(EIService); + service = TestBed.inject(ProducerService); expect(service).toBeTruthy(); }); @@ -46,7 +46,7 @@ describe('EIService', () => { let expectedEIProducerIds: string[]; beforeEach(() => { - service = TestBed.inject(EIService); + service = TestBed.inject(ProducerService); httpTestingController = TestBed.inject(HttpTestingController); expectedEIProducerIds = [ 'producer1', 'producer2' ] as string[]; }); @@ -57,7 +57,7 @@ describe('EIService', () => { fail ); - const req = httpTestingController.expectOne(basePath + '/' + service.eiProducersPath); + const req = httpTestingController.expectOne(basePath + '/' + service.producersPath); expect(req.request.method).toEqual('GET'); req.flush(expectedEIProducerIds); //Return expected producer IDs @@ -67,15 +67,15 @@ describe('EIService', () => { }); describe('#getJobsForProducer', () => { - let expectedEIJobs: EIJob[]; + let expectedEIJobs: JobInfo[]; beforeEach(() => { - service = TestBed.inject(EIService); + service = TestBed.inject(ProducerService); httpTestingController = TestBed.inject(HttpTestingController); expectedEIJobs = [ - { ei_job_identity: '1', ei_job_data: 'data', ei_type_identity: 'Type ID 1', target_uri: 'hhtp://url', owner: 'owner'}, - { ei_job_identity: '2', ei_job_data: 'EI Job 2', ei_type_identity: 'Type ID 2', target_uri: 'hhtp://url', owner: 'owner'} - ] as EIJob[]; + { info_job_identity: '1', info_job_data: 'data', info_type_identity: 'Type ID 1', target_uri: 'hhtp://url', owner: 'owner'}, + { info_job_identity: '2', info_job_data: 'EI Job 2', info_type_identity: 'Type ID 2', target_uri: 'hhtp://url', owner: 'owner'} + ] as JobInfo[]; }); it('should return all jobs', () => { @@ -84,7 +84,7 @@ describe('EIService', () => { fail ); - const req = httpTestingController.expectOne(basePath + '/' + service.eiProducersPath + '/producer1/' + service.eiJobsPath); + const req = httpTestingController.expectOne(basePath + '/' + service.producersPath + '/producer1/' + service.jobsPath); expect(req.request.method).toEqual('GET'); req.flush(expectedEIJobs); //Return expectedEIJobs @@ -97,10 +97,10 @@ describe('EIService', () => { let expectedProducer: ProducerRegistrationInfo; beforeEach(() => { - service = TestBed.inject(EIService); + service = TestBed.inject(ProducerService); httpTestingController = TestBed.inject(HttpTestingController); expectedProducer = { - supported_ei_types: [ 'type1', 'type2' ] + supported_info_types: [ 'type1', 'type2' ] } as ProducerRegistrationInfo; }); @@ -110,7 +110,7 @@ describe('EIService', () => { fail ); - const req = httpTestingController.expectOne(basePath + '/' + service.eiProducersPath + '/producer1'); + const req = httpTestingController.expectOne(basePath + '/' + service.producersPath + '/producer1'); expect(req.request.method).toEqual('GET'); req.flush(expectedProducer); //Return expected producer @@ -123,7 +123,7 @@ describe('EIService', () => { let expectedProducerStatus: ProducerStatus; beforeEach(() => { - service = TestBed.inject(EIService); + service = TestBed.inject(ProducerService); httpTestingController = TestBed.inject(HttpTestingController); expectedProducerStatus = { operational_state: OperationalState.ENABLED @@ -136,7 +136,7 @@ describe('EIService', () => { fail ); - const req = httpTestingController.expectOne(basePath + '/' + service.eiProducersPath + '/producer1/' + service.eiProducerStatusPath); + const req = httpTestingController.expectOne(basePath + '/' + service.producersPath + '/producer1/' + service.producerStatusPath); expect(req.request.method).toEqual('GET'); req.flush(expectedProducerStatus); //Return expected status diff --git a/webapp-frontend/src/app/services/ei/ei.service.ts b/webapp-frontend/src/app/services/ei/producer.service.ts similarity index 70% rename from webapp-frontend/src/app/services/ei/ei.service.ts rename to webapp-frontend/src/app/services/ei/producer.service.ts index 1237b58..2c4571d 100644 --- a/webapp-frontend/src/app/services/ei/ei.service.ts +++ b/webapp-frontend/src/app/services/ei/producer.service.ts @@ -21,7 +21,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; -import { EIJob, ProducerStatus, ProducerRegistrationInfo } from '@interfaces/ei.types'; +import { JobInfo, ProducerStatus, ProducerRegistrationInfo } from '@interfaces/producer.types'; /** * Services for calling the EI endpoints. @@ -29,12 +29,12 @@ import { EIJob, ProducerStatus, ProducerRegistrationInfo } from '@interfaces/ei. @Injectable({ providedIn: 'root' }) -export class EIService { +export class ProducerService { - private basePath = '/ei-producer/v1'; - readonly eiJobsPath = 'eijobs'; - readonly eiProducersPath = 'eiproducers'; - readonly eiProducerStatusPath = 'status'; + private basePath = '/data-producer/v1'; + readonly jobsPath = 'info-jobs'; + readonly producersPath = 'info-producers'; + readonly producerStatusPath = 'status'; private buildPath(...args: any[]) { let result = this.basePath; @@ -49,22 +49,22 @@ export class EIService { } getProducerIds(): Observable { - const url = this.buildPath(this.eiProducersPath); + const url = this.buildPath(this.producersPath); return this.httpClient.get(url); } - getJobsForProducer(producerId: string): Observable { - const url = this.buildPath(this.eiProducersPath, producerId, this.eiJobsPath); - return this.httpClient.get(url); + getJobsForProducer(producerId: string): Observable { + const url = this.buildPath(this.producersPath, producerId, this.jobsPath); + return this.httpClient.get(url); } getProducer(producerId: string): Observable { - const url = this.buildPath(this.eiProducersPath, producerId); + const url = this.buildPath(this.producersPath, producerId); return this.httpClient.get(url); } getProducerStatus(producerId: string): Observable { - const url = this.buildPath(this.eiProducersPath, producerId, this.eiProducerStatusPath); + const url = this.buildPath(this.producersPath, producerId, this.producerStatusPath); return this.httpClient.get(url); } } diff --git a/webapp-frontend/src/app/services/policy/policy.service.spec.ts b/webapp-frontend/src/app/services/policy/policy.service.spec.ts index a7fd56b..e0afb46 100644 --- a/webapp-frontend/src/app/services/policy/policy.service.spec.ts +++ b/webapp-frontend/src/app/services/policy/policy.service.spec.ts @@ -32,7 +32,7 @@ import { PolicyType, PolicyTypes, } from "@interfaces/policy.types"; -import { Ric, Rics } from "@app/interfaces/ric"; +import { Ric, Rics } from "@interfaces/ric"; describe("PolicyService", () => { let apiVersion2 = "v2"; diff --git a/webapp-frontend/src/app/services/policy/policy.service.ts b/webapp-frontend/src/app/services/policy/policy.service.ts index 95b3694..028caa0 100644 --- a/webapp-frontend/src/app/services/policy/policy.service.ts +++ b/webapp-frontend/src/app/services/policy/policy.service.ts @@ -31,7 +31,7 @@ import { PolicyTypes, } from "@interfaces/policy.types"; import { Rics } from "@interfaces/ric"; -import { RicConfig } from "@app/interfaces/ric.config"; +import { RicConfig } from "@interfaces/ric.config"; import { HttpHeaders } from "@angular/common/http"; /** -- 2.16.6