def starttask(): taskid = request.form.get('taskid') a = control.taskmanage() # b = a.taskscript(taskid) a.starttask(taskid) return '任务已启动'
def createtask(): task = request.form.to_dict() a = control.taskmanage() if task['taskgroup']=='1': print(task) b = a.createtask(task['taskname'],task['startmode'],task['taskgroup'],caseids=task['caseids']) # b = a.showcase() return b elif task['taskgroup']=='2': print(task) b = a.createtask(task['taskname'], task['startmode'], task['taskgroup'],groupname=task['groupname']) return b
def taskcase(): taskid = request.form.to_dict() a = control.taskmanage() b = a.show(a.taskcase,taskid=taskid['taskid']) return b
def taskcasedetail(): # taskname = request.form.get('taskname') a = control.taskmanage() b = a.show(a.taskcasedetail) return b
def showtask(): a = control.taskmanage() result = a.show(a.selecttask) return jsonify(result)