Add query <-> advanced data synchronization
[arvados-workbench2.git] / src / models / search-bar.ts
index 4df5c38f2527278babfa187210681d89310685cb..efbbb157cc2be7487a11de9e270057e3d51c4faa 100644 (file)
@@ -12,9 +12,10 @@ export type SearchBarAdvanceFormData = {
     dateFrom: string;
     dateTo: string;
     saveQuery: boolean;
-    searchQuery: string;
+    queryName: string;
+    searchValue: string;
     properties: PropertyValues[];
-} & PropertyValues;
+};
 
 export interface PropertyValues {
     key: string;
@@ -25,4 +26,17 @@ export enum ClusterObjectType {
     INDIANAPOLIS = "indianapolis",
     KAISERAUGST = "kaiseraugst",
     PENZBERG = "penzberg"
-}
\ No newline at end of file
+}
+
+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;
+    }
+};