Skip to content

Commit

Permalink
[AAE-15252] Update ADF interfaces to reflect update from BE (#8672)
Browse files Browse the repository at this point in the history
* [AAE-15252] Update ADF ApplicationInstanceModel and Descriptor interfaces and AppsProcessCloudService service

* [AAE-15252] Update app.config.json file
  • Loading branch information
DiogoABastos committed Jun 27, 2023
1 parent f0d2456 commit 3f4fe2a
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 11 deletions.
9 changes: 6 additions & 3 deletions demo-shell/src/app.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -1433,13 +1433,16 @@
],
"alfresco-deployed-apps": [
{
"name": "candidatebaseapp"
"name": "candidatebaseapp",
"displayName": "candidatebaseapp"
},
{
"name": "simpleapp"
"name": "simpleapp",
"displayName": "simpleapp"
},
{
"name": "subprocessapp"
"name": "subprocessapp",
"displayName": "subprocessapp"
}
],
"aspect-visible": {
Expand Down
53 changes: 47 additions & 6 deletions lib/process-services-cloud/src/lib/app/mock/app-model.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,54 @@ import { fakeEnvironmentList } from '../../common/mock/environment.mock';
import { ApplicationInstanceModel } from '../models/application-instance.model';

export const fakeApplicationInstance: ApplicationInstanceModel[] = [
{ name: 'application-new-1', createdAt: '2018-09-21T12:31:39.000Z', status: 'Running', theme: 'theme-2', icon: 'favorite_border' },
{ name: 'application-new-2', createdAt: '2018-09-21T12:31:39.000Z', status: 'Pending', theme: 'theme-2', icon: 'favorite_border' },
{ name: 'application-new-3', createdAt: '2018-09-21T12:31:39.000Z', status: 'Pending' }
{
name: 'application-new-1',
displayName: 'application-new-1',
createdAt: '2018-09-21T12:31:39.000Z',
status: 'Running',
theme: 'theme-2',
icon: 'favorite_border'
},
{
name: 'application-new-2',
displayName: 'application-new-2',
createdAt: '2018-09-21T12:31:39.000Z',
status: 'Pending',
theme: 'theme-2',
icon: 'favorite_border'
},
{
name: 'application-new-3',
displayName: 'application-new-3',
createdAt: '2018-09-21T12:31:39.000Z',
status: 'Pending'
}
];

export const fakeApplicationInstanceWithEnvironment: ApplicationInstanceModel[] = [
{ name: 'application-new-1', environmentId: fakeEnvironmentList[0].id, createdAt: '2018-09-21T12:31:39.000Z', status: 'Running', theme: 'theme-2', icon: 'favorite_border' },
{ name: 'application-new-2', environmentId: fakeEnvironmentList[1].id,createdAt: '2018-09-21T12:31:39.000Z', status: 'Pending', theme: 'theme-2', icon: 'favorite_border' },
{ name: 'application-new-3', environmentId: fakeEnvironmentList[2].id,createdAt: '2018-09-21T12:31:39.000Z', status: 'Pending' }
{
name: 'application-new-1-env-id',
displayName: 'application-new-1',
environmentId: fakeEnvironmentList[0].id,
createdAt: '2018-09-21T12:31:39.000Z',
status: 'Running',
theme: 'theme-2',
icon: 'favorite_border'
},
{
name: 'application-new-2-env-id',
displayName: 'application-new-2',
environmentId: fakeEnvironmentList[1].id,
createdAt: '2018-09-21T12:31:39.000Z',
status: 'Pending',
theme: 'theme-2',
icon: 'favorite_border'
},
{
name: 'application-new-3-env-id',
displayName: 'application-new-3',
environmentId: fakeEnvironmentList[2].id,
createdAt: '2018-09-21T12:31:39.000Z',
status: 'Pending'
}
];
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const DEFAULT_APP_INSTANCE_ICON = 'favorite_border';

export interface ApplicationInstanceModel {
name?: string;
displayName?: string;
createdAt?: any;
status?: string;
theme?: string;
Expand All @@ -28,10 +29,12 @@ export interface ApplicationInstanceModel {
connectors?: any;
descriptor?: Descriptor;
environmentId?: string;
environment?: string;
}

export interface Descriptor {
name?: string;
displayName?: string;
projectId?: string;
releaseId?: string;
releaseVersion?: number;
Expand All @@ -40,6 +43,7 @@ export interface Descriptor {
variables?: DescriptorVariables;
version?: string;
runtimeBundleVersion?: string;
enableLocalDevelopment?: boolean;
}

export interface DescriptorSecurity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ export class AppsProcessCloudService {
const envName = environmentList?.find((env: Environment) => env.id === application.environmentId)?.name;

if (application.environmentId && environmentList && envName) {
return `${application.name} (${envName})`;
return `${application.displayName} (${envName})`;
} else {
return application.name;
return application.displayName;
}
}

Expand Down

0 comments on commit 3f4fe2a

Please sign in to comment.