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

Unified Diff: appengine/findit/templates/crash/crash_config.html

Issue 1914113002: [Findit] Enable project classifier and component classifier (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase Created 4 years, 7 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 | « appengine/findit/model/crash/test/crash_config_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/templates/crash/crash_config.html
diff --git a/appengine/findit/templates/crash/crash_config.html b/appengine/findit/templates/crash/crash_config.html
index 6b6dad9e0aaa9d450a56aec60ba2c4a1e3b5487c..2a6963b8533957965d86e4ce81457f01ad194e89 100644
--- a/appengine/findit/templates/crash/crash_config.html
+++ b/appengine/findit/templates/crash/crash_config.html
@@ -7,6 +7,8 @@
<script>
var crash = {};
crash.fracas = {{ fracas | tojson | safe }};
+ crash.component_classifier = {{ component_classifier | tojson | safe }};
+ crash.project_classifier = {{ project_classifier | tojson | safe }};
function getJsonOfTextarea(textId) {
return JSON.parse($('#' + textId).val());
@@ -19,6 +21,8 @@
function save(e) {
var newConfig = {
'fracas': getJsonOfTextarea('fracas'),
+ 'component_classifier': getJsonOfTextarea('component-classifier'),
+ 'project_classifier': getJsonOfTextarea('project-classifier'),
};
$.post('/crash/config', { data: JSON.stringify(newConfig) }).done(function() {
window.location.reload(); // Reload after successful saving.
@@ -32,6 +36,8 @@
$(document).ready(function() {
$('#save-button').click(save);
$('#fracas').val(getStringFromJson(crash.fracas));
+ $('#component-classifier').val(getStringFromJson(crash.component_classifier));
+ $('#project-classifier').val(getStringFromJson(crash.project_classifier));
});
</script>
</head>
@@ -41,5 +47,13 @@
Settings for Fracas:<br>
<textarea id="fracas" rows="20" cols="80"></textarea>
</div>
+ <div>
+ Settings for component classifier:<br>
+ <textarea id="component-classifier" rows="20" cols="80"></textarea>
+ </div>
+ <div>
+ Settings for project classifier:<br>
+ <textarea id="project-classifier" rows="20" cols="80"></textarea>
+ </div>
<button type="submit" id="save-button">Save</button>
</body>
« no previous file with comments | « appengine/findit/model/crash/test/crash_config_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698