Beispiel #1
0
func (controller *Operation) loadOperation() {
	ID := controller.Ctx.Input.Param(":operation")
	intID, err := strconv.Atoi(ID)
	if err == nil {
		operation := action.NewOperation(intID)
		controller.Data["operation"] = operation
		controller.operation = operation
		controller.SetCustomTitle("Operation #" + strconv.Itoa(operation.ID))
	}
}
Beispiel #2
0
// ShowProcess displays the log of a process
func (controller *Process) show() {
	process := controller.GetProcess()

	if process.IsRunning {
		operationID := process.GetCurrentOperation().ID
		operation := action.NewOperation(operationID)
		controller.Data["operation"] = operation
	}
	controller.Data["operations"] = process.GetOperations()
	controller.Data["harvestProcess"] = harvest.NewProcess(process.Action.ID)
}