From 404f26aee90062fc57b24efd5c9f289492fd8305 Mon Sep 17 00:00:00 2001 From: Nile Walker Date: Tue, 23 Mar 2021 16:52:41 -0400 Subject: [PATCH 1/3] fixes 74 --- .../workflow-spec-dialog.component.ts | 14 +------------- .../workflow-spec-list.component.ts | 2 ++ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/app/_dialogs/workflow-spec-dialog/workflow-spec-dialog.component.ts b/src/app/_dialogs/workflow-spec-dialog/workflow-spec-dialog.component.ts index 8fa271a..f4d0a32 100644 --- a/src/app/_dialogs/workflow-spec-dialog/workflow-spec-dialog.component.ts +++ b/src/app/_dialogs/workflow-spec-dialog/workflow-spec-dialog.component.ts @@ -89,19 +89,7 @@ export class WorkflowSpecDialogComponent { description: 'Write a few sentences explaining to users why this workflow exists and what it should be used for.', required: true, }, - }, - { - key: 'display_order', - type: 'input', - defaultValue: this.data.display_order, - templateOptions: { - type: 'number', - label: 'Display Order', - placeholder: 'Order in which spec will be displayed', - description: 'Sort order that the spec should appear in within its category. Lower numbers will appear first.', - required: true, - }, - }, + } ]; }); } 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 d6fcf21..589cb88 100644 --- a/src/app/workflow-spec-list/workflow-spec-list.component.ts +++ b/src/app/workflow-spec-list/workflow-spec-list.component.ts @@ -109,6 +109,7 @@ export class WorkflowSpecListComponent implements OnInit { display_order: hasDisplayOrder ? selectedSpec.display_order : 0, }; + // Open new filename/workflow spec dialog const dialogRef = this.dialog.open(WorkflowSpecDialogComponent, { height: '65vh', @@ -118,6 +119,7 @@ export class WorkflowSpecListComponent implements OnInit { dialogRef.afterClosed().subscribe((data: WorkflowSpecDialogData) => { if (data && data.id && data.name && data.display_name && data.description) { + data.display_order = this.categories.filter(function (entry) { return entry.id === data.category_id;}).length; this._upsertWorkflowSpecification(selectedSpec == null, data); } }); From 32c1da1c3cce920c1ce8a455df8f23569e1189ba Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 16 Apr 2021 14:24:38 -0400 Subject: [PATCH 2/3] correcting some linting errors. --- Dockerfile | 2 +- src/app/file-list/file-list.component.ts | 1 + src/app/workflow-spec-list/workflow-spec-list.component.ts | 5 ++--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 42f0b11..f9b6420 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,7 +12,7 @@ RUN npm install && \ ### STAGE 2: Run ### FROM quay.io/sartography/nginx:alpine -RUN set -x && apk add --update --no-cache bash libintl gettext curl +RUN set -x && apk add --update --no-cache bash libintl gettext curl`` COPY --from=builder /app/dist/* /etc/nginx/html/ COPY --from=builder /app/nginx.conf /etc/nginx/conf.d/default.conf diff --git a/src/app/file-list/file-list.component.ts b/src/app/file-list/file-list.component.ts index f11c96a..39b3f1a 100644 --- a/src/app/file-list/file-list.component.ts +++ b/src/app/file-list/file-list.component.ts @@ -81,6 +81,7 @@ export class FileListComponent implements OnInit, OnChanges { makePrimary(fmPrimary: FileMeta) { if (fmPrimary.type === FileType.BPMN) { let numUpdated = 0; + // Fixme: This buisness rule does not belong here. this.fileMetas.forEach(fm => { fm.primary = (fmPrimary.id === fm.id); this.api.updateFileMeta(fm).subscribe(() => { 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 589cb88..769d0d9 100644 --- a/src/app/workflow-spec-list/workflow-spec-list.component.ts +++ b/src/app/workflow-spec-list/workflow-spec-list.component.ts @@ -23,7 +23,6 @@ import { } from '../_interfaces/dialog-data'; import { ApiErrorsComponent } from 'sartography-workflow-lib'; import { ActivatedRoute } from '@angular/router'; -import { debounceTime, distinctUntilChanged, map, switchMap, tap } from 'rxjs/operators'; import { Location } from '@angular/common'; import { environment } from '../../environments/environment.runtime'; import { FormControl } from '@angular/forms'; @@ -109,7 +108,7 @@ export class WorkflowSpecListComponent implements OnInit { display_order: hasDisplayOrder ? selectedSpec.display_order : 0, }; - + // Open new filename/workflow spec dialog const dialogRef = this.dialog.open(WorkflowSpecDialogComponent, { height: '65vh', @@ -119,7 +118,7 @@ export class WorkflowSpecListComponent implements OnInit { dialogRef.afterClosed().subscribe((data: WorkflowSpecDialogData) => { if (data && data.id && data.name && data.display_name && data.description) { - data.display_order = this.categories.filter(function (entry) { return entry.id === data.category_id;}).length; + data.display_order = this.categories.filter(function (entry) { return entry.id === data.category_id; }).length; this._upsertWorkflowSpecification(selectedSpec == null, data); } }); From 5234f2b3bbe65d9cb6c5cf7c9cce75836d9d3404 Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 16 Apr 2021 14:53:14 -0400 Subject: [PATCH 3/3] Updating packages, including more recent sartography-workflow-lib. --- package-lock.json | 18 +++++++++--------- package.json | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 12546ea..6dcd79b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12032,9 +12032,9 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "sartography-workflow-lib": { - "version": "0.0.415", - "resolved": "https://registry.npmjs.org/sartography-workflow-lib/-/sartography-workflow-lib-0.0.415.tgz", - "integrity": "sha512-dc/JObsAq0TqGra/NuHG23EpmXrfnQqxbhGWXXkTfySDcA9beRNxJ5nd7xlc8EZzbUiWXIKxVM3xiyBCBQ+88A==" + "version": "0.0.447", + "resolved": "https://registry.npmjs.org/sartography-workflow-lib/-/sartography-workflow-lib-0.0.447.tgz", + "integrity": "sha512-xGBS1YQbXKj3O3I8bK58m7D2NApUpZUuzE3FxLTjS52Q1FL6Hgw2GY8urTJ/BF0a4ROEIHUaPm/4BN9yuzx33w==" }, "sass": { "version": "1.26.3", @@ -13118,9 +13118,9 @@ } }, "ssri": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.0.tgz", - "integrity": "sha512-aq/pz989nxVYwn16Tsbj1TqFpD5LLrQxHf5zaHuieFV+R0Bbr4y8qUsOA45hXT/N4/9UNXTarBjnjVmjSOVaAA==", + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.1.tgz", + "integrity": "sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ==", "dev": true, "requires": { "minipass": "^3.1.1" @@ -15552,9 +15552,9 @@ "dev": true }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true }, "yallist": { diff --git a/package.json b/package.json index 08e3356..682a52a 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "ngx-highlightjs": "^4.1.1", "ngx-markdown": "^9.1.1", "rxjs": "~6.5.4", - "sartography-workflow-lib": "0.0.415", + "sartography-workflow-lib": "0.0.447", "tslib": "^1.13.0", "uuid": "^7.0.2", "zone.js": "^0.10.3"