mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
AAE-15221 Allow multiple roles when fetching deployed applications (#10503)
This commit is contained in:
parent
b7881db56b
commit
65b991674d
@ -36,11 +36,11 @@ export class AppsProcessCloudService {
|
|||||||
* Gets a list of deployed apps for this user by status.
|
* Gets a list of deployed apps for this user by status.
|
||||||
*
|
*
|
||||||
* @param status Required status value
|
* @param status Required status value
|
||||||
* @param role to filter the apps
|
* @param roles to filter the apps
|
||||||
* @returns The list of deployed apps
|
* @returns The list of deployed apps
|
||||||
*/
|
*/
|
||||||
getDeployedApplicationsByStatus(status: string, role?: string): Observable<ApplicationInstanceModel[]> {
|
getDeployedApplicationsByStatus(status: string, roles?: string | string[]): Observable<ApplicationInstanceModel[]> {
|
||||||
return this.hasDeployedApps() ? of(this.deployedApps) : this.getApplicationsByStatus(status, role);
|
return this.hasDeployedApps() ? of(this.deployedApps) : this.getApplicationsByStatus(status, roles);
|
||||||
}
|
}
|
||||||
|
|
||||||
hasDeployedApps(): boolean {
|
hasDeployedApps(): boolean {
|
||||||
@ -66,13 +66,13 @@ export class AppsProcessCloudService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private getApplicationsByStatus(status: string, role?: string): Observable<ApplicationInstanceModel[]> {
|
private getApplicationsByStatus(status: string, roles?: string | string[]): Observable<ApplicationInstanceModel[]> {
|
||||||
if (status === '') {
|
if (status === '') {
|
||||||
return of([]);
|
return of([]);
|
||||||
}
|
}
|
||||||
const path = this.getApplicationUrl();
|
const path = this.getApplicationUrl();
|
||||||
const pathParams = {};
|
const pathParams = {};
|
||||||
const queryParams = { status, roles: role, sort: 'name' };
|
const queryParams = { status, roles, sort: 'name' };
|
||||||
const httpMethod = 'GET';
|
const httpMethod = 'GET';
|
||||||
const headerParams = {};
|
const headerParams = {};
|
||||||
const formParams = {};
|
const formParams = {};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user