[ARVADOS-WORKBENCH2] updated: 1.1.4-614-gf0ac109

Git user git at public.curoverse.com
Fri Aug 17 05:57:42 EDT 2018


Summary of changes:
 .env                                               |   1 +
 package.json                                       |   8 +-
 src/common/api/common-resource-service.test.ts     |   2 +-
 src/common/api/common-resource-service.ts          |  12 +-
 src/common/api/filter-builder.test.ts              |  56 ++++-----
 src/common/api/filter-builder.ts                   |  48 +++-----
 src/common/api/order-builder.test.ts               |  16 +--
 src/common/api/order-builder.ts                    |  36 ++----
 src/common/config.ts                               |  21 ++--
 src/common/labels.ts                               |   4 +-
 src/common/webdav.test.ts                          | 131 +++++++++++++++++++++
 src/common/webdav.ts                               |  90 ++++++++++++++
 .../collection-panel-files.tsx                     |   6 +-
 src/components/column-selector/column-selector.tsx |   2 +-
 .../confirmation-dialog/confirmation-dialog.tsx    |   4 +-
 src/components/context-menu/context-menu.test.tsx  |   2 +-
 .../data-explorer/data-explorer.test.tsx           |  16 ++-
 src/components/data-explorer/data-explorer.tsx     | 118 ++++++++++++-------
 .../data-table-filters/data-table-filters.test.tsx |   2 +-
 src/components/data-table/data-column.ts           |   7 +-
 src/components/data-table/data-table.test.tsx      |  26 ++--
 src/components/data-table/data-table.tsx           |   2 +-
 src/components/default-view/default-view.tsx       |  46 ++++++++
 .../details-attribute/details-attribute.tsx        |  23 ++--
 .../dropdown-menu/dropdown-menu.test.tsx           |   4 +-
 src/components/file-tree/file-tree-item.tsx        |   2 +-
 src/components/file-upload/file-upload.tsx         |   4 +-
 .../list-item-text-icon/list-item-text-icon.tsx    |   2 +-
 src/components/popover/popover.test.tsx            |   8 +-
 src/components/rename-dialog/rename-dialog.tsx     |   4 +-
 src/components/side-panel/side-panel.tsx           |   4 +-
 src/components/text-field/text-field.tsx           |   4 +-
 src/components/tree/tree.tsx                       |   2 +-
 src/index.tsx                                      |   4 +-
 src/services/auth-service/auth-service.ts          |   2 +-
 .../collection-files-service.ts                    |   2 +-
 .../collection-manifest-mapper.ts                  |   4 +-
 .../collection-manifest-parser.ts                  |   2 +-
 .../collection-service/collection-service.ts       |  14 +--
 .../favorite-service/favorite-order-builder.ts     |  48 --------
 .../favorite-service/favorite-service.test.ts      |  27 ++---
 src/services/favorite-service/favorite-service.ts  |  39 +++---
 src/services/groups-service/groups-service.ts      |  20 ++--
 src/services/keep-service/keep-service.ts          |   4 +-
 src/services/link-service/link-service.ts          |   6 +-
 .../project-service/project-service.test.ts        |  11 +-
 src/services/project-service/project-service.ts    |  28 ++---
 src/services/services.ts                           |  30 ++---
 src/services/tag-service/tag-service.ts            |  21 ++--
 src/store/auth/auth-action.ts                      |  21 ++--
 src/store/auth/auth-actions.test.ts                |   8 +-
 src/store/auth/auth-reducer.test.ts                |   6 +-
 src/store/auth/auth-reducer.ts                     |   4 +-
 .../collection-panel/collection-panel-action.ts    |  18 +--
 .../collection-panel-files-actions.ts              |   4 +-
 .../collection-panel-files-reducer.test.ts         |   4 +-
 .../collection-panel-files-reducer.ts              |   4 +-
 .../collection-panel-files-state.ts                |   6 +-
 .../collection-panel/collection-panel-reducer.ts   |   4 +-
 .../creator/collection-creator-action.ts           |   4 +-
 .../updater/collection-updater-action.ts           |   6 +-
 src/store/data-explorer/data-explorer-action.ts    |   4 +-
 .../data-explorer-middleware-service.ts            |   7 ++
 .../data-explorer/data-explorer-middleware.test.ts |   9 +-
 .../data-explorer/data-explorer-reducer.test.tsx   |  20 ++--
 src/store/data-explorer/data-explorer-reducer.ts   |   6 +-
 src/store/details-panel/details-panel-action.ts    |  15 ++-
 src/store/details-panel/details-panel-reducer.ts   |   3 +-
 .../favorite-panel-middleware-service.ts           | 103 ++++++++--------
 src/store/favorites/favorites-actions.ts           |   2 +-
 src/store/navigation/navigation-action.ts          |  25 ++--
 .../project-panel-middleware-service.ts            | 130 +++++++++-----------
 src/store/project/project-action.ts                |  51 +++++---
 src/store/project/project-reducer.test.ts          |  19 ++-
 src/store/project/project-reducer.ts               |  27 ++++-
 src/store/side-panel/side-panel-reducer.test.ts    |   2 +-
 src/store/side-panel/side-panel-reducer.ts         |  15 ++-
 src/store/store.ts                                 |   2 +-
 src/store/tree-picker/tree-picker-reducer.test.ts  |   5 +-
 src/store/tree-picker/tree-picker-reducer.ts       |   6 +-
 src/store/tree-picker/tree-picker.ts               |   6 +-
 src/validators/validators.tsx                      |   9 +-
 src/views-components/api-token/api-token.tsx       |   8 +-
 .../collection-panel-files.ts                      |  18 +--
 .../action-sets/collection-action-set.ts           |   8 +-
 .../action-sets/collection-files-action-set.ts     |   6 +-
 .../collection-files-item-action-set.ts            |   2 +-
 .../action-sets/collection-resource-action-set.ts  |   8 +-
 .../action-sets/favorite-action-set.ts             |   4 +-
 .../context-menu/action-sets/project-action-set.ts |  64 ++++++----
 .../action-sets/resource-action-set.ts             |   2 +-
 .../action-sets/root-project-action-set.ts         |  30 +++--
 .../context-menu/actions/favorite-action.tsx       |   4 +-
 .../context-menu/context-menu-action-set.ts        |   4 +-
 src/views-components/context-menu/context-menu.tsx |  10 +-
 .../create-collection-dialog-with-selected.tsx     |   4 +-
 .../create-collection-dialog.tsx                   |  10 +-
 .../create-project-dialog.tsx                      |   8 +-
 .../current-token-dialog/current-token-dialog.tsx  |  20 ++--
 .../data-explorer/data-explorer.tsx                |  14 +--
 src/views-components/data-explorer/renderers.tsx   |  10 +-
 .../details-panel/collection-details.tsx           |  12 +-
 .../details-panel/details-data.tsx                 |   2 +-
 .../details-panel/details-panel.tsx                |  14 +--
 .../details-panel/empty-details.tsx                |  42 +------
 .../details-panel/process-details.tsx              |  12 +-
 .../details-panel/project-details.tsx              |  12 +-
 .../dialog-collection-create-selected.tsx          |   6 +-
 .../dialog-create/dialog-collection-create.tsx     |  30 ++---
 .../dialog-create/dialog-project-create.tsx        |  11 +-
 .../dialog-update/dialog-collection-update.tsx     |  46 ++------
 .../dialog-update/dialog-project-update.tsx        | 101 ++++++++++++++++
 .../favorite-star/favorite-star.tsx                |   6 +-
 .../file-remove-dialog/file-remove-dialog.ts       |  10 +-
 .../multiple-files-remove-dialog.ts                |  10 +-
 .../main-app-bar/main-app-bar.test.tsx             |  10 +-
 src/views-components/main-app-bar/main-app-bar.tsx |  10 +-
 .../project-tree-picker/project-tree-picker.tsx    |  32 ++---
 src/views-components/project-tree/project-tree.tsx |  12 +-
 .../remove-dialog/remove-dialog.tsx                |   4 +-
 .../rename-file-dialog/rename-file-dialog.tsx      |   6 +-
 src/views-components/snackbar/snackbar.tsx         |   4 +-
 src/views-components/tree-picker/tree-picker.ts    |  10 +-
 .../update-collection-dialog..tsx                  |  10 +-
 .../update-project-dialog.tsx                      |  42 +++++++
 src/views/collection-panel/collection-panel.tsx    |  30 ++---
 src/views/collection-panel/collection-tag-form.tsx | 104 +++++++---------
 src/views/favorite-panel/favorite-panel-item.ts    |   6 +-
 src/views/favorite-panel/favorite-panel.tsx        |  35 ++++--
 src/views/project-panel/project-panel-item.ts      |   6 +-
 src/views/project-panel/project-panel.tsx          |  44 ++++---
 src/views/workbench/workbench.test.tsx             |  14 ++-
 src/views/workbench/workbench.tsx                  |  91 +++++++-------
 tsconfig.json                                      |  11 +-
 yarn.lock                                          |   6 +-
 135 files changed, 1487 insertions(+), 1078 deletions(-)
 create mode 100644 src/common/webdav.test.ts
 create mode 100644 src/common/webdav.ts
 create mode 100644 src/components/default-view/default-view.tsx
 delete mode 100644 src/services/favorite-service/favorite-order-builder.ts
 create mode 100644 src/views-components/dialog-update/dialog-project-update.tsx
 create mode 100644 src/views-components/update-project-dialog/update-project-dialog.tsx

       via  f0ac109691369516a5adf9370838cb4eacf16a45 (commit)
       via  c956bd958d3fb90ce51d758fb99d1d88cf589062 (commit)
       via  b13fa1f0403b854ccb4b0a2f75323984581bf877 (commit)
       via  52dd0ffeffa30667e7f66ca2f5f9ff2b3dfe8f7a (commit)
       via  97937a780bdb4ff67f334a1817d405dec1b2773c (commit)
       via  be4232a50f210b4c4023e3dc5fddb931e71a1c4a (commit)
       via  d0bb82d15656ffe5240376de64b756496fce5639 (commit)
       via  eebf51242e597fd8430f1e92a5e9076b3d623ab5 (commit)
       via  64ccecc473cee79d6c929a75d97c2411f6b038b3 (commit)
       via  96b6bf5ac045e8b11e00a2cd73f6ecfbd7040cca (commit)
       via  e5ecd847e0a5d64f78ab45194f3b4f2e7fbd199a (commit)
       via  b9d9f71443a149cb99e9dfdbe8a293e52cc6d498 (commit)
       via  f0d519637c997df11d5b1a1b32b3d9e4a2872325 (commit)
       via  c6ef6cc481dc56270d8ad80d387115eace618525 (commit)
       via  37e43f4e19ad2bd27b15fe7f0d857218dad39055 (commit)
       via  876e5e2f31a218255845977489ea70aacc0211cd (commit)
       via  df041a7ff7f8515adc49b2e2ddd3fc6663b345af (commit)
       via  eb880179bed8f07348faeccb79d34c9726d206e8 (commit)
       via  3626497d024cddee09990afd6e08a24debaf5c7b (commit)
       via  d5a3a1f9623e200dd1170e7b9279127e7f4f0936 (commit)
       via  3b0011c6f2312bd6517cf470a80b921bd65e86fe (commit)
       via  dd89200ad6fdbfa337fdbab5f54def8712c6746c (commit)
       via  732294bc8aeafde5e85a4437cbd36b0d2648b04e (commit)
       via  786d7c2b99da82c92d0ab5bc242f75513a46b4b5 (commit)
       via  0eea74dd422f762226b5b854274a8c18b9c24a1b (commit)
       via  c3cbb4ad3272bbd8f8b282a3db00a86c674e4117 (commit)
       via  08f35d9b26a06b70da6e54533782276617c5bed1 (commit)
       via  5a7f3f56fc39ab231982435d29b8f15e819748fe (commit)
       via  34763d00fc3fad357251a2ba0a0af77ea5a8563e (commit)
       via  2c4b5777c5bea7b862e481038566e93194b06aa9 (commit)
       via  4b7d15c94685ca3e34ebb905a4803f895367ad09 (commit)
       via  1c42304ed00d0055e24070793e0cef08a7c76c97 (commit)
      from  1c1a44191e11b62a0640551ea73f2281b2ed9a7f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit f0ac109691369516a5adf9370838cb4eacf16a45
