1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00

35 lines
728 B
TypeScript
Raw Normal View History

2019-12-29 10:24:47 +01:00
import {backendText} from '../../BackendTexts';
2019-12-15 15:36:05 +01:00
export type fieldType = 'string' | 'number' | 'boolean' | 'number-array';
2019-07-27 22:56:12 +02:00
2019-12-24 12:22:25 +01:00
export enum DefaultsJobs {
2019-12-26 21:03:10 +01:00
Indexing = 1,
'Database Reset' = 2,
'Video Converting' = 3,
'Photo Converting' = 4,
'Thumbnail Generation' = 5,
'Temp Folder Cleaning' = 6,
'Preview Filling' = 7,
'Preview Reset' = 8
2019-07-27 22:56:12 +02:00
}
export interface ConfigTemplateEntry {
id: string;
2019-12-29 10:24:47 +01:00
name: backendText;
description: backendText;
2019-07-27 22:56:12 +02:00
type: fieldType;
defaultValue: any;
}
2019-12-24 12:22:25 +01:00
export interface JobDTO {
2019-07-27 22:56:12 +02:00
Name: string;
ConfigTemplate: ConfigTemplateEntry[];
}
2019-12-29 00:35:41 +01:00
export const JobDTOUtils = {
getHashName: (jobName: string, config: any = {}) => {
2019-12-29 00:35:41 +01:00
return jobName + '-' + JSON.stringify(config);
}
};