diff --git a/package-lock.json b/package-lock.json index 36ecf91..9b08b81 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9917,9 +9917,9 @@ "dev": true }, "sartography-workflow-lib": { - "version": "0.0.13", - "resolved": "https://registry.npmjs.org/sartography-workflow-lib/-/sartography-workflow-lib-0.0.13.tgz", - "integrity": "sha512-qVFKnvPeubnEfuRAqKLW7zN9J6aXeP8F5IVpJMs7+qRsfCWV311UZJCRbBU7s9fdDN/27LAsBvy1dYiWh3If3A==", + "version": "0.0.14", + "resolved": "https://registry.npmjs.org/sartography-workflow-lib/-/sartography-workflow-lib-0.0.14.tgz", + "integrity": "sha512-+t0dbrP0yHvE/cAO1wDd2p2MG7qGr2RVi4SOQQ5tb2IiN4VpmukZ4Wisq1xWViMF4rD/JrKRT1YCkdIn23kizQ==", "requires": { "tslib": "^1.9.0" } diff --git a/package.json b/package.json index c71223a..0c82163 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "file-saver": "^2.0.2", "hammerjs": "^2.0.8", "rxjs": "~6.5.4", - "sartography-workflow-lib": "^0.0.13", + "sartography-workflow-lib": "^0.0.14", "tslib": "^1.10.0", "zone.js": "~0.9.1" }, diff --git a/src/app/_interfaces/file-meta-dialog-data.ts b/src/app/_interfaces/file-meta-dialog-data.ts index 9fdc4d3..9d0cd58 100644 --- a/src/app/_interfaces/file-meta-dialog-data.ts +++ b/src/app/_interfaces/file-meta-dialog-data.ts @@ -1,6 +1,7 @@ export interface FileMetaDialogData { fileName: string; workflowSpecId: string; + name: string; displayName: string; description: string; } diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index 272ceec..4a52546 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -236,6 +236,7 @@ describe('AppComponent', () => { const data: FileMetaDialogData = { fileName: 'after', workflowSpecId: 'after', + name: 'after', description: 'after', displayName: 'after', }; @@ -253,6 +254,7 @@ describe('AppComponent', () => { const data: FileMetaDialogData = { fileName: mockFileMeta0.name, workflowSpecId: mockWorkflowSpec0.id, + name: mockWorkflowSpec0.name, description: mockWorkflowSpec0.description, displayName: mockWorkflowSpec0.display_name, }; @@ -287,6 +289,7 @@ describe('AppComponent', () => { const data: FileMetaDialogData = { fileName: mockFileMeta0.name, workflowSpecId: mockWorkflowSpec0.id, + name: mockWorkflowSpec0.id, description: mockWorkflowSpec0.description, displayName: mockWorkflowSpec0.display_name, }; @@ -370,7 +373,7 @@ describe('AppComponent', () => { it('should get a file metadata display string', () => { expect(component.getFileMetaDisplayString(mockFileMeta0)).toEqual('Loading...'); 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); }); @@ -379,6 +382,7 @@ describe('AppComponent', () => { component.workflowSpecs = mockWorkflowSpecs; const expectedString = ` Workflow spec ID: all_things + Workflow name: all_things Display name: Everything Description: Do all the things File name: one-fish.bpmn diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 02c41f8..e1c47fa 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -187,6 +187,7 @@ export class AppComponent implements AfterViewInit { this.workflowSpec = { id: data.workflowSpecId, + name: data.name, display_name: data.displayName, description: data.description, }; @@ -203,6 +204,7 @@ export class AppComponent implements AfterViewInit { const newSpec: WorkflowSpec = { id: data.workflowSpecId, + name: data.name, display_name: data.displayName, description: data.description, }; @@ -235,7 +237,7 @@ export class AppComponent implements AfterViewInit { const spec = this.getWorkflowSpec(fileMeta.workflow_spec_id); 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); return `${specName} (${fileMeta.name}) - v${fileMeta.version} (${lastUpdated})`; } else { @@ -250,6 +252,7 @@ export class AppComponent implements AfterViewInit { const lastUpdated = new DatePipe('en-us').transform(fileMeta.last_updated); return ` Workflow spec ID: ${spec.id} + Workflow name: ${spec.name} Display name: ${spec.display_name} Description: ${spec.description} File name: ${fileMeta.name} diff --git a/src/app/file-meta-dialog/file-meta-dialog.component.html b/src/app/file-meta-dialog/file-meta-dialog.component.html index 7b99eef..4586ea5 100644 --- a/src/app/file-meta-dialog/file-meta-dialog.component.html +++ b/src/app/file-meta-dialog/file-meta-dialog.component.html @@ -1,15 +1,18 @@
- + - + - + - + + + +
diff --git a/src/app/file-meta-dialog/file-meta-dialog.component.spec.ts b/src/app/file-meta-dialog/file-meta-dialog.component.spec.ts index 4714155..b3ef894 100644 --- a/src/app/file-meta-dialog/file-meta-dialog.component.spec.ts +++ b/src/app/file-meta-dialog/file-meta-dialog.component.spec.ts @@ -53,6 +53,7 @@ describe('EditFileMetaDialogComponent', () => { const dataBefore: FileMetaDialogData = { fileName: 'green_eggs.bpmn', workflowSpecId: 'green_eggs', + name: 'green_eggs', displayName: 'Green Eggs', description: 'Eat them! Eat them! Here they are.', }; @@ -67,6 +68,7 @@ describe('EditFileMetaDialogComponent', () => { const dataBefore: FileMetaDialogData = { fileName: 'and_ham.bpmn', workflowSpecId: 'and_ham', + name: 'and_hame', displayName: 'And Ham', description: 'Would you, could you, in a box?', }; @@ -81,6 +83,7 @@ describe('EditFileMetaDialogComponent', () => { const dataBefore: FileMetaDialogData = { fileName: ' 🍳 green_eggs.v1-2020-01-01.XML.bmnp 🍖 ', workflowSpecId: 'green_eggs', + name: 'green_eggs', displayName: 'Green Eggs', description: 'Eat them! Eat them! Here they are.', }; @@ -97,6 +100,7 @@ describe('EditFileMetaDialogComponent', () => { const dataBefore: FileMetaDialogData = { fileName: 'green_eggs.bpmn', workflowSpecId: ' 🍳 Green Eggs & Ham: A Dish Best Served Cold? 🍖 ', + name: 'green_eggs', displayName: 'Green Eggs', description: 'I would not, could not, with a fox!', };