X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a2a93caf3e8c78fc93d47eec249086e26124a0be..4d78e6e875392cdcadad164cc3863a552343833f:/src/common/labels.ts diff --git a/src/common/labels.ts b/src/common/labels.ts index 8ca9e530f4..e784cec0f5 100644 --- a/src/common/labels.ts +++ b/src/common/labels.ts @@ -2,17 +2,30 @@ // // SPDX-License-Identifier: AGPL-3.0 -import { ResourceKind } from "../models/kinds"; +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"; + } else if (subtype === "role") { + return "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"; + case ResourceKind.WORKFLOW: + return "Workflow"; default: return "Unknown"; } -}; \ No newline at end of file +};