import * as React from "react";
import { Field } from 'redux-form';
-import { TextField } from "~/components/text-field/text-field";
+import { TextField, DataTextField } from "~/components/text-field/text-field";
import { CheckboxField } from '~/components/checkbox-field/checkbox-field';
-import { Checkbox, FormControlLabel } from '@material-ui/core';
+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 = () =>
<Field
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