|
|
@@ -199,3 +199,28 @@ func ShowModelInfo(ctx *context.Context) { |
|
|
|
ctx.Data["Tasks"] = modelResult |
|
|
|
ctx.HTML(200, "") |
|
|
|
} |
|
|
|
|
|
|
|
func ModifyModel(id string, description string) error { |
|
|
|
err := models.ModifyModelDescription(id, description) |
|
|
|
if err == nil { |
|
|
|
log.Info("modify success.") |
|
|
|
} else { |
|
|
|
log.Info("Failed to modify.id=" + id + " desc=" + description) |
|
|
|
} |
|
|
|
return err |
|
|
|
} |
|
|
|
|
|
|
|
func ModifyModelInfo(ctx *context.Context) { |
|
|
|
log.Info("delete model start.") |
|
|
|
id := ctx.Query("ID") |
|
|
|
description := ctx.Query("Description") |
|
|
|
|
|
|
|
err := ModifyModel(id, description) |
|
|
|
|
|
|
|
if err == nil { |
|
|
|
ctx.HTML(200, "success") |
|
|
|
} else { |
|
|
|
ctx.HTML(500, "Failed.") |
|
|
|
} |
|
|
|
|
|
|
|
} |