X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/e5696ae072134453e8a0845a4cc58288e3b3163c..f5127724c5ca39a59a08ba20f843e530b0650be9:/src/views-components/form-fields/search-bar-form-fields.tsx

diff --git a/src/views-components/form-fields/search-bar-form-fields.tsx b/src/views-components/form-fields/search-bar-form-fields.tsx
index 269113218c..a6126ca56f 100644
--- a/src/views-components/form-fields/search-bar-form-fields.tsx
+++ b/src/views-components/form-fields/search-bar-form-fields.tsx
@@ -3,50 +3,53 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from "react";
-import { Field } from "redux-form";
-import { TextField } from "~/components/text-field/text-field";
-import { Checkbox, FormControlLabel } from '@material-ui/core';
+import { Field } from 'redux-form';
+import { TextField, DataTextField } from "~/components/text-field/text-field";
+import { CheckboxField } from '~/components/checkbox-field/checkbox-field';
+import { NativeSelectField } from '~/components/select-field/select-field';
+import { ResourceKind } from '~/models/resource';
+import { ClusterObjectType } from '~/models/search-bar';
 
 export const SearchBarTypeField = () =>
     <Field
         name='type'
-        component={TextField}
-        label="Type"/>;
+        component={NativeSelectField}
+        items={[
+            { key: '', value: 'Any'},
+            { key: ResourceKind.COLLECTION, value: 'Collection'},
+            { key: ResourceKind.PROJECT, value: 'Project' },
+            { key: ResourceKind.PROCESS, value: 'Process' }
+        ]}/>;
 
 export const SearchBarClusterField = () =>
     <Field
         name='cluster'
-        component={TextField}
-        label="Cluster name" />;
+        component={NativeSelectField}
+        items={[
+            { key: '', value: 'Any' },
+            { key: ClusterObjectType.INDIANAPOLIS, value: 'Indianapolis' },
+            { key: ClusterObjectType.KAISERAUGST, value: 'Kaiseraugst' },
+            { key: ClusterObjectType.PENZBERG, value: 'Penzberg' }
+        ]} />;
 
 export const SearchBarProjectField = () => 
-    <Field
-        name='project'
-        component={TextField}
-        label="Project name" />;
+    <div>Box</div>;
 
 export const SearchBarTrashField = () => 
-    <FormControlLabel
-        control={
-            <Checkbox
-                checked={false}
-                value="true"
-                color="primary"
-            />
-        }
+    <Field
+        name='inTrash'
+        component={CheckboxField}
         label="In trash" />;
 
 export const SearchBarDataFromField = () => 
     <Field
-        name='dataFrom'
-        component={TextField}
-        label="From" />;
+        name='dateFrom'
+        component={DataTextField} />;
 
 export const SearchBarDataToField = () =>
     <Field
-        name='dataTo'
-        component={TextField}
-        label="To" />;
+        name='dateTo'
+        component={DataTextField} />;
 
 export const SearchBarKeyField = () => 
     <Field
@@ -61,14 +64,9 @@ export const SearchBarValueField = () =>
         label="Value" />;
 
 export const SearchBarSaveSearchField = () => 
-    <FormControlLabel
-        control={
-            <Checkbox
-                checked={false}
-                value="true"
-                color="primary"
-            />
-        }
+    <Field
+        name='saveQuery'
+        component={CheckboxField}
         label="Save search query" />;
 
 export const SearchBarQuerySearchField = () => 
