[ARVADOS-WORKBENCH2] updated: 1.1.4-443-g55bb503
Git user
git at public.curoverse.com
Mon Jul 30 03:14:57 EDT 2018
Summary of changes:
.../collection-panel-files.tsx | 63 ++++++++++++++++++++++
src/views/workbench/workbench.tsx | 9 ++++
2 files changed, 72 insertions(+)
create mode 100644 src/components/collection-panel-files/collection-panel-files.tsx
via 55bb503e1b885a53ca20fc120c862c7af2db33af (commit)
from 28f13ae4d15f4f80ff3834d6a7422b4259672a20 (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 55bb503e1b885a53ca20fc120c862c7af2db33af
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Fri Jul 27 15:04:53 2018 +0200
Create CollectionPanelFiles [WIP]
Feature #13855
Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
diff --git a/src/components/collection-panel-files/collection-panel-files.tsx b/src/components/collection-panel-files/collection-panel-files.tsx
new file mode 100644
index 0000000..df277e3
--- /dev/null
+++ b/src/components/collection-panel-files/collection-panel-files.tsx
@@ -0,0 +1,63 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import * as React from 'react';
+import { TreeItem, TreeItemStatus } from '../tree/tree';
+import { FileTreeData } from '../file-tree/file-tree-data';
+import { FileTree } from '../file-tree/file-tree';
+import { CollectionPanelFilesState } from '../../store/collection-panel/collection-panel-files/collection-panel-files-state';
+
+export interface CollectionPanelFilesProps {
+ items: Array<TreeItem<FileTreeData>>;
+ onItemContextMenu: (event: React.MouseEvent<HTMLElement>, item: TreeItem<FileTreeData>) => void;
+ onCommonContextMenu: (event: React.MouseEvent<HTMLElement>) => void;
+ onSelectionToggle: (event: React.MouseEvent<HTMLElement>, item: TreeItem<FileTreeData>) => void;
+ onCollapseToggle: (id: string, status: TreeItemStatus) => void;
+}
+
+export const CollectionPanelFiles = ({ onItemContextMenu, onCommonContextMenu, ...treeProps }: CollectionPanelFilesProps) =>
+ <div>
+ <FileTree onContextMenu={onItemContextMenu} {...treeProps} />
+ </div>;
+
+export const collectionPanelItems: Array<TreeItem<FileTreeData>> = [{
+ active: false,
+ data: {
+ name: "Directory 1",
+ type: "directory"
+ },
+ id: "Directory 1",
+ open: true,
+ status: TreeItemStatus.LOADED,
+ items: [{
+ active: false,
+ data: {
+ name: "Directory 1.1",
+ type: "directory"
+ },
+ id: "Directory 1.1",
+ open: false,
+ status: TreeItemStatus.LOADED,
+ items: []
+ }, {
+ active: false,
+ data: {
+ name: "File 1.1",
+ type: "file"
+ },
+ id: "File 1.1",
+ open: false,
+ status: TreeItemStatus.LOADED,
+ items: []
+ }]
+}, {
+ active: false,
+ data: {
+ name: "Directory 2",
+ type: "directory"
+ },
+ id: "Directory 2",
+ open: false,
+ status: TreeItemStatus.LOADED
+}];
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index 3637528..e932fba 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -36,6 +36,7 @@ import { FavoritePanel, FAVORITE_PANEL_ID } from "../favorite-panel/favorite-pan
import { CurrentTokenDialog } from '../../views-components/current-token-dialog/current-token-dialog';
import { dataExplorerActions } from '../../store/data-explorer/data-explorer-action';
import { Snackbar } from '../../views-components/snackbar/snackbar';
+import { CollectionPanelFiles, collectionPanelItems } from '../../components/collection-panel-files/collection-panel-files';
const drawerWidth = 240;
const appBarHeight = 100;
@@ -212,6 +213,14 @@ export const Workbench = withStyles(styles)(
<Switch>
<Route path="/projects/:id" render={this.renderProjectPanel} />
<Route path="/favorites" render={this.renderFavoritePanel} />
+ <Route path="/" render={() =>
+ <CollectionPanelFiles
+ items={collectionPanelItems}
+ onCollapseToggle={console.log}
+ onSelectionToggle={console.log}
+ onItemContextMenu={console.log}
+ onCommonContextMenu={console.log}
+ />} />
</Switch>
</div>
{user && <DetailsPanel />}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list