Merge: 1c1a441 c956bd9
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date:   Fri Aug 17 11:57:05 2018 +0200

    merge master
    
    Feature #13902
    
    Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>

diff --cc src/index.tsx
index bf3002e,cfdbb46..461904c
--- a/src/index.tsx
+++ b/src/index.tsx
@@@ -46,8 -45,7 +46,8 @@@ fetchConfig(
  
          store.dispatch(initAuth());
          store.dispatch(getProjectList(services.authService.getUuid()));
 +        store.dispatch(initPickerProjectTree());
- 
+         
          const TokenComponent = (props: any) => <ApiToken authService={services.authService} {...props}/>;
          const WorkbenchComponent = (props: any) => <Workbench authService={services.authService} {...props}/>;
  
diff --cc src/store/data-explorer/data-explorer-reducer.test.tsx
index 11296ce,6b1c907..56ea3e8
--- a/src/store/data-explorer/data-explorer-reducer.test.tsx
+++ b/src/store/data-explorer/data-explorer-reducer.test.tsx
@@@ -14,7 -14,7 +14,9 @@@ describe('data-explorer-reducer', () =
              name: "Column 1",
              render: jest.fn(),
              selected: true,
-             configurable: false
++            sortDirection: SortDirection.ASC,
++            filters: [],
+             configurable: true
          }];
          const state = dataExplorerReducer(undefined,
              dataExplorerActions.SET_COLUMNS({ id: "Data explorer", columns }));
