1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from "react";
6 import { Field } from 'redux-form';
7 import { TextField, DataTextField } from "~/components/text-field/text-field";
8 import { CheckboxField } from '~/components/checkbox-field/checkbox-field';
9 import { NativeSelectField } from '~/components/select-field/select-field';
10 import { ResourceKind } from '~/models/resource';
11 import { ClusterObjectType } from '~/models/search-bar';
13 export const SearchBarTypeField = () =>
16 component={NativeSelectField}
18 { key: '', value: 'Any'},
19 { key: ResourceKind.COLLECTION, value: 'Collection'},
20 { key: ResourceKind.PROJECT, value: 'Project' },
21 { key: ResourceKind.PROCESS, value: 'Process' }
24 export const SearchBarClusterField = () =>
27 component={NativeSelectField}
29 { key: '', value: 'Any' },
30 { key: ClusterObjectType.INDIANAPOLIS, value: 'Indianapolis' },
31 { key: ClusterObjectType.KAISERAUGST, value: 'Kaiseraugst' },
32 { key: ClusterObjectType.PENZBERG, value: 'Penzberg' }
35 export const SearchBarProjectField = () =>
38 export const SearchBarTrashField = () =>
41 component={CheckboxField}
44 export const SearchBarDataFromField = () =>
47 component={DataTextField} />;
49 export const SearchBarDataToField = () =>
52 component={DataTextField} />;
54 export const SearchBarKeyField = () =>
60 export const SearchBarValueField = () =>
66 export const SearchBarSaveSearchField = () =>
69 component={CheckboxField}
70 label="Save search query" />;
72 export const SearchBarQuerySearchField = () =>
76 label="Search query name" />;