[ARVADOS-WORKBENCH2] updated: 1.2.0-910-g1a59e5d

Git user git at public.curoverse.com
Mon Nov 19 04:53:15 EST 2018


Summary of changes:
 src/models/tree.test.ts                            | 10 +++++-
 src/models/tree.ts                                 |  9 ++++-
 src/store/collections/collection-copy-actions.ts   |  2 ++
 src/store/collections/collection-move-actions.ts   |  2 ++
 .../collections/collection-partial-copy-actions.ts |  2 ++
 src/store/details-panel/details-panel-action.ts    | 13 ++++++--
 src/store/processes/process-copy-actions.ts        |  2 ++
 src/store/processes/process-move-actions.ts        |  2 ++
 src/store/processes/processes-actions.ts           | 30 ++++++++++++++++-
 src/store/projects/project-move-actions.ts         |  2 ++
 src/store/tree-picker/picker-id.tsx                | 16 +++++++++
 src/store/tree-picker/tree-picker-actions.ts       | 39 +++++++++++-----------
 src/store/tree-picker/tree-picker-reducer.ts       | 25 ++++++++++++--
 .../action-sets/collection-action-set.ts           |  3 +-
 .../action-sets/collection-resource-action-set.ts  |  3 +-
 .../context-menu/action-sets/process-action-set.ts |  3 +-
 .../action-sets/process-resource-action-set.ts     | 19 ++++++-----
 .../context-menu/action-sets/project-action-set.ts |  3 +-
 .../action-sets/trashed-collection-action-set.ts   |  3 +-
 .../details-panel/details-panel.tsx                |  5 ++-
 .../details-panel/project-details.tsx              |  6 ++--
 .../dialog-copy/dialog-collection-partial-copy.tsx | 19 +++++++----
 src/views-components/dialog-copy/dialog-copy.tsx   | 31 +++++++++--------
 .../dialog-forms/copy-collection-dialog.ts         |  4 ++-
 .../dialog-forms/copy-process-dialog.ts            |  4 ++-
 .../dialog-forms/move-collection-dialog.ts         |  4 ++-
 .../dialog-forms/move-process-dialog.ts            |  4 ++-
 .../dialog-forms/move-project-dialog.ts            |  4 ++-
 .../dialog-forms/partial-copy-collection-dialog.ts |  5 ++-
 .../dialog-move/dialog-move-to.tsx                 | 18 ++++++----
 .../form-fields/collection-form-fields.tsx         | 13 +++-----
 .../main-content-bar/main-content-bar.tsx          |  3 +-
 .../process-remove-dialog.tsx}                     | 13 ++++----
 .../project-tree-picker/project-tree-picker.tsx    | 17 ++++++----
 .../generic-projects-tree-picker.tsx               | 15 +++++++--
 .../projects-tree-picker/projects-tree-picker.tsx  | 18 +++++++---
 src/views/workbench/workbench.tsx                  |  2 ++
 37 files changed, 263 insertions(+), 110 deletions(-)
 create mode 100644 src/store/tree-picker/picker-id.tsx
 copy src/views-components/{file-remove-dialog/multiple-files-remove-dialog.ts => process-remove-dialog/process-remove-dialog.tsx} (51%)

       via  1a59e5dcc15a9a1aebfd15a08903fcb75efd2aac (commit)
       via  0a0db4ca8433ae210df5cf1475dd2b77e4aabec9 (commit)
       via  abf8502a9a1f061f58586b966a4012674d9cb71e (commit)
       via  123bae90530147cf31e220066999b416d3610ae2 (commit)
       via  9e1596de7ac6ed8286b17c5e3d2b39bc0c03fa8f (commit)
       via  6e7601cf151b8384b353b3c90134e4bbb4939d2f (commit)
       via  ed5c052b271d357da4b85a10db33edd10d43685d (commit)
       via  2636921500b01485584eb43263815957b867122a (commit)
       via  aed4e6256e6d5ecb5edc60a04a5aab6f04d9fb99 (commit)
       via  185f57cf4371e7811077bee56976028dd640688d (commit)
       via  fcda82dca52aa45926f8e656c45baf892acdc634 (commit)
       via  fc05ea3e89e7618ea0a52d88a377533512d5ec32 (commit)
       via  de434883528ce218d384686092e82742a18491c7 (commit)
       via  ea4c952433d2ee3906999f629b8bc2076e0af13c (commit)
       via  2edee5acc1ef219dd90a7314c87df5683569afaa (commit)
       via  6f08c46e8d91662aab3b3e600868328c1bd1bacd (commit)
       via  a5f55ef0fa6bd61ba5678d5ccdbf26589c093212 (commit)
       via  6d1da474f9ae85108bbde00fe341cca65fd0ca06 (commit)
       via  f528f6f6ca52c8654b52f84e52339da8e91a9d9c (commit)
       via  c1b42ed027b39f04d4bf61b27d0603818cdd2bee (commit)
       via  db6ff2ea8246badb7bdcfb0ec0ad169134c5c7ba (commit)
       via  dd00886a1098e82a70b814d7d4c2f30d3e6e69c7 (commit)
       via  fa8e4468481efa1d43065b73ae1fa08fb0e851a7 (commit)
       via  c4fb72d1ddf4080cae66e296b873e5605e83e326 (commit)
       via  0101b0b9c7416f7aadb94ca71258b4d4e60af58a (commit)
       via  a2783c48c8210410de72bd17a32ab72d0f364cde (commit)
       via  90f56604ead086b6acc582bcb745a75e8bde5267 (commit)
       via  59ddd20573eab6116c590c2a692c0131fa2f3f4f (commit)
       via  02e77918141f173e5a61b17623c8cad0e8a1bae3 (commit)
       via  807660c78edbb1672af8b60348961896e48487b6 (commit)
       via  61eb34ae0ce62f67769baeba02b4e15971873e34 (commit)
       via  1eb2cc60cbf40d86db2304e11a678c3aa51af321 (commit)
       via  8e44d7f9d688d4d42b9d76f1a3c68924e927405c (commit)
       via  bb89fb18a6edfd90e80470abf040f6a5b9f6da1d (commit)
       via  00ec76eb43a0f27c02669cbfce16d0d2211ff0b4 (commit)
       via  d1231b6ce7e8d40498b15011b88117812acdf632 (commit)
       via  ce19ce10f479c168f72003495696fdd0f01ecc52 (commit)
       via  165d40cdee00c0d8ae11f711c898498c032b1374 (commit)
       via  ec9081aafdd4b8c251e935edd047126ad411767e (commit)
       via  9da0da6012b6c4b80db90fdd5862d37ad2113aa4 (commit)
       via  abee9c2585e30a4217b5adc3b40d298227f6a650 (commit)
       via  546052817ac18623f5389914a3077e8cc6a3d4f4 (commit)
       via  6c40105be37e95350ad0537c38401d58e6f84e2c (commit)
       via  59213045f0a135ef97249ff69e1737ea88123007 (commit)
      from  82908c571a492f19f2ea402e033fa84b6df15b61 (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 1a59e5dcc15a9a1aebfd15a08903fcb75efd2aac
Merge: 0a0db4c abf8502
Author: Janicki Artur <artur.janicki at contractors.roche.com>
Date:   Mon Nov 19 10:52:47 2018 +0100

    Merge branch 'master' of git.curoverse.com:arvados-workbench2 into 14433_properties_inside_projects
    
    refs #2
    14433
    
    Arvados-DCO-1.1-Signed-off-by: Janicki Artur <artur.janicki at contractors.roche.com>

diff --cc src/store/details-panel/details-panel-action.ts
index 6aebc05,0f13286..2c742a1
--- a/src/store/details-panel/details-panel-action.ts
+++ b/src/store/details-panel/details-panel-action.ts
@@@ -3,17 -3,10 +3,19 @@@
  // SPDX-License-Identifier: AGPL-3.0
  
  import { unionize, ofType, UnionOf } from '~/common/unionize';
 +import { RootState } from '~/store/store';
  import { Dispatch } from 'redux';
 +import { dialogActions } from '~/store/dialog/dialog-actions';
 +import { getResource } from '~/store/resources/resources';
 +import { ProjectResource } from "~/models/project";
 +import { ServiceRepository } from '~/services/services';
 +import { TagProperty } from '~/models/tag';
 +import { startSubmit, stopSubmit } from 'redux-form';
 +import { resourcesActions } from '~/store/resources/resources-actions';
 +import { snackbarActions } from '~/store/snackbar/snackbar-actions';
  
+ export const SLIDE_TIMEOUT = 500;
+ 
  export const detailsPanelActions = unionize({
      TOGGLE_DETAILS_PANEL: ofType<{}>(),
      LOAD_DETAILS_PANEL: ofType<string>()
@@@ -21,49 -14,13 +23,57 @@@
  
  export type DetailsPanelAction = UnionOf<typeof detailsPanelActions>;
  
 +export const PROJECT_PROPERTIES_FORM_NAME = 'projectPropertiesFormName';
 +export const PROJECT_PROPERTIES_DIALOG_NAME = 'projectPropertiesDialogName';
 +
  export const loadDetailsPanel = (uuid: string) => detailsPanelActions.LOAD_DETAILS_PANEL(uuid);
  
 +export const openProjectPropertiesDialog = () =>
 +    (dispatch: Dispatch) => {
 +        dispatch<any>(dialogActions.OPEN_DIALOG({ id: PROJECT_PROPERTIES_DIALOG_NAME, data: { } }));
 +    };
 +
 +export const deleteProjectProperty = (key: string) =>
 +    async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
 +        const { detailsPanel, resources } = getState();
 +        const project = getResource(detailsPanel.resourceUuid)(resources) as ProjectResource;
 +        try {
 +            if (project) {
 +                delete project.properties[key];
 +                const updatedProject = await services.projectService.update(project.uuid, project);
 +                dispatch(resourcesActions.SET_RESOURCES([updatedProject]));
 +                dispatch(snackbarActions.OPEN_SNACKBAR({ message: "Property has been successfully deleted.", hideDuration: 2000 }));
 +            }
 +        } catch (e) {
 +            dispatch(dialogActions.CLOSE_DIALOG({ id: PROJECT_PROPERTIES_FORM_NAME }));
 +            throw new Error('Could not remove property from the project.');
 +        }
 +    };
 +
 +export const createProjectProperty = (data: TagProperty) =>
 +    async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
 +        const { detailsPanel, resources } = getState();
 +        const project = getResource(detailsPanel.resourceUuid)(resources) as ProjectResource;
 +        dispatch(startSubmit(PROJECT_PROPERTIES_FORM_NAME));
 +        try {
 +            if (project) {
 +                project.properties[data.key] = data.value;
 +                const updatedProject = await services.projectService.update(project.uuid, project);
 +                dispatch(resourcesActions.SET_RESOURCES([updatedProject]));
 +                dispatch(snackbarActions.OPEN_SNACKBAR({ message: "Property has been successfully added.", hideDuration: 2000 }));
 +                dispatch(stopSubmit(PROJECT_PROPERTIES_FORM_NAME));
 +            }
 +            return;
 +        } catch (e) {
 +            dispatch(dialogActions.CLOSE_DIALOG({ id: PROJECT_PROPERTIES_FORM_NAME }));
 +            throw new Error('Could not add property to the project.');
 +        }
-     };
++    };
+ export const toggleDetailsPanel = () => (dispatch: Dispatch) => {
+     // because of material-ui issue resizing details panel breaks tabs.
+     // triggering window resize event fixes that.
+     setTimeout(() => {
+         window.dispatchEvent(new Event('resize'));
+     }, SLIDE_TIMEOUT);
+     dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
+ };
diff --cc src/views/workbench/workbench.tsx
index 19a2ef4,744526b..8d1fb67
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@@ -141,7 -141,7 +142,8 @@@ export const WorkbenchPanel 
              <PartialCopyCollectionDialog />
              <ProcessCommandDialog />
              <ProcessInputDialog />
 +            <ProjectPropertiesDialog />
