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
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()
def taskSummary(task: Task) -> XML: return pageLink( 'Task', TaskIdArgs(jobId=task.getJob().getId(), taskName=task.getName()) )[ task.getLatestRun().getSummary() or '(empty summary)' ]