Replace go back item with browser back button support
[arvados.git] / src / models / resource.ts
index 4c198fb8cac56548a5d2ba4357c0ef271af2fcad..1dd5979b521a005af1ff94fbf219f6dee3138de8 100644 (file)
@@ -1,3 +1,7 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
 export interface Resource {
     name: string;
     createdAt: string;
@@ -5,22 +9,25 @@ export interface Resource {
     uuid: string;
     ownerUuid: string;
     href: string;
-    kind: string;
+    kind: ResourceKind;
 }
 
 export enum ResourceKind {
     PROJECT = "project",
     COLLECTION = "collection",
     PIPELINE = "pipeline",
-    LEVEL_UP = "levelup",
     UNKNOWN = "unknown"
 }
 
 export function getResourceKind(itemKind: string) {
     switch (itemKind) {
-        case "arvados#project": return ResourceKind.PROJECT;
-        case "arvados#collection": return ResourceKind.COLLECTION;
-        case "arvados#pipeline": return ResourceKind.PIPELINE;
+        case "arvados#project":
+        case "arvados#group":
+            return ResourceKind.PROJECT;
+        case "arvados#collection":
+            return ResourceKind.COLLECTION;
+        case "arvados#pipeline":
+            return ResourceKind.PIPELINE;
         default:
             return ResourceKind.UNKNOWN;
     }