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

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

Issue 2344443005: [Findit] Factoring the gitiles (etc) stuff out into its own directory (Closed)
Patch Set: reordering imports Created 4 years, 1 month 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/try_job.py ('k') | appengine/findit/handlers/try_job_result.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 import time_util 10 from common import time_util
11 from common.base_handler import BaseHandler 11 from common.base_handler import BaseHandler, Permission
12 from common.base_handler import Permission
13 from model.wf_try_job_data import WfTryJobData 12 from model.wf_try_job_data import WfTryJobData
14 13
15 14
16 NOT_AVAILABLE = 'N/A' 15 NOT_AVAILABLE = 'N/A'
17 16
18 17
19 def _FormatDuration(start_time, end_time): 18 def _FormatDuration(start_time, end_time):
20 if not start_time or not end_time: 19 if not start_time or not end_time:
21 return NOT_AVAILABLE 20 return NOT_AVAILABLE
22 return time_util.FormatTimedelta(end_time - start_time) 21 return time_util.FormatTimedelta(end_time - start_time)
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 'end_date': time_util.FormatDatetime(end_date), 124 'end_date': time_util.FormatDatetime(end_date),
126 'try_jobs_in_progress': try_jobs_in_progress, 125 'try_jobs_in_progress': try_jobs_in_progress,
127 'try_jobs_with_error': try_jobs_with_error, 126 'try_jobs_with_error': try_jobs_with_error,
128 'successfully_completed_try_jobs': successfully_completed_try_jobs 127 'successfully_completed_try_jobs': successfully_completed_try_jobs
129 } 128 }
130 129
131 return { 130 return {
132 'template': 'try_job_dashboard.html', 131 'template': 'try_job_dashboard.html',
133 'data': data 132 'data': data
134 } 133 }
OLDNEW
« no previous file with comments | « appengine/findit/handlers/try_job.py ('k') | appengine/findit/handlers/try_job_result.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698