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

Side by Side Diff: appengine/findit/handlers/try_job_dashboard.py

Issue 2538373003: [Culprit-Finder] Merge lib/ to libs/. (Closed)
Patch Set: . Created 4 years 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 unified diff | Download patch
« no previous file with comments | « appengine/findit/handlers/triage_suspected_cl.py ('k') | appengine/findit/lib/__init__.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from datetime import datetime 5 from datetime import datetime
6 from datetime import time 6 from datetime import time
7 from datetime import timedelta 7 from datetime import timedelta
8 import json 8 import json
9 9
10 from common.base_handler import BaseHandler, Permission 10 from common.base_handler import BaseHandler, Permission
11 from model.wf_try_job_data import WfTryJobData 11 from model.wf_try_job_data import WfTryJobData
12 from lib import time_util 12 from libs import time_util
13 13
14 14
15 NOT_AVAILABLE = 'N/A' 15 NOT_AVAILABLE = 'N/A'
16 16
17 17
18 def _FormatDuration(start_time, end_time): 18 def _FormatDuration(start_time, end_time):
19 if not start_time or not end_time: 19 if not start_time or not end_time:
20 return NOT_AVAILABLE 20 return NOT_AVAILABLE
21 return time_util.FormatTimedelta(end_time - start_time) 21 return time_util.FormatTimedelta(end_time - start_time)
22 22
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 'end_date': time_util.FormatDatetime(end_date), 124 'end_date': time_util.FormatDatetime(end_date),
125 'try_jobs_in_progress': try_jobs_in_progress, 125 'try_jobs_in_progress': try_jobs_in_progress,
126 'try_jobs_with_error': try_jobs_with_error, 126 'try_jobs_with_error': try_jobs_with_error,
127 'successfully_completed_try_jobs': successfully_completed_try_jobs 127 'successfully_completed_try_jobs': successfully_completed_try_jobs
128 } 128 }
129 129
130 return { 130 return {
131 'template': 'try_job_dashboard.html', 131 'template': 'try_job_dashboard.html',
132 'data': data 132 'data': data
133 } 133 }
OLDNEW
« no previous file with comments | « appengine/findit/handlers/triage_suspected_cl.py ('k') | appengine/findit/lib/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698