From 28feb9d1c063c850feade57797ff7370b33334fd Mon Sep 17 00:00:00 2001 From: Nicolas Gruel Date: Wed, 11 Sep 2024 12:34:39 +0200 Subject: [PATCH] feat: add pending and paused status introduce in ArmoniK.API 3.21.0 --- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- .../tasks/services/tasks-statuses.service.spec.ts | 4 +++- src/app/tasks/services/tasks-statuses.service.ts | 14 ++++++++------ 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index cfeab1cbb..fca92df32 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ }, "private": true, "dependencies": { - "@aneoconsultingfr/armonik.api.angular": "^3.20.0", + "@aneoconsultingfr/armonik.api.angular": "^3.21.0", "@angular-material-components/datetime-picker": "^16.0.1", "@angular/animations": "^18.2.3", "@angular/cdk": "18.2.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b8b7b3abf..ba224f8a4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@aneoconsultingfr/armonik.api.angular': - specifier: ^3.20.0 - version: 3.20.0(@angular/common@18.2.3(@angular/core@18.2.3(rxjs@7.8.1)(zone.js@0.14.4))(rxjs@7.8.1))(@angular/core@18.2.3(rxjs@7.8.1)(zone.js@0.14.4))(@ngx-grpc/common@3.1.2(google-protobuf@3.21.2)(rxjs@7.8.1))(@ngx-grpc/core@3.1.2(@angular/core@18.2.3(rxjs@7.8.1)(zone.js@0.14.4))(@ngx-grpc/common@3.1.2(google-protobuf@3.21.2)(rxjs@7.8.1))(rxjs@7.8.1))(@ngx-grpc/well-known-types@3.1.2(@ngx-grpc/common@3.1.2(google-protobuf@3.21.2)(rxjs@7.8.1))(google-protobuf@3.21.2))(google-protobuf@3.21.2)(rxjs@7.8.1) + specifier: ^3.21.0 + version: 3.21.0(@angular/common@18.2.3(@angular/core@18.2.3(rxjs@7.8.1)(zone.js@0.14.4))(rxjs@7.8.1))(@angular/core@18.2.3(rxjs@7.8.1)(zone.js@0.14.4))(@ngx-grpc/common@3.1.2(google-protobuf@3.21.2)(rxjs@7.8.1))(@ngx-grpc/core@3.1.2(@angular/core@18.2.3(rxjs@7.8.1)(zone.js@0.14.4))(@ngx-grpc/common@3.1.2(google-protobuf@3.21.2)(rxjs@7.8.1))(rxjs@7.8.1))(@ngx-grpc/well-known-types@3.1.2(@ngx-grpc/common@3.1.2(google-protobuf@3.21.2)(rxjs@7.8.1))(google-protobuf@3.21.2))(google-protobuf@3.21.2)(rxjs@7.8.1) '@angular-material-components/datetime-picker': specifier: ^16.0.1 version: 16.0.1(ufrbrx3ry7f6id6rle6zpka27i) @@ -164,8 +164,8 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} - '@aneoconsultingfr/armonik.api.angular@3.20.0': - resolution: {integrity: sha512-DATS5lD+Z8/v2S6wnwT+qJHcYIjWBY+zUASgR8eD/BAGUWMb9cmBhlnoElozD0hjfd+Ea+hXl5Tcgz6JyWyDkw==} + '@aneoconsultingfr/armonik.api.angular@3.21.0': + resolution: {integrity: sha512-VZMUDRHzqL85QBtyGdsl75LU/ZE2gP5KYyPh220yRPNE1skvC8K7D8OCIIkD0jqTYbBbUv40rRb7JbKCXSsOsg==} peerDependencies: '@angular/common': ^18.2.1 '@angular/core': ^18.2.1 @@ -6272,7 +6272,7 @@ snapshots: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - '@aneoconsultingfr/armonik.api.angular@3.20.0(@angular/common@18.2.3(@angular/core@18.2.3(rxjs@7.8.1)(zone.js@0.14.4))(rxjs@7.8.1))(@angular/core@18.2.3(rxjs@7.8.1)(zone.js@0.14.4))(@ngx-grpc/common@3.1.2(google-protobuf@3.21.2)(rxjs@7.8.1))(@ngx-grpc/core@3.1.2(@angular/core@18.2.3(rxjs@7.8.1)(zone.js@0.14.4))(@ngx-grpc/common@3.1.2(google-protobuf@3.21.2)(rxjs@7.8.1))(rxjs@7.8.1))(@ngx-grpc/well-known-types@3.1.2(@ngx-grpc/common@3.1.2(google-protobuf@3.21.2)(rxjs@7.8.1))(google-protobuf@3.21.2))(google-protobuf@3.21.2)(rxjs@7.8.1)': + '@aneoconsultingfr/armonik.api.angular@3.21.0(@angular/common@18.2.3(@angular/core@18.2.3(rxjs@7.8.1)(zone.js@0.14.4))(rxjs@7.8.1))(@angular/core@18.2.3(rxjs@7.8.1)(zone.js@0.14.4))(@ngx-grpc/common@3.1.2(google-protobuf@3.21.2)(rxjs@7.8.1))(@ngx-grpc/core@3.1.2(@angular/core@18.2.3(rxjs@7.8.1)(zone.js@0.14.4))(@ngx-grpc/common@3.1.2(google-protobuf@3.21.2)(rxjs@7.8.1))(rxjs@7.8.1))(@ngx-grpc/well-known-types@3.1.2(@ngx-grpc/common@3.1.2(google-protobuf@3.21.2)(rxjs@7.8.1))(google-protobuf@3.21.2))(google-protobuf@3.21.2)(rxjs@7.8.1)': dependencies: '@angular/common': 18.2.3(@angular/core@18.2.3(rxjs@7.8.1)(zone.js@0.14.4))(rxjs@7.8.1) '@angular/core': 18.2.3(rxjs@7.8.1)(zone.js@0.14.4) diff --git a/src/app/tasks/services/tasks-statuses.service.spec.ts b/src/app/tasks/services/tasks-statuses.service.spec.ts index 17881cfac..94c898359 100644 --- a/src/app/tasks/services/tasks-statuses.service.spec.ts +++ b/src/app/tasks/services/tasks-statuses.service.spec.ts @@ -25,7 +25,9 @@ describe('tasksStatusesService', () => { { value: '8', name: 'Cancelled' }, { value: '9', name: 'Processing' }, { value: '10', name: 'Processed' }, - { value: '11', name: 'Retried' } + { value: '11', name: 'Retried' }, + { value: '12', name: 'Pending' }, + { value: '13', name: 'Paused' } ]); }); diff --git a/src/app/tasks/services/tasks-statuses.service.ts b/src/app/tasks/services/tasks-statuses.service.ts index 5becf37d0..2ddc3ba29 100644 --- a/src/app/tasks/services/tasks-statuses.service.ts +++ b/src/app/tasks/services/tasks-statuses.service.ts @@ -7,17 +7,19 @@ import { StatusesServiceI } from '@app/types/services'; export class TasksStatusesService implements StatusesServiceI { readonly statuses: Record = { [TaskStatus.TASK_STATUS_UNSPECIFIED]: $localize`Unspecified`, - [TaskStatus.TASK_STATUS_DISPATCHED]: $localize`Dispatched`, [TaskStatus.TASK_STATUS_CREATING]: $localize`Creating`, [TaskStatus.TASK_STATUS_SUBMITTED]: $localize`Submitted`, - [TaskStatus.TASK_STATUS_PROCESSING]: $localize`Processing`, - [TaskStatus.TASK_STATUS_PROCESSED]: $localize`Processed`, - [TaskStatus.TASK_STATUS_CANCELLING]: $localize`Cancelling`, - [TaskStatus.TASK_STATUS_CANCELLED]: $localize`Cancelled`, + [TaskStatus.TASK_STATUS_DISPATCHED]: $localize`Dispatched`, [TaskStatus.TASK_STATUS_COMPLETED]: $localize`Completed`, [TaskStatus.TASK_STATUS_ERROR]: $localize`Error`, [TaskStatus.TASK_STATUS_TIMEOUT]: $localize`Timeout`, + [TaskStatus.TASK_STATUS_CANCELLING]: $localize`Cancelling`, + [TaskStatus.TASK_STATUS_CANCELLED]: $localize`Cancelled`, + [TaskStatus.TASK_STATUS_PROCESSING]: $localize`Processing`, + [TaskStatus.TASK_STATUS_PROCESSED]: $localize`Processed`, [TaskStatus.TASK_STATUS_RETRIED]: $localize`Retried`, + [TaskStatus.TASK_STATUS_PENDING]: $localize`Pending`, + [TaskStatus.TASK_STATUS_PAUSED]: $localize`Paused`, }; statusesRecord(): { value: string, name: string }[] { @@ -60,6 +62,6 @@ export class TasksStatusesService implements StatusesServiceI { */ taskNotEnded(taskStatus: TaskStatus) { return taskStatus === TaskStatus.TASK_STATUS_PROCESSING || taskStatus === TaskStatus.TASK_STATUS_CREATING || taskStatus === TaskStatus.TASK_STATUS_SUBMITTED - || taskStatus === TaskStatus.TASK_STATUS_DISPATCHED || taskStatus === TaskStatus.TASK_STATUS_RETRIED; + || taskStatus === TaskStatus.TASK_STATUS_DISPATCHED || taskStatus === TaskStatus.TASK_STATUS_RETRIED || taskStatus === TaskStatus.TASK_STATUS_PENDING || taskStatus === TaskStatus.TASK_STATUS_PAUSED ; } }