Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2384)

Unified Diff: dashboard/dashboard/api/bugs.py

Issue 2978933002: Add alert timestamps, bisect start, and convert bug timestamps to ISO format. (Closed)
Patch Set: Fix started_timestamp name Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dashboard/dashboard/alerts.py ('k') | dashboard/dashboard/api/bugs_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/dashboard/api/bugs.py
diff --git a/dashboard/dashboard/api/bugs.py b/dashboard/dashboard/api/bugs.py
index ea4d718fd153eeb16d80babf46044f4bfa64b685..e36f7265521ef2af651138b76e88a7dc423cf7ae 100644
--- a/dashboard/dashboard/api/bugs.py
+++ b/dashboard/dashboard/api/bugs.py
@@ -1,7 +1,6 @@
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import datetime
from dashboard.api import api_request_handler
from dashboard.common import datastore_hooks
@@ -51,27 +50,23 @@ class BugsHandler(api_request_handler.ApiRequestHandler):
'command': b.GetConfigDict()['command'],
'culprit': self._GetCulpritInfo(b),
'metric': (b.results_data or {}).get('metric'),
+ 'started_timestamp': b.last_ran_timestamp.isoformat(),
} for b in bisects],
'cc': [cc.get('name') for cc in issue.get('cc', [])],
'comments': [{
'content': comment.get('content'),
'author': comment.get('author'),
- 'published': self._FormatTimestampMilliseconds(
- comment.get('published')),
+ 'published': comment.get('published'),
} for comment in comments],
'components': issue.get('components', []),
'id': bug_id,
'labels': issue.get('labels', []),
- 'published': self._FormatTimestampMilliseconds(issue.get('published')),
+ 'published': issue.get('published'),
'state': issue.get('state'),
'status': issue.get('status'),
'summary': issue.get('summary'),
}}
- def _FormatTimestampMilliseconds(self, timestamp_string):
- time = datetime.datetime.strptime(timestamp_string, '%Y-%m-%dT%H:%M:%S')
- return utils.TimestampMilliseconds(time)
-
def _GetCulpritInfo(self, try_job_entity):
if not try_job_entity.results_data:
return None
« no previous file with comments | « dashboard/dashboard/alerts.py ('k') | dashboard/dashboard/api/bugs_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698