feat(task): auto-inject scheduling params into script template via scheduling_map

Add scheduling_map field to ParameterSchema so Application creators can
declare that a parameter (e.g. NP) maps to a scheduling field (e.g. cpus).
The backend auto-injects the scheduling value into script template variables
before rendering, eliminating duplicate user input. The frontend hides
mapped parameters from the form and injects their values on submit.
This commit is contained in:
dailz
2026-04-22 10:26:52 +08:00
parent 435ab285c1
commit 5591b67f75
9 changed files with 206 additions and 2 deletions

View File

@@ -43,7 +43,8 @@ type ParameterSchema struct {
Required bool `json:"required,omitempty"` // 是否必填
Default string `json:"default,omitempty"` // 默认值
Options []string `json:"options,omitempty"` // 枚举选项列表
Description string `json:"description,omitempty"` // 参数说明
Description string `json:"description,omitempty"` // 参数说明
SchedulingMap string `json:"scheduling_map,omitempty"` // maps to a scheduling param
}
// CreateApplicationRequest 是创建应用的 API 请求。