X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/89c3c647797787377f4d950b38d320ee3b28e92c..e11a6fa13214f91ffc602e53574736174ca6e8e9:/src/models/search-bar.ts diff --git a/src/models/search-bar.ts b/src/models/search-bar.ts index efbbb157..f9320a26 100644 --- a/src/models/search-bar.ts +++ b/src/models/search-bar.ts @@ -2,41 +2,27 @@ // // SPDX-License-Identifier: AGPL-3.0 -import { ResourceKind } from '~/models/resource'; +import { ResourceKind } from 'models/resource'; +import { GroupResource } from './group'; -export type SearchBarAdvanceFormData = { +export type SearchBarAdvancedFormData = { type?: ResourceKind; - cluster?: ClusterObjectType; + cluster?: string; projectUuid?: string; + projectObject?: GroupResource; inTrash: boolean; + pastVersions: boolean; dateFrom: string; dateTo: string; saveQuery: boolean; queryName: string; searchValue: string; - properties: PropertyValues[]; + properties: PropertyValue[]; }; -export interface PropertyValues { +export interface PropertyValue { key: string; + keyID?: string; value: string; + valueID?: string; } - -export enum ClusterObjectType { - INDIANAPOLIS = "indianapolis", - 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; - } -};