mirror of
https://github.com/xuthus83/pigallery2.git
synced 2025-01-14 14:43:17 +08:00
35 lines
728 B
TypeScript
35 lines
728 B
TypeScript
import {backendText} from '../../BackendTexts';
|
|
|
|
export type fieldType = 'string' | 'number' | 'boolean' | 'number-array';
|
|
|
|
|
|
export enum DefaultsJobs {
|
|
Indexing = 1,
|
|
'Database Reset' = 2,
|
|
'Video Converting' = 3,
|
|
'Photo Converting' = 4,
|
|
'Thumbnail Generation' = 5,
|
|
'Temp Folder Cleaning' = 6,
|
|
'Preview Filling' = 7,
|
|
'Preview Reset' = 8
|
|
}
|
|
|
|
export interface ConfigTemplateEntry {
|
|
id: string;
|
|
name: backendText;
|
|
description: backendText;
|
|
type: fieldType;
|
|
defaultValue: any;
|
|
}
|
|
|
|
export interface JobDTO {
|
|
Name: string;
|
|
ConfigTemplate: ConfigTemplateEntry[];
|
|
}
|
|
|
|
export const JobDTOUtils = {
|
|
getHashName: (jobName: string, config: any = {}) => {
|
|
return jobName + '-' + JSON.stringify(config);
|
|
}
|
|
};
|