parameters: (self)
docstring: Renders the UI for the main overview page.
  
      Request parameters:
        days: Number of days to show anomalies for (optional).
        sheriff: Sheriff to show anomalies for (optional)
        num_changes: The number of improvements/regressions to list.
  
      Outputs:
        A HTML page that shows recent regressions, improvements.
docstring_summary: Renders the UI for the main overview page.
docstring_tokens: Renders the UI for the main overview page .
function: def get(self):
      """Renders the UI for the main overview page.
  
      Request parameters:
        days: Number of days to show anomalies for (optional).
        sheriff: Sheriff to show anomalies for (optional)
        num_changes: The number of improvements/regressions to list.
  
      Outputs:
        A HTML page that shows recent regressions, improvements.
      """
      days = int(self.request.get('days', _DEFAULT_DAYS_TO_SHOW))
      num_changes = int(self.request.get('num_changes', _DEFAULT_CHANGES_TO_SHOW))
      sheriff_name = self.request.get('sheriff', _DEFAULT_SHERIFF_NAME)
      sheriff = ndb.Key('Sheriff', sheriff_name)
  
      anomalies = _GetRecentAnomalies(days, sheriff)
  
      top_improvements = _TopImprovements(anomalies, num_changes)
      top_regressions = _TopRegressions(anomalies, num_changes)
      tests = _GetKeyToTestDict(top_improvements + top_regressions)
  
      template_dict = {
          'num_days': days,
          'num_changes': num_changes,
          'sheriff_name': sheriff_name,
          'improvements': _AnomalyInfoDicts(top_improvements, tests),
          'regressions': _AnomalyInfoDicts(top_regressions, tests),
      }
      self.RenderHtml('main.html', template_dict)
function_tokens: def get ( self ) : days = int ( self . request . get ( 'days' , _DEFAULT_DAYS_TO_SHOW ) ) num_changes = int ( self . request . get ( 'num_changes' , _DEFAULT_CHANGES_TO_SHOW ) ) sheriff_name = self . request . get ( 'sheriff' , _DEFAULT_SHERIFF_NAME ) sheriff = ndb . Key ( 'Sheriff' , sheriff_name ) anomalies = _GetRecentAnomalies ( days , sheriff ) top_improvements = _TopImprovements ( anomalies , num_changes ) top_regressions = _TopRegressions ( anomalies , num_changes ) tests = _GetKeyToTestDict ( top_improvements + top_regressions ) template_dict = { 'num_days' : days , 'num_changes' : num_changes , 'sheriff_name' : sheriff_name , 'improvements' : _AnomalyInfoDicts ( top_improvements , tests ) , 'regressions' : _AnomalyInfoDicts ( top_regressions , tests ) , } self . RenderHtml ( 'main.html' , template_dict )