[ARVADOS-WORKBENCH2] updated: 1.1.4-189-gb0573b4

Git user git at public.curoverse.com
Wed Jul 4 08:36:07 EDT 2018


Summary of changes:
 src/models/collection.ts                      | 21 +++++++++++++++--
 src/models/container-request.ts               | 34 +++++++++++++++++++++++++++
 src/models/group.ts                           | 18 ++++++++++++++
 src/models/kinds.ts                           | 12 ++++++++++
 src/models/process.ts                         |  7 ++++++
 src/models/project.ts                         |  9 +++++--
 src/models/workflow.ts                        | 13 ++++++++++
 src/services/groups-service/groups-service.ts | 24 +++++++++----------
 src/views/project-panel/project-panel-item.ts | 11 +++++----
 9 files changed, 129 insertions(+), 20 deletions(-)
 create mode 100644 src/models/container-request.ts
 create mode 100644 src/models/group.ts
 create mode 100644 src/models/kinds.ts
 create mode 100644 src/models/process.ts
 create mode 100644 src/models/workflow.ts

       via  b0573b45f19c656ac07901004a3686ef10d402a5 (commit)
      from  a918d09702ac7b1ac111ea12ded1cdb2bd801e88 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit b0573b45f19c656ac07901004a3686ef10d402a5
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Wed Jul 4 14:35:52 2018 +0200

    Update models with groups, colelctions, workflows and processes
    
    Feature #13703
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/models/collection.ts b/src/models/collection.ts
index 316b1fa..cf5b4e6 100644
--- a/src/models/collection.ts
+++ b/src/models/collection.ts
@@ -2,7 +2,24 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { Resource } from "./resource";
+import { Resource as R } from "./resource";
+import { Resource } from "../common/api/common-resource-service";
+import { ResourceKind } from "./kinds";
 
