def index(self): tm = TasksManager() c.tasks = tm.getTasks() sort = 'ALL' if 'sort' in request.params: sort = request.params['sort'] if sort == 'F': c.tasks = [obj for obj in c.tasks if obj['timestamp']] elif sort == 'U': c.tasks = [obj for obj in c.tasks if not obj['timestamp']] return render('/tasks.mako')
def addRun(self): con = TasksManager() res = con.addTest(request.params['name'], request.params['repo'], request.params['timestamp'], request.params['email'], request.params['comment']) c.link = '/tasks' if res: c.message = 'Nowe zadanie %s dodane pomyslnie. ' % request.params['name'] return render('/message.mako') else: c.message = 'Wystapil blad przy dodawaniu zadania %s. Sprobuj pozniej \ lub skontaktuj sie z administratorem.' % request.params['name'] return render('/message.mako')
def remove(self): tm = TasksManager() tm.removeTask(request.params['name']) c.link = '/tasks' c.message = 'Pomyslnie skasowano zadanie: ' + request.params['name'] return render('message.mako')
def showRaport(self): tm = TasksManager() c.task = tm.getTask(request.params['name']) c.testCases = db.getTestCaseByTask(request.params['name']) return render('/taskRaport.mako')
def info(self): tm = TasksManager() c.task = tm.getTask(request.params['name']) rm = RepoManager() c.info = rm.getRepository(c.task['repository']) return render('/taskInfo.mako')