X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/f5127724c5ca39a59a08ba20f843e530b0650be9..72b6c853b95b1ef3da2a0beca3a31e4838a17896:/src/models/search-bar.ts diff --git a/src/models/search-bar.ts b/src/models/search-bar.ts index 9fadc2af..efbbb157 100644 --- a/src/models/search-bar.ts +++ b/src/models/search-bar.ts @@ -4,19 +4,39 @@ import { ResourceKind } from '~/models/resource'; -export interface SearchBarAdvanceFormData { +export type SearchBarAdvanceFormData = { type?: ResourceKind; cluster?: ClusterObjectType; - project?: string; + projectUuid?: string; inTrash: boolean; dateFrom: string; dateTo: string; saveQuery: boolean; - searchQuery: string; + queryName: string; + searchValue: string; + properties: PropertyValues[]; +}; + +export interface PropertyValues { + key: string; + value: string; } 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; + } +};