Merge branch '16181-fix-vm-view' refs #16181
[arvados-workbench2.git] / src / common / labels.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { ResourceKind } from "~/models/resource";
6
7 export const resourceLabel = (type: string) => {
8     switch (type) {
9         case ResourceKind.COLLECTION:
10             return "Data collection";
11         case ResourceKind.PROJECT:
12             return "Project";
13         case ResourceKind.PROCESS:
14             return "Process";
15         case ResourceKind.USER:
16             return "User";
17         case ResourceKind.GROUP:
18             return "Group";
19         case ResourceKind.VIRTUAL_MACHINE:
20             return "Virtual Machine";
21         default:
22             return "Unknown";
23     }
24 };