[ARVADOS-WORKBENCH2] updated: 1.4.1-436-g91ec75d2
Git user
git at public.arvados.org
Fri Sep 18 23:12:28 UTC 2020
Summary of changes:
cypress/integration/favorites.js | 6 ++++++
src/store/shared-with-me-panel/shared-with-me-middleware-service.ts | 4 +++-
src/store/side-panel-tree/side-panel-tree-actions.ts | 3 ++-
3 files changed, 11 insertions(+), 2 deletions(-)
via 91ec75d2d0e388a8818d0d4d2d7c2990cccf7f62 (commit)
from 14903d601d6c878f1d772f0b91c0877891a2e78c (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 91ec75d2d0e388a8818d0d4d2d7c2990cccf7f62
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Fri Sep 18 19:11:56 2020 -0400
16811: Filter "Public favorites" from "Shared with me" & add test
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/cypress/integration/favorites.js b/cypress/integration/favorites.js
index 8ef4899f..b38399be 100644
--- a/cypress/integration/favorites.js
+++ b/cypress/integration/favorites.js
@@ -28,6 +28,12 @@ describe('Collection panel tests', function() {
cy.clearLocalStorage()
})
+ it('checks that Public favorites does not appear under shared with me', function() {
+ cy.loginAs(adminUser);
+ cy.contains('Shared with me').click();
+ cy.get('main').contains('Public favorites').should('not.exist');
+ })
+
it('creates and removes a public favorite', function() {
cy.loginAs(adminUser);
cy.createGroup(adminUser.token, {
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 a09a3085..e5dd6d9f 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
@@ -10,7 +10,7 @@ import { getDataExplorer, DataExplorer } from '~/store/data-explorer/data-explor
import { updateFavorites } from '~/store/favorites/favorites-actions';
import { updateResources } from '~/store/resources/resources-actions';
import { loadMissingProcessesInformation, getFilters } from '~/store/project-panel/project-panel-middleware-service';
-import {snackbarActions, SnackbarKind} from '~/store/snackbar/snackbar-actions';
+import { snackbarActions, SnackbarKind } from '~/store/snackbar/snackbar-actions';
import { sharedWithMePanelActions } from './shared-with-me-panel-actions';
import { ListResults } from '~/services/common-service/common-service';
import { GroupContentsResource, GroupContentsResourcePrefix } from '~/services/groups-service/groups-service';
@@ -20,6 +20,7 @@ import { ProjectResource } from '~/models/project';
import { ProjectPanelColumnNames } from '~/views/project-panel/project-panel';
import { getSortColumn } from "~/store/data-explorer/data-explorer-reducer";
import { updatePublicFavorites } from '~/store/public-favorites/public-favorites-actions';
+import { FilterBuilder } from '~/services/api/filter-builder';
export class SharedWithMeMiddlewareService extends DataExplorerMiddlewareService {
constructor(private services: ServiceRepository, id: string) {
@@ -34,6 +35,7 @@ export class SharedWithMeMiddlewareService extends DataExplorerMiddlewareService
.contents('', {
...getParams(dataExplorer),
excludeHomeProject: true,
+ filters: new FilterBuilder().addDistinct('uuid', `${state.auth.config.uuidPrefix}-j7d0g-publicfavorites`).getFilters()
});
api.dispatch<any>(updateFavorites(response.items.map(item => item.uuid)));
api.dispatch<any>(updatePublicFavorites(response.items.map(item => item.uuid)));
diff --git a/src/store/side-panel-tree/side-panel-tree-actions.ts b/src/store/side-panel-tree/side-panel-tree-actions.ts
index a09ab6ba..ff506103 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -106,13 +106,14 @@ const loadProject = (projectUuid: string) =>
dispatch(resourcesActions.SET_RESOURCES(items));
};
-const loadSharedRoot = async (dispatch: Dispatch, _: () => RootState, services: ServiceRepository) => {
+const loadSharedRoot = async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
dispatch(treePickerActions.LOAD_TREE_PICKER_NODE({ id: SidePanelTreeCategory.SHARED_WITH_ME, pickerId: SIDE_PANEL_TREE }));
const params = {
filters: `[${new FilterBuilder()
.addIsA('uuid', ResourceKind.PROJECT)
.addEqual('group_class', GroupClass.PROJECT)
+ .addDistinct('uuid', getState().auth.config.uuidPrefix + '-j7d0g-publicfavorites')
.getFilters()}]`,
order: new OrderBuilder<ProjectResource>()
.addAsc('name', GroupContentsResourcePrefix.PROJECT)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list