[ARVADOS-WORKBENCH2] created: 1.1.4-427-g2badeb3

Git user git at public.curoverse.com
Wed Jul 25 04:59:55 EDT 2018


        at  2badeb3fe6beb308b952ab2b7101ed4547c04e10 (commit)


commit 2badeb3fe6beb308b952ab2b7101ed4547c04e10
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date:   Wed Jul 25 10:59:39 2018 +0200

    change-snakecase-to-uppercase-in-enums
    
    Feature #13830
    
    Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>

diff --git a/src/common/labels.ts b/src/common/labels.ts
index 9567ce1..ed3a43d 100644
--- a/src/common/labels.ts
+++ b/src/common/labels.ts
@@ -6,11 +6,11 @@ import { ResourceKind } from "../models/resource";
 
 export const resourceLabel = (type: string) => {
     switch (type) {
-        case ResourceKind.Collection:
+        case ResourceKind.COLLECTION:
             return "Data collection";
-        case ResourceKind.Project:
+        case ResourceKind.PROJECT:
             return "Project";
-        case ResourceKind.Process:
+        case ResourceKind.PROCESS:
             return "Process";
         default:
             return "Unknown";
diff --git a/src/components/data-table/data-column.ts b/src/components/data-table/data-column.ts
index 06744c3..96ef952 100644
--- a/src/components/data-table/data-column.ts
+++ b/src/components/data-table/data-column.ts
@@ -17,9 +17,9 @@ export interface DataColumn<T, F extends DataTableFilterItem = DataTableFilterIt
 }
 
 export enum SortDirection {
-    Asc = "asc",
-    Desc = "desc",
-    None = "none"
+    ASC = "asc",
+    DESC = "desc",
+    NONE = "none"
 }
 
 export const isColumnConfigurable = <T>(column: DataColumn<T>) => {
@@ -28,12 +28,12 @@ export const isColumnConfigurable = <T>(column: DataColumn<T>) => {
 
 export const toggleSortDirection = <T>(column: DataColumn<T>): DataColumn<T> => {
     return column.sortDirection
-        ? column.sortDirection === SortDirection.Asc
-            ? { ...column, sortDirection: SortDirection.Desc }
-            : { ...column, sortDirection: SortDirection.Asc }
+        ? column.sortDirection === SortDirection.ASC
+            ? { ...column, sortDirection: SortDirection.DESC }
+            : { ...column, sortDirection: SortDirection.ASC }
         : column;
 };
 
 export const resetSortDirection = <T>(column: DataColumn<T>): DataColumn<T> => {
-    return column.sortDirection ? { ...column, sortDirection: SortDirection.None } : column;
+    return column.sortDirection ? { ...column, sortDirection: SortDirection.NONE } : column;
 };
diff --git a/src/components/data-table/data-table.tsx b/src/components/data-table/data-table.tsx
index 829bc84..f92f97b 100644
--- a/src/components/data-table/data-table.tsx
+++ b/src/components/data-table/data-table.tsx
@@ -74,8 +74,8 @@ export const DataTable = withStyles(styles)(
                         </DataTableFilters>
                         : sortDirection
                             ? <TableSortLabel
-                                active={sortDirection !== SortDirection.None}
-                                direction={sortDirection !== SortDirection.None ? sortDirection : undefined}
+                                active={sortDirection !== SortDirection.NONE}
+                                direction={sortDirection !== SortDirection.NONE ? sortDirection : undefined}
                                 onClick={() =>
                                     onSortToggle &&
                                     onSortToggle(column)}>
diff --git a/src/components/tree/tree.tsx b/src/components/tree/tree.tsx
index 799e821..604ba49 100644
--- a/src/components/tree/tree.tsx
+++ b/src/components/tree/tree.tsx
@@ -44,9 +44,9 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
 });
 
 export enum TreeItemStatus {
-    Initial,
-    Pending,
-    Loaded
+    INITIAL,
+    PENDING,
+    LOADED
 }
 
 export interface TreeItem<T> {
@@ -80,7 +80,7 @@ export const Tree = withStyles(styles)(
                         <ListItem button className={list} style={{ paddingLeft: (level + 1) * 20 }}
                             onClick={() => toggleItemActive(it.id, it.status)}
                             onContextMenu={this.handleRowContextMenu(it)}>
-                            {it.status === TreeItemStatus.Pending ?
+                            {it.status === TreeItemStatus.PENDING ?
                                 <CircularProgress size={10} className={loader} /> : null}
                             <i onClick={() => this.props.toggleItemOpen(it.id, it.status)}
                                 className={toggableIconContainer}>
diff --git a/src/index.tsx b/src/index.tsx
index 7443aea..77d5763 100644
--- a/src/index.tsx
+++ b/src/index.tsx
@@ -25,10 +25,10 @@ import { projectActionSet } from "./views-components/context-menu/action-sets/pr
 import { resourceActionSet } from './views-components/context-menu/action-sets/resource-action-set';
 import { favoriteActionSet } from "./views-components/context-menu/action-sets/favorite-action-set";
 
-addMenuActionSet(ContextMenuKind.RootProject, rootProjectActionSet);
-addMenuActionSet(ContextMenuKind.Project, projectActionSet);
-addMenuActionSet(ContextMenuKind.Resource, resourceActionSet);
-addMenuActionSet(ContextMenuKind.Favorite, favoriteActionSet);
+addMenuActionSet(ContextMenuKind.ROOT_PROJECT, rootProjectActionSet);
+addMenuActionSet(ContextMenuKind.PROJECT, projectActionSet);
+addMenuActionSet(ContextMenuKind.RESOURCE, resourceActionSet);
+addMenuActionSet(ContextMenuKind.FAVORITE, favoriteActionSet);
 
 fetchConfig()
     .then(config => {
diff --git a/src/models/collection.ts b/src/models/collection.ts
index 2a92594..9cb8bb8 100644
--- a/src/models/collection.ts
+++ b/src/models/collection.ts
@@ -5,7 +5,7 @@
 import { Resource, ResourceKind } from "./resource";
 
 export interface CollectionResource extends Resource {
-    kind: ResourceKind.Collection;
+    kind: ResourceKind.COLLECTION;
     name: string;
     description: string;
     properties: any;
diff --git a/src/models/container-request.ts b/src/models/container-request.ts
index 4e54815..d1bcc36 100644
--- a/src/models/container-request.ts
+++ b/src/models/container-request.ts
@@ -5,13 +5,13 @@
 import { Resource, ResourceKind } from "./resource";
 
 export enum ContainerRequestState {
-    Uncommitted = "Uncommitted",
-    Committed = "Committed",
-    Final = "Final"
+    UNCOMMITTED = "Uncommitted",
+    COMMITTED = "Committed",
+    FINAL = "Final"
 }
 
 export interface ContainerRequestResource extends Resource {
-    kind: ResourceKind.ContainerRequest;
+    kind: ResourceKind.CONTAINER_REQUEST;
     name: string;
     description: string;
     properties: any;
diff --git a/src/models/group.ts b/src/models/group.ts
index d8efae2..5e8d7a1 100644
--- a/src/models/group.ts
+++ b/src/models/group.ts
@@ -5,7 +5,7 @@
 import { Resource, ResourceKind } from "./resource";
 
 export interface GroupResource extends Resource {
-    kind: ResourceKind.Group;
+    kind: ResourceKind.GROUP;
     name: string;
     groupClass: GroupClass | null;
     description: string;
@@ -17,5 +17,5 @@ export interface GroupResource extends Resource {
 }
 
 export enum GroupClass {
-    Project = "project"
+    PROJECT = "project"
 }
\ No newline at end of file
diff --git a/src/models/project.ts b/src/models/project.ts
index 1373ca7..eaf6090 100644
--- a/src/models/project.ts
+++ b/src/models/project.ts
@@ -5,5 +5,5 @@
 import { GroupResource, GroupClass } from "./group";
 
 export interface ProjectResource extends GroupResource {
-    groupClass: GroupClass.Project;
+    groupClass: GroupClass.PROJECT;
 }
diff --git a/src/models/resource.ts b/src/models/resource.ts
index 2d72fbc..6a76b07 100644
--- a/src/models/resource.ts
+++ b/src/models/resource.ts
@@ -15,10 +15,10 @@ export interface Resource {
 }
 
 export enum ResourceKind {
-    Collection = "arvados#collection",
-    ContainerRequest = "arvados#containerRequest",
-    Group = "arvados#group",
-    Process = "arvados#containerRequest",
-    Project = "arvados#group",
-    Workflow = "arvados#workflow"
+    COLLECTION = "arvados#collection",
+    CONTAINER_REQUEST = "arvados#containerRequest",
+    GROUP = "arvados#group",
+    PROCESS = "arvados#containerRequest",
+    PROJECT = "arvados#group",
+    WORKFLOW = "arvados#workflow"
 }
diff --git a/src/models/test-utils.ts b/src/models/test-utils.ts
index 3f49dba..6723430 100644
--- a/src/models/test-utils.ts
+++ b/src/models/test-utils.ts
@@ -14,7 +14,7 @@ export const mockGroupResource = (data: Partial<GroupResource> = {}): GroupResou
     groupClass: null,
     href: "",
     isTrashed: false,
-    kind: ResourceKind.Group,
+    kind: ResourceKind.GROUP,
     modifiedAt: "",
     modifiedByClientUuid: "",
     modifiedByUserUuid: "",
@@ -28,7 +28,7 @@ export const mockGroupResource = (data: Partial<GroupResource> = {}): GroupResou
 });
 
 export const mockProjectResource = (data: Partial<ProjectResource> = {}): ProjectResource =>
-    mockGroupResource({ ...data, groupClass: GroupClass.Project }) as ProjectResource;
+    mockGroupResource({ ...data, groupClass: GroupClass.PROJECT }) as ProjectResource;
 
 export const mockCommonResource = (data: Partial<Resource>): Resource => ({
     createdAt: "",
diff --git a/src/models/workflow.ts b/src/models/workflow.ts
index e0a5df4..d644b79 100644
--- a/src/models/workflow.ts
+++ b/src/models/workflow.ts
@@ -5,7 +5,7 @@
 import { Resource, ResourceKind } from "./resource";
 
 export interface WorkflowResource extends Resource {
-    kind: ResourceKind.Workflow;
+    kind: ResourceKind.WORKFLOW;
     name: string;
     description: string;
     definition: string;
diff --git a/src/services/favorite-service/favorite-order-builder.ts b/src/services/favorite-service/favorite-order-builder.ts
index 33214a0..0d9a75e 100644
--- a/src/services/favorite-service/favorite-order-builder.ts
+++ b/src/services/favorite-service/favorite-order-builder.ts
@@ -22,18 +22,18 @@ export class FavoriteOrderBuilder {
     addAsc(attribute: "name") {
         const linkOrder = this.linkOrder.addAsc(attribute);
         const contentOrder = this.contentOrder
-            .concat(OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.Collection).addAsc(attribute))
-            .concat(OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.Process).addAsc(attribute))
-            .concat(OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.Project).addAsc(attribute));
+            .concat(OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.COLLECTION).addAsc(attribute))
+            .concat(OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.PROCESS).addAsc(attribute))
+            .concat(OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.PROJECT).addAsc(attribute));
         return FavoriteOrderBuilder.create(linkOrder, contentOrder);
     }
 
     addDesc(attribute: "name") {
         const linkOrder = this.linkOrder.addDesc(attribute);
         const contentOrder = this.contentOrder
-            .concat(OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.Collection).addDesc(attribute))
-            .concat(OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.Process).addDesc(attribute))
-            .concat(OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.Project).addDesc(attribute));
+            .concat(OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.COLLECTION).addDesc(attribute))
+            .concat(OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.PROCESS).addDesc(attribute))
+            .concat(OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.PROJECT).addDesc(attribute));
         return FavoriteOrderBuilder.create(linkOrder, contentOrder);
     }
 
