reduce some logging
Some checks are pending
CI / Lint (push) Waiting to run
CI / Test (push) Waiting to run
CI / End-to-End (push) Waiting to run
CI / Publish Docker (push) Blocked by required conditions
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-10-14 20:54:52 +11:00
parent 665750548f
commit 81271873f3
3 changed files with 21 additions and 31 deletions

View File

@@ -112,6 +112,8 @@ func (h *Handler) VmModifyEvent(w http.ResponseWriter, r *http.Request) {
params.PlaceholderChange = sql.NullString{String: "placeholderVm", Valid: true}
} else if change["newValue"] == "<unset>" {
params.PlaceholderChange = sql.NullString{String: "Vm", Valid: true}
} else if change["newValue"] == "testVm" {
params.PlaceholderChange = sql.NullString{String: "testVm", Valid: true}
} else {
h.Logger.Error("Unexpected value for managedBy configuration", "new_value", change["newValue"])
}
@@ -121,7 +123,15 @@ func (h *Handler) VmModifyEvent(w http.ResponseWriter, r *http.Request) {
// [map[newValue:\"placeholderVm\" type:config.managedBy.type]
// map[newValue:<unset> type:config.managedBy]
// config.managedBy.type: "testVm" -> "placeholderVm"
// TODO - track when this happens, maybe need a new database column?
case "config.managedBy.type":
h.Logger.Debug("config.managedBy.type")
if change["newValue"] == "testVm" {
h.Logger.Debug("testVm")
params.PlaceholderChange = sql.NullString{String: "testVm", Valid: true}
}
}
// Check if a disk was added (or maybe removed?)