[ARVADOS-WORKBENCH2] updated: 1.4.1-137-ge69ce2f8

Git user git at public.curoverse.com
Wed Nov 27 14:29:54 UTC 2019


Summary of changes:
 package.json                                       |   3 +-
 public/vocabulary-example.json                     | 223 +++++++++++++++++++--
 src/common/formatters.ts                           |   6 +-
 src/components/autocomplete/autocomplete.tsx       |   8 +-
 src/index.tsx                                      |   4 +-
 src/models/search-bar.ts                           |   4 +-
 src/models/tag.ts                                  |   2 +
 src/models/vocabulary.test.ts                      | 148 ++++++++++++++
 src/models/vocabulary.ts                           |  87 +++++++-
 src/services/auth-service/auth-service.ts          |   2 +-
 src/services/search-service/search-service.ts      |  10 +-
 src/store/auth/auth-action-ssh.ts                  |   1 +
 .../collection-panel/collection-panel-action.ts    |   4 +-
 src/store/collections/collection-create-actions.ts |   1 +
 src/store/details-panel/details-panel-action.ts    |  10 +-
 src/store/favorites/favorites-actions.ts           |   4 +-
 .../link-account-panel-actions.ts                  |   4 +-
 .../project-tree-picker-actions.ts                 |   2 +-
 src/store/projects/project-create-actions.ts       |   1 +
 src/store/projects/project-move-actions.ts         |   4 +-
 src/store/repositories/repositories-actions.ts     |   2 +
 .../run-process-panel/run-process-panel-actions.ts |   1 +
 src/store/search-bar/search-bar-actions.ts         |  70 ++++---
 src/store/search-bar/search-bar-reducer.ts         |   6 +-
 src/store/search-bar/search-bar-tree-actions.ts    |  24 +--
 .../side-panel-tree/side-panel-tree-actions.ts     |   8 +-
 .../trash-panel/trash-panel-middleware-service.ts  |   4 +-
 src/store/tree-picker/tree-picker-actions.ts       |   1 -
 src/store/users/users-actions.ts                   |   1 +
 src/store/vocabulary/vocabulary-actions.ts         |   2 +-
 ...abulary-selctors.ts => vocabulary-selectors.ts} |   2 +-
 .../details-panel/project-details.tsx              |  17 +-
 .../form-fields/search-bar-form-fields.tsx         |  31 +--
 .../project-properties-dialog.tsx                  |  25 +--
 .../resource-properties-form/property-chip.tsx     |  52 +++++
 .../property-field-common.tsx                      |  60 ++++--
 .../property-key-field.tsx                         |  39 ++--
 .../property-value-field.tsx                       |  58 +++---
 .../resource-properties-form.tsx                   |   6 +-
 .../search-bar-advanced-properties-view.tsx        |  42 ++--
 .../search-bar/search-bar-advanced-view.tsx        |  20 +-
 .../search-bar/search-bar-save-queries.tsx         |   6 +-
 .../search-bar/search-bar-view.tsx                 |  19 +-
 src/views-components/search-bar/search-bar.tsx     |  17 +-
 src/views/collection-panel/collection-panel.tsx    |  30 ++-
 .../search-results-panel/search-results-panel.tsx  |   4 +-
 yarn.lock                                          |   5 +
 47 files changed, 801 insertions(+), 279 deletions(-)
 create mode 100644 src/models/vocabulary.test.ts
 rename src/store/vocabulary/{vocabulary-selctors.ts => vocabulary-selectors.ts} (95%)
 create mode 100644 src/views-components/resource-properties-form/property-chip.tsx

       via  e69ce2f8f14e4272acf5efa4c8a252bc101227ca (commit)
       via  6fdd4a4d609cf8fa459786f42eb337f8da6a5afa (commit)
       via  b0bc9cddda159681f28384374be59335efda5f20 (commit)
       via  c260e0918e6c117340b6a5ae7117070602bc91ec (commit)
       via  17963753e57340121942857300c41c7852275c4b (commit)
       via  2a7002882377baf7dc63f82c26f724f3ec5bdb17 (commit)
       via  c2203b1706178b03dca89376f4cef84ccd882538 (commit)
       via  c33dec559093730850c578cb37e0606d33a9ca8a (commit)
       via  72a55e8c271d97ab084b29022dd087d208188422 (commit)
       via  0fbbf3d45c99486c384605d1cc286d2552dee7f1 (commit)
       via  2856ebc64777ef4c5e84a35c4fe90795fb8e1ca8 (commit)
       via  c1afdcdfebdb6cb34eb9533345e23789519917df (commit)
       via  9de00081201406e11ed0ad1ba16af7ae732f402a (commit)
       via  3e56db626688ee6225d40b7e4c511e3217e84847 (commit)
       via  2f93708cdf1e4d750b6148077246f7c13c7ac402 (commit)
       via  a22226b9a6cc30b6d69d517d71ecb6b1b402419c (commit)
       via  6656a000d2992676dcfcbed51b34d327d304d05e (commit)
       via  63ffac0b419097265599243dd645c0447d1c24d6 (commit)
       via  9caac45e4e1c1bfe42876eaeb74b4c32df6904e3 (commit)
       via  70e0ef7baeb7a27e2048b359b5b3ae204d3b4528 (commit)
       via  83df67242fa95dd321a19189e68e3ce82f1a0837 (commit)
       via  0369ee1292c296942219b9ed49654f7343680eca (commit)
       via  796a3ce005800d37ef5711b367c926ac720577d5 (commit)
       via  45ee419ff7952fc722a139666c327a321a92cc81 (commit)
       via  e7916d508b495a1fd2be51bd3da2125cc8eb7467 (commit)
       via  ec2c868ff4c0f974ae5f7ca126fe43c02b91d564 (commit)
       via  210cdfd52a1514944b648a694cbe1b2776c1f442 (commit)
       via  c9af1d15f8dd176f335b87c05b10d02e8bbf01f3 (commit)
       via  1830df4301d5e1dda4ac4ffde1eb65df6039d180 (commit)
       via  e92ec7340d9f5354cc05005375a30b34a18bb28d (commit)
       via  2d0ff8ef0b59a615435653392b27b673f4fc9770 (commit)
       via  37ef971c0db3e1989dcab9268337bc92aa950499 (commit)
       via  db82b698f42304b63c62b3ba12616987e1c95212 (commit)
       via  d26d87bbe23b31f2838c3eaea26699c829223792 (commit)
       via  a91c2a768d3a8858856261da905f2d2184cbe602 (commit)
      from  8d6d5f23ab2e666fbb179093750d6b31280baede (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 e69ce2f8f14e4272acf5efa4c8a252bc101227ca
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Wed Nov 27 09:28:34 2019 -0500

    15803: Add checks that user uuid (from getUserUuid) is defined
    
    Add @types/sinon to package.json

diff --git a/package.json b/package.json
index 6a56d826..e01351f5 100644
--- a/package.json
+++ b/package.json
@@ -92,7 +92,8 @@
     "node-sass": "4.9.4",
     "node-sass-chokidar": "1.3.4",
     "redux-devtools": "3.4.1",
-    "typescript": "3.1.1"
+    "typescript": "3.1.1",
+    "@types/sinon": "7.5"
   },
   "jest": {
     "moduleNameMapper": {
diff --git a/src/services/auth-service/auth-service.ts b/src/services/auth-service/auth-service.ts
index 63cdd08c..c6e93a8f 100644
--- a/src/services/auth-service/auth-service.ts
+++ b/src/services/auth-service/auth-service.ts
@@ -44,7 +44,7 @@ export class AuthService {
     public saveApiToken(token: string) {
         localStorage.setItem(API_TOKEN_KEY, token);
         const sp = token.split('/');
-        if (sp.length == 3) {
+        if (sp.length === 3) {
             localStorage.setItem(HOME_CLUSTER, sp[1].substr(0, 5));
         }
     }
diff --git a/src/store/auth/auth-action-ssh.ts b/src/store/auth/auth-action-ssh.ts
index 27a5c52d..6e9ddaab 100644
--- a/src/store/auth/auth-action-ssh.ts
+++ b/src/store/auth/auth-action-ssh.ts
@@ -62,6 +62,7 @@ export const removeSshKey = (uuid: string) =>
 export const createSshKey = (data: SshKeyCreateFormDialogData) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         const userUuid = getUserUuid(getState());
+        if (!userUuid) { return; }
         const { name, publicKey } = data;
         dispatch(startSubmit(SSH_KEY_CREATE_FORM_NAME));
         try {
diff --git a/src/store/collections/collection-create-actions.ts b/src/store/collections/collection-create-actions.ts
index 1b4e86da..c7dc2ae8 100644
--- a/src/store/collections/collection-create-actions.ts
+++ b/src/store/collections/collection-create-actions.ts
@@ -30,6 +30,7 @@ export const openCollectionCreateDialog = (ownerUuid: string) =>
         const properties = getState().properties;
         if (isItemNotInProject(properties) || !isProjectOrRunProcessRoute(router)) {
             const userUuid = getUserUuid(getState());
+            if (!userUuid) { return; }
             dispatch(initialize(COLLECTION_CREATE_FORM_NAME, { userUuid }));
         } else {
             dispatch(initialize(COLLECTION_CREATE_FORM_NAME, { ownerUuid }));
diff --git a/src/store/favorites/favorites-actions.ts b/src/store/favorites/favorites-actions.ts
index 3221d17a..3a16c562 100644
--- a/src/store/favorites/favorites-actions.ts
+++ b/src/store/favorites/favorites-actions.ts
@@ -61,9 +61,7 @@ export const toggleFavorite = (resource: { uuid: string; name: string }) =>
 export const updateFavorites = (resourceUuids: string[]) =>
     (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         const userUuid = getUserUuid(getState());
-        if (!userUuid) {
-            return;
-        }
+        if (!userUuid) { return; }
         dispatch(favoritesActions.CHECK_PRESENCE_IN_FAVORITES(resourceUuids));
         services.favoriteService
             .checkPresenceInFavorites(userUuid, resourceUuids)
diff --git a/src/store/link-account-panel/link-account-panel-actions.ts b/src/store/link-account-panel/link-account-panel-actions.ts
index 108b7747..6540ee69 100644
--- a/src/store/link-account-panel/link-account-panel-actions.ts
+++ b/src/store/link-account-panel/link-account-panel-actions.ts
@@ -204,7 +204,9 @@ export const loadLinkAccountPanel = () =>
 
 export const startLinking = (t: LinkAccountType) =>
     (dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
-        const accountToLink = { type: t, userUuid: getUserUuid(getState()), token: services.authService.getApiToken() } as AccountToLink;
+        const userUuid = getUserUuid(getState());
+        if (!userUuid) { return; }
+        const accountToLink = { type: t, userUuid, token: services.authService.getApiToken() } as AccountToLink;
         services.linkAccountService.saveAccountToLink(accountToLink);
 
         const auth = getState().auth;
diff --git a/src/store/project-tree-picker/project-tree-picker-actions.ts b/src/store/project-tree-picker/project-tree-picker-actions.ts
index 6ec13bfe..d05e2dc7 100644
--- a/src/store/project-tree-picker/project-tree-picker-actions.ts
+++ b/src/store/project-tree-picker/project-tree-picker-actions.ts
@@ -20,7 +20,7 @@ export const resetPickerProjectTree = () => (dispatch: Dispatch, getState: () =>
 
 export const initPickerProjectTree = () => (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
     const uuid = getUserUuid(getState());
-
+    if (!uuid) { return; }
     dispatch<any>(getPickerTreeProjects(uuid));
     dispatch<any>(getSharedWithMeProjectsPickerTree(uuid));
     dispatch<any>(getFavoritesProjectsPickerTree(uuid));
diff --git a/src/store/projects/project-create-actions.ts b/src/store/projects/project-create-actions.ts
index fe1aeda7..7f12b7cf 100644
--- a/src/store/projects/project-create-actions.ts
+++ b/src/store/projects/project-create-actions.ts
@@ -49,6 +49,7 @@ export const openProjectCreateDialog = (ownerUuid: string) =>
         const properties = getState().properties;
         if (isItemNotInProject(properties) || !isProjectOrRunProcessRoute(router)) {
             const userUuid = getUserUuid(getState());
+            if (!userUuid) { return; }
             dispatch(initialize(PROJECT_CREATE_FORM_NAME, { userUuid }));
         } else {
             dispatch(initialize(PROJECT_CREATE_FORM_NAME, { ownerUuid }));
diff --git a/src/store/projects/project-move-actions.ts b/src/store/projects/project-move-actions.ts
index fb34fa6e..d8eebb81 100644
--- a/src/store/projects/project-move-actions.ts
+++ b/src/store/projects/project-move-actions.ts
@@ -28,9 +28,7 @@ export const openMoveProjectDialog = (resource: { name: string, uuid: string })
 export const moveProject = (resource: MoveToFormDialogData) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         const userUuid = getUserUuid(getState());
-        if (!userUuid) {
-            return;
-        }
+        if (!userUuid) { return; }
         dispatch(startSubmit(PROJECT_MOVE_FORM_NAME));
         try {
             const newProject = await services.projectService.update(resource.uuid, { ownerUuid: resource.ownerUuid });
diff --git a/src/store/repositories/repositories-actions.ts b/src/store/repositories/repositories-actions.ts
index 263262f7..4585231f 100644
--- a/src/store/repositories/repositories-actions.ts
+++ b/src/store/repositories/repositories-actions.ts
@@ -42,6 +42,7 @@ export const openRepositoryAttributes = (uuid: string) =>
 export const openRepositoryCreateDialog = () =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         const userUuid = getUserUuid(getState());
+	if (!userUuid) { return; }
         const user = await services.userService.get(userUuid!);
         dispatch(reset(REPOSITORY_CREATE_FORM_NAME));
         dispatch(dialogActions.OPEN_DIALOG({ id: REPOSITORY_CREATE_FORM_NAME, data: { user } }));
@@ -50,6 +51,7 @@ export const openRepositoryCreateDialog = () =>
 export const createRepository = (repository: RepositoryResource) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         const userUuid = getUserUuid(getState());
+	if (!userUuid) { return; }	
         const user = await services.userService.get(userUuid!);
         dispatch(startSubmit(REPOSITORY_CREATE_FORM_NAME));
         try {
diff --git a/src/store/run-process-panel/run-process-panel-actions.ts b/src/store/run-process-panel/run-process-panel-actions.ts
index c5fbd532..66c784f9 100644
--- a/src/store/run-process-panel/run-process-panel-actions.ts
+++ b/src/store/run-process-panel/run-process-panel-actions.ts
@@ -120,6 +120,7 @@ export const runProcess = async (dispatch: Dispatch<any>, getState: () => RootSt
     const inputsForm = getFormValues(RUN_PROCESS_INPUTS_FORM)(state) as WorkflowInputsData;
     const advancedForm = getFormValues(RUN_PROCESS_ADVANCED_FORM)(state) as RunProcessAdvancedFormData || DEFAULT_ADVANCED_FORM_VALUES;
     const userUuid = getUserUuid(getState());
+    if (!userUuid) { return; }
     const pathname = getState().runProcessPanel.processPathname;
     const { processOwnerUuid, selectedWorkflow } = state.runProcessPanel;
     if (selectedWorkflow) {
diff --git a/src/store/search-bar/search-bar-tree-actions.ts b/src/store/search-bar/search-bar-tree-actions.ts
index 0d193fa2..c97d77b3 100644
--- a/src/store/search-bar/search-bar-tree-actions.ts
+++ b/src/store/search-bar/search-bar-tree-actions.ts
@@ -41,9 +41,7 @@ export const getSearchBarTreeNodeAncestorsIds = (id: string) => (treePicker: Tre
 export const activateSearchBarTreeBranch = (id: string) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         const userUuid = getUserUuid(getState());
-        if (!userUuid) {
-            return;
-        }
+        if (!userUuid) { return; }
         const ancestors = await services.ancestorsService.ancestors(id, userUuid);
 
         for (const ancestor of ancestors) {
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 4aa5e26e..1bb1624d 100644
--- a/src/store/side-panel-tree/side-panel-tree-actions.ts
+++ b/src/store/side-panel-tree/side-panel-tree-actions.ts
@@ -55,9 +55,7 @@ export const isSidePanelTreeCategory = (id: string) => SIDE_PANEL_CATEGORIES.som
 export const initSidePanelTree = () =>
     (dispatch: Dispatch, getState: () => RootState, { authService }: ServiceRepository) => {
         const rootProjectUuid = getUserUuid(getState());
-        if (!rootProjectUuid) {
-            return;
-        }
+        if (!rootProjectUuid) { return; }
         const nodes = SIDE_PANEL_CATEGORIES.map(id => initTreeNode({ id, value: id }));
         const projectsNode = initTreeNode({ id: rootProjectUuid, value: SidePanelTreeCategory.PROJECTS });
         const sharedNode = initTreeNode({ id: SidePanelTreeCategory.SHARED_WITH_ME, value: SidePanelTreeCategory.SHARED_WITH_ME });
@@ -161,9 +159,7 @@ export const activateSidePanelTreeProject = (id: string) =>
 export const activateSidePanelTreeBranch = (id: string) =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         const userUuid = getUserUuid(getState());
-        if (!userUuid) {
-            return;
-        }
+        if (!userUuid) { return; }
         const ancestors = await services.ancestorsService.ancestors(id, userUuid);
         const isShared = ancestors.every(({ uuid }) => uuid !== userUuid);
         if (isShared) {
diff --git a/src/store/trash-panel/trash-panel-middleware-service.ts b/src/store/trash-panel/trash-panel-middleware-service.ts
index c9a6b93d..bf7fae56 100644
--- a/src/store/trash-panel/trash-panel-middleware-service.ts
+++ b/src/store/trash-panel/trash-panel-middleware-service.ts
@@ -66,9 +66,7 @@ export class TrashPanelMiddlewareService extends DataExplorerMiddlewareService {
         }
 
         const userUuid = getUserUuid(api.getState());
-        if (!userUuid) {
-            return;
-        }
+        if (!userUuid) { return; }
         try {
             api.dispatch(progressIndicatorActions.START_WORKING(this.getId()));
             const listResults = await this.services.groupsService
diff --git a/src/store/tree-picker/tree-picker-actions.ts b/src/store/tree-picker/tree-picker-actions.ts
index d1eef8fb..3fc718ff 100644
--- a/src/store/tree-picker/tree-picker-actions.ts
+++ b/src/store/tree-picker/tree-picker-actions.ts
@@ -235,7 +235,6 @@ export const loadFavoritesProject = (params: LoadFavoritesProjectParams) =>
         const { pickerId, includeCollections = false, includeFiles = false } = params;
         const uuid = getUserUuid(getState());
         if (uuid) {
-
             const filters = pipe(
                 (fb: FilterBuilder) => includeCollections
                     ? fb.addIsA('headUuid', [ResourceKind.PROJECT, ResourceKind.COLLECTION])
diff --git a/src/store/users/users-actions.ts b/src/store/users/users-actions.ts
index 05cdc9b6..8d7d0dcd 100644
--- a/src/store/users/users-actions.ts
+++ b/src/store/users/users-actions.ts
@@ -65,6 +65,7 @@ export const loginAs = (uuid: string) =>
 export const openUserCreateDialog = () =>
     async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
         const userUuid = getUserUuid(getState());
+	if (!userUuid) { return; }
         const user = await services.userService.get(userUuid!);
         const virtualMachines = await services.virtualMachineService.list();
         dispatch(reset(USER_CREATE_FORM_NAME));
diff --git a/yarn.lock b/yarn.lock
index 948b7fa6..559adb53 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -286,6 +286,11 @@
   version "1.6.0"
   resolved "https://registry.yarnpkg.com/@types/shell-quote/-/shell-quote-1.6.0.tgz#537b2949a2ebdcb0d353e448fee45b081021963f"
 
+"@types/sinon at 7.5":
+  version "7.5.1"
+  resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-7.5.1.tgz#d27b81af0d1cfe1f9b24eebe7a24f74ae40f5b7c"
+  integrity sha512-EZQUP3hSZQyTQRfiLqelC9NMWd1kqLcmQE0dMiklxBkgi84T+cHOhnKpgk4NnOWpGX863yE6+IaGnOXUNFqDnQ==
+
 "@types/uuid at 3.4.4":
   version "3.4.4"
   resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-3.4.4.tgz#7af69360fa65ef0decb41fd150bf4ca5c0cefdf5"

commit 6fdd4a4d609cf8fa459786f42eb337f8da6a5afa
Merge: 8d6d5f23 b0bc9cdd
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date:   Tue Nov 26 16:18:48 2019 -0500

    Merge branch 'master' into 15803-unsetup


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


hooks/post-receive
-- 




More information about the arvados-commits mailing list