mirror of
https://github.com/sartography/cr-connect-bpmn.git
synced 2025-01-12 10:04:23 +00:00
Adds workflow spec name
This commit is contained in:
parent
69af10caf2
commit
e93051941d
6
package-lock.json
generated
6
package-lock.json
generated
@ -9917,9 +9917,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"sartography-workflow-lib": {
|
"sartography-workflow-lib": {
|
||||||
"version": "0.0.13",
|
"version": "0.0.14",
|
||||||
"resolved": "https://registry.npmjs.org/sartography-workflow-lib/-/sartography-workflow-lib-0.0.13.tgz",
|
"resolved": "https://registry.npmjs.org/sartography-workflow-lib/-/sartography-workflow-lib-0.0.14.tgz",
|
||||||
"integrity": "sha512-qVFKnvPeubnEfuRAqKLW7zN9J6aXeP8F5IVpJMs7+qRsfCWV311UZJCRbBU7s9fdDN/27LAsBvy1dYiWh3If3A==",
|
"integrity": "sha512-+t0dbrP0yHvE/cAO1wDd2p2MG7qGr2RVi4SOQQ5tb2IiN4VpmukZ4Wisq1xWViMF4rD/JrKRT1YCkdIn23kizQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"tslib": "^1.9.0"
|
"tslib": "^1.9.0"
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
"file-saver": "^2.0.2",
|
"file-saver": "^2.0.2",
|
||||||
"hammerjs": "^2.0.8",
|
"hammerjs": "^2.0.8",
|
||||||
"rxjs": "~6.5.4",
|
"rxjs": "~6.5.4",
|
||||||
"sartography-workflow-lib": "^0.0.13",
|
"sartography-workflow-lib": "^0.0.14",
|
||||||
"tslib": "^1.10.0",
|
"tslib": "^1.10.0",
|
||||||
"zone.js": "~0.9.1"
|
"zone.js": "~0.9.1"
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
export interface FileMetaDialogData {
|
export interface FileMetaDialogData {
|
||||||
fileName: string;
|
fileName: string;
|
||||||
workflowSpecId: string;
|
workflowSpecId: string;
|
||||||
|
name: string;
|
||||||
displayName: string;
|
displayName: string;
|
||||||
description: string;
|
description: string;
|
||||||
}
|
}
|
||||||
|
@ -236,6 +236,7 @@ describe('AppComponent', () => {
|
|||||||
const data: FileMetaDialogData = {
|
const data: FileMetaDialogData = {
|
||||||
fileName: 'after',
|
fileName: 'after',
|
||||||
workflowSpecId: 'after',
|
workflowSpecId: 'after',
|
||||||
|
name: 'after',
|
||||||
description: 'after',
|
description: 'after',
|
||||||
displayName: 'after',
|
displayName: 'after',
|
||||||
};
|
};
|
||||||
@ -253,6 +254,7 @@ describe('AppComponent', () => {
|
|||||||
const data: FileMetaDialogData = {
|
const data: FileMetaDialogData = {
|
||||||
fileName: mockFileMeta0.name,
|
fileName: mockFileMeta0.name,
|
||||||
workflowSpecId: mockWorkflowSpec0.id,
|
workflowSpecId: mockWorkflowSpec0.id,
|
||||||
|
name: mockWorkflowSpec0.name,
|
||||||
description: mockWorkflowSpec0.description,
|
description: mockWorkflowSpec0.description,
|
||||||
displayName: mockWorkflowSpec0.display_name,
|
displayName: mockWorkflowSpec0.display_name,
|
||||||
};
|
};
|
||||||
@ -287,6 +289,7 @@ describe('AppComponent', () => {
|
|||||||
const data: FileMetaDialogData = {
|
const data: FileMetaDialogData = {
|
||||||
fileName: mockFileMeta0.name,
|
fileName: mockFileMeta0.name,
|
||||||
workflowSpecId: mockWorkflowSpec0.id,
|
workflowSpecId: mockWorkflowSpec0.id,
|
||||||
|
name: mockWorkflowSpec0.id,
|
||||||
description: mockWorkflowSpec0.description,
|
description: mockWorkflowSpec0.description,
|
||||||
displayName: mockWorkflowSpec0.display_name,
|
displayName: mockWorkflowSpec0.display_name,
|
||||||
};
|
};
|
||||||
@ -370,7 +373,7 @@ describe('AppComponent', () => {
|
|||||||
it('should get a file metadata display string', () => {
|
it('should get a file metadata display string', () => {
|
||||||
expect(component.getFileMetaDisplayString(mockFileMeta0)).toEqual('Loading...');
|
expect(component.getFileMetaDisplayString(mockFileMeta0)).toEqual('Loading...');
|
||||||
component.workflowSpecs = mockWorkflowSpecs;
|
component.workflowSpecs = mockWorkflowSpecs;
|
||||||
const expectedString = 'Everything (one-fish.bpmn) - v1.0 (Jan 23, 2020)';
|
const expectedString = 'all_things - all_things - Everything (one-fish.bpmn) - v1.0 (Jan 23, 2020)';
|
||||||
expect(component.getFileMetaDisplayString(mockFileMeta0)).toEqual(expectedString);
|
expect(component.getFileMetaDisplayString(mockFileMeta0)).toEqual(expectedString);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -379,6 +382,7 @@ describe('AppComponent', () => {
|
|||||||
component.workflowSpecs = mockWorkflowSpecs;
|
component.workflowSpecs = mockWorkflowSpecs;
|
||||||
const expectedString = `
|
const expectedString = `
|
||||||
Workflow spec ID: all_things
|
Workflow spec ID: all_things
|
||||||
|
Workflow name: all_things
|
||||||
Display name: Everything
|
Display name: Everything
|
||||||
Description: Do all the things
|
Description: Do all the things
|
||||||
File name: one-fish.bpmn
|
File name: one-fish.bpmn
|
||||||
|
@ -187,6 +187,7 @@ export class AppComponent implements AfterViewInit {
|
|||||||
|
|
||||||
this.workflowSpec = {
|
this.workflowSpec = {
|
||||||
id: data.workflowSpecId,
|
id: data.workflowSpecId,
|
||||||
|
name: data.name,
|
||||||
display_name: data.displayName,
|
display_name: data.displayName,
|
||||||
description: data.description,
|
description: data.description,
|
||||||
};
|
};
|
||||||
@ -203,6 +204,7 @@ export class AppComponent implements AfterViewInit {
|
|||||||
|
|
||||||
const newSpec: WorkflowSpec = {
|
const newSpec: WorkflowSpec = {
|
||||||
id: data.workflowSpecId,
|
id: data.workflowSpecId,
|
||||||
|
name: data.name,
|
||||||
display_name: data.displayName,
|
display_name: data.displayName,
|
||||||
description: data.description,
|
description: data.description,
|
||||||
};
|
};
|
||||||
@ -235,7 +237,7 @@ export class AppComponent implements AfterViewInit {
|
|||||||
const spec = this.getWorkflowSpec(fileMeta.workflow_spec_id);
|
const spec = this.getWorkflowSpec(fileMeta.workflow_spec_id);
|
||||||
|
|
||||||
if (spec) {
|
if (spec) {
|
||||||
const specName = spec.display_name;
|
const specName = spec.id + ' - ' + spec.name + ' - ' + spec.display_name;
|
||||||
const lastUpdated = new DatePipe('en-us').transform(fileMeta.last_updated);
|
const lastUpdated = new DatePipe('en-us').transform(fileMeta.last_updated);
|
||||||
return `${specName} (${fileMeta.name}) - v${fileMeta.version} (${lastUpdated})`;
|
return `${specName} (${fileMeta.name}) - v${fileMeta.version} (${lastUpdated})`;
|
||||||
} else {
|
} else {
|
||||||
@ -250,6 +252,7 @@ export class AppComponent implements AfterViewInit {
|
|||||||
const lastUpdated = new DatePipe('en-us').transform(fileMeta.last_updated);
|
const lastUpdated = new DatePipe('en-us').transform(fileMeta.last_updated);
|
||||||
return `
|
return `
|
||||||
Workflow spec ID: ${spec.id}
|
Workflow spec ID: ${spec.id}
|
||||||
|
Workflow name: ${spec.name}
|
||||||
Display name: ${spec.display_name}
|
Display name: ${spec.display_name}
|
||||||
Description: ${spec.description}
|
Description: ${spec.description}
|
||||||
File name: ${fileMeta.name}
|
File name: ${fileMeta.name}
|
||||||
|
@ -1,15 +1,18 @@
|
|||||||
<div mat-dialog-content>
|
<div mat-dialog-content>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input [(ngModel)]="data.workflowSpecId" matInput placeholder="Workflow specification id">
|
<input disabled required [(ngModel)]="data.workflowSpecId" matInput placeholder="Workflow specification id">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input [(ngModel)]="data.fileName" matInput placeholder="File name">
|
<input required [(ngModel)]="data.name" matInput placeholder="Workflow specification name">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<input [(ngModel)]="data.displayName" matInput placeholder="Display name">
|
<input required [(ngModel)]="data.fileName" matInput placeholder="File name">
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
<mat-form-field>
|
<mat-form-field>
|
||||||
<textarea [(ngModel)]="data.description" matInput matTextareaAutosize placeholder="Description"></textarea>
|
<input required [(ngModel)]="data.displayName" matInput placeholder="Display name">
|
||||||
|
</mat-form-field>
|
||||||
|
<mat-form-field>
|
||||||
|
<textarea required [(ngModel)]="data.description" matInput matTextareaAutosize placeholder="Description"></textarea>
|
||||||
</mat-form-field>
|
</mat-form-field>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -53,6 +53,7 @@ describe('EditFileMetaDialogComponent', () => {
|
|||||||
const dataBefore: FileMetaDialogData = {
|
const dataBefore: FileMetaDialogData = {
|
||||||
fileName: 'green_eggs.bpmn',
|
fileName: 'green_eggs.bpmn',
|
||||||
workflowSpecId: 'green_eggs',
|
workflowSpecId: 'green_eggs',
|
||||||
|
name: 'green_eggs',
|
||||||
displayName: 'Green Eggs',
|
displayName: 'Green Eggs',
|
||||||
description: 'Eat them! Eat them! Here they are.',
|
description: 'Eat them! Eat them! Here they are.',
|
||||||
};
|
};
|
||||||
@ -67,6 +68,7 @@ describe('EditFileMetaDialogComponent', () => {
|
|||||||
const dataBefore: FileMetaDialogData = {
|
const dataBefore: FileMetaDialogData = {
|
||||||
fileName: 'and_ham.bpmn',
|
fileName: 'and_ham.bpmn',
|
||||||
workflowSpecId: 'and_ham',
|
workflowSpecId: 'and_ham',
|
||||||
|
name: 'and_hame',
|
||||||
displayName: 'And Ham',
|
displayName: 'And Ham',
|
||||||
description: 'Would you, could you, in a box?',
|
description: 'Would you, could you, in a box?',
|
||||||
};
|
};
|
||||||
@ -81,6 +83,7 @@ describe('EditFileMetaDialogComponent', () => {
|
|||||||
const dataBefore: FileMetaDialogData = {
|
const dataBefore: FileMetaDialogData = {
|
||||||
fileName: ' 🍳 green_eggs.v1-2020-01-01.XML.bmnp 🍖 ',
|
fileName: ' 🍳 green_eggs.v1-2020-01-01.XML.bmnp 🍖 ',
|
||||||
workflowSpecId: 'green_eggs',
|
workflowSpecId: 'green_eggs',
|
||||||
|
name: 'green_eggs',
|
||||||
displayName: 'Green Eggs',
|
displayName: 'Green Eggs',
|
||||||
description: 'Eat them! Eat them! Here they are.',
|
description: 'Eat them! Eat them! Here they are.',
|
||||||
};
|
};
|
||||||
@ -97,6 +100,7 @@ describe('EditFileMetaDialogComponent', () => {
|
|||||||
const dataBefore: FileMetaDialogData = {
|
const dataBefore: FileMetaDialogData = {
|
||||||
fileName: 'green_eggs.bpmn',
|
fileName: 'green_eggs.bpmn',
|
||||||
workflowSpecId: ' 🍳 Green Eggs & Ham: A Dish Best Served Cold? 🍖 ',
|
workflowSpecId: ' 🍳 Green Eggs & Ham: A Dish Best Served Cold? 🍖 ',
|
||||||
|
name: 'green_eggs',
|
||||||
displayName: 'Green Eggs',
|
displayName: 'Green Eggs',
|
||||||
description: 'I would not, could not, with a fox!',
|
description: 'I would not, could not, with a fox!',
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user