X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=webapp-frontend%2Fsrc%2Fapp%2Fservices%2Fac-xapp%2Fac-xapp.service.ts;h=dbe4cd6e3f3ce59367c975f5f6da8f65efb53723;hb=9cf5b95a5bc9810d739d14d324dd7d80cbdb4a7d;hp=4e7231723f62520af6e5562ca8e4ca46dd1def0b;hpb=c1c667f0a1aa289655b5309aff4c1c748733f4d2;p=portal%2Fric-dashboard.git diff --git a/webapp-frontend/src/app/services/ac-xapp/ac-xapp.service.ts b/webapp-frontend/src/app/services/ac-xapp/ac-xapp.service.ts index 4e723172..dbe4cd6e 100644 --- a/webapp-frontend/src/app/services/ac-xapp/ac-xapp.service.ts +++ b/webapp-frontend/src/app/services/ac-xapp/ac-xapp.service.ts @@ -35,8 +35,10 @@ import { DashboardService } from '../dashboard/dashboard.service'; export class ACXappService { private component = 'a1-p'; - private policyPath = 'policies'; - private acPolicyName = 'admission_control_policy'; + private policyTypePath = 'poltype'; + private policyInstPath = 'polinst'; + private acPolicyType = '21000'; + private acPolicyInst = 'admission_control_policy'; constructor( private dashboardSvc: DashboardService, @@ -60,7 +62,8 @@ export class ACXappService { * @returns Observable that yields an ACAdmissionIntervalControl */ getPolicy(instanceKey: string): Observable { - const path = this.dashboardSvc.buildPath(this.component, instanceKey, this.policyPath, this.acPolicyName); + const path = this.dashboardSvc.buildPath(this.component, instanceKey, this.policyTypePath, this.acPolicyType, + this.policyInstPath, this.acPolicyInst); return this.httpClient.get(path); } @@ -70,7 +73,8 @@ export class ACXappService { * @returns Observable that yields a response code, no data */ putPolicy(instanceKey: string, policy: ACAdmissionIntervalControl): Observable { - const path = this.dashboardSvc.buildPath(this.component, instanceKey, this.policyPath, this.acPolicyName); + const path = this.dashboardSvc.buildPath(this.component, instanceKey, this.policyTypePath, this.acPolicyType, + this.policyInstPath, this.acPolicyInst); return this.httpClient.put(path, policy, { observe: 'response' }); }