[ACS-7427] Process Services improvements and cleanup (#9664)

This commit is contained in:
Denys Vuika
2024-05-20 16:08:47 -04:00
committed by GitHub
parent 96e607b4de
commit e71e2a749a
174 changed files with 1736 additions and 3933 deletions

View File

@@ -39,7 +39,7 @@ export class AppsProcessService {
* @returns The list of deployed apps
*/
getDeployedApplications(): Observable<AppDefinitionRepresentation[]> {
return from(this.appsApi.getAppDefinitions()).pipe(map((response) => response.data));
return from(this.appsApi.getAppDefinitions()).pipe(map((response) => response.data || []));
}
/**
@@ -49,16 +49,6 @@ export class AppsProcessService {
* @returns The list of deployed apps
*/
getDeployedApplicationsByName(name: string): Observable<AppDefinitionRepresentation> {
return from(this.appsApi.getAppDefinitions()).pipe(map((response) => response.data.find((app) => app.name === name)));
}
/**
* Gets the details for a specific app ID number.
*
* @param appId ID of the target app
* @returns Details of the app
*/
getApplicationDetailsById(appId: number): Observable<AppDefinitionRepresentation> {
return from(this.appsApi.getAppDefinitions()).pipe(map((response) => response.data.find((app) => app.id === appId)));
return this.getDeployedApplications().pipe(map((response) => response.find((app) => app.name === name)));
}
}