Expand job settings definitions
Add `subtype` and `editable` fields: - `subtype`: to distinguish between regular strings, file paths, dir paths, etc. - `editable`: To indicate a setting should be editale after submitting the job. Editing will trigger re-compilation of the job.
This commit is contained in:
parent
d0fafb5063
commit
e971c4aaed
@ -21,10 +21,11 @@
|
|||||||
const JOB_TYPE = {
|
const JOB_TYPE = {
|
||||||
label: "Simple Blender Render",
|
label: "Simple Blender Render",
|
||||||
settings: [
|
settings: [
|
||||||
{ key: "blender_cmd", type: "string", default: "{blender}" },
|
{ key: "blender_cmd", type: "string", default: "{blender}", visible: false },
|
||||||
|
{ key: "filepath", type: "string", subtype: "file_path", required: true },
|
||||||
{ key: "chunk_size", type: "int32", default: 1 },
|
{ key: "chunk_size", type: "int32", default: 1 },
|
||||||
{ key: "frames", type: "string", required: true },
|
{ key: "frames", type: "string", required: true },
|
||||||
{ key: "render_output", type: "string", required: true },
|
{ key: "render_output", type: "string", subtype: "hashed_file_path", required: true },
|
||||||
{ key: "fps", type: "int32" },
|
{ key: "fps", type: "int32" },
|
||||||
{ key: "extract_audio", type: "bool", default: true },
|
{ key: "extract_audio", type: "bool", default: true },
|
||||||
{
|
{
|
||||||
|
@ -170,6 +170,7 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
description: Identifier for the setting, must be unique within the job type.
|
description: Identifier for the setting, must be unique within the job type.
|
||||||
"type": {$ref: "#/components/schemas/AvailableJobSettingType"}
|
"type": {$ref: "#/components/schemas/AvailableJobSettingType"}
|
||||||
|
"subtype": {$ref: "#/components/schemas/AvailableJobSettingSubtype"}
|
||||||
"choices":
|
"choices":
|
||||||
description: When given, limit the valid values to these choices. Only usable with string type.
|
description: When given, limit the valid values to these choices. Only usable with string type.
|
||||||
type: array
|
type: array
|
||||||
@ -185,15 +186,33 @@ components:
|
|||||||
default: true
|
default: true
|
||||||
"required":
|
"required":
|
||||||
type: boolean
|
type: boolean
|
||||||
description: Whether to immediately reject a job definition, of this type, without this particular setting.
|
description: >
|
||||||
|
Whether to immediately reject a job definition, of this type,
|
||||||
|
without this particular setting.
|
||||||
|
default: false
|
||||||
|
"editable":
|
||||||
|
type: boolean
|
||||||
|
description: >
|
||||||
|
Whether to allow editing this setting after the job has been
|
||||||
|
submitted. Would imply deleting all existing tasks for this job, and
|
||||||
|
recompiling it.
|
||||||
default: false
|
default: false
|
||||||
required: [key, type]
|
required: [key, type]
|
||||||
|
|
||||||
AvailableJobSettingType:
|
AvailableJobSettingType:
|
||||||
type: string
|
type: string
|
||||||
description: Type of job setting, must be usable as IDProperty type in Blender. No nested structures (arrays, dictionaries) are supported.
|
description: >
|
||||||
|
Type of job setting, must be usable as IDProperty type in Blender. No
|
||||||
|
nested structures (arrays, dictionaries) are supported.
|
||||||
enum: [string, int32, float, bool]
|
enum: [string, int32, float, bool]
|
||||||
|
|
||||||
|
AvailableJobSettingSubtype:
|
||||||
|
type: string
|
||||||
|
description: >
|
||||||
|
Sub-type of the job setting. Currently only available for string types.
|
||||||
|
`HASHED_FILE_PATH` is a directory path + `"/######"` appended.
|
||||||
|
enum: ["file_path", "dir_path", "file_name", "hashed_file_path"]
|
||||||
|
|
||||||
Error:
|
Error:
|
||||||
type: object
|
type: object
|
||||||
required: [code, message]
|
required: [code, message]
|
||||||
|
@ -18,36 +18,39 @@ import (
|
|||||||
// Base64 encoded, gzipped, json marshaled Swagger object
|
// Base64 encoded, gzipped, json marshaled Swagger object
|
||||||
var swaggerSpec = []string{
|
var swaggerSpec = []string{
|
||||||
|
|
||||||
"H4sIAAAAAAAC/7xYYW/jNtL+KwO9L3AtoNi5TT/52273ekjR6wZNin7YDdKxOLaZUKSWHMU1Av/3w5C0",
|
"H4sIAAAAAAAC/7xZ32/bOBL+VwbaA24Xp9i5Zp/ylm7baxa9bbDJog9NkFDi2GJCkSo5imsU/t8PQ1Ky",
|
||||||
"JFtKsr3bHrDYyBLJmXnmmZlHeioqVzfOkuVQLJ6KUG2oxnj5NgS9tqRuMDzIb0Wh8rph7WyxOHoKOgAC",
|
"bMlJe9feYtHK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1bpW4oOnbzfl8V35xdf",
|
"gG8s+8YTXxwfd1CiCUtF0+jEj/m9j6kdRca3ShAfw7X3xaxX/70wiinU1rVw6+gt6JF4CrqiQuX2tCUJ",
|
||||||
"zfdjtTXh/BX5WgfpmPCerCZ1NI2Lxcen4+n18XZ/O8zmhyWjtpkAfIzEa0yIwIWcRQ9kVeO05Vl2wUsr",
|
"FglBzvjsZmejrake6fvtN5VNHvGLNJy71JSPVtuebP0EmF33Tr07VhT09NLK9XeDcqLCTmAZZ7Hc6rzP",
|
||||||
"jx6kITEvxHQ+cfSJ+Ooygtn1qQRo/BAnL1WtFQDzl7du0eDtMc+l7Oi+PDXwThIm/6KZKCnk7DVxbIk1",
|
"hgWOb6+bHxjvkY6ZcNGwtNLQ+bD3kei7uBF78YTt1uDnBksW3JjmDOnRuQ8CDK5SORowKr24mVgUQ8IE",
|
||||||
"MSpkhCWapcH+wNhV97f7fwcAAP//KSYvdP0WAAA=",
|
"3a70+4yi9MV4mkbcKmSr8SqKkx+XlMPv1xMghS/XW8Ee8uLF8a/jSv+HTd+6du/v4R7TyftNnv16fPLd",
|
||||||
|
"fN9VWxPOX6CrleeKCa/QKJQ73Tg7/fhlt3t9vNncDKP5viChTCIA7SLxHBMCcD5F0QEa2VhlaJZccFzK",
|
||||||
|
"gwexScwzNp12HP0zwsV5ALOvUxHQ8LGWL1WtYQDT19l+0uD2mPpScnST7xt4yQHj/4OZICl47yVSKIk1",
|
||||||
|
"kpCCBBRCF1psNwxVdXOz+U8AAAD//61bqX4hGQAA",
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetSwagger returns the content of the embedded swagger specification file
|
// GetSwagger returns the content of the embedded swagger specification file
|
||||||
|
@ -7,6 +7,17 @@ const (
|
|||||||
Worker_authScopes = "worker_auth.Scopes"
|
Worker_authScopes = "worker_auth.Scopes"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Defines values for AvailableJobSettingSubtype.
|
||||||
|
const (
|
||||||
|
AvailableJobSettingSubtypeDirPath AvailableJobSettingSubtype = "dir_path"
|
||||||
|
|
||||||
|
AvailableJobSettingSubtypeFileName AvailableJobSettingSubtype = "file_name"
|
||||||
|
|
||||||
|
AvailableJobSettingSubtypeFilePath AvailableJobSettingSubtype = "file_path"
|
||||||
|
|
||||||
|
AvailableJobSettingSubtypeHashedFilePath AvailableJobSettingSubtype = "hashed_file_path"
|
||||||
|
)
|
||||||
|
|
||||||
// Defines values for AvailableJobSettingType.
|
// Defines values for AvailableJobSettingType.
|
||||||
const (
|
const (
|
||||||
AvailableJobSettingTypeBool AvailableJobSettingType = "bool"
|
AvailableJobSettingTypeBool AvailableJobSettingType = "bool"
|
||||||
@ -63,12 +74,18 @@ type AvailableJobSetting struct {
|
|||||||
// The default value shown to the user when determining this setting.
|
// The default value shown to the user when determining this setting.
|
||||||
Default *interface{} `json:"default,omitempty"`
|
Default *interface{} `json:"default,omitempty"`
|
||||||
|
|
||||||
|
// Whether to allow editing this setting after the job has been submitted. Would imply deleting all existing tasks for this job, and recompiling it.
|
||||||
|
Editable *bool `json:"editable,omitempty"`
|
||||||
|
|
||||||
// Identifier for the setting, must be unique within the job type.
|
// Identifier for the setting, must be unique within the job type.
|
||||||
Key string `json:"key"`
|
Key string `json:"key"`
|
||||||
|
|
||||||
// Whether to immediately reject a job definition, of this type, without this particular setting.
|
// Whether to immediately reject a job definition, of this type, without this particular setting.
|
||||||
Required *bool `json:"required,omitempty"`
|
Required *bool `json:"required,omitempty"`
|
||||||
|
|
||||||
|
// Sub-type of the job setting. Currently only available for string types. `HASHED_FILE_PATH` is a directory path + `"/######"` appended.
|
||||||
|
Subtype *AvailableJobSettingSubtype `json:"subtype,omitempty"`
|
||||||
|
|
||||||
// Type of job setting, must be usable as IDProperty type in Blender. No nested structures (arrays, dictionaries) are supported.
|
// Type of job setting, must be usable as IDProperty type in Blender. No nested structures (arrays, dictionaries) are supported.
|
||||||
Type AvailableJobSettingType `json:"type"`
|
Type AvailableJobSettingType `json:"type"`
|
||||||
|
|
||||||
@ -76,6 +93,9 @@ type AvailableJobSetting struct {
|
|||||||
Visible *bool `json:"visible,omitempty"`
|
Visible *bool `json:"visible,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sub-type of the job setting. Currently only available for string types. `HASHED_FILE_PATH` is a directory path + `"/######"` appended.
|
||||||
|
type AvailableJobSettingSubtype string
|
||||||
|
|
||||||
// Type of job setting, must be usable as IDProperty type in Blender. No nested structures (arrays, dictionaries) are supported.
|
// Type of job setting, must be usable as IDProperty type in Blender. No nested structures (arrays, dictionaries) are supported.
|
||||||
type AvailableJobSettingType string
|
type AvailableJobSettingType string
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user