X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/5e88476747d9fb0c77ef76d63430192fa4b77f22..5fd5db805554d3eddd46cc911a5108fbb74b3cfc:/src/views-components/project-explorer/project-explorer-item.ts?ds=sidebyside diff --git a/src/views-components/project-explorer/project-explorer-item.ts b/src/views-components/project-explorer/project-explorer-item.ts index 055c22cf..4fa3d3d6 100644 --- a/src/views-components/project-explorer/project-explorer-item.ts +++ b/src/views-components/project-explorer/project-explorer-item.ts @@ -2,12 +2,26 @@ // // SPDX-License-Identifier: AGPL-3.0 +import { getResourceKind, Resource, ResourceKind } from "../../models/resource"; + export interface ProjectExplorerItem { uuid: string; name: string; - type: string; + kind: ResourceKind; + url: string; owner: string; lastModified: string; fileSize?: number; status?: string; } + +function resourceToDataItem(r: Resource, kind?: ResourceKind) { + return { + uuid: r.uuid, + name: r.name, + kind: kind ? kind : getResourceKind(r.kind), + owner: r.ownerUuid, + lastModified: r.modifiedAt + }; +} +