1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { ResourceKind } from "models/resource";
6 import { ProcessTypeFilter } from "store/resource-type-filters/resource-type-filters";
8 export const resourceLabel = (type: string, subtype = '') => {
10 case ResourceKind.COLLECTION:
11 return "Data collection";
12 case ResourceKind.PROJECT:
13 if (subtype === "filter") {
14 return "Filter group";
15 } else if (subtype === "role") {
19 case ResourceKind.PROCESS:
20 if (subtype === ProcessTypeFilter.MAIN_PROCESS) {
21 return "Workflow Run";
23 return "Workflow Step";
24 case ResourceKind.USER:
26 case ResourceKind.GROUP:
28 case ResourceKind.VIRTUAL_MACHINE:
29 return "Virtual Machine";
30 case ResourceKind.WORKFLOW: