[ARVADOS-WORKBENCH2] updated: 1.1.4-445-g9072585
Git user
git at public.curoverse.com
Mon Jul 30 06:58:19 EDT 2018
Summary of changes:
.../collection-panel-files.tsx | 41 ----------------
.../collection-panel-files.ts | 55 ++++++++++++++++++++++
src/views/workbench/workbench.tsx | 3 +-
3 files changed, 56 insertions(+), 43 deletions(-)
create mode 100644 src/views-components/collection-panel-files/collection-panel-files.ts
via 9072585569eedc1ed276ade47fe9ca16447aff39 (commit)
from 91c6da4c4f84498a8473a0245a70c024ca9910d7 (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 9072585569eedc1ed276ade47fe9ca16447aff39
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date: Mon Jul 30 12:58:04 2018 +0200
Init collection-panel-files hoc
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
index af2c19a..fb1ee05 100644
--- a/src/components/collection-panel-files/collection-panel-files.tsx
+++ b/src/components/collection-panel-files/collection-panel-files.tsx
@@ -47,44 +47,3 @@ export const CollectionPanelFiles = withStyles(styles)(
<FileTree onMenuOpen={onItemMenuOpen} {...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",
- size: 20033
- },
- 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-components/collection-panel-files/collection-panel-files.ts b/src/views-components/collection-panel-files/collection-panel-files.ts
new file mode 100644
index 0000000..e61007a
--- /dev/null
+++ b/src/views-components/collection-panel-files/collection-panel-files.ts
@@ -0,0 +1,55 @@
+// Copyright (C) The Arvados Authors. All rights reserved.
+//
+// SPDX-License-Identifier: AGPL-3.0
+
+import { connect } from "react-redux";
+import { CollectionPanelFiles as Component, CollectionPanelFilesProps } from "../../components/collection-panel-files/collection-panel-files";
+import { RootState } from "../../store/store";
+import { TreeItemStatus } from "../../components/tree/tree";
+
+const mapStateToProps = (state: RootState): Pick<CollectionPanelFilesProps, "items"> => ({
+ items: [{
+ 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",
+ size: 20033
+ },
+ 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
+ }]
+});
+
+
+export const CollectionPanelFiles = connect(mapStateToProps)(Component);
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index 1b6e05d..75e9265 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -36,7 +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';
+import { CollectionPanelFiles } from '../../views-components/collection-panel-files/collection-panel-files';
const drawerWidth = 240;
const appBarHeight = 100;
@@ -215,7 +215,6 @@ export const Workbench = withStyles(styles)(
<Route path="/favorites" render={this.renderFavoritePanel} />
<Route path="/" render={() =>
<CollectionPanelFiles
- items={collectionPanelItems}
onCollapseToggle={console.log}
onSelectionToggle={console.log}
onItemMenuOpen={console.log}
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list