fix: address load_factor code review findings
- Fix bulk edit: send 0 instead of null/NaN to clear load_factor - Fix edit modal: explicit NaN check instead of implicit falsy - Fix create modal: use ?? instead of || for load_factor - Add load_factor upper limit validation (max 10000) - Add //go:build unit tag and self-contained intPtrHelper in test - Add design intent comments on WaitPlan.MaxConcurrency
This commit is contained in:
@@ -1227,7 +1227,9 @@ const buildUpdatePayload = (): Record<string, unknown> | null => {
|
||||
}
|
||||
|
||||
if (enableLoadFactor.value) {
|
||||
updates.load_factor = loadFactor.value
|
||||
// 空值/NaN/0 时发送 0(后端约定 <= 0 表示清除)
|
||||
const lf = loadFactor.value
|
||||
updates.load_factor = (lf != null && !Number.isNaN(lf) && lf > 0) ? lf : 0
|
||||
}
|
||||
|
||||
if (enablePriority.value) {
|
||||
|
||||
Reference in New Issue
Block a user