[ARVADOS-WORKBENCH2] created: 1.2.0-846-g341b552

Git user git at public.curoverse.com
Tue Nov 13 02:43:53 EST 2018


        at  341b552800f6866fc3f73b4f6c1468425e485694 (commit)


commit 341b552800f6866fc3f73b4f6c1468425e485694
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Tue Nov 13 08:42:46 2018 +0100

    Reuse project panel filters function
    
    Feature #14268
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/store/shared-with-me-panel/shared-with-me-middleware-service.ts b/src/store/shared-with-me-panel/shared-with-me-middleware-service.ts
index 5ec3ae7..b268e31 100644
--- a/src/store/shared-with-me-panel/shared-with-me-middleware-service.ts
+++ b/src/store/shared-with-me-panel/shared-with-me-middleware-service.ts
@@ -9,7 +9,7 @@ import { RootState } from '~/store/store';
 import { getDataExplorer, DataExplorer } from '~/store/data-explorer/data-explorer-reducer';
 import { updateFavorites } from '~/store/favorites/favorites-actions';
 import { updateResources } from '~/store/resources/resources-actions';
-import { loadMissingProcessesInformation } from '~/store/project-panel/project-panel-middleware-service';
+import { loadMissingProcessesInformation, getFilters } from '~/store/project-panel/project-panel-middleware-service';
 import { snackbarActions } from '~/store/snackbar/snackbar-actions';
 import { sharedWithMePanelActions } from './shared-with-me-panel-actions';
 import { ListResults } from '~/services/common-service/common-resource-service';
@@ -18,7 +18,6 @@ import { SortDirection } from '~/components/data-table/data-column';
 import { OrderBuilder, OrderDirection } from '~/services/api/order-builder';
 import { ProjectResource } from '~/models/project';
 import { ProjectPanelColumnNames } from '~/views/project-panel/project-panel';
-import { FilterBuilder } from '~/services/api/filter-builder';
 
 export class SharedWithMeMiddlewareService extends DataExplorerMiddlewareService {
     constructor(private services: ServiceRepository, id: string) {
@@ -50,14 +49,6 @@ export const getParams = (dataExplorer: DataExplorer) => ({
     filters: getFilters(dataExplorer),
 });
 
-export const getFilters = (dataExplorer: DataExplorer) => {
-    return new FilterBuilder()
-        .addILike("name", dataExplorer.searchValue, GroupContentsResourcePrefix.COLLECTION)
-        .addILike("name", dataExplorer.searchValue, GroupContentsResourcePrefix.PROCESS)
-        .addILike("name", dataExplorer.searchValue, GroupContentsResourcePrefix.PROJECT)
-        .getFilters();
-};
-
 export const getOrder = (dataExplorer: DataExplorer) => {
     const sortColumn = dataExplorer.columns.find(c => c.sortDirection !== SortDirection.NONE);
     const order = new OrderBuilder<ProjectResource>();

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list