X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/a886877017be6744b38d84d52503d21892704139..3efbabfcd06a10b83f1f130141d6c1f6017037cf:/src/common/labels.ts diff --git a/src/common/labels.ts b/src/common/labels.ts index 9567ce14..cfc2c52c 100644 --- a/src/common/labels.ts +++ b/src/common/labels.ts @@ -2,17 +2,26 @@ // // SPDX-License-Identifier: AGPL-3.0 -import { ResourceKind } from "../models/resource"; +import { ResourceKind } from "~/models/resource"; -export const resourceLabel = (type: string) => { +export const resourceLabel = (type: string, subtype = '') => { switch (type) { - case ResourceKind.Collection: + case ResourceKind.COLLECTION: return "Data collection"; - case ResourceKind.Project: + case ResourceKind.PROJECT: + if (subtype === "filter") { + return "Filter group"; + } return "Project"; - case ResourceKind.Process: + case ResourceKind.PROCESS: return "Process"; + case ResourceKind.USER: + return "User"; + case ResourceKind.GROUP: + return "Group"; + case ResourceKind.VIRTUAL_MACHINE: + return "Virtual Machine"; default: return "Unknown"; } -}; \ No newline at end of file +};