diff --git a/src/services/groups-service/groups-service.ts b/src/services/groups-service/groups-service.ts
index dfaf11d..a0f27a4 100644
--- a/src/services/groups-service/groups-service.ts
+++ b/src/services/groups-service/groups-service.ts
@@ -47,7 +47,7 @@ export class GroupsService<T extends GroupResource = GroupResource> extends Comm
 }
 
 export enum GroupContentsResourcePrefix {
-    Collection = "collections",
-    Project = "groups",
-    Process = "container_requests"
+    COLLECTION = "collections",
+    PROJECT = "groups",
+    PROCESS = "container_requests"
 }
diff --git a/src/services/project-service/project-service.ts b/src/services/project-service/project-service.ts
index 7b1640e..31a2ddd 100644
--- a/src/services/project-service/project-service.ts
+++ b/src/services/project-service/project-service.ts
@@ -11,7 +11,7 @@ import { FilterBuilder } from "../../common/api/filter-builder";
 export class ProjectService extends GroupsService<ProjectResource> {
 
     create(data: Partial<ProjectResource>) {
-        const projectData = { ...data, groupClass: GroupClass.Project };
+        const projectData = { ...data, groupClass: GroupClass.PROJECT };
         return super.create(projectData);
     }
 
@@ -30,6 +30,6 @@ export class ProjectService extends GroupsService<ProjectResource> {
                 : FilterBuilder.create())
             .concat(FilterBuilder
                 .create<ProjectResource>()
-                .addEqual("groupClass", GroupClass.Project));
+                .addEqual("groupClass", GroupClass.PROJECT));
     }
 }
