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

Side by Side Diff: appengine/findit/handlers/crash/crash_config.py

Issue 1852383002: [Findit] Integrate with Fracas through Pub/Sub. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Just rebase. Created 4 years, 8 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 # found in the LICENSE file.
4
5 """Handles requests to the crash config page."""
6
7 import json
8
9 from google.appengine.api import users
10
11 from common.base_handler import BaseHandler
12 from common.base_handler import Permission
13 from model.crash.crash_config import CrashConfig as CrashConfigModel
14
15
16 class CrashConfig(BaseHandler):
17 PERMISSION_LEVEL = Permission.ADMIN
18
19 def HandleGet(self):
20 settings = CrashConfigModel.Get()
21
22 data = {
23 'fracas': settings.fracas,
24 }
25
26 return {'template': 'crash/crash_config.html', 'data': data}
27
28 def HandlePost(self):
29 data = self.request.params.get('data')
30 new_config_dict = json.loads(data)
31 CrashConfigModel.Get().Update(
32 users.get_current_user(), users.IsCurrentUserAdmin(), **new_config_dict)
33 return self.HandleGet()
OLDNEW
« no previous file with comments | « appengine/findit/handlers/crash/__init__.py ('k') | appengine/findit/handlers/crash/fracas_crash.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698