@@@ -26,14 -26,14 +28,16 @@@
              name: "Column 1",
              render: jest.fn(),
              selected: true,
 -            configurable: true,
 -            sortDirection: SortDirection.ASC
 +            sortDirection: SortDirection.ASC,
-             configurable: false
++            filters: [],
++            configurable: true
          }, {
              name: "Column 2",
              render: jest.fn(),
              selected: true,
+             configurable: true,
              sortDirection: SortDirection.NONE,
-             configurable: false
++            filters: [],
          }];
          const state = dataExplorerReducer({ "Data explorer": { ...initialDataExplorer, columns } },
              dataExplorerActions.TOGGLE_SORT({ id: "Data explorer", columnName: "Column 2" }));
@@@ -46,7 -46,7 +50,9 @@@
              name: "Column 1",
              render: jest.fn(),
              selected: true,
-             configurable: false
 -            configurable: true
++            configurable: true,
++            sortDirection: SortDirection.NONE,
++            filters: [],
          }];
  
          const filters: DataTableFilterItem[] = [{
diff --cc src/store/tree-picker/tree-picker-reducer.ts
index e4ca262,8d61714..cf67aa7
--- a/src/store/tree-picker/tree-picker-reducer.ts
+++ b/src/store/tree-picker/tree-picker-reducer.ts
@@@ -2,35 -2,25 +2,35 @@@
  //
  // SPDX-License-Identifier: AGPL-3.0
  
- import { createTree, setNodeValueWith, TreeNode, setNode, mapTreeValues, Tree } from "../../models/tree";
 -import { createTree, setNodeValueWith, TreeNode, setNode, mapTreeValues } from "~/models/tree";
++import { createTree, setNodeValueWith, TreeNode, setNode, mapTreeValues, Tree } from "~/models/tree";
  import { TreePicker, TreePickerNode } from "./tree-picker";
  import { treePickerActions, TreePickerAction } from "./tree-picker-actions";
- import { TreeItemStatus } from "../../components/tree/tree";
+ import { TreeItemStatus } from "~/components/tree/tree";
  
 -export const treePickerReducer = (state: TreePicker = createTree(), action: TreePickerAction) =>
 +export const treePickerReducer = (state: TreePicker = {}, action: TreePickerAction) =>
      treePickerActions.match(action, {
 -        LOAD_TREE_PICKER_NODE: ({ id }) =>
 -            setNodeValueWith(setPending)(id)(state),
 -        LOAD_TREE_PICKER_NODE_SUCCESS: ({ id, nodes }) => {
 -            const [newState] = [state]
 +        LOAD_TREE_PICKER_NODE: ({ id, pickerId }) => {
 +            const picker = state[pickerId] || createTree();
 +            const updatedPicker = setNodeValueWith(setPending)(id)(picker);
 +            return { ...state, [pickerId]: updatedPicker };
 +        },
 +        LOAD_TREE_PICKER_NODE_SUCCESS: ({ id, nodes, pickerId }) => {
 +            const picker = state[pickerId] || createTree();
 +            const [updatedPicker] = [picker]
                  .map(receiveNodes(nodes)(id))
                  .map(setNodeValueWith(setLoaded)(id));
 -            return newState;
 +            return { ...state, [pickerId]: updatedPicker };
 +        },
 +        TOGGLE_TREE_PICKER_NODE_COLLAPSE: ({ id, pickerId }) => {
 +            const picker = state[pickerId] || createTree();
 +            const updatedPicker = setNodeValueWith(toggleCollapse)(id)(picker);
 +            return { ...state, [pickerId]: updatedPicker };
 +        },
 +        TOGGLE_TREE_PICKER_NODE_SELECT: ({ id, pickerId }) => {
 +            const picker = state[pickerId] || createTree();
 +            const updatedPicker = mapTreeValues(toggleSelect(id))(picker);
 +            return { ...state, [pickerId]: updatedPicker };
          },
 -        TOGGLE_TREE_PICKER_NODE_COLLAPSE: ({ id }) =>
 -            setNodeValueWith(toggleCollapse)(id)(state),
 -        TOGGLE_TREE_PICKER_NODE_SELECT: ({ id }) =>
 -            mapTreeValues(toggleSelect(id))(state),
          default: () => state
      });
  
diff --cc src/store/tree-picker/tree-picker.ts
index 5cb2d97,e19ce3a..5029cbe
--- a/src/store/tree-picker/tree-picker.ts
+++ b/src/store/tree-picker/tree-picker.ts
@@@ -2,10 -2,10 +2,10 @@@
  //
  // SPDX-License-Identifier: AGPL-3.0
  
- import { Tree } from "../../models/tree";
- import { TreeItemStatus } from "../../components/tree/tree";
+ import { Tree } from "~/models/tree";
+ import { TreeItemStatus } from "~/components/tree/tree";
  
 -export type TreePicker = Tree<TreePickerNode>;
 +export type TreePicker = { [key: string]: Tree<TreePickerNode> };
  
  export interface TreePickerNode {
      id: string;
diff --cc src/views-components/context-menu/action-sets/collection-action-set.ts
index 75ffdb3,4561f9d..e6dd686
--- a/src/views-components/context-menu/action-sets/collection-action-set.ts
+++ b/src/views-components/context-menu/action-sets/collection-action-set.ts
@@@ -4,11 -4,10 +4,11 @@@
  
  import { ContextMenuActionSet } from "../context-menu-action-set";
  import { ToggleFavoriteAction } from "../actions/favorite-action";
- import { toggleFavorite } from "../../../store/favorites/favorites-actions";
- import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, ProvenanceGraphIcon, AdvancedIcon, RemoveIcon } from "../../../components/icon/icon";
- import { openUpdater } from "../../../store/collections/updater/collection-updater-action";
- import { favoritePanelActions } from "../../../store/favorite-panel/favorite-panel-action";
+ import { toggleFavorite } from "~/store/favorites/favorites-actions";
+ import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, ProvenanceGraphIcon, AdvancedIcon, RemoveIcon } from "~/components/icon/icon";
+ import { openUpdater } from "~/store/collections/updater/collection-updater-action";
+ import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
 +import { openMoveToDialog } from "../../move-to-dialog/move-to-dialog";
  
  export const collectionActionSet: ContextMenuActionSet = [[
      {
diff --cc src/views-components/context-menu/action-sets/collection-resource-action-set.ts
index f0e7efe,7d8364b..fd2f8d7
--- a/src/views-components/context-menu/action-sets/collection-resource-action-set.ts
+++ b/src/views-components/context-menu/action-sets/collection-resource-action-set.ts
@@@ -4,11 -4,10 +4,11 @@@
  
  import { ContextMenuActionSet } from "../context-menu-action-set";
  import { ToggleFavoriteAction } from "../actions/favorite-action";
- import { toggleFavorite } from "../../../store/favorites/favorites-actions";
- import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, RemoveIcon } from "../../../components/icon/icon";
- import { openUpdater } from "../../../store/collections/updater/collection-updater-action";
- import { favoritePanelActions } from "../../../store/favorite-panel/favorite-panel-action";
+ import { toggleFavorite } from "~/store/favorites/favorites-actions";
+ import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, RemoveIcon } from "~/components/icon/icon";
+ import { openUpdater } from "~/store/collections/updater/collection-updater-action";
+ import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
 +import { openMoveToDialog } from "../../move-to-dialog/move-to-dialog";
  
  export const collectionResourceActionSet: ContextMenuActionSet = [[
      {
diff --cc src/views-components/context-menu/action-sets/project-action-set.ts
index 06ffb9d,1b000c8..ca9a4f6
--- a/src/views-components/context-menu/action-sets/project-action-set.ts
+++ b/src/views-components/context-menu/action-sets/project-action-set.ts
@@@ -2,35 -2,39 +2,47 @@@
  //
  // SPDX-License-Identifier: AGPL-3.0
  
- import { reset } from "redux-form";
+ import { reset, initialize } from "redux-form";
  
  import { ContextMenuActionSet } from "../context-menu-action-set";
- import { projectActions } from "../../../store/project/project-action";
- import { NewProjectIcon, MoveToIcon } from "../../../components/icon/icon";
+ import { projectActions, PROJECT_FORM_NAME } from "~/store/project/project-action";
 -import { NewProjectIcon, RenameIcon } from "~/components/icon/icon";
++import { NewProjectIcon, MoveToIcon, RenameIcon } from "~/components/icon/icon";
  import { ToggleFavoriteAction } from "../actions/favorite-action";
- import { toggleFavorite } from "../../../store/favorites/favorites-actions";
- import { favoritePanelActions } from "../../../store/favorite-panel/favorite-panel-action";
+ import { toggleFavorite } from "~/store/favorites/favorites-actions";
+ import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
 +import { openMoveToDialog } from "../../move-to-dialog/move-to-dialog";
  import { PROJECT_CREATE_DIALOG } from "../../dialog-create/dialog-project-create";
  
- export const projectActionSet: ContextMenuActionSet = [[{
-     icon: NewProjectIcon,
-     name: "New project",
-     execute: (dispatch, resource) => {
-         dispatch(reset(PROJECT_CREATE_DIALOG));
-         dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: resource.uuid }));
-     }
- }, {
-     component: ToggleFavoriteAction,
-     execute: (dispatch, resource) => {
-         dispatch<any>(toggleFavorite(resource)).then(() => {
-             dispatch<any>(favoritePanelActions.REQUEST_ITEMS());
-         });
-     }
- }, {
-     icon: MoveToIcon,
-     name: "Move to",
-     execute: (dispatch) => {
-         dispatch<any>(openMoveToDialog());
-     }
- },]];
+ export const projectActionSet: ContextMenuActionSet = [[
+     {
+         icon: NewProjectIcon,
+         name: "New project",
+         execute: (dispatch, resource) => {
+             dispatch(reset(PROJECT_CREATE_DIALOG));
+             dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: resource.uuid }));
+         }
+     },
+     {
+         icon: RenameIcon,
+         name: "Edit project",
+         execute: (dispatch, resource) => {
+             dispatch(projectActions.OPEN_PROJECT_UPDATER({ uuid: resource.uuid }));
+             dispatch(initialize(PROJECT_FORM_NAME, { name: resource.name, description: resource.description }));
+         }
+     },
+     {
+         component: ToggleFavoriteAction,
+         execute: (dispatch, resource) => {
+             dispatch<any>(toggleFavorite(resource)).then(() => {
+                 dispatch<any>(favoritePanelActions.REQUEST_ITEMS());
+             });
+         }
 -    }
++    },
++    {
++        icon: MoveToIcon,
++        name: "Move to",
++        execute: (dispatch) => {
++            dispatch<any>(openMoveToDialog());
++        }
++    },
+ ]];
diff --cc src/views-components/create-collection-dialog-with-selected/create-collection-dialog-with-selected.tsx
index ece0639,46bc724..60ce05c
--- a/src/views-components/create-collection-dialog-with-selected/create-collection-dialog-with-selected.tsx
+++ b/src/views-components/create-collection-dialog-with-selected/create-collection-dialog-with-selected.tsx
@@@ -4,9 -4,10 +4,9 @@@
  
  import { Dispatch } from "redux";
  import { reduxForm, reset, startSubmit, stopSubmit } from "redux-form";