diff --git a/src/store/data-explorer/data-explorer-reducer.test.tsx b/src/store/data-explorer/data-explorer-reducer.test.tsx
index 5b9f68f..c54a86a 100644
--- a/src/store/data-explorer/data-explorer-reducer.test.tsx
+++ b/src/store/data-explorer/data-explorer-reducer.test.tsx
@@ -25,12 +25,12 @@ describe('data-explorer-reducer', () => {
             name: "Column 1",
             render: jest.fn(),
             selected: true,
-            sortDirection: SortDirection.Asc
+            sortDirection: SortDirection.ASC
         }, {
             name: "Column 2",
             render: jest.fn(),
             selected: true,
-            sortDirection: SortDirection.None,
+            sortDirection: SortDirection.NONE,
         }];
         const state = dataExplorerReducer({ "Data explorer": { ...initialDataExplorer, columns } },
             dataExplorerActions.TOGGLE_SORT({ id: "Data explorer", columnName: "Column 2" }));
diff --git a/src/store/details-panel/details-panel-action.ts b/src/store/details-panel/details-panel-action.ts
index ba330f2..f37907d 100644
--- a/src/store/details-panel/details-panel-action.ts
+++ b/src/store/details-panel/details-panel-action.ts
@@ -28,9 +28,9 @@ export const loadDetails = (uuid: string, kind: ResourceKind) =>
 
 const getService = (kind: ResourceKind) => {
     switch (kind) {
-        case ResourceKind.Project:
+        case ResourceKind.PROJECT:
             return new CommonResourceService(serverApi, "groups");
-        case ResourceKind.Collection:
+        case ResourceKind.COLLECTION:
             return new CommonResourceService(serverApi, "collections");
         default:
             return new CommonResourceService(serverApi, "");
diff --git a/src/store/favorite-panel/favorite-panel-middleware.ts b/src/store/favorite-panel/favorite-panel-middleware.ts
index 0ce13b4..548a117 100644
--- a/src/store/favorite-panel/favorite-panel-middleware.ts
+++ b/src/store/favorite-panel/favorite-panel-middleware.ts
@@ -67,7 +67,7 @@ export const favoritePanelMiddleware: Middleware = store => next => {
                             limit: dataExplorer.rowsPerPage,
                             offset: dataExplorer.page * dataExplorer.rowsPerPage,
                             order: sortColumn!.name === FavoritePanelColumnNames.NAME
-                                ? sortColumn!.sortDirection === SortDirection.Asc
+                                ? sortColumn!.sortDirection === SortDirection.ASC
                                     ? order.addDesc("name")
                                     : order.addAsc("name")
                                 : order,
@@ -104,14 +104,14 @@ export const favoritePanelMiddleware: Middleware = store => next => {
 const getOrder = (direction: SortDirection) => {
     const order = OrderBuilder.create<LinkResource>();
     const addRule = (builder: OrderBuilder<GroupContentsResource | LinkResource>, direction: SortDirection) =>
-        direction === SortDirection.Asc
+        direction === SortDirection.ASC
             ? builder.addAsc("name")
             : builder.addDesc("name");
 
     return [
-        OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.Collection),
-        OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.Process),
-        OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.Project)
+        OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.COLLECTION),
+        OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.PROCESS),
+        OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.PROJECT)
     ].reduce((acc, b) =>
         acc.concat(addRule(b, direction)), addRule(OrderBuilder.create(), direction));
 };
