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,
|
2022-01-17 23:05:10 +01:00
|
|
|
'Temp Folder Cleaning' = 6,
|
2022-01-26 23:09:31 +01:00
|
|
|
'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
|
|
|
|
2021-04-18 15:48:35 +02:00
|
|
|
export const JobDTOUtils = {
|
|
|
|
getHashName: (jobName: string, config: any = {}) => {
|
2019-12-29 00:35:41 +01:00
|
|
|
return jobName + '-' + JSON.stringify(config);
|
2021-04-18 15:48:35 +02:00
|
|
|
}
|
|
|
|
};
|