- import { withDialog } from "../../store/dialog/with-dialog";
- import { dialogActions } from "../../store/dialog/dialog-actions";
+ import { withDialog } from "~/store/dialog/with-dialog";
+ import { dialogActions } from "~/store/dialog/dialog-actions";
  import { DialogCollectionCreateWithSelected } from "../dialog-create/dialog-collection-create-selected";
 -import { loadProjectTreePickerProjects } from "../project-tree-picker/project-tree-picker";
  
  export const DIALOG_COLLECTION_CREATE_WITH_SELECTED = 'dialogCollectionCreateWithSelected';
  
diff --cc src/views-components/project-tree-picker/project-tree-picker.tsx
index 0338534,9143c47..e18af9e
--- a/src/views-components/project-tree-picker/project-tree-picker.tsx
+++ b/src/views-components/project-tree-picker/project-tree-picker.tsx
@@@ -6,29 -6,28 +6,29 @@@ import * as React from "react"
  import { Dispatch } from "redux";
  import { connect } from "react-redux";
  import { Typography } from "@material-ui/core";
 -import { TreePicker } from "../tree-picker/tree-picker";
 -import { TreeProps, TreeItem, TreeItemStatus } from "~/components/tree/tree";
 +import { TreePicker, TreePickerProps } from "../tree-picker/tree-picker";