-export interface Collection extends Resource {
+export interface Collection extends R {
+}
+
+export interface CollectionResource extends Resource {
+    kind: ResourceKind.Collection;
+    name: string;
+    description: string;
+    properties: any;
+    portableDataHash: string;
+    manifestText: string;
+    replicationDesired: number;
+    replicationConfirmed: number;
+    replicationConfirmedAt: string;
+    trashAt: string;
+    deleteAt: string;
+    isTrashed: boolean;
 }
diff --git a/src/models/container-request.ts b/src/models/container-request.ts
new file mode 100644
index 0000000..44dd615
--- /dev/null
+++ b/src/models/container-request.ts
@@ -0,0 +1,34 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import { Resource } from "../common/api/common-resource-service";
+import { ResourceKind } from "./kinds";
+
+export interface ContainerRequestResource extends Resource {
+    kind: ResourceKind.ContainerRequest;
+    name: string;
+    description: string;
+    properties: any;
+    state: string;
+    requestingContainerUuid: string;
+    containerUuid: string;
+    containerCountMax: number;
+    mounts: any;
+    runtimeConstraints: any;
+    schedulingParameters: any;
+    containerImage: string;
+    environment: any;
+    cwd: string;
+    command: string[];
+    outputPath: string;
+    outputName: string;
+    outputTtl: number;
+    priority: number;
+    expiresAt: string;
+    useExisting: boolean;
+    logUuid: string;
+    outputUuid: string;
+    filters: string;
+
+}
\ No newline at end of file
diff --git a/src/models/group.ts b/src/models/group.ts
new file mode 100644
index 0000000..dae516b
--- /dev/null
+++ b/src/models/group.ts
@@ -0,0 +1,18 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import { Resource } from "../common/api/common-resource-service";
+import { ResourceKind } from "./kinds";
+
+export interface GroupResource extends Resource {
+    kind: ResourceKind.Group;
+    name: string;
+    groupClass: string;
+    description: string;
+    properties: string;
+    writeableBy: string[];
+    trashAt: string;
+    deleteAt: string;
+    isTrashed: boolean;
+}
\ No newline at end of file
diff --git a/src/models/kinds.ts b/src/models/kinds.ts
new file mode 100644
index 0000000..15bd622
--- /dev/null
+++ b/src/models/kinds.ts
@@ -0,0 +1,12 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+export enum ResourceKind {
+    Collection = "arvados#collection",
+    ContainerRequest = "arvados#containerRequest",
+    Group = "arvados#group",
+    Process = "arvados#containerRequest",
+    Project = "arvados#group",
+    Workflow = "arvados#workflow"
+}
\ No newline at end of file
diff --git a/src/models/process.ts b/src/models/process.ts
new file mode 100644
index 0000000..1e04cb1
--- /dev/null
+++ b/src/models/process.ts
@@ -0,0 +1,7 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import { ContainerRequestResource } from "./container-request";
+
+export type ProcessResource = ContainerRequestResource;
diff --git a/src/models/project.ts b/src/models/project.ts
index 7d29de8..beb9810 100644
--- a/src/models/project.ts
+++ b/src/models/project.ts
@@ -2,7 +2,12 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { Resource } from "./resource";
+import { Resource as R } from "./resource";
+import { GroupResource } from "./group";
 
-export interface Project extends Resource {
+export interface Project extends R {
+}
+
+export interface ProjectResource extends GroupResource {
+    groupClass: "project";
 }
diff --git a/src/models/workflow.ts b/src/models/workflow.ts
new file mode 100644
index 0000000..2054550
--- /dev/null
+++ b/src/models/workflow.ts
@@ -0,0 +1,13 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import { Resource } from "../common/api/common-resource-service";
+import { ResourceKind } from "./kinds";
+
+export interface WorkflowResource extends Resource {
+    kind: ResourceKind.Workflow;
+    name: string;
+    description: string;
+    definition: string;
+}
\ No newline at end of file
diff --git a/src/services/groups-service/groups-service.ts b/src/services/groups-service/groups-service.ts
index 1e53185..aa39e64 100644
--- a/src/services/groups-service/groups-service.ts
+++ b/src/services/groups-service/groups-service.ts
@@ -7,17 +7,11 @@ import CommonResourceService, { Resource, ListResults } from "../../common/api/c
 import FilterBuilder from "../../common/api/filter-builder";
 import OrderBuilder from "../../common/api/order-builder";
 import { AxiosInstance } from "axios";
-
-interface GroupResource extends Resource {
-    name: string;
-    groupClass: string;
-    description: string;
-    properties: string;
-    writeableBy: string[];
-    trashAt: string;
-    deleteAt: string;
-    isTrashed: boolean;
-}
+import { GroupResource } from "../../models/group";
+import { CollectionResource } from "../../models/collection";
+import { ProjectResource } from "../../models/project";
+import { WorkflowResource } from "../../models/workflow";
+import { ProcessResource } from "../../models/process";
 
 interface ContensArguments {
     limit?: number;
@@ -27,13 +21,19 @@ interface ContensArguments {
     recursive?: boolean;
 }
 
+export type GroupContentsResource =
+    CollectionResource |
+    ProjectResource |
+    WorkflowResource |
+    ProcessResource;
+
 export default class GroupsService extends CommonResourceService<GroupResource> {
 
     constructor(serverApi: AxiosInstance) {
         super(serverApi, "groups");
     }
 
-    contents (uuid: string, args: ContensArguments = {}): Promise<ListResults<Resource>> {
+    contents(uuid: string, args: ContensArguments = {}): Promise<ListResults<GroupContentsResource>> {
         const { filters, order, ...other } = args;
         const params = {
             ...other,
diff --git a/src/views/project-panel/project-panel-item.ts b/src/views/project-panel/project-panel-item.ts
index cf77aaf..9a9f845 100644
--- a/src/views/project-panel/project-panel-item.ts
+++ b/src/views/project-panel/project-panel-item.ts
@@ -2,8 +2,9 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { Resource } from "../../common/api/common-resource-service";
 import { DataItem } from "../../components/data-table/data-table";
+import { ResourceKind } from "../../models/kinds";
+import { GroupContentsResource } from "../../services/groups-service/groups-service";
 
 export interface ProjectPanelItem extends DataItem {
     uuid: string;
@@ -16,15 +17,17 @@ export interface ProjectPanelItem extends DataItem {
     status?: string;
 }
 
-export function resourceToDataItem(r: Resource): ProjectPanelItem {
+
+export function resourceToDataItem(r: GroupContentsResource): ProjectPanelItem {
     return {
         key: r.uuid,
         uuid: r.uuid,
-        name: r.uuid,
+        name: r.name,
         kind: r.kind,
         url: "",
         owner: r.ownerUuid,
-        lastModified: r.modifiedAt
+        lastModified: r.modifiedAt,
+        status:  r.kind === ResourceKind.Process ? r.state : undefined
     };
 }
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list