+             <RemoveProcessDialog />
              <RenameFileDialog />
              <RichTextEditorDialog />
              <SharingDialog />

commit 0a0db4ca8433ae210df5cf1475dd2b77e4aabec9
Author: Janicki Artur <artur.janicki at contractors.roche.com>
Date:   Fri Nov 16 17:08:19 2018 +0100

    change code after CR
    
    Feature #14433_properties_inside_projects
    
    Arvados-DCO-1.1-Signed-off-by: Janicki Artur <artur.janicki at contractors.roche.com>

diff --git a/src/store/details-panel/details-panel-action.ts b/src/store/details-panel/details-panel-action.ts
index cd9ab4b..6aebc05 100644
--- a/src/store/details-panel/details-panel-action.ts
+++ b/src/store/details-panel/details-panel-action.ts
@@ -42,7 +42,6 @@ export const deleteProjectProperty = (key: string) =>
                 dispatch(resourcesActions.SET_RESOURCES([updatedProject]));
                 dispatch(snackbarActions.OPEN_SNACKBAR({ message: "Property has been successfully deleted.", hideDuration: 2000 }));
             }
-            return;
         } catch (e) {
             dispatch(dialogActions.CLOSE_DIALOG({ id: PROJECT_PROPERTIES_FORM_NAME }));
             throw new Error('Could not remove property from the project.');
diff --git a/src/views-components/details-panel/project-details.tsx b/src/views-components/details-panel/project-details.tsx
index e995291..91c5e02 100644
--- a/src/views-components/details-panel/project-details.tsx
+++ b/src/views-components/details-panel/project-details.tsx
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from 'react';
-import { Dispatch } from 'redux';
+import { compose } from 'redux';
 import { connect } from 'react-redux';
 import { openProjectPropertiesDialog } from '~/store/details-panel/details-panel-action';
 import { ProjectIcon, RenameIcon } from '~/components/icon/icon';
@@ -49,9 +49,7 @@ interface ProjectDetailsComponentActionProps {
     onClick: () => void;
 }
 
-const mapDispatchToProps = (dispatch: Dispatch): ProjectDetailsComponentActionProps => ({
-    onClick: () => dispatch<any>(openProjectPropertiesDialog())
-});
+const mapDispatchToProps = ({ onClick: openProjectPropertiesDialog });
 
 type ProjectDetailsComponentProps = ProjectDetailsComponentDataProps & ProjectDetailsComponentActionProps & WithStyles<CssRules>;
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list