Esempio n. 1
0
 def _GetBuildRow(self):
     controller = build_row_controller.BuildRowController()
     build_row_list = controller.GetStructuredBuilds(
         latest_build_id=self._build_id, num_builds=1)
     if not build_row_list:
         return None
     return build_row_list[0]
Esempio n. 2
0
 def _EnsureSessionInitialized(self):
     latest_build_id = self._session.get('latest_build_id', None)
     num_results = self._session.get('num_builds', None)
     if latest_build_id is None or num_results is None:
         # We don't have a valid search history in this session, obtain defaults.
         controller = build_row_controller.BuildRowController()
         controller.GetStructuredBuilds(num_builds=1)
         self._session['latest_build_id'] = controller.latest_build_id
         self._session['num_builds'] = controller.DEFAULT_NUM_BUILDS
Esempio n. 3
0
  def _PopulateUrlArgs(self, latest_build_id, num_builds):
    self._latest_build_id = latest_build_id
    self._num_builds = num_builds

    if self._latest_build_id is None or self._num_builds is None:
      controller = build_row_controller.BuildRowController()
      controller.GetStructuredBuilds(num_builds=1)

    if self._latest_build_id is None:
      self._latest_build_id = controller.latest_build_id
    if self._num_builds is None:
      self._num_builds = controller.DEFAULT_NUM_BUILDS
Esempio n. 4
0
 def get_queryset(self):
   self._controller = build_row_controller.BuildRowController()
   build_config_q = None
   if self._build_config is not None:
     build_config_q = self._controller.GetQRestrictToBuildConfig(
         self._build_config)
   self._builds_list = self._controller.GetStructuredBuilds(
       latest_build_id=self._latest_build_id,
       num_builds=self._num_builds,
       extra_filter_q=build_config_q)
   self._hist = self._controller.GetHandlingTimeHistogram(
       latest_build_id=self._latest_build_id,
       num_builds=self._num_builds,
       extra_filter_q=build_config_q)
   return self._builds_list
Esempio n. 5
0
 def get_queryset(self):
     self._EnsureSessionInitialized()
     self._controller = build_row_controller.BuildRowController()
     build_config_q = None
     if self._build_config is not None:
         build_config_q = self._controller.GetQRestrictToBuildConfig(
             self._build_config)
     self._builds_list = self._controller.GetStructuredBuilds(
         latest_build_id=self._session['latest_build_id'],
         num_builds=self._session['num_builds'],
         extra_filter_q=build_config_q)
     self._hist = self._controller.GetHandlingTimeHistogram(
         latest_build_id=self._session['latest_build_id'],
         num_builds=self._session['num_builds'],
         extra_filter_q=build_config_q)
     return self._builds_list
Esempio n. 6
0
 def _GetLatestBuildId(self):
     controller = build_row_controller.BuildRowController()
     controller.GetStructuredBuilds(num_builds=1)
     return controller.latest_build_id