[ARVADOS-WORKBENCH2] updated: 1.1.4-479-g05d13a8

Git user git at public.curoverse.com
Fri Aug 3 02:10:24 EDT 2018


Summary of changes:
 src/common/api/server-api.ts                       | 29 --------
 src/index.tsx                                      | 19 +++--
 src/services/auth-service/auth-service.ts          |  9 ++-
 src/services/services.ts                           | 44 ++++++++++--
 src/store/auth/auth-action.ts                      | 55 +++++++++++++--
 src/store/auth/auth-actions.test.ts                | 74 ++++++++++++++++++++
 src/store/auth/auth-reducer.test.ts                | 80 +++++-----------------
 src/store/auth/auth-reducer.ts                     | 22 ++----
 .../collection-panel/collection-panel-action.ts    |  9 +--
 .../creator/collection-creator-action.ts           |  8 +--
 src/store/details-panel/details-panel-action.ts    | 15 ++--
 .../favorite-panel-middleware-service.ts           |  8 +--
 src/store/favorites/favorites-actions.ts           | 14 ++--
 .../project-panel-middleware-service.ts            |  6 +-
 src/store/project/project-action.ts                | 10 +--
 src/store/store.ts                                 | 41 ++++++-----
 src/views-components/api-token/api-token.tsx       |  9 +--
 src/views/workbench/workbench.test.tsx             |  3 +-
 src/views/workbench/workbench.tsx                  | 58 ++++++++--------
 19 files changed, 292 insertions(+), 221 deletions(-)
 delete mode 100644 src/common/api/server-api.ts
 create mode 100644 src/store/auth/auth-actions.test.ts

       via  05d13a8a142ccab6425905bd6706ba77cb5f06dd (commit)
       via  d0166a21891dca8719bcedc252a640d1b8037f40 (commit)
       via  fbec771115f1872bdadc0572a5c5059be68f1aca (commit)
       via  cba00eaa2d205b13cfa696f866a31452c6511cf3 (commit)
       via  27f903d5e3aa7f1c936808d0a7be37a70283516f (commit)
       via  c9185154744d997a35833de9c8e2cb9640b1162b (commit)
       via  24ddc06cb04b124d337e91c190230bfad83e490b (commit)
       via  3ec7057e490b3d19b15663dd312328f637fa1d3b (commit)
       via  f239b9e88677d82a48b6b565ab2fd407d1171729 (commit)
      from  c16bd80e93d4f5613f4c0a8ef973502932c62486 (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 05d13a8a142ccab6425905bd6706ba77cb5f06dd
Merge: c16bd80 d0166a2
Author: Janicki Artur <artur.janicki at contractors.roche.com>
Date:   Fri Aug 3 08:10:09 2018 +0200

    Merge branch 'master' into 13903-edit-collection-popup
    
    refs #13903
    
    Arvados-DCO-1.1-Signed-off-by: Janicki Artur <artur.janicki at contractors.roche.com>

diff --cc src/store/collection-panel/collection-panel-action.ts
index c0d3366,1a23fbe..673f9f0
--- a/src/store/collection-panel/collection-panel-action.ts
+++ b/src/store/collection-panel/collection-panel-action.ts
@@@ -16,12 -18,12 +17,12 @@@ export const collectionPanelActions = u
  export type CollectionPanelAction = UnionOf<typeof collectionPanelActions>;
  
  export const loadCollection = (uuid: string, kind: ResourceKind) =>
-     (dispatch: Dispatch) => {
+     (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
          dispatch(collectionPanelActions.LOAD_COLLECTION({ uuid, kind }));
-         return collectionService
 -        return new CommonResourceService(services.apiClient, "collections")
++        return services.collectionService
              .get(uuid)
              .then(item => {
-                 dispatch(collectionPanelActions.LOAD_COLLECTION_SUCCESS({ item }));
+                 dispatch(collectionPanelActions.LOAD_COLLECTION_SUCCESS({ item: item as CollectionResource }));
              });
      };
  
diff --cc src/store/collections/creator/collection-creator-action.ts
index 2a977e3,1dc8236..2f2b838
--- a/src/store/collections/creator/collection-creator-action.ts
+++ b/src/store/collections/creator/collection-creator-action.ts
@@@ -20,11 -20,11 +20,11 @@@ export const collectionCreateActions = 
      });
  
  export const createCollection = (collection: Partial<CollectionResource>) =>
