projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
17914: Replaces deprecated substr() with substring().
[arvados-workbench2.git]
/
src
/
common
/
labels.ts
diff --git
a/src/common/labels.ts
b/src/common/labels.ts
index 9567ce14936b7d880ea06a42069feb85b9ab16d3..682513fb165e31105363a71decf7c2b4a74fa8fe 100644
(file)
--- a/
src/common/labels.ts
+++ b/
src/common/labels.ts
@@
-2,17
+2,28
@@
//
// 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) {
switch (type) {
- case ResourceKind.C
ollection
:
+ case ResourceKind.C
OLLECTION
:
return "Data collection";
return "Data collection";
- case ResourceKind.Project:
+ case ResourceKind.PROJECT:
+ if (subtype === "filter") {
+ return "Filter group";
+ } else if (subtype === "role") {
+ return "Group";
+ }
return "Project";
return "Project";
- case ResourceKind.P
rocess
:
+ case ResourceKind.P
ROCESS
:
return "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";
}
-};
\ No newline at end of file
+};