[ARVADOS-WORKBENCH2] updated: 1.2.1-1097-g85d29bb

Git user git at public.curoverse.com
Tue Dec 4 15:17:50 EST 2018


Summary of changes:
 src/models/resource.ts                     | 19 -------------------
 src/models/search-bar.ts                   | 13 -------------
 src/store/search-bar/search-bar-actions.ts | 10 +++++-----
 3 files changed, 5 insertions(+), 37 deletions(-)

       via  85d29bbab95a2c63314a5f637503548106c56de6 (commit)
      from  519b431a41a9ab4815a1e4180ee78395b74a85de (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 85d29bbab95a2c63314a5f637503548106c56de6
Author: Daniel Kos <daniel.kos at contractors.roche.com>
Date:   Tue Dec 4 21:17:45 2018 +0100

    Code review fixes
    
    Feature #14280
    
    Arvados-DCO-1.1-Signed-off-by: Daniel Kos <daniel.kos at contractors.roche.com>

diff --git a/src/models/resource.ts b/src/models/resource.ts
index 99e9196..7e2127b 100644
--- a/src/models/resource.ts
+++ b/src/models/resource.ts
@@ -89,22 +89,3 @@ export const extractUuidKind = (uuid: string = '') => {
             return undefined;
     }
 };
-
-export const getResourceKind = (kind?: string) => {
-    switch (kind) {
-        case "arvados#collection":
-            return ResourceKind.COLLECTION;
-        case "arvados#container":
-            return ResourceKind.CONTAINER;
-        case "arvados#containerRequest":
-            return ResourceKind.CONTAINER_REQUEST;
-        case "arvados#group":
-            return ResourceKind.GROUP;
-        case "arvados#log":
-            return ResourceKind.LOG;
-        case "arvados#workflow":
-            return ResourceKind.WORKFLOW;
-        default:
-            return undefined;
-    }
-};
diff --git a/src/models/search-bar.ts b/src/models/search-bar.ts
index efbbb15..abc4b72 100644
--- a/src/models/search-bar.ts
+++ b/src/models/search-bar.ts
@@ -27,16 +27,3 @@ export enum ClusterObjectType {
     KAISERAUGST = "kaiseraugst",
     PENZBERG = "penzberg"
 }
-
-export const getClusterObjectType = (cluster?: string) => {
-    switch (cluster) {
-        case "indianapolis":
-            return ClusterObjectType.INDIANAPOLIS;
-        case "kaiseraugst":
-            return ClusterObjectType.KAISERAUGST;
-        case "penzberg":
-            return ClusterObjectType.PENZBERG;
-        default:
-            return undefined;
-    }
-};
diff --git a/src/store/search-bar/search-bar-actions.ts b/src/store/search-bar/search-bar-actions.ts
index 3d1b4ee..16cad43 100644
--- a/src/store/search-bar/search-bar-actions.ts
+++ b/src/store/search-bar/search-bar-actions.ts
@@ -10,12 +10,12 @@ import { RootState } from '~/store/store';
 import { initUserProject, treePickerActions } from '~/store/tree-picker/tree-picker-actions';
 import { ServiceRepository } from '~/services/services';
 import { FilterBuilder } from "~/services/api/filter-builder";
-import { getResourceKind, ResourceKind } from '~/models/resource';
+import { ResourceKind } from '~/models/resource';
 import { GroupClass } from '~/models/group';
 import { SearchView } from '~/store/search-bar/search-bar-reducer';
 import { navigateTo, navigateToSearchResults } from '~/store/navigation/navigation-action';
 import { snackbarActions, SnackbarKind } from '~/store/snackbar/snackbar-actions';
-import { getClusterObjectType, PropertyValues, SearchBarAdvanceFormData } from '~/models/search-bar';
+import { ClusterObjectType, PropertyValues, SearchBarAdvanceFormData } from '~/models/search-bar';
 import { debounce } from 'debounce';
 import * as _ from "lodash";
 import { getModifiedKeysValues } from "~/common/objects";
@@ -371,8 +371,8 @@ export const getAdvancedDataFromQuery = (query: string): SearchBarAdvanceFormDat
 
     return {
         searchValue: sq.values.join(' '),
-        type: getResourceKind(getFirstProp(sq, 'type')),
-        cluster: getClusterObjectType(getFirstProp(sq, 'cluster')),
+        type: getFirstProp(sq, 'type') as ResourceKind,
+        cluster: getFirstProp(sq, 'cluster') as ClusterObjectType,
         projectUuid: getFirstProp(sq, 'project'),
         inTrash: getPropValue(sq, 'is', 'trashed') !== undefined,
         dateFrom: getFirstProp(sq, 'from'),
@@ -387,7 +387,7 @@ export const getFilters = (filterName: string, searchValue: string): string => {
     const filter = new FilterBuilder();
     const sq = parseSearchQuery(searchValue);
 
-    const resourceKind = getResourceKind(getFirstProp(sq, 'type'));
+    const resourceKind = getFirstProp(sq, 'type') as ResourceKind;
 
     let prefix = '';
     switch (resourceKind) {

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list