-     (dispatch: Dispatch, getState: () => RootState) => {
+     (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
 -        const { ownerUuid } = getState().collectionCreation.creator;
 +        const { ownerUuid } = getState().collections.creator;
          const collectiontData = { ownerUuid, ...collection };
          dispatch(collectionCreateActions.CREATE_COLLECTION(collectiontData));
-         return collectionService
+         return services.collectionService
              .create(collectiontData)
              .then(collection => dispatch(collectionCreateActions.CREATE_COLLECTION_SUCCESS(collection)));
      };
diff --cc src/store/store.ts
index 73b73f9,3734361..02dcc9b
--- a/src/store/store.ts
+++ b/src/store/store.ts
@@@ -21,8 -21,9 +21,9 @@@ import { FAVORITE_PANEL_ID } from "./fa
  import { PROJECT_PANEL_ID } from "./project-panel/project-panel-action";
  import { ProjectPanelMiddlewareService } from "./project-panel/project-panel-middleware-service";
  import { FavoritePanelMiddlewareService } from "./favorite-panel/favorite-panel-middleware-service";
 -import { CollectionCreatorState, collectionCreationReducer } from './collections/creator/collection-creator-reducer';
  import { CollectionPanelState, collectionPanelReducer } from './collection-panel/collection-panel-reducer';
 +import { CollectionsState, collectionsReducer } from './collections/collections-reducer';
+ import { ServiceRepository } from "../services/services";
  
  const composeEnhancers =
      (process.env.NODE_ENV === 'development' &&
@@@ -43,27 -44,29 +44,29 @@@ export interface RootState 
      snackbar: SnackbarState;
  }
  
- const rootReducer = combineReducers({
-     auth: authReducer,
-     projects: projectsReducer,
-     collections: collectionsReducer,
-     router: routerReducer,
-     dataExplorer: dataExplorerReducer,
-     sidePanel: sidePanelReducer,
-     collectionPanel: collectionPanelReducer,
-     detailsPanel: detailsPanelReducer,
-     contextMenu: contextMenuReducer,
-     form: formReducer,
-     favorites: favoritesReducer,
-     snackbar: snackbarReducer,
- });
+ export type RootStore = Store<RootState, Action> & { dispatch: Dispatch<any> };
+ 
+ export function configureStore(history: History, services: ServiceRepository): RootStore {
+ 	const rootReducer = combineReducers({
+ 	    auth: authReducer(services),
+ 	    projects: projectsReducer,
 -	    collectionCreation: collectionCreationReducer,
++        collections: collectionsReducer,
+ 	    router: routerReducer,
+ 	    dataExplorer: dataExplorerReducer,
+ 	    sidePanel: sidePanelReducer,
+ 	    collectionPanel: collectionPanelReducer,
+ 	    detailsPanel: detailsPanelReducer,
+ 	    contextMenu: contextMenuReducer,
+ 	    form: formReducer,
+ 	    favorites: favoritesReducer,
+ 	    snackbar: snackbarReducer,
+ 	});
  
- export function configureStore(history: History) {
      const projectPanelMiddleware = dataExplorerMiddleware(
-         new ProjectPanelMiddlewareService(PROJECT_PANEL_ID)
+         new ProjectPanelMiddlewareService(services, PROJECT_PANEL_ID)
      );
      const favoritePanelMiddleware = dataExplorerMiddleware(
-         new FavoritePanelMiddlewareService(FAVORITE_PANEL_ID)
+         new FavoritePanelMiddlewareService(services, FAVORITE_PANEL_ID)
      );
  
      const middlewares: Middleware[] = [
diff --cc src/views/workbench/workbench.tsx
index 048e44d,f0067aa..dcce725
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@@ -42,10 -41,10 +41,11 @@@ import { CreateCollectionDialog } from 
  import { CollectionPanel } from '../collection-panel/collection-panel';
  import { loadCollection } from '../../store/collection-panel/collection-panel-action';
  import { getCollectionUrl } from '../../models/collection';
 +import { UpdateCollectionDialog } from '../../views-components/update-collection-dialog/update-collection-dialog.';
+ import { AuthService } from "../../services/auth-service/auth-service";
  
- const drawerWidth = 240;
- const appBarHeight = 100;
+ const DRAWER_WITDH = 240;
+ const APP_BAR_HEIGHT = 100;
  
  type CssRules = 'root' | 'appBar' | 'drawerPaper' | 'content' | 'contentWrapper' | 'toolbar';
  

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list