Exemplo n.º 1
0
 def addRun(self, task: Task) -> TaskRun:
     taskRun = self.factory.createTaskrun({'id': createInternalId()})
     # pylint: disable=protected-access
     taskRun._task = task
     taskRun._job = task.getJob()
     self.add(taskRun)
     return taskRun
Exemplo n.º 2
0
 def presentCell(self, record: Task, **kwargs: object) -> XMLContent:
     table = cast(TaskRunsTable, kwargs['table'])
     if table.taskNameLink:
         return createTaskInfoLink(record.getJob().getId(),
                                   record.getName())
     else:
         return record.getName()
Exemplo n.º 3
0
def taskSummary(task: Task) -> XML:
    return pageLink(
        'Task',
        TaskIdArgs(jobId=task.getJob().getId(), taskName=task.getName())
        )[ task.getLatestRun().getSummary() or '(empty summary)' ]