[ARVADOS-WORKBENCH2] updated: 1.1.4-147-ga6bda2a

Git user git at public.curoverse.com
Tue Jun 26 04:12:04 EDT 2018


Summary of changes:
 .../project-explorer/project-explorer-item.ts      | 11 +++++
 .../project-explorer/project-explorer.tsx          | 51 +++++++++++-----------
 src/views/project-panel/project-panel-selectors.ts | 15 -------
 src/views/project-panel/project-panel.tsx          | 31 -------------
 src/views/workbench/workbench.tsx                  | 16 ++-----
 5 files changed, 40 insertions(+), 84 deletions(-)
 delete mode 100644 src/views/project-panel/project-panel-selectors.ts
 delete mode 100644 src/views/project-panel/project-panel.tsx

       via  a6bda2a572824ffe2daf89b42dd1bb9321bfb6d9 (commit)
      from  a49f8eb5ac38cbd405ef8465387faa71c07f7f45 (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 a6bda2a572824ffe2daf89b42dd1bb9321bfb6d9
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Tue Jun 26 10:11:48 2018 +0200

    Replace project-panel with project-explorer
    
    Feature #13678
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/views-components/project-explorer/project-explorer-item.ts b/src/views-components/project-explorer/project-explorer-item.ts
index 055c22c..b7c8707 100644
--- a/src/views-components/project-explorer/project-explorer-item.ts
+++ b/src/views-components/project-explorer/project-explorer-item.ts
@@ -2,6 +2,9 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
+import { TreeItem } from "../../components/tree/tree";
+import { Project } from "../../models/project";
+
 export interface ProjectExplorerItem {
     uuid: string;
     name: string;
@@ -11,3 +14,11 @@ export interface ProjectExplorerItem {
     fileSize?: number;
     status?: string;
 }
+
+export const mapProjectTreeItem = (item: TreeItem<Project>): ProjectExplorerItem => ({
+    name: item.data.name,
+    type: item.data.kind,
+    owner: item.data.ownerUuid,
+    lastModified: item.data.modifiedAt,
+    uuid: item.data.uuid
+});
\ No newline at end of file
diff --git a/src/views-components/project-explorer/project-explorer.tsx b/src/views-components/project-explorer/project-explorer.tsx
index c4d40e8..e9dc2a9 100644
--- a/src/views-components/project-explorer/project-explorer.tsx
+++ b/src/views-components/project-explorer/project-explorer.tsx
@@ -16,35 +16,10 @@ import { DataColumns } from '../../components/data-table/data-table';
 
 export const PROJECT_EXPLORER_ID = "projectExplorer";
 class ProjectExplorer extends React.Component<DispatchProp> {
-
-    contextMenuActions = [[{
-        icon: "fas fa-users fa-fw",
-        name: "Share"
-    }, {
-        icon: "fas fa-sign-out-alt fa-fw",
-        name: "Move to"
-    }, {
-        icon: "fas fa-star fa-fw",
-        name: "Add to favourite"
-    }, {
-        icon: "fas fa-edit fa-fw",
-        name: "Rename"
-    }, {
-        icon: "fas fa-copy fa-fw",
-        name: "Make a copy"
-    }, {
-        icon: "fas fa-download fa-fw",
-        name: "Download"
-    }], [{
-        icon: "fas fa-trash-alt fa-fw",
-        name: "Remove"
-    }
-    ]];
-
     render() {
         return <DataExplorer
             id={PROJECT_EXPLORER_ID}
-            contextActions={this.contextMenuActions}
+            contextActions={contextMenuActions}
             onColumnToggle={this.toggleColumn}
             onFiltersChange={this.changeFilters}
             onRowClick={console.log}
@@ -182,4 +157,28 @@ const columns: DataColumns<ProjectExplorerItem> = [{
     render: item => renderDate(item.lastModified)
 }];
 
+const contextMenuActions = [[{
+    icon: "fas fa-users fa-fw",
+    name: "Share"
+}, {
+    icon: "fas fa-sign-out-alt fa-fw",
+    name: "Move to"
+}, {
+    icon: "fas fa-star fa-fw",
+    name: "Add to favourite"
+}, {
+    icon: "fas fa-edit fa-fw",
+    name: "Rename"
+}, {
+    icon: "fas fa-copy fa-fw",
+    name: "Make a copy"
+}, {
+    icon: "fas fa-download fa-fw",
+    name: "Download"
+}], [{
+    icon: "fas fa-trash-alt fa-fw",
+    name: "Remove"
+}
+]];
+
 export default connect()(ProjectExplorer);
diff --git a/src/views/project-panel/project-panel-selectors.ts b/src/views/project-panel/project-panel-selectors.ts
deleted file mode 100644
index 610f2fa..0000000
--- a/src/views/project-panel/project-panel-selectors.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright (C) The Arvados Authors. All rights reserved.
-//
-// SPDX-License-Identifier: AGPL-3.0
-
-import { TreeItem } from "../../components/tree/tree";
-import { Project } from "../../models/project";
-import { ProjectExplorerItem } from "../../views-components/project-explorer/project-explorer-item";
-
-export const mapProjectTreeItem = (item: TreeItem<Project>): ProjectExplorerItem => ({
-    name: item.data.name,
-    type: item.data.kind,
-    owner: item.data.ownerUuid,
-    lastModified: item.data.modifiedAt,
-    uuid: item.data.uuid
-});
diff --git a/src/views/project-panel/project-panel.tsx b/src/views/project-panel/project-panel.tsx
deleted file mode 100644
index afc6ce0..0000000
--- a/src/views/project-panel/project-panel.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright (C) The Arvados Authors. All rights reserved.
-//
-// SPDX-License-Identifier: AGPL-3.0
-
-import * as React from 'react';
-import { RouteComponentProps } from 'react-router-dom';
-import { DispatchProp, connect } from 'react-redux';
-import { ProjectState, findTreeItem } from '../../store/project/project-reducer';
-import { RootState } from '../../store/store';
-import ProjectExplorer from '../../views-components/project-explorer/project-explorer';
-
-interface ProjectPanelDataProps {
-    projects: ProjectState;
-}
-
-type ProjectPanelProps = ProjectPanelDataProps & RouteComponentProps<{ name: string }> & DispatchProp;
-
-class ProjectPanel extends React.Component<ProjectPanelProps> {
-
-    render() {
-        return (
-            <ProjectExplorer />
-        );
-    }
-}
-
-export default connect(
-    (state: RootState) => ({
-        projects: state.projects
-    })
-)(ProjectPanel);
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index a05d4db..92cbc5d 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -19,11 +19,9 @@ import ProjectTree from '../../views-components/project-tree/project-tree';
 import { TreeItem, TreeItemStatus } from "../../components/tree/tree";
 import { Project } from "../../models/project";
 import { getTreePath, findTreeItem } from '../../store/project/project-reducer';
-import ProjectPanel from '../project-panel/project-panel';
-import { PROJECT_EXPLORER_ID } from '../../views-components/project-explorer/project-explorer';
-import { ProjectExplorerItem } from '../../views-components/project-explorer/project-explorer-item';
+import ProjectExplorer, { PROJECT_EXPLORER_ID } from '../../views-components/project-explorer/project-explorer';
+import { ProjectExplorerItem, mapProjectTreeItem } from '../../views-components/project-explorer/project-explorer-item';
 import sidePanelActions from '../../store/side-panel/side-panel-action';
-import { projectService } from '../../services/services';
 import SidePanel, { SidePanelItem } from '../../components/side-panel/side-panel';
 
 const drawerWidth = 240;
@@ -195,13 +193,7 @@ class Workbench extends React.Component<WorkbenchProps, WorkbenchState> {
 
         const project = findTreeItem(this.props.projects, itemId);
         const items: ProjectExplorerItem[] = project && project.items
-            ? project.items.map(({ data }) => ({
-                uuid: data.uuid,
-                name: data.name,
-                type: data.kind,
-                owner: data.ownerUuid,
-                lastModified: data.modifiedAt
-            }))
+            ? project.items.map(mapProjectTreeItem)
             : [];
         this.props.dispatch(dataExplorerActions.SET_ITEMS({ id: PROJECT_EXPLORER_ID, items }));
     }
@@ -239,7 +231,7 @@ class Workbench extends React.Component<WorkbenchProps, WorkbenchState> {
                 <main className={classes.contentWrapper}>
                     <div className={classes.content}>
                         <Switch>
-                            <Route path="/project/:name" component={ProjectPanel} />
+                            <Route path="/project/:name" component={ProjectExplorer} />
                         </Switch>
                     </div>
                 </main>

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list