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 add(self): con = RepoManager() c.repTypes = con.getRepositoriesTypes() c.repTypes = [it() for it in c.repTypes] c.templates = RepositoryController.template c.tempSize = len(c.templates) return render('/repositoryAdd.mako')
def edit(self): con = RepoManager() c.rep = con.getRepository(request.params['name']) c.repTypes = con.getRepositoriesTypes() c.repTypes = [it() for it in c.repTypes] c.templates = RepositoryController.template c.tempSize = len(c.templates) return render('/repositoryEdit.mako')
def index(self): import ConfigParser config = ConfigParser.RawConfigParser() config.read('./framework/serwer/config.txt') c.conf = {} c.conf['WorkerList'] = config.get('Worker', 'list') c.conf['WorkerPort'] = config.getint('Worker', 'port') c.conf['TmpFile'] = config.get('Rep', 'path') return render('configure.mako')
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 doAdd(self): con = RepoManager() added = IRepository() #potrzeba sprawdzenia czy dane sa jako tako dobre i czy w ogole sa added.assign(request.params['name'], request.params['url'], request.params['comment'], request.params['type']) if request.params['login']: added.setAuth(request.params['login'], request.params['password']) added.setTestAttributes(request.params['build_cmd'], request.params['find_tests'], request.params['run_test']) if 'compile' in request.params and request.params['compile'] == 'on': added.compileOnServer = True con.addRepository(added) c.message = 'Pomyslnie dodano repozytorium %s ' % request.params['name'] c.link = '/repository' return render('/message.mako')
def doEdit(self): rep = IRepository() rep.assign(request.params['name'], request.params['url'], request.params['comment'], request.params['type']) if request.params['login']: rep.setAuth(request.params['login'], request.params['password']) rep.setTestAttributes(request.params['build_cmd'], request.params['find_tests'], request.params['run_test']) if 'compile' in request.params and request.params['compile'] == 'on': rep.compileOnServer = True if RepoManager().updateRepository(rep, request.params['old_name']): c.message = 'Pomyslnie edytowano repozytorium %s .' % request.params['old_name'] else: c.message = 'Wystapil blad podczas edycji repozytorium %s. \ Sprobuj ponownie pozniej, lub skontaktuj sie z administratorem.' % request.params['old_name'] c.link = '/repository' return render('/message.mako')
def index(self): c.repCount = db.getCount('repositories') c.taskCount = db.getCount('tasks') return render('/main.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')
def removeLog(self): logutils.removeLog() c.message = "wyczyszczono logi" c.link = "/tasks/getLogs" return render('message.mako')
def getLogs(self): c.content = logutils.getLog() return render('/log.mako')
def raportCase(self): c.info = db.getResultsByTask(request.params['task'], request.params['name']) c.ret = '/showRaport?name=' + request.params['task'] return render('/caseRaport.mako')
def index(self): # Return a rendered template con = RepoManager() c.repos = con.getRepositories() return render('/repository.mako')
def index(self): con = RepoManager() c.repTypes = con.getRepositories() return render('/run.mako')
def info(self): name = request.params['name'] c.info = RepoManager().getRepository(name) return render('/repositoryInfo.mako')
def remove(self): RepoManager().removeRepository(request.params['name']) c.link = '/repository' c.message = 'Pomyslnie skasowano repozytorium %s ' % request.params['name'] return render('/message.mako')