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:
@@ -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 请求。
|
||||
|
||||
Reference in New Issue
Block a user