mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-01 14:41:32 +00:00
[AAE-12288] Enable Environment Id filtering support (#8360)
* [AAE-12288] Add environment context to process-instances, user-tasks and service-tasks * [AAE-12288] Add environment type * [AAE-12288] add unit tests for environment aware logic * [AAE-12288] remove mock barrel import and remove code duplication * [AAE-12288] Update docs
This commit is contained in:
@@ -21,6 +21,7 @@ import { map, catchError } from 'rxjs/operators';
|
||||
import { AlfrescoApiService, AppConfigService, LogService } from '@alfresco/adf-core';
|
||||
import { Oauth2Auth } from '@alfresco/js-api';
|
||||
import { ApplicationInstanceModel } from '../models/application-instance.model';
|
||||
import { Environment } from '../../common/interface/environment.interface';
|
||||
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class AppsProcessCloudService {
|
||||
@@ -58,6 +59,16 @@ export class AppsProcessCloudService {
|
||||
this.deployedApps = apps;
|
||||
}
|
||||
|
||||
getApplicationLabel(application: ApplicationInstanceModel, environmentList?: Environment[]): string {
|
||||
const envName = environmentList?.find((env: Environment) => env.id === application.environmentId)?.name;
|
||||
|
||||
if (application.environmentId && environmentList && envName) {
|
||||
return `${application.name} (${envName})`;
|
||||
} else {
|
||||
return application.name;
|
||||
}
|
||||
}
|
||||
|
||||
private getApplicationsByStatus(status: string, role?: string): Observable<ApplicationInstanceModel[]> {
|
||||
if (status === '') {
|
||||
return of([]);
|
||||
|
Reference in New Issue
Block a user