X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=dashboard%2Fwebapp-frontend%2Fsrc%2Fapp%2Fservices%2Fpolicy%2Fpolicy.service.ts;h=6af517f4b973b3d2ce87521312e2798ef9449e03;hb=bbc4aa48f60dc70154ff07c2143918053f1c9154;hp=1c87081822a58121378df7b8d8f65d6f4c287ef8;hpb=3b1e23945b9426ad7aaacfc3794e15286d82c816;p=nonrtric.git diff --git a/dashboard/webapp-frontend/src/app/services/policy/policy.service.ts b/dashboard/webapp-frontend/src/app/services/policy/policy.service.ts index 1c870818..6af517f4 100644 --- a/dashboard/webapp-frontend/src/app/services/policy/policy.service.ts +++ b/dashboard/webapp-frontend/src/app/services/policy/policy.service.ts @@ -66,7 +66,7 @@ export class PolicyService { return this.httpClient.get(url); } - getPolicyInstances(policyTypeId: number): Observable { + getPolicyInstances(policyTypeId: string): Observable { const url = this.buildPath(this.policyTypePath, policyTypeId, this.policyPath); return this.httpClient.get(url); } @@ -75,7 +75,7 @@ export class PolicyService { * Gets policy parameters. * @returns Observable that should yield a policy instance */ - getPolicy(policyTypeId: number, policyInstanceId: string): Observable { + getPolicy(policyTypeId: string, policyInstanceId: string): Observable { const url = this.buildPath(this.policyTypePath, policyTypeId, this.policyPath, policyInstanceId); return this.httpClient.get(url); } @@ -87,8 +87,8 @@ export class PolicyService { * @param policyJson Json with the policy content * @returns Observable that should yield a response code, no data */ - putPolicy(policyTypeId: number, policyInstanceId: string, policyJson: string): Observable { - const url = this.buildPath(this.policyTypePath, policyTypeId, this.policyPath, policyInstanceId); + putPolicy(policyTypeId: string, policyInstanceId: string, policyJson: string, ric: string): Observable { + const url = this.buildPath(this.policyTypePath, policyTypeId, this.policyPath, policyInstanceId) + "?ric=" + ric; return this.httpClient.put(url, policyJson, { observe: 'response' }); } @@ -97,8 +97,14 @@ export class PolicyService { * @param policyTypeId * @returns Observable that should yield a response code, no data */ - deletePolicy(policyTypeId: number, policyInstanceId: string): Observable { + deletePolicy(policyTypeId: string, policyInstanceId: string): Observable { const url = this.buildPath(this.policyTypePath, policyTypeId, this.policyPath, policyInstanceId); return this.httpClient.delete(url, { observe: 'response' }); } + + + getRics(policyTypeId: string): Observable { + const url = this.buildPath('rics') + '?policyType=' + policyTypeId; + return this.httpClient.get(url); + } }