diff --git a/src/app/workflow-spec-list/workflow-spec-list.component.ts b/src/app/workflow-spec-list/workflow-spec-list.component.ts index d105048..c0e3381 100644 --- a/src/app/workflow-spec-list/workflow-spec-list.component.ts +++ b/src/app/workflow-spec-list/workflow-spec-list.component.ts @@ -191,15 +191,21 @@ export class WorkflowSpecListComponent implements OnInit { canDeleteWorkflowSpec(wfs){ - // TODO: put the popup back in for this let references = [] if (wfs.library){ this.workflowSpecs.forEach(spec => { if (spec.libraries.indexOf(wfs.id) >= 0 ) { - references.push(wfs.id); + references.push(spec.id); } }); if (references.length > 0) { + let message = ''; + references.forEach(ref => { + message += ref.toString() + ', '; + }); + message = message.substr(0, message.length-2); + this.snackBar.open('The Library ' + '\'' + wfs.display_name + '\'' + + ' is still being referenced by these workflows: ' + message, 'Ok'); return false; } } @@ -221,8 +227,6 @@ export class WorkflowSpecListComponent implements OnInit { if (typeof this.masterStatusSpec !== 'undefined') { this.selectSpec(this.masterStatusSpec); } - } else { - // TODO: the library is being referenced elsewhere still } }); }