[ARVADOS-WORKBENCH2] updated: 1.1.4-664-g1bd016d
Git user
git at public.curoverse.com
Mon Aug 20 05:25:58 EDT 2018
Summary of changes:
package.json | 26 +--
src/common/file.ts | 15 ++
src/common/webdav.test.ts | 4 +-
src/common/webdav.ts | 8 +-
.../collection-panel-files.tsx | 66 +++-----
src/components/data-explorer/data-explorer.tsx | 6 +
.../file-upload-dialog/file-upload-dialog.tsx | 52 ++++++
src/components/side-panel/side-panel.tsx | 28 ++--
src/index.tsx | 14 +-
src/models/tree.test.ts | 10 +-
src/models/tree.ts | 35 +++--
.../collection-manifest-mapper.ts | 4 +-
.../collection-service-files-response.ts | 54 +++++++
.../collection-service/collection-service.ts | 162 ++++---------------
src/services/services.ts | 2 +-
src/store/auth/auth-action.ts | 6 +-
.../collection-panel-files-actions.ts | 5 +-
.../collection-panel-files-reducer.ts | 6 +-
.../creator/collection-creator-action.ts | 30 ++--
.../uploader/collection-uploader-actions.ts | 38 +++++
.../data-explorer/data-explorer-reducer.test.tsx | 14 +-
src/store/data-explorer/data-explorer-reducer.ts | 16 +-
src/store/navigation/navigation-action.ts | 22 +--
src/store/side-panel/side-panel-action.ts | 5 +-
src/store/side-panel/side-panel-reducer.test.ts | 55 +------
src/store/side-panel/side-panel-reducer.ts | 80 +++++-----
src/store/tree-picker/tree-picker-reducer.test.ts | 6 +-
.../collection-panel-files.ts | 11 +-
.../data-explorer/data-explorer.tsx | 64 ++++----
src/views-components/main-app-bar/main-app-bar.tsx | 5 +-
src/views-components/tree-picker/tree-picker.ts | 6 +-
.../upload-collection-files-dialog.ts | 29 ++++
src/views/workbench/workbench.tsx | 14 +-
yarn.lock | 174 ++++++++++++---------
34 files changed, 577 insertions(+), 495 deletions(-)
create mode 100644 src/common/file.ts
create mode 100644 src/components/file-upload-dialog/file-upload-dialog.tsx
create mode 100644 src/services/collection-service/collection-service-files-response.ts
create mode 100644 src/views-components/upload-collection-files-dialog/upload-collection-files-dialog.ts
via 1bd016d1f30c72353e5e3b086dd9778b74efb516 (commit)
via 75db1e88374315f84fdfb30faee84253e1383a28 (commit)
via fa26c423867036cbc290ba68bf001a4bea76fddd (commit)
via 80a9ee470d066aeb95e84338c8f57d558f715113 (commit)
via c0e5f8f04311c22ca8e0be32c1c1da88ae1cceec (commit)
via 18bb503b7ba881d9c6b09446e3ecb70eb11fa17e (commit)
via 57c0b10d162183c24cf9bab52f85ffe3d2754b32 (commit)
via 8acf2e5e84bb64fe57ae0eb819d9a4556af10afa (commit)
via fafe45583ad0aaa1a2325004a953d3154e6c15a9 (commit)
via a31bf8e640b88349dc99b6d56bc5d537410d5694 (commit)
via fce00188736e1d25abf13f4f04cdff2d168e6cc6 (commit)
via d60eaaa5549bcd863d4d202aecc2368de1f00db6 (commit)
via b8616dbf687fc2569c8b6252a4751f8b571457b6 (commit)
via 5d2d4c926ba82b3147c7a315e1b5c8a49b71e9d2 (commit)
via 24034b05e619fefd6015db12be27c812e9b4393d (commit)
via 4fe47dee802ef6491649317f335a8558f9f75c40 (commit)
via f45dd93f467fe02c33908c0b4b3ff8ba01827bc9 (commit)
via 158a4936f754ad78004e1bbcbb5af053a6a4073a (commit)
via da8c21590f014d5c94e9f5c26dde76f48b20f9bc (commit)
via 5a40b5b582b25e410622da8b7e484fad757f6bd1 (commit)
via 12f1a2196ccab628a5e899b70052fcf6ccb0f79f (commit)
via eb4491eea9ba873845f7a5796d139d19977f8112 (commit)
via e13e7dd672160e4ab5569c24133f4f6032db4a9a (commit)
via 9f1bcc2882ee4b7581192f992b042187e6fe39e8 (commit)
via 31afa127fa9b354c46fd78a2fe28228f958df71f (commit)
via d260d2473cd7faefb0f06cedfb26ef5abda7e012 (commit)
via 8c259b5122df8254613e8d23b0d860a7b1b37b41 (commit)
via a49f059145a3054052e1c79555bdeadf660d1c6a (commit)
from e6ce4acd9ac2ed0d93e5aafe8df8fb1e16ee956d (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 1bd016d1f30c72353e5e3b086dd9778b74efb516
Merge: e6ce4ac 75db1e8
Author: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
Date: Mon Aug 20 11:25:45 2018 +0200
merge-conflicts
Feature #13902
Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk at contractors.roche.com>
diff --cc src/index.tsx
index faaf6b8,443e76f..fcc02f1
--- a/src/index.tsx
+++ b/src/index.tsx
@@@ -27,8 -27,15 +27,16 @@@ import { collectionFilesActionSet } fro
import { collectionFilesItemActionSet } from './views-components/context-menu/action-sets/collection-files-item-action-set';
import { collectionActionSet } from './views-components/context-menu/action-sets/collection-action-set';
import { collectionResourceActionSet } from './views-components/context-menu/action-sets/collection-resource-action-set';
+import { initPickerProjectTree } from './views-components/project-tree-picker/project-tree-picker';
+ const getBuildNumber = () => "BN-" + (process.env.BUILD_NUMBER || "dev");
+ const getGitCommit = () => "GIT-" + (process.env.GIT_COMMIT || "latest").substr(0, 7);
+ const getBuildInfo = () => getBuildNumber() + " / " + getGitCommit();
+
+ const buildInfo = getBuildInfo();
+
+ console.log(`Starting arvados [${buildInfo}]`);
+
addMenuActionSet(ContextMenuKind.ROOT_PROJECT, rootProjectActionSet);
addMenuActionSet(ContextMenuKind.PROJECT, projectActionSet);
addMenuActionSet(ContextMenuKind.RESOURCE, resourceActionSet);
@@@ -46,10 -53,9 +54,10 @@@ fetchConfig(
store.dispatch(initAuth());
store.dispatch(getProjectList(services.authService.getUuid()));
- store.dispatch(initPickerProjectTree());
-
++ store.dispatch(initPickerProjectTree());
+
const TokenComponent = (props: any) => <ApiToken authService={services.authService} {...props}/>;
- const WorkbenchComponent = (props: any) => <Workbench authService={services.authService} {...props}/>;
+ const WorkbenchComponent = (props: any) => <Workbench authService={services.authService} buildInfo={buildInfo} {...props}/>;
const App = () =>
<MuiThemeProvider theme={CustomTheme}>
diff --cc src/store/data-explorer/data-explorer-reducer.test.tsx
index 56ea3e8,0bc44ba..d26d768
--- a/src/store/data-explorer/data-explorer-reducer.test.tsx
+++ b/src/store/data-explorer/data-explorer-reducer.test.tsx
@@@ -26,13 -26,14 +26,14 @@@ describe('data-explorer-reducer', () =
it('should toggle sorting', () => {
const columns: DataColumns<any> = [{
name: "Column 1",
+ filters: [],
render: jest.fn(),
selected: true,
- configurable: true,
- sortDirection: SortDirection.ASC
+ sortDirection: SortDirection.ASC,
- filters: [],
+ configurable: true
}, {
name: "Column 2",
+ filters: [],
render: jest.fn(),
selected: true,
configurable: true,
diff --cc src/store/tree-picker/tree-picker-reducer.test.ts
index 946d9cf,b092d5a..e09d12d
--- a/src/store/tree-picker/tree-picker-reducer.test.ts
+++ b/src/store/tree-picker/tree-picker-reducer.test.ts
@@@ -30,22 -28,22 +30,22 @@@ describe('TreePickerReducer', () =>
});
it('LOAD_TREE_PICKER_NODE_SUCCESS - initial state', () => {
- const tree = createTree<TreePickerNode>();
- const subNode = createTreePickerNode({ id: '1.1', value: '1.1' });
- const newTree = treePickerReducer(tree, treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({ id: '', nodes: [subNode] }));
- expect(getNodeChildrenIds('')(newTree)).toEqual(['1.1']);
+ const subNode = createTreePickerNode({ nodeId: '1.1', value: '1.1' });
+ const newState = treePickerReducer({}, treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({ nodeId: '', nodes: [subNode], pickerId: "projects" }));
- expect(getNodeChildren('')(newState.projects)).toEqual(['1.1']);
++ expect(getNodeChildrenIds('')(newState.projects)).toEqual(['1.1']);
});
it('LOAD_TREE_PICKER_NODE_SUCCESS', () => {
- const tree = createTree<TreePickerNode>();
- const node = createTreePickerNode({ id: '1', value: '1' });
- const subNode = createTreePickerNode({ id: '1.1', value: '1.1' });
- const [newTree] = [tree]
- .map(tree => treePickerReducer(tree, treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({ id: '', nodes: [node] })))
- .map(tree => treePickerReducer(tree, treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({ id: '1', nodes: [subNode] })));
- expect(getNodeChildrenIds('1')(newTree)).toEqual(['1.1']);
- expect(getNodeValue('1')(newTree)).toEqual({
- ...createTreePickerNode({ id: '1', value: '1' }),
+ const node = createTreePickerNode({ nodeId: '1', value: '1' });
+ const subNode = createTreePickerNode({ nodeId: '1.1', value: '1.1' });
+ const [newState] = [{
+ projects: createTree<TreePickerNode>()
+ }]
+ .map(state => treePickerReducer(state, treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({ nodeId: '', nodes: [node], pickerId: "projects" })))
+ .map(state => treePickerReducer(state, treePickerActions.LOAD_TREE_PICKER_NODE_SUCCESS({ nodeId: '1', nodes: [subNode], pickerId: "projects" })));
- expect(getNodeChildren('1')(newState.projects)).toEqual(['1.1']);
++ expect(getNodeChildrenIds('1')(newState.projects)).toEqual(['1.1']);
+ expect(getNodeValue('1')(newState.projects)).toEqual({
+ ...createTreePickerNode({ nodeId: '1', value: '1' }),
status: TreeItemStatus.LOADED
});
});
diff --cc src/views-components/tree-picker/tree-picker.ts
index a47599f,ba9ccb9..b90f2e4
--- a/src/views-components/tree-picker/tree-picker.ts
+++ b/src/views-components/tree-picker/tree-picker.ts
@@@ -3,38 -3,37 +3,38 @@@
// SPDX-License-Identifier: AGPL-3.0
import { connect } from "react-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, getNodeChildrenIds } from "~/models/tree";
+import { createTreePickerNode, TreePickerNode } from "~/store/tree-picker/tree-picker";
- import { getNodeValue, getNodeChildren, Tree as Ttree, createTree } from "~/models/tree";
++import { getNodeValue, getNodeChildrenIds, 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: (nodeId: string, status: TreeItemStatus, pickerId: string) => void;
+ toggleItemActive: (nodeId: string, status: TreeItemStatus, pickerId: string) => void;
+}
- return (state: RootState): Pick<TreeProps<any>, 'items'> => {
- if (prevState !== state.treePicker) {
- prevState = state.treePicker;
- prevTree = getNodeChildrenIds('')(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)
++ items: getNodeChildrenIds('')(tree)
+ .map(treePickerToTreeItems(tree))
};
};
-const mapDispatchToProps = (): Pick<TreeProps<any>, 'onContextMenu'> => ({
+const mapDispatchToProps = (dispatch: Dispatch, props: TreePickerProps): Pick<TreeProps<any>, 'onContextMenu' | 'toggleItemOpen' | 'toggleItemActive'> => ({
onContextMenu: () => { return; },
+ toggleItemActive: (id, status) => props.toggleItemActive(id, status, props.pickerId),
+ toggleItemOpen: (id, status) => props.toggleItemOpen(id, status, props.pickerId)
});
-export const TreePicker = connect(memoizedMapStateToProps(), mapDispatchToProps)(Tree);
+export const TreePicker = connect(mapStateToProps, mapDispatchToProps)(Tree);
-const treePickerToTreeItems = (tree: TTreePicker) =>
+const treePickerToTreeItems = (tree: Ttree<TreePickerNode>) =>
(id: string): TreeItem<any> => {
- const node: TreePickerNode = getNodeValue(id)(tree) || createTreePickerNode({ id: '', value: 'InvalidNode' });
- const items = getNodeChildrenIds(node.id)(tree)
+ const node: TreePickerNode = getNodeValue(id)(tree) || createTreePickerNode({ nodeId: '', value: 'InvalidNode' });
- const items = getNodeChildren(node.nodeId)(tree)
++ const items = getNodeChildrenIds(node.nodeId)(tree)
.map(treePickerToTreeItems(tree));
return {
active: node.selected,
diff --cc src/views/workbench/workbench.tsx
index cffae74,f23a978..3e0ed55
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@@ -48,9 -47,9 +47,10 @@@ import { RenameFileDialog } from '~/vie
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 { UploadCollectionFilesDialog } from '~/views-components/upload-collection-files-dialog/upload-collection-files-dialog';
const DRAWER_WITDH = 240;
const APP_BAR_HEIGHT = 100;
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list