| OLD | NEW |
| 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 common.base_handler import BaseHandler | 5 from common.base_handler import BaseHandler |
| 6 from common.base_handler import Permission | 6 from common.base_handler import Permission |
| 7 from model.flake.master_flake_analysis import MasterFlakeAnalysis | 7 from model.flake.master_flake_analysis import MasterFlakeAnalysis |
| 8 | 8 |
| 9 | 9 |
| 10 class FlakeDashboard(BaseHandler): | 10 class FlakeDashboard(BaseHandler): |
| 11 PERMISSION_LEVEL = Permission.CORP_USER | 11 PERMISSION_LEVEL = Permission.CORP_USER |
| 12 | 12 |
| 13 def HandleGet(self): | 13 def HandleGet(self): |
| 14 master_flake_analyses = MasterFlakeAnalysis.query().fetch() | 14 master_flake_analyses = MasterFlakeAnalysis.query().order( |
| 15 -MasterFlakeAnalysis.updated_time).fetch() |
| 15 data = { | 16 data = { |
| 16 'master_flake_analyses': master_flake_analyses | 17 'master_flake_analyses': master_flake_analyses |
| 17 } | 18 } |
| 18 return { | 19 return { |
| 19 'template': 'flake/dashboard.html', | 20 'template': 'flake/dashboard.html', |
| 20 'data': data | 21 'data': data |
| 21 } | 22 } |
| OLD | NEW |