- import { TreeItem, TreeItemStatus } from "../../components/tree/tree";
- import { ProjectResource } from "../../models/project";
- import { treePickerActions } from "../../store/tree-picker/tree-picker-actions";
- import { ListItemTextIcon } from "../../components/list-item-text-icon/list-item-text-icon";
- import { ProjectIcon, FavoriteIcon, ProjectsIcon, ShareMeIcon } from "../../components/icon/icon";
- import { createTreePickerNode } from "../../store/tree-picker/tree-picker";
- import { RootState } from "../../store/store";
- import { ServiceRepository } from "../../services/services";
- import { FilterBuilder } from "../../common/api/filter-builder";
++import { TreeItem, TreeItemStatus } from "~/components/tree/tree";
+ import { ProjectResource } from "~/models/project";
+ import { treePickerActions } from "~/store/tree-picker/tree-picker-actions";
+ import { ListItemTextIcon } from "~/components/list-item-text-icon/list-item-text-icon";
 -import { ProjectIcon } from "~/components/icon/icon";
++import { ProjectIcon, FavoriteIcon, ProjectsIcon, ShareMeIcon } from "~/components/icon/icon";
+ import { createTreePickerNode } from "~/store/tree-picker/tree-picker";
+ import { RootState } from "~/store/store";
+ import { ServiceRepository } from "~/services/services";
+ import { FilterBuilder } from "~/common/api/filter-builder";
  
 -type ProjectTreePickerProps = Pick<TreeProps<ProjectResource>, 'toggleItemActive' | 'toggleItemOpen'>;
 +type ProjectTreePickerProps = Pick<TreePickerProps, 'toggleItemActive' | 'toggleItemOpen'>;
 +
 +const mapDispatchToProps = (dispatch: Dispatch, props: { onChange: (projectUuid: string) => void }): ProjectTreePickerProps => ({
 +    toggleItemActive: (id, status, pickerId) => {
 +        getNotSelectedTreePickerKind(pickerId)
 +            .forEach(pickerId => dispatch(treePickerActions.TOGGLE_TREE_PICKER_NODE_SELECT({ id: '', pickerId })));
 +        dispatch(treePickerActions.TOGGLE_TREE_PICKER_NODE_SELECT({ id, pickerId }));
  
 -const mapDispatchToProps = (dispatch: Dispatch, props: {onChange: (projectUuid: string) => void}): ProjectTreePickerProps => ({
 -    toggleItemActive: id => {
 -        dispatch(treePickerActions.TOGGLE_TREE_PICKER_NODE_SELECT({ id }));
          props.onChange(id);
      },
 -    toggleItemOpen: (id, status) => {
 -        status === TreeItemStatus.INITIAL
 -            ? dispatch<any>(loadProjectTreePickerProjects(id))
 -            : dispatch(treePickerActions.TOGGLE_TREE_PICKER_NODE_COLLAPSE({ id }));
 +    toggleItemOpen: (id, status, pickerId) => {
 +        dispatch<any>(toggleItemOpen(id, status, pickerId));
      }
  });
  
@@@ -83,47 -54,12 +83,47 @@@ export const loadProjectTreePickerProje
  
          const { items } = await services.projectService.list({ filters });
  
 -        dispatch<any>(receiveProjectTreePickerData(id, items));
 +        dispatch<any>(receiveTreePickerData(id, items, TreePickerKind.PROJECTS));
      };
  
 +export const loadFavoriteTreePickerProjects = (id: string) =>
 +    async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
 +        const parentId = services.authService.getUuid() || '';
 +
 +        if (id === '') {
 +            dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id: parentId, pickerId: TreePickerKind.FAVORITES }));
 +            const { items } = await services.favoriteService.list(parentId);
 +
 +            dispatch<any>(receiveTreePickerData(parentId, items as ProjectResource[], TreePickerKind.FAVORITES));
 +        } else {
 +            dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id, pickerId: TreePickerKind.FAVORITES }));
