Adds workflow spec name
This commit is contained in:
parent
69af10caf2
commit
e93051941d
|
@ -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"
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
},
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
export interface FileMetaDialogData {
|
||||
fileName: string;
|
||||
workflowSpecId: string;
|
||||
name: string;
|
||||
displayName: string;
|
||||
description: string;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
<div mat-dialog-content>
|
||||
<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>
|
||||
<input [(ngModel)]="data.fileName" matInput placeholder="File name">
|
||||
<input required [(ngModel)]="data.name" matInput placeholder="Workflow specification name">
|
||||
</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>
|
||||
<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>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -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!',
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue