mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-11-01 19:24:29 +08:00
66 lines
1.9 KiB
TypeScript
66 lines
1.9 KiB
TypeScript
import { faAws, faPython } from "@fortawesome/free-brands-svg-icons";
|
|
import { faCloud, faHdd, faNetworkWired, type IconDefinition } from "font-awesome-6";
|
|
|
|
import type { components } from "@/api/schema";
|
|
import { contains } from "@/utils/filtering";
|
|
|
|
const typeMessage = (type: string) => `This template produces storage locations of type ${type}.`;
|
|
|
|
export type ObjectStoreTemplateSummary = components["schemas"]["ObjectStoreTemplateSummary"];
|
|
export type ObjectStoreTemplateSummaries = ObjectStoreTemplateSummary[];
|
|
|
|
export type ObjectStoreTypes = ObjectStoreTemplateSummary["type"];
|
|
export type ObjectStoreTypesDetail = Record<ObjectStoreTypes, { icon: IconDefinition; message: string }>;
|
|
export type ObjectStoreBadgeType = components["schemas"]["BadgeDict"];
|
|
|
|
export type ObjectStoreTemplateType = Record<ObjectStoreTypes, { icon: IconDefinition; message: string }>;
|
|
export const objectStoreTemplateTypes: ObjectStoreTemplateType = {
|
|
aws_s3: {
|
|
icon: faAws,
|
|
message: typeMessage("Amazon S3"),
|
|
},
|
|
azure_blob: {
|
|
icon: faCloud,
|
|
message: typeMessage("Azure Blob"),
|
|
},
|
|
boto3: {
|
|
icon: faPython,
|
|
message: typeMessage("Boto3"),
|
|
},
|
|
disk: {
|
|
icon: faHdd,
|
|
message: typeMessage("Disk"),
|
|
},
|
|
generic_s3: {
|
|
icon: faAws,
|
|
message: typeMessage("Generic S3"),
|
|
},
|
|
onedata: {
|
|
icon: faNetworkWired,
|
|
message: typeMessage("Onedata"),
|
|
},
|
|
rucio: {
|
|
icon: faNetworkWired,
|
|
message: typeMessage("Rucio"),
|
|
},
|
|
irods: {
|
|
icon: faNetworkWired,
|
|
message: typeMessage("Irods"),
|
|
},
|
|
};
|
|
|
|
export const ObjectStoreValidFilters = {
|
|
name: {
|
|
placeholder: "name",
|
|
type: String,
|
|
handler: contains("name"),
|
|
menuItem: false,
|
|
},
|
|
type: {
|
|
placeholder: "type",
|
|
type: String,
|
|
handler: contains("type"),
|
|
menuItem: false,
|
|
},
|
|
};
|