diff --git a/src/store/navigation/navigation-action.ts b/src/store/navigation/navigation-action.ts
index 50f6e20..f3f9caf 100644
--- a/src/store/navigation/navigation-action.ts
+++ b/src/store/navigation/navigation-action.ts
@@ -14,8 +14,8 @@ import { Resource, ResourceKind } from "../../models/resource";
 
 export const getResourceUrl = <T extends Resource>(resource: T): string => {
     switch (resource.kind) {
-        case ResourceKind.Project: return `/projects/${resource.uuid}`;
-        case ResourceKind.Collection: return `/collections/${resource.uuid}`;
+        case ResourceKind.PROJECT: return `/projects/${resource.uuid}`;
+        case ResourceKind.COLLECTION: return `/collections/${resource.uuid}`;
         default: return resource.href;
     }
 };
@@ -46,7 +46,7 @@ export const setProjectItem = (itemId: string, itemMode: ItemMode) =>
                 dispatch(projectActions.TOGGLE_PROJECT_TREE_ITEM_ACTIVE(treeItem.data.uuid));
             }
 
-            const promise = treeItem.status === TreeItemStatus.Loaded
+            const promise = treeItem.status === TreeItemStatus.LOADED
                 ? Promise.resolve()
                 : dispatch<any>(getProjectList(itemId));
 
diff --git a/src/store/project-panel/project-panel-middleware.ts b/src/store/project-panel/project-panel-middleware.ts
index faa22f0..b7ab03c 100644
--- a/src/store/project-panel/project-panel-middleware.ts
+++ b/src/store/project-panel/project-panel-middleware.ts
@@ -55,7 +55,7 @@ export const projectPanelMiddleware: Middleware = store => next => {
                 const typeFilters = getColumnFilters(columns, ProjectPanelColumnNames.TYPE);
                 const statusFilters = getColumnFilters(columns, ProjectPanelColumnNames.STATUS);
                 const sortColumn = dataExplorer.columns.find(({ sortDirection }) => Boolean(sortDirection && sortDirection !== "none"));
-                const sortDirection = sortColumn && sortColumn.sortDirection === SortDirection.Asc ? SortDirection.Asc : SortDirection.Desc;
+                const sortDirection = sortColumn && sortColumn.sortDirection === SortDirection.ASC ? SortDirection.ASC : SortDirection.DESC;
                 if (typeFilters.length > 0) {
                     groupsService
                         .contents(state.projects.currentItemId, {
@@ -72,7 +72,7 @@ export const projectPanelMiddleware: Middleware = store => next => {
                                     .create()
                                     .addIsA("uuid", typeFilters.map(f => f.type)))
                                 .concat(FilterBuilder
-                                    .create<ProcessResource>(GroupContentsResourcePrefix.Process)
+                                    .create<ProcessResource>(GroupContentsResourcePrefix.PROCESS)
                                     .addIn("state", statusFilters.map(f => f.type)))
                                 .concat(getSearchFilter(dataExplorer.searchValue))
                         })
@@ -108,20 +108,20 @@ const getColumnFilters = (columns: DataColumns<ProjectPanelItem, ProjectPanelFil
 
 const getOrder = (attribute: "name" | "createdAt", direction: SortDirection) =>
     [
-        OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.Collection),
-        OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.Process),
-        OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.Project)
+        OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.COLLECTION),
+        OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.PROCESS),
+        OrderBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.PROJECT)
     ].reduce((acc, b) =>
-        acc.concat(direction === SortDirection.Asc
+        acc.concat(direction === SortDirection.ASC
             ? b.addAsc(attribute)
             : b.addDesc(attribute)), OrderBuilder.create());
 
 const getSearchFilter = (searchValue: string) =>
     searchValue
         ? [
-            FilterBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.Collection),
-            FilterBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.Process),
-            FilterBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.Project)]
+            FilterBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.COLLECTION),
+            FilterBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.PROCESS),
+            FilterBuilder.create<GroupContentsResource>(GroupContentsResourcePrefix.PROJECT)]
             .reduce((acc, b) =>
                 acc.concat(b.addILike("name", searchValue)), FilterBuilder.create())
         : FilterBuilder.create();
