def get_line_values(self, req, build, include_builder=True): ''' Collect the data needed for each line display ''' builder_name = build.getBuilder().getName() results = build.getResults() text = build.getText() css_class = css_classes.get(results, "") rev_list = self.get_rev_list(build) if isinstance(text, list): text = " ".join(text) values = {'class': css_class, 'builder_name': builder_name, 'buildnum': build.getNumber(), 'results': css_class, 'text': " ".join(build.getText()), 'buildurl': path_to_build(req, build), 'builderurl': path_to_builder(req, build.getBuilder()), 'rev_list': rev_list, 'multiple_revs': (len(rev_list) > 1), 'time': time.strftime(self.LINE_TIME_FORMAT, time.localtime(build.getTimes()[0])), 'text': text, 'include_builder': include_builder } return values
def get_line_values(self, req, build, include_builder=True): ''' Collect the data needed for each line display ''' builder_name = build.getBuilder().getName() results = build.getResults() text = build.getText() rev = str(build.getProperty("got_revision", "??")) css_class = css_classes.get(results, "") repo = build.getSourceStamp().repository if type(text) == list: text = " ".join(text) values = {'class': css_class, 'builder_name': builder_name, 'buildnum': build.getNumber(), 'results': css_class, 'text': " ".join(build.getText()), 'buildurl': path_to_build(req, build), 'builderurl': path_to_builder(req, build.getBuilder()), 'rev': rev, 'rev_repo' : repo, 'time': time.strftime(self.LINE_TIME_FORMAT, time.localtime(build.getTimes()[0])), 'text': text, 'include_builder': include_builder } return values
def get_line_values(self, req, build, include_builder=True): """ Collect the data needed for each line display """ builder_name = build.getBuilder().getName() results = build.getResults() text = build.getText() try: rev = build.getProperty("got_revision") if rev is None: rev = "??" except KeyError: rev = "??" rev = str(rev) css_class = css_classes.get(results, "") repo = build.getSourceStamp().repository if type(text) == list: text = " ".join(text) values = { "class": css_class, "builder_name": builder_name, "buildnum": build.getNumber(), "results": css_class, "text": " ".join(build.getText()), "buildurl": path_to_build(req, build), "builderurl": path_to_builder(req, build.getBuilder()), "rev": rev, "rev_repo": repo, "time": time.strftime(self.LINE_TIME_FORMAT, time.localtime(build.getTimes()[0])), "text": text, "include_builder": include_builder, } return values
def get_line_values(self, req, build, include_builder=True): ''' Collect the data needed for each line display ''' builder_name = build.getBuilder().getName() results = build.getResults() css_class = css_classes.get(results, "") source_stamps = build.getSourceStamps() branch = source_stamps[0].branch if source_stamps else 'unknown' rev_list = self.get_rev_list(build) values = {'class': css_class, 'builder_name': builder_name, 'buildnum': build.getNumber(), 'branch': branch, 'results': css_class, 'text': " ".join(build.getText()), 'buildurl': path_to_build(req, build), 'builderurl': path_to_builder(req, build.getBuilder()), 'rev_list': rev_list, 'multiple_revs': (len(rev_list) > 1), 'time': time.strftime(self.LINE_TIME_FORMAT, time.localtime(build.getTimes()[0])), 'include_builder': include_builder, 'reason': build.getReason(), 'interested_users': build.getInterestedUsers(), } return values
def get_line_values(self, req, build, include_builder=True): ''' Collect the data needed for each line display ''' builder_name = build.getBuilder().getName() results = build.getResults() text = build.getText() all_got_revision = build.getAllGotRevisions() css_class = css_classes.get(results, "") ss_list = build.getSourceStamps() if ss_list: repo = ss_list[0].repository if all_got_revision: if len(ss_list) == 1: rev = all_got_revision.get(ss_list[0].codebase, "??") else: rev = "multiple rev." else: rev = "??" else: repo = 'unknown, no information in build' rev = 'unknown' if type(text) == list: text = " ".join(text) values = { 'class': css_class, 'builder_name': builder_name, 'buildnum': build.getNumber(), 'results': css_class, 'text': " ".join(build.getText()), 'buildurl': path_to_build(req, build), 'builderurl': path_to_builder(req, build.getBuilder()), 'rev': rev, 'rev_repo': repo, 'time': time.strftime(self.LINE_TIME_FORMAT, time.localtime(build.getTimes()[0])), 'text': text, 'include_builder': include_builder } return values
def get_line_values(self, req, build, include_builder=True): ''' Collect the data needed for each line display ''' builder_name = build.getBuilder().getName() results = build.getResults() text = build.getText() try: rev = build.getProperty("got_revision") if rev is None: rev = "??" except KeyError: rev = "??" rev = str(rev) css_class = css_classes.get(results, "") repo = build.getSourceStamp().repository if type(text) == list: text = " ".join(text) values = { 'class': css_class, 'builder_name': builder_name, 'buildnum': build.getNumber(), 'results': css_class, 'text': " ".join(build.getText()), 'buildurl': path_to_build(req, build), 'builderurl': path_to_builder(req, build.getBuilder()), 'rev': rev, 'rev_repo': repo, 'time': time.strftime(self.LINE_TIME_FORMAT, time.localtime(build.getTimes()[0])), 'text': text, 'include_builder': include_builder } return values
def get_line_values(self, req, build, include_builder=True): """ Collect the data needed for each line display """ builder_name = build.getBuilder().getName() results = build.getResults() text = build.getText() all_got_revision = build.getAllGotRevisions() css_class = css_classes.get(results, "") ss_list = build.getSourceStamps() if ss_list: repo = ss_list[0].repository if all_got_revision: if len(ss_list) == 1: rev = all_got_revision.get(ss_list[0].codebase, "??") else: rev = "multiple rev." else: rev = "??" else: repo = "unknown, no information in build" rev = "unknown" if type(text) == list: text = " ".join(text) values = { "class": css_class, "builder_name": builder_name, "buildnum": build.getNumber(), "results": css_class, "text": " ".join(build.getText()), "buildurl": path_to_build(req, build), "builderurl": path_to_builder(req, build.getBuilder()), "rev": rev, "rev_repo": repo, "time": time.strftime(self.LINE_TIME_FORMAT, time.localtime(build.getTimes()[0])), "text": text, "include_builder": include_builder, } return values
def get_line_values(self, req, build, include_builder=True): ''' Collect the data needed for each line display ''' builder_name = build.getBuilder().getName() results = build.getResults() text = build.getText() all_got_revision = build.getAllGotRevisions() css_class = css_classes.get(results, "") ss_list = build.getSourceStamps() if ss_list: repo = ss_list[0].repository if all_got_revision: if len(ss_list) == 1: rev = all_got_revision.get(ss_list[0].codebase, "??") else: rev = "multiple rev." else: rev = "??" else: repo = 'unknown, no information in build' rev = 'unknown' if type(text) == list: text = " ".join(text) values = {'class': css_class, 'builder_name': builder_name, 'buildnum': build.getNumber(), 'results': css_class, 'text': " ".join(build.getText()), 'buildurl': path_to_build(req, build), 'builderurl': path_to_builder(req, build.getBuilder()), 'rev': rev, 'rev_repo' : repo, 'time': time.strftime(self.LINE_TIME_FORMAT, time.localtime(build.getTimes()[0])), 'text': text, 'include_builder': include_builder } return values