SM-1146: Total counts API paths update
This commit is contained in:
parent
8793cc0267
commit
c725d53d1a
|
@ -48,13 +48,10 @@ export class ProjectService {
|
||||||
return await this.createProjectsListView(organizationId, results.data);
|
return await this.createProjectsListView(organizationId, results.data);
|
||||||
}
|
}
|
||||||
|
|
||||||
async getProjectCounts(
|
async getProjectCounts(projectId: string): Promise<ProjectCountsResponse> {
|
||||||
organizationId: string,
|
|
||||||
projectId: string,
|
|
||||||
): Promise<ProjectCountsResponse> {
|
|
||||||
const r = await this.apiService.send(
|
const r = await this.apiService.send(
|
||||||
"GET",
|
"GET",
|
||||||
"/organizations/" + organizationId + "/projects/" + projectId + "/sm-counts",
|
"/projects/" + projectId + "/sm-counts",
|
||||||
null,
|
null,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
|
|
|
@ -75,11 +75,7 @@ export class ProjectComponent implements OnInit, OnDestroy {
|
||||||
this.secretService.secret$.pipe(startWith(null)),
|
this.secretService.secret$.pipe(startWith(null)),
|
||||||
this.accessPolicyService.accessPolicy$.pipe(startWith(null)),
|
this.accessPolicyService.accessPolicy$.pipe(startWith(null)),
|
||||||
this.serviceAccountService.serviceAccount$.pipe(startWith(null)),
|
this.serviceAccountService.serviceAccount$.pipe(startWith(null)),
|
||||||
]).pipe(
|
]).pipe(switchMap(([params]) => this.projectService.getProjectCounts(params.projectId)));
|
||||||
switchMap(([params]) =>
|
|
||||||
this.projectService.getProjectCounts(params.organizationId, params.projectId),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
combineLatest([projectId$, organization$, projectCounts$])
|
combineLatest([projectId$, organization$, projectCounts$])
|
||||||
.pipe(takeUntil(this.destroy$))
|
.pipe(takeUntil(this.destroy$))
|
||||||
|
|
|
@ -57,9 +57,7 @@ export class ServiceAccountComponent implements OnInit, OnDestroy {
|
||||||
this.accessService.accessToken$.pipe(startWith(null)),
|
this.accessService.accessToken$.pipe(startWith(null)),
|
||||||
this.onChange$,
|
this.onChange$,
|
||||||
]).pipe(
|
]).pipe(
|
||||||
switchMap(([params, _]) =>
|
switchMap(([params, _]) => this.serviceAccountService.getCounts(params.serviceAccountId)),
|
||||||
this.serviceAccountService.getCounts(params.organizationId, params.serviceAccountId),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
combineLatest([this.serviceAccount$, serviceAccountCounts$])
|
combineLatest([this.serviceAccount$, serviceAccountCounts$])
|
||||||
|
|
|
@ -71,13 +71,10 @@ export class ServiceAccountService {
|
||||||
return await this.createServiceAccountView(orgKey, new ServiceAccountResponse(r));
|
return await this.createServiceAccountView(orgKey, new ServiceAccountResponse(r));
|
||||||
}
|
}
|
||||||
|
|
||||||
async getCounts(
|
async getCounts(serviceAccountId: string): Promise<ServiceAccountCountsResponse> {
|
||||||
organizationId: string,
|
|
||||||
serviceAccountId: string,
|
|
||||||
): Promise<ServiceAccountCountsResponse> {
|
|
||||||
const r = await this.apiService.send(
|
const r = await this.apiService.send(
|
||||||
"GET",
|
"GET",
|
||||||
"/organizations/" + organizationId + "/service-accounts/" + serviceAccountId + "/sm-counts",
|
"/service-accounts/" + serviceAccountId + "/sm-counts",
|
||||||
null,
|
null,
|
||||||
true,
|
true,
|
||||||
true,
|
true,
|
||||||
|
|
Loading…
Reference in New Issue