예제 #1
0
파일: run.py 프로젝트: krzychusan/TestHard
    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')
예제 #2
0
 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')
예제 #3
0
 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')
예제 #4
0
    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')
예제 #5
0
    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')
예제 #6
0
 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')
예제 #7
0
 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')
예제 #8
0
파일: main.py 프로젝트: krzychusan/TestHard
 def index(self):
     c.repCount = db.getCount('repositories')
     c.taskCount = db.getCount('tasks')
     return render('/main.mako')
예제 #9
0
 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')
예제 #10
0
 def showRaport(self):
     tm = TasksManager()
     c.task = tm.getTask(request.params['name'])
     c.testCases = db.getTestCaseByTask(request.params['name'])
     return render('/taskRaport.mako')
예제 #11
0
 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')
예제 #12
0
 def removeLog(self):
     logutils.removeLog()
     c.message = "wyczyszczono logi"
     c.link = "/tasks/getLogs"
     return render('message.mako')
예제 #13
0
 def getLogs(self):
     c.content = logutils.getLog()
     return render('/log.mako')
예제 #14
0
 def raportCase(self):
     c.info = db.getResultsByTask(request.params['task'], request.params['name'])
     c.ret = '/showRaport?name=' + request.params['task']
     return render('/caseRaport.mako')
예제 #15
0
 def index(self):
     # Return a rendered template
     con = RepoManager()
     c.repos = con.getRepositories()
     return render('/repository.mako')
예제 #16
0
파일: run.py 프로젝트: krzychusan/TestHard
 def index(self):
     con = RepoManager()
     c.repTypes = con.getRepositories()
     return render('/run.mako')
예제 #17
0
 def info(self):
     name = request.params['name']
     c.info = RepoManager().getRepository(name)
     return render('/repositoryInfo.mako')
예제 #18
0
 def remove(self):
     RepoManager().removeRepository(request.params['name'])
     c.link = '/repository'
     c.message = 'Pomyslnie skasowano repozytorium %s ' % request.params['name']
     return render('/message.mako')