projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
18881: Fixes process state indicator, with tests.
[arvados-workbench2.git]
/
src
/
common
/
labels.ts
diff --git
a/src/common/labels.ts
b/src/common/labels.ts
index 0e3131db6a3f8c9621c05e3e4df3770960537b88..682513fb165e31105363a71decf7c2b4a74fa8fe 100644
(file)
--- a/
src/common/labels.ts
+++ b/
src/common/labels.ts
@@
-2,16
+2,27
@@
//
// SPDX-License-Identifier: AGPL-3.0
//
// 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:
return "Data collection";
case ResourceKind.PROJECT:
switch (type) {
case ResourceKind.COLLECTION:
return "Data collection";
case ResourceKind.PROJECT:
+ if (subtype === "filter") {
+ return "Filter group";
+ } else if (subtype === "role") {
+ return "Group";
+ }
return "Project";
case ResourceKind.PROCESS:
return "Process";
return "Project";
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";
}
default:
return "Unknown";
}