diff --git a/src/store/project/project-reducer.test.ts b/src/store/project/project-reducer.test.ts
index c8eed87..ca139e6 100644
--- a/src/store/project/project-reducer.test.ts
+++ b/src/store/project/project-reducer.test.ts
@@ -136,7 +136,7 @@ describe("findTreeBranch", () => {
         active: false,
         data: "",
         open: false,
-        status: TreeItemStatus.Initial
+        status: TreeItemStatus.INITIAL
     });
 
     it("should return an array that matches path to the given item", () => {
diff --git a/src/store/project/project-reducer.ts b/src/store/project/project-reducer.ts
index 94a451a..fa92f5f 100644
--- a/src/store/project/project-reducer.ts
+++ b/src/store/project/project-reducer.ts
@@ -73,14 +73,14 @@ function updateProjectTree(tree: Array<TreeItem<ProjectResource>>, projects: Pro
     if (parentItemId) {
         treeItem = findTreeItem(tree, parentItemId);
         if (treeItem) {
-            treeItem.status = TreeItemStatus.Loaded;
+            treeItem.status = TreeItemStatus.LOADED;
         }
     }
     const items = projects.map(p => ({
         id: p.uuid,
         open: false,
         active: false,
-        status: TreeItemStatus.Initial,
+        status: TreeItemStatus.INITIAL,
         data: p,
         items: []
     } as TreeItem<ProjectResource>));
@@ -123,7 +123,7 @@ export const projectsReducer = (state: ProjectState = initialState, action: Proj
             const items = _.cloneDeep(state.items);
             const item = findTreeItem(items, itemId);
             if (item) {
-                item.status = TreeItemStatus.Pending;
+                item.status = TreeItemStatus.PENDING;
                 state.items = items;
             }
             return { ...state, items };
diff --git a/src/store/side-panel/side-panel-reducer.ts b/src/store/side-panel/side-panel-reducer.ts
index 263ecbd..9d56102 100644
--- a/src/store/side-panel/side-panel-reducer.ts
+++ b/src/store/side-panel/side-panel-reducer.ts
@@ -41,17 +41,17 @@ export const sidePanelReducer = (state: SidePanelState = sidePanelData, action:
 };
 
 export enum SidePanelIdentifiers {
-    Projects = "Projects",
-    SharedWithMe = "SharedWithMe",
-    Workflows = "Workflows",
-    RecentOpen = "RecentOpen",
-    Favourites = "Favourites",
-    Trash = "Trash"
+    PROJECTS = "Projects",
+    SHARED_WITH_ME = "SharedWithMe",
+    WORKFLOWS = "Workflows",
+    RECENT_OPEN = "RecentOpen",
+    FAVORITES = "Favourites",
+    TRASH = "Trash"
 }
 
 export const sidePanelData = [
     {
-        id: SidePanelIdentifiers.Projects,
+        id: SidePanelIdentifiers.PROJECTS,
         name: "Projects",
         icon: ProjectsIcon,
         open: false,
@@ -60,25 +60,25 @@ export const sidePanelData = [
         openAble: true
     },
     {
-        id: SidePanelIdentifiers.SharedWithMe,
+        id: SidePanelIdentifiers.SHARED_WITH_ME,
         name: "Shared with me",
         icon: ShareMeIcon,
         active: false,
     },
     {
-        id: SidePanelIdentifiers.Workflows,
+        id: SidePanelIdentifiers.WORKFLOWS,
         name: "Workflows",
         icon: WorkflowIcon,
         active: false,
     },
     {
-        id: SidePanelIdentifiers.RecentOpen,
+        id: SidePanelIdentifiers.RECENT_OPEN,
         name: "Recent open",
         icon: RecentIcon,
         active: false,
     },
     {
-        id: SidePanelIdentifiers.Favourites,
+        id: SidePanelIdentifiers.FAVORITES,
         name: "Favorites",
         icon: FavoriteIcon,
         active: false,
@@ -89,7 +89,7 @@ export const sidePanelData = [
         }
     },
     {
-        id: SidePanelIdentifiers.Trash,
+        id: SidePanelIdentifiers.TRASH,
         name: "Trash",
         icon: TrashIcon,
         active: false,
diff --git a/src/views-components/context-menu/context-menu.tsx b/src/views-components/context-menu/context-menu.tsx
index 9b339c6..5b1049c 100644
--- a/src/views-components/context-menu/context-menu.tsx
+++ b/src/views-components/context-menu/context-menu.tsx
@@ -56,8 +56,8 @@ const getMenuActionSet = (resource?: ContextMenuResource): ContextMenuActionSet
 };
 
 export enum ContextMenuKind {
-    RootProject = "RootProject",
-    Project = "Project",
-    Resource = "Resource",
-    Favorite = "Favorite"
+    ROOT_PROJECT = "RootProject",
+    PROJECT = "Project",
+    RESOURCE = "Resource",
+    FAVORITE = "Favorite"
 }
diff --git a/src/views-components/details-panel/collection-details.tsx b/src/views-components/details-panel/collection-details.tsx
index 2881776..f0be449 100644
--- a/src/views-components/details-panel/collection-details.tsx
+++ b/src/views-components/details-panel/collection-details.tsx
@@ -19,7 +19,7 @@ export class CollectionDetails extends DetailsData<CollectionResource> {
 
     getDetails() {
         return <div>
-            <DetailsAttribute label='Type' value={resourceLabel(ResourceKind.Collection)} />
+            <DetailsAttribute label='Type' value={resourceLabel(ResourceKind.COLLECTION)} />
             <DetailsAttribute label='Size' value='---' />
             <DetailsAttribute label='Owner' value={this.item.ownerUuid} />
             <DetailsAttribute label='Last modified' value={formatDate(this.item.modifiedAt)} />
diff --git a/src/views-components/details-panel/details-panel.tsx b/src/views-components/details-panel/details-panel.tsx
index ea8f2e4..20d3843 100644
--- a/src/views-components/details-panel/details-panel.tsx
+++ b/src/views-components/details-panel/details-panel.tsx
@@ -55,11 +55,11 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
 const getItem = (resource: DetailsResource): DetailsData => {
     const res = resource || { kind: undefined, name: 'Projects' };
     switch (res.kind) {
-        case ResourceKind.Project:
+        case ResourceKind.PROJECT:
             return new ProjectDetails(res);
-        case ResourceKind.Collection:
+        case ResourceKind.COLLECTION:
             return new CollectionDetails(res);
-        case ResourceKind.Process:
+        case ResourceKind.PROCESS:
             return new ProcessDetails(res);
         default:
             return new EmptyDetails(res as EmptyResource);
diff --git a/src/views-components/details-panel/process-details.tsx b/src/views-components/details-panel/process-details.tsx
index 931ff7e..e195d05 100644
--- a/src/views-components/details-panel/process-details.tsx
+++ b/src/views-components/details-panel/process-details.tsx
@@ -19,7 +19,7 @@ export class ProcessDetails extends DetailsData<ProcessResource> {
 
     getDetails() {
         return <div>
-            <DetailsAttribute label='Type' value={resourceLabel(ResourceKind.Process)} />
+            <DetailsAttribute label='Type' value={resourceLabel(ResourceKind.PROCESS)} />
             <DetailsAttribute label='Size' value='---' />
             <DetailsAttribute label='Owner' value={this.item.ownerUuid} />
 
diff --git a/src/views-components/details-panel/project-details.tsx b/src/views-components/details-panel/project-details.tsx
index 84b3706..b46bdcd 100644
--- a/src/views-components/details-panel/project-details.tsx
+++ b/src/views-components/details-panel/project-details.tsx
@@ -19,7 +19,7 @@ export class ProjectDetails extends DetailsData<ProjectResource> {
 
     getDetails() {
         return <div>
-            <DetailsAttribute label='Type' value={resourceLabel(ResourceKind.Project)} />
+            <DetailsAttribute label='Type' value={resourceLabel(ResourceKind.PROJECT)} />
             {/* Missing attr */}
             <DetailsAttribute label='Size' value='---' />
             <DetailsAttribute label='Owner' value={this.item.ownerUuid} />
diff --git a/src/views/favorite-panel/favorite-panel-item.ts b/src/views/favorite-panel/favorite-panel-item.ts
index 28f7f88..da48298 100644
--- a/src/views/favorite-panel/favorite-panel-item.ts
+++ b/src/views/favorite-panel/favorite-panel-item.ts
@@ -25,7 +25,7 @@ export function resourceToDataItem(r: GroupContentsResource): FavoritePanelItem
         url: "",
         owner: r.ownerUuid,
         lastModified: r.modifiedAt,
-        status:  r.kind === ResourceKind.Process ? r.state : undefined
+        status:  r.kind === ResourceKind.PROCESS ? r.state : undefined
     };
 }
 
diff --git a/src/views/favorite-panel/favorite-panel.tsx b/src/views/favorite-panel/favorite-panel.tsx
index 8f49450..36a3410 100644
--- a/src/views/favorite-panel/favorite-panel.tsx
+++ b/src/views/favorite-panel/favorite-panel.tsx
@@ -52,11 +52,11 @@ const renderName = (item: FavoritePanelItem) =>
 
 const renderIcon = (item: FavoritePanelItem) => {
     switch (item.kind) {
-        case ResourceKind.Project:
+        case ResourceKind.PROJECT:
             return <ProjectIcon />;
-        case ResourceKind.Collection:
+        case ResourceKind.COLLECTION:
             return <CollectionIcon />;
-        case ResourceKind.Process:
+        case ResourceKind.PROCESS:
             return <ProcessIcon />;
         default:
             return <DefaultIcon />;
@@ -104,7 +104,7 @@ export const columns: DataColumns<FavoritePanelItem, FavoritePanelFilter> = [
     {
         name: FavoritePanelColumnNames.NAME,
         selected: true,
-        sortDirection: SortDirection.Asc,
+        sortDirection: SortDirection.ASC,
         render: renderName,
         width: "450px"
     },
@@ -113,19 +113,19 @@ export const columns: DataColumns<FavoritePanelItem, FavoritePanelFilter> = [
         selected: true,
         filters: [
             {
-                name: ContainerRequestState.Committed,
+                name: ContainerRequestState.COMMITTED,
                 selected: true,
-                type: ContainerRequestState.Committed
+                type: ContainerRequestState.COMMITTED
             },
             {
-                name: ContainerRequestState.Final,
+                name: ContainerRequestState.FINAL,
                 selected: true,
-                type: ContainerRequestState.Final
+                type: ContainerRequestState.FINAL
             },
             {
-                name: ContainerRequestState.Uncommitted,
+                name: ContainerRequestState.UNCOMMITTED,
                 selected: true,
-                type: ContainerRequestState.Uncommitted
+                type: ContainerRequestState.UNCOMMITTED
             }
         ],
         render: renderStatus,
@@ -136,19 +136,19 @@ export const columns: DataColumns<FavoritePanelItem, FavoritePanelFilter> = [
         selected: true,
         filters: [
             {
-                name: resourceLabel(ResourceKind.Collection),
+                name: resourceLabel(ResourceKind.COLLECTION),
                 selected: true,
-                type: ResourceKind.Collection
+                type: ResourceKind.COLLECTION
             },
             {
-                name: resourceLabel(ResourceKind.Process),
+                name: resourceLabel(ResourceKind.PROCESS),
                 selected: true,
-                type: ResourceKind.Process
+                type: ResourceKind.PROCESS
             },
             {
-                name: resourceLabel(ResourceKind.Project),
+                name: resourceLabel(ResourceKind.PROJECT),
                 selected: true,
-                type: ResourceKind.Project
+                type: ResourceKind.PROJECT
             }
         ],
         render: item => renderType(item.kind),
@@ -169,7 +169,7 @@ export const columns: DataColumns<FavoritePanelItem, FavoritePanelFilter> = [
     {
         name: FavoritePanelColumnNames.LAST_MODIFIED,
         selected: true,
-        sortDirection: SortDirection.None,
+        sortDirection: SortDirection.NONE,
         render: item => renderDate(item.lastModified),
         width: "150px"
     }
diff --git a/src/views/project-panel/project-panel-item.ts b/src/views/project-panel/project-panel-item.ts
index 1d665a6..d0609d6 100644
--- a/src/views/project-panel/project-panel-item.ts
+++ b/src/views/project-panel/project-panel-item.ts
@@ -25,7 +25,7 @@ export function resourceToDataItem(r: GroupContentsResource): ProjectPanelItem {
         url: "",
         owner: r.ownerUuid,
         lastModified: r.modifiedAt,
-        status:  r.kind === ResourceKind.Process ? r.state : undefined
+        status:  r.kind === ResourceKind.PROCESS ? r.state : undefined
     };
 }
 
diff --git a/src/views/project-panel/project-panel.tsx b/src/views/project-panel/project-panel.tsx
index c2b42a5..17b0fd7 100644
--- a/src/views/project-panel/project-panel.tsx
+++ b/src/views/project-panel/project-panel.tsx
@@ -52,11 +52,11 @@ const renderName = (item: ProjectPanelItem) =>
 
 const renderIcon = (item: ProjectPanelItem) => {
     switch (item.kind) {
-        case ResourceKind.Project:
+        case ResourceKind.PROJECT:
             return <ProjectIcon />;
-        case ResourceKind.Collection:
+        case ResourceKind.COLLECTION:
             return <CollectionIcon />;
-        case ResourceKind.Process:
+        case ResourceKind.PROCESS:
             return <ProcessIcon />;
         default:
             return <DefaultIcon />;
@@ -104,7 +104,7 @@ export const columns: DataColumns<ProjectPanelItem, ProjectPanelFilter> = [
     {
         name: ProjectPanelColumnNames.NAME,
         selected: true,
-        sortDirection: SortDirection.Asc,
+        sortDirection: SortDirection.ASC,
         render: renderName,
         width: "450px"
     },
@@ -113,19 +113,19 @@ export const columns: DataColumns<ProjectPanelItem, ProjectPanelFilter> = [
         selected: true,
         filters: [
             {
-                name: ContainerRequestState.Committed,
+                name: ContainerRequestState.COMMITTED,
                 selected: true,
-                type: ContainerRequestState.Committed
+                type: ContainerRequestState.COMMITTED
             },
             {
-                name: ContainerRequestState.Final,
+                name: ContainerRequestState.FINAL,
                 selected: true,
-                type: ContainerRequestState.Final
+                type: ContainerRequestState.FINAL
             },
             {
-                name: ContainerRequestState.Uncommitted,
+                name: ContainerRequestState.UNCOMMITTED,
                 selected: true,
-                type: ContainerRequestState.Uncommitted
+                type: ContainerRequestState.UNCOMMITTED
             }
         ],
         render: renderStatus,
@@ -136,19 +136,19 @@ export const columns: DataColumns<ProjectPanelItem, ProjectPanelFilter> = [
         selected: true,
         filters: [
             {
-                name: resourceLabel(ResourceKind.Collection),
+                name: resourceLabel(ResourceKind.COLLECTION),
                 selected: true,
-                type: ResourceKind.Collection
+                type: ResourceKind.COLLECTION
             },
             {
-                name: resourceLabel(ResourceKind.Process),
+                name: resourceLabel(ResourceKind.PROCESS),
                 selected: true,
-                type: ResourceKind.Process
+                type: ResourceKind.PROCESS
             },
             {
-                name: resourceLabel(ResourceKind.Project),
+                name: resourceLabel(ResourceKind.PROJECT),
                 selected: true,
-                type: ResourceKind.Project
+                type: ResourceKind.PROJECT
             }
         ],
         render: item => renderType(item.kind),
@@ -169,7 +169,7 @@ export const columns: DataColumns<ProjectPanelItem, ProjectPanelFilter> = [
     {
         name: ProjectPanelColumnNames.LAST_MODIFIED,
         selected: true,
-        sortDirection: SortDirection.None,
+        sortDirection: SortDirection.NONE,
         render: item => renderDate(item.lastModified),
         width: "150px"
     }
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index 8e2cb57..3637528 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -190,7 +190,7 @@ export const Workbench = withStyles(styles)(
                                     onContextMenu={(event) => this.openContextMenu(event, {
                                         uuid: authService.getUuid() || "",
                                         name: "",
-                                        kind: ContextMenuKind.RootProject
+                                        kind: ContextMenuKind.ROOT_PROJECT
                                     })}>
                                     <ProjectTree
                                         projects={this.props.projects}
@@ -198,12 +198,12 @@ export const Workbench = withStyles(styles)(
                                         onContextMenu={(event, item) => this.openContextMenu(event, {
                                             uuid: item.data.uuid,
                                             name: item.data.name,
-                                            kind: ContextMenuKind.Project
+                                            kind: ContextMenuKind.PROJECT
                                         })}
                                         toggleActive={itemId => {
                                             this.props.dispatch<any>(setProjectItem(itemId, ItemMode.ACTIVE));
-                                            this.props.dispatch<any>(loadDetails(itemId, ResourceKind.Project));
-                                            this.props.dispatch<any>(sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_ACTIVE(SidePanelIdentifiers.Projects));
+                                            this.props.dispatch<any>(loadDetails(itemId, ResourceKind.PROJECT));
+                                            this.props.dispatch<any>(sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_ACTIVE(SidePanelIdentifiers.PROJECTS));
                                         }} />
                                 </SidePanel>
                             </Drawer>}
@@ -230,7 +230,7 @@ export const Workbench = withStyles(styles)(
             renderProjectPanel = (props: RouteComponentProps<{ id: string }>) => <ProjectPanel
                 onItemRouteChange={itemId => this.props.dispatch<any>(setProjectItem(itemId, ItemMode.ACTIVE))}
                 onContextMenu={(event, item) => {
-                    const kind = item.kind === ResourceKind.Project ? ContextMenuKind.Project : ContextMenuKind.Resource;
+                    const kind = item.kind === ResourceKind.PROJECT ? ContextMenuKind.PROJECT : ContextMenuKind.RESOURCE;
                     this.openContextMenu(event, {
                         uuid: item.uuid,
                         name: item.name,
@@ -243,14 +243,14 @@ export const Workbench = withStyles(styles)(
                 }}
                 onItemDoubleClick={item => {
                     this.props.dispatch<any>(setProjectItem(item.uuid, ItemMode.ACTIVE));
-                    this.props.dispatch<any>(loadDetails(item.uuid, ResourceKind.Project));
+                    this.props.dispatch<any>(loadDetails(item.uuid, ResourceKind.PROJECT));
                 }}
                 {...props} />
 
             renderFavoritePanel = (props: RouteComponentProps<{ id: string }>) => <FavoritePanel
                 onItemRouteChange={() => this.props.dispatch<any>(dataExplorerActions.REQUEST_ITEMS({ id: FAVORITE_PANEL_ID }))}
                 onContextMenu={(event, item) => {
-                    const kind = item.kind === ResourceKind.Project ? ContextMenuKind.Project : ContextMenuKind.Resource;
+                    const kind = item.kind === ResourceKind.PROJECT ? ContextMenuKind.PROJECT : ContextMenuKind.RESOURCE;
                     this.openContextMenu(event, {
                         uuid: item.uuid,
                         name: item.name,
@@ -262,16 +262,16 @@ export const Workbench = withStyles(styles)(
                     this.props.dispatch<any>(loadDetails(item.uuid, item.kind as ResourceKind));
                 }}
                 onItemDoubleClick={item => {
-                    this.props.dispatch<any>(loadDetails(item.uuid, ResourceKind.Project));
+                    this.props.dispatch<any>(loadDetails(item.uuid, ResourceKind.PROJECT));
                     this.props.dispatch<any>(setProjectItem(item.uuid, ItemMode.ACTIVE));
-                    this.props.dispatch<any>(sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_ACTIVE(SidePanelIdentifiers.Projects));
+                    this.props.dispatch<any>(sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_ACTIVE(SidePanelIdentifiers.PROJECTS));
                 }}
                 {...props} />
 
             mainAppBarActions: MainAppBarActionProps = {
                 onBreadcrumbClick: ({ itemId }: NavBreadcrumb) => {
                     this.props.dispatch<any>(setProjectItem(itemId, ItemMode.BOTH));
-                    this.props.dispatch<any>(loadDetails(itemId, ResourceKind.Project));
+                    this.props.dispatch<any>(loadDetails(itemId, ResourceKind.PROJECT));
                 },
                 onSearch: searchText => {
                     this.setState({ searchText });
@@ -285,7 +285,7 @@ export const Workbench = withStyles(styles)(
                     this.openContextMenu(event, {
                         uuid: breadcrumb.itemId,
                         name: breadcrumb.label,
-                        kind: ContextMenuKind.Project
+                        kind: ContextMenuKind.PROJECT
                     });
                 }
             };

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list