X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=webapp-frontend%2Fsrc%2Fapp%2Finterceptor.mock.ts;h=89034a8a5215a671a41bf5cafe8daf21ff16cb08;hb=a3e5b2cc0eaf68e4f167cbf6cb39a6e154457678;hp=bfba913332e4df962d5bcb3b6463a8257437b7e5;hpb=34a30b0b34f863b103c55900c93408323298bdcc;p=portal%2Fnonrtric-controlpanel.git diff --git a/webapp-frontend/src/app/interceptor.mock.ts b/webapp-frontend/src/app/interceptor.mock.ts index bfba913..89034a8 100644 --- a/webapp-frontend/src/app/interceptor.mock.ts +++ b/webapp-frontend/src/app/interceptor.mock.ts @@ -1,11 +1,33 @@ -import { Injectable, Injector } from '@angular/core'; +/*- + * ========================LICENSE_START================================= + * O-RAN-SC + * %% + * Copyright (C) 2021 Nordix Foundation + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================LICENSE_END=================================== + */ + import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse } from '@angular/common/http'; +import { Injectable, Injector } from '@angular/core'; import { Observable, of } from 'rxjs'; -import * as policytypes from './mock/policytypes.json'; -import * as policyinstances from './mock/policy-instance.json'; -import * as policyinstanceedit from './mock/policy-instance-edit.json'; +import * as policyinstances1 from './mock/policy-instance-1.json'; +import * as policyinstances2 from './mock/policy-instance-2.json'; import * as eijobs from './mock/ei-jobs.json'; import * as eiproducers from './mock/ei-producers.json'; +import * as nopolicyinstances from './mock/nopolicyinstances.json'; +import * as policytypes from './mock/policytypes.json'; +import * as policyinstanceedit from './mock/policy-instance-edit.json'; import * as rics from './mock/rics.json'; const urls = [ @@ -15,12 +37,24 @@ const urls = [ }, { url: 'api/policy/policies?type=1', - json: policyinstances + json: policyinstances1 + }, + { + url: 'api/policy/policies?type=2', + json: policyinstances2 + }, + { + url: 'api/policy/policies?type=2', + json: nopolicyinstances }, { url: 'api/policy/policies/2000?type=1', json: policyinstanceedit }, + { + url: 'api/policy/policies/2001?type=2', + json: policyinstanceedit + }, { url: 'api/policy/policies/2000?ric=ric1&type=1', json: '' @@ -36,6 +70,10 @@ const urls = [ { url: 'api/policy/rics?policyType=1', json: rics + }, + { + url: 'api/policy/rics?policyType=2', + json: rics } ];