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/package-lock.json b/package-lock.json index 2b2d95b..9322cf6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11921,9 +11921,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", @@ -12999,9 +12999,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" @@ -15421,9 +15421,9 @@ "dev": true }, "y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", + "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 5864dcc..6a42d67 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "ngx-markdown": "^9.1.1", "protractor": "^7.0.0", "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" 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/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 ecdc5e1..4d156d5 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'; @@ -113,6 +112,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', @@ -122,7 +122,8 @@ export class WorkflowSpecListComponent implements OnInit { dialogRef.afterClosed().subscribe((data: WorkflowSpecDialogData) => { if (data && data.id && data.name && data.display_name && data.description) { - this._upsertWorkflowSpecification(selectedSpec == null, data); + data.display_order = this.categories.filter(function (entry) { return entry.id === data.category_id; }).length; + this._upsertWorkflowSpecification(selectedSpec == null, data); } }); }