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;
+ }
+};