-             const filters = FilterBuilder
-                 .create()
-                 .addEqual('ownerUuid', id);
++            const filters = new FilterBuilder()
++                .addEqual('ownerUuid', id)
++                .getFilters();
 +
 +            const { items } = await services.projectService.list({ filters });
 +
 +            dispatch<any>(receiveTreePickerData(id, items, TreePickerKind.FAVORITES));
 +        }
 +
 +    };
 +
 +const getProjectPickerIcon = (item: TreeItem<ProjectResource>) => {
 +    switch (item.data.name) {
 +        case TreePickerKind.FAVORITES:
 +            return FavoriteIcon;
 +        case TreePickerKind.PROJECTS:
 +            return ProjectsIcon;
 +        case TreePickerKind.SHARED_WITH_ME:
 +            return ShareMeIcon;
 +        default:
 +            return ProjectIcon;
 +    }
 +};
 +
  const renderTreeItem = (item: TreeItem<ProjectResource>) =>
      <ListItemTextIcon
 -        icon={ProjectIcon}
 +        icon={getProjectPickerIcon(item)}
          name={item.data.name}
          isActive={item.active}
          hasMargin={true} />;
@@@ -134,10 -69,7 +134,10 @@@ export const receiveTreePickerData = (i
      (dispatch: Dispatch) => {
          dispatch(treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({
              id,
 -            nodes: projects.map(project => createTreePickerNode({ id: project.uuid, value: project }))
 +            nodes: projects.map(project => createTreePickerNode({ id: project.uuid, value: project })),
 +            pickerId,
          }));
 -        dispatch(treePickerActions.TOGGLE_TREE_PICKER_NODE_COLLAPSE({ id }));
++
 +        dispatch(treePickerActions.TOGGLE_TREE_PICKER_NODE_COLLAPSE({ id, pickerId }));
      };
 +
- 
diff --cc src/views-components/tree-picker/tree-picker.ts
index a0eae9f,09a0744..fb05b81
--- a/src/views-components/tree-picker/tree-picker.ts
+++ b/src/views-components/tree-picker/tree-picker.ts
@@@ -3,23 -3,24 +3,23 @@@
  // SPDX-License-Identifier: AGPL-3.0
  
  import { connect } from "react-redux";
- import { Tree, TreeProps, TreeItem, TreeItemStatus } from "../../components/tree/tree";
- import { RootState } from "../../store/store";
- import { createTreePickerNode, TreePickerNode } from "../../store/tree-picker/tree-picker";
- import { getNodeValue, getNodeChildren, Tree as Ttree, createTree } from "../../models/tree";
- import { Dispatch } from "node_modules/redux";
 -import { Tree, TreeProps, TreeItem } from "~/components/tree/tree";
++import { Tree, TreeProps, TreeItem, TreeItemStatus } from "~/components/tree/tree";
+ import { RootState } from "~/store/store";
 -import { TreePicker as TTreePicker, TreePickerNode, createTreePickerNode } from "~/store/tree-picker/tree-picker";
 -import { getNodeValue, getNodeChildren } from "~/models/tree";
++import { createTreePickerNode, TreePickerNode } from "~/store/tree-picker/tree-picker";
++import { getNodeValue, getNodeChildren, Tree as Ttree, createTree } from "~/models/tree";
++import { Dispatch } from "redux";
  
 -const memoizedMapStateToProps = () => {
 -    let prevState: TTreePicker;
 -    let prevTree: Array<TreeItem<any>>;
 +export interface TreePickerProps {
 +    pickerId: string;
 +    toggleItemOpen: (id: string, status: TreeItemStatus, pickerId: string) => void;
 +    toggleItemActive: (id: string, status: TreeItemStatus, pickerId: string) => void;
 +}
  
 -    return (state: RootState): Pick<TreeProps<any>, 'items'> => {
 -        if (prevState !== state.treePicker) {
 -            prevState = state.treePicker;
 -            prevTree = getNodeChildren('')(state.treePicker)
 -                .map(treePickerToTreeItems(state.treePicker));
 -        }
 -        return {
 -            items: prevTree
 -        };
 +const mapStateToProps = (state: RootState, props: TreePickerProps): Pick<TreeProps<any>, 'items'> => {
 +    const tree = state.treePicker[props.pickerId] || createTree();
 +    return {
 +        items: getNodeChildren('')(tree)
 +            .map(treePickerToTreeItems(tree))
      };
  };
  
diff --cc src/views/workbench/workbench.tsx
index c8d4474,a38afb7..9210fb3
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@@ -6,50 -6,50 +6,51 @@@ import * as React from 'react'
  import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles';
  import Drawer from '@material-ui/core/Drawer';
  import { connect, DispatchProp } from "react-redux";
- import { Route, Switch, RouteComponentProps } from "react-router";
- import { login, logout } from "../../store/auth/auth-action";
- import { User } from "../../models/user";
- import { RootState } from "../../store/store";
- import { MainAppBar, MainAppBarActionProps, MainAppBarMenuItem } from '../../views-components/main-app-bar/main-app-bar';
- import { Breadcrumb } from '../../components/breadcrumbs/breadcrumbs';
+ import { Route, RouteComponentProps, Switch, Redirect } from "react-router";
+ import { login, logout } from "~/store/auth/auth-action";
+ import { User } from "~/models/user";
+ import { RootState } from "~/store/store";
+ import { MainAppBar, MainAppBarActionProps, MainAppBarMenuItem } from '~/views-components/main-app-bar/main-app-bar';
+ import { Breadcrumb } from '~/components/breadcrumbs/breadcrumbs';
  import { push } from 'react-router-redux';
  import { reset } from 'redux-form';
- import { ProjectTree } from '../../views-components/project-tree/project-tree';
- import { TreeItem } from "../../components/tree/tree";
- import { getTreePath } from '../../store/project/project-reducer';
- import { sidePanelActions } from '../../store/side-panel/side-panel-action';
- import { SidePanel, SidePanelItem } from '../../components/side-panel/side-panel';
- import { ItemMode, setProjectItem } from "../../store/navigation/navigation-action";
- import { projectActions } from "../../store/project/project-action";
- import { collectionCreateActions } from '../../store/collections/creator/collection-creator-action';
- import { ProjectPanel } from "../project-panel/project-panel";
- import { DetailsPanel } from '../../views-components/details-panel/details-panel';
- import { ArvadosTheme } from '../../common/custom-theme';
- import { CreateProjectDialog } from "../../views-components/create-project-dialog/create-project-dialog";
+ import { ProjectTree } from '~/views-components/project-tree/project-tree';
+ import { TreeItem } from "~/components/tree/tree";
+ import { getTreePath } from '~/store/project/project-reducer';
+ import { sidePanelActions } from '~/store/side-panel/side-panel-action';
+ import { SidePanel, SidePanelItem } from '~/components/side-panel/side-panel';
+ import { ItemMode, setProjectItem } from "~/store/navigation/navigation-action";
+ import { projectActions } from "~/store/project/project-action";
+ import { collectionCreateActions } from '~/store/collections/creator/collection-creator-action';
+ import { ProjectPanel } from "~/views/project-panel/project-panel";
+ import { DetailsPanel } from '~/views-components/details-panel/details-panel';
+ import { ArvadosTheme } from '~/common/custom-theme';
+ import { CreateProjectDialog } from "~/views-components/create-project-dialog/create-project-dialog";
  
- import { detailsPanelActions, loadDetails } from "../../store/details-panel/details-panel-action";
- import { contextMenuActions } from "../../store/context-menu/context-menu-actions";
- import { SidePanelIdentifiers } from '../../store/side-panel/side-panel-reducer';
- import { ProjectResource } from '../../models/project';
- import { ResourceKind } from '../../models/resource';
- import { ContextMenu, ContextMenuKind } from "../../views-components/context-menu/context-menu";
+ import { detailsPanelActions, loadDetails } from "~/store/details-panel/details-panel-action";
+ import { contextMenuActions } from "~/store/context-menu/context-menu-actions";
+ import { SidePanelIdentifiers } from '~/store/side-panel/side-panel-reducer';
+ import { ProjectResource } from '~/models/project';
+ import { ResourceKind } from '~/models/resource';
+ import { ContextMenu, ContextMenuKind } from "~/views-components/context-menu/context-menu";
  import { FavoritePanel } from "../favorite-panel/favorite-panel";
- import { CurrentTokenDialog } from '../../views-components/current-token-dialog/current-token-dialog';
- import { Snackbar } from '../../views-components/snackbar/snackbar';
- import { favoritePanelActions } from '../../store/favorite-panel/favorite-panel-action';
- import { CreateCollectionDialog } from '../../views-components/create-collection-dialog/create-collection-dialog';
+ import { CurrentTokenDialog } from '~/views-components/current-token-dialog/current-token-dialog';
+ import { Snackbar } from '~/views-components/snackbar/snackbar';
+ import { favoritePanelActions } from '~/store/favorite-panel/favorite-panel-action';
+ import { CreateCollectionDialog } from '~/views-components/create-collection-dialog/create-collection-dialog';
  import { CollectionPanel } from '../collection-panel/collection-panel';
- import { loadCollection, loadCollectionTags } from '../../store/collection-panel/collection-panel-action';
- import { getCollectionUrl } from '../../models/collection';
- import { UpdateCollectionDialog } from '../../views-components/update-collection-dialog/update-collection-dialog.';
- import { AuthService } from "../../services/auth-service/auth-service";
- import { RenameFileDialog } from '../../views-components/rename-file-dialog/rename-file-dialog';
- import { FileRemoveDialog } from '../../views-components/file-remove-dialog/file-remove-dialog';
- import { MultipleFilesRemoveDialog } from '../../views-components/file-remove-dialog/multiple-files-remove-dialog';
- import { DialogCollectionCreateWithSelectedFile } from '../../views-components/create-collection-dialog-with-selected/create-collection-dialog-with-selected';
+ import { loadCollection, loadCollectionTags } from '~/store/collection-panel/collection-panel-action';
+ import { getCollectionUrl } from '~/models/collection';
+ import { UpdateCollectionDialog } from '~/views-components/update-collection-dialog/update-collection-dialog.';
+ import { UpdateProjectDialog } from '~/views-components/update-project-dialog/update-project-dialog';
+ import { AuthService } from "~/services/auth-service/auth-service";
+ import { RenameFileDialog } from '~/views-components/rename-file-dialog/rename-file-dialog';
+ import { FileRemoveDialog } from '~/views-components/file-remove-dialog/file-remove-dialog';
+ import { MultipleFilesRemoveDialog } from '~/views-components/file-remove-dialog/multiple-files-remove-dialog';
+ import { DialogCollectionCreateWithSelectedFile } from '~/views-components/create-collection-dialog-with-selected/create-collection-dialog-with-selected';
 +import { MoveToProjectDialog } from '../../views-components/move-to-dialog/move-to-dialog';
- import { COLLECTION_CREATE_DIALOG } from '../../views-components/dialog-create/dialog-collection-create';
- import { PROJECT_CREATE_DIALOG } from '../../views-components/dialog-create/dialog-project-create';
+ import { COLLECTION_CREATE_DIALOG } from '~/views-components/dialog-create/dialog-collection-create';
+ import { PROJECT_CREATE_DIALOG } from '~/views-components/dialog-create/dialog-project-create';
  
  const DRAWER_WITDH = 240;
  const APP_BAR_HEIGHT = 100;

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list