X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=webapp-frontend%2Fsrc%2Fapp%2Fservices%2Fpolicy%2Fpolicy.service.ts;h=93f08e7168b16c8a54f519cd43574a88f7c78eaa;hb=5372422520d7cfb5760a536cce0da7b15f012eda;hp=b92e8f11b37e2329bb3be1e734b8a5e7d8db2276;hpb=0bcfde8903ba3f1fb99fcab3bf39f7f4e6ccbe1e;p=portal%2Fnonrtric-controlpanel.git diff --git a/webapp-frontend/src/app/services/policy/policy.service.ts b/webapp-frontend/src/app/services/policy/policy.service.ts index b92e8f1..93f08e7 100644 --- a/webapp-frontend/src/app/services/policy/policy.service.ts +++ b/webapp-frontend/src/app/services/policy/policy.service.ts @@ -67,7 +67,7 @@ export class PolicyService { } getPolicyInstances(policyTypeId: string): Observable { - const url = this.buildPath(this.policyTypePath, policyTypeId, this.policyPath); + const url = this.buildPath(this.policyPath) + '?type=' + policyTypeId; return this.httpClient.get(url); } @@ -76,7 +76,7 @@ export class PolicyService { * @returns Observable that should yield a policy instance */ getPolicy(policyTypeId: string, policyInstanceId: string): Observable { - const url = this.buildPath(this.policyTypePath, policyTypeId, this.policyPath, policyInstanceId); + const url = this.buildPath(this.policyPath, policyInstanceId) + '?type=' + policyTypeId; return this.httpClient.get(url); } @@ -88,7 +88,7 @@ export class PolicyService { * @returns Observable that should yield a response code, no data */ putPolicy(policyTypeId: string, policyInstanceId: string, policyJson: string, ric: string): Observable { - const url = this.buildPath(this.policyTypePath, policyTypeId, this.policyPath, policyInstanceId) + '?ric=' + ric; + const url = this.buildPath(this.policyPath, policyInstanceId) + '?ric=' + ric + '&type=' + policyTypeId; return this.httpClient.put(url, policyJson, { observe: 'response' }); } @@ -99,7 +99,7 @@ export class PolicyService { * @returns Observable that should yield a response code, no data */ deletePolicy(policyTypeId: string, policyInstanceId: string): Observable { - const url = this.buildPath(this.policyTypePath, policyTypeId, this.policyPath, policyInstanceId); + const url = this.buildPath(this.policyPath, policyInstanceId) + '?type=' + policyTypeId; return this.httpClient.delete(url, { observe: 'response' }); }