<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[183041] trunk/Websites/perf.webkit.org</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/183041">183041</a></dd>
<dt>Author</dt> <dd>rniwa@webkit.org</dd>
<dt>Date</dt> <dd>2015-04-20 19:48:22 -0700 (Mon, 20 Apr 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Perf dashboard should have UI to set status on analysis tasks
https://bugs.webkit.org/show_bug.cgi?id=143977

Reviewed by Chris Dumez.

Added the UI to set the result of an analysis task to 'progression', 'regression', 'unchanged', and 'inconclusive'
as well as a boolean indicating whether creating the analysis task was the right thing to do or not.
The latter will be a useful metric once we start automatically creating analysis tasks.

* init-database.sql: Added two columns to analysis_tasks table.
* public/api/analysis-tasks.php: Include the added columns in the JSON.
* public/include/db.php:
(Database::to_database_boolean): Added.
* public/include/json-header.php:
(require_match_one_of_values): Added.
* public/privileged-api/update-analysis-task.php: Added. Updates 'result' and 'needed' values of an analysis task.
(main):
* public/v2/analysis.js:
(App.AnalysisTask.result): Added.
(App.AnalysisTask.needed): Added. We don't use DS.attr('boolean') here since that would coerce null into false
and we want to differentiate null from false in order to differentiate the null-ness of the value.
(App.AnalysisTask.saveStatus): Added.
(App.AnalysisTask.statusLabel): Use 'result' as the label if it's set and all build requests have been processed.
* public/v2/app.css:
* public/v2/app.js:
(App.AnalysisTaskController.analysisResultOptions): Added.
(App.AnalysisTaskController.shouldNotHaveBeenCreated): Added.
(App.AnalysisTaskController.needsFeedback): Added. Show the checkbox to indicate the analysis task should not have
been created if 'no change' is selected.
(App.AnalysisTaskController._updateChosenAnalysisResult): Added.
(App.AnalysisTaskController.actions.saveStatus): Added.
* public/v2/index.html: Extracted a partial template for updating the bug numbers. Also added the UI to update
'result' and 'needed' values of the analysis task.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkWebsitesperfwebkitorgChangeLog">trunk/Websites/perf.webkit.org/ChangeLog</a></li>
<li><a href="#trunkWebsitesperfwebkitorginitdatabasesql">trunk/Websites/perf.webkit.org/init-database.sql</a></li>
<li><a href="#trunkWebsitesperfwebkitorgpublicapianalysistasksphp">trunk/Websites/perf.webkit.org/public/api/analysis-tasks.php</a></li>
<li><a href="#trunkWebsitesperfwebkitorgpublicincludedbphp">trunk/Websites/perf.webkit.org/public/include/db.php</a></li>
<li><a href="#trunkWebsitesperfwebkitorgpublicincludejsonheaderphp">trunk/Websites/perf.webkit.org/public/include/json-header.php</a></li>
<li><a href="#trunkWebsitesperfwebkitorgpublicv2analysisjs">trunk/Websites/perf.webkit.org/public/v2/analysis.js</a></li>
<li><a href="#trunkWebsitesperfwebkitorgpublicv2appcss">trunk/Websites/perf.webkit.org/public/v2/app.css</a></li>
<li><a href="#trunkWebsitesperfwebkitorgpublicv2appjs">trunk/Websites/perf.webkit.org/public/v2/app.js</a></li>
<li><a href="#trunkWebsitesperfwebkitorgpublicv2indexhtml">trunk/Websites/perf.webkit.org/public/v2/index.html</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkWebsitesperfwebkitorgpublicprivilegedapiupdateanalysistaskphp">trunk/Websites/perf.webkit.org/public/privileged-api/update-analysis-task.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkWebsitesperfwebkitorgChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/ChangeLog (183040 => 183041)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/ChangeLog        2015-04-21 02:37:40 UTC (rev 183040)
+++ trunk/Websites/perf.webkit.org/ChangeLog        2015-04-21 02:48:22 UTC (rev 183041)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2015-04-20  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
+
+        Perf dashboard should have UI to set status on analysis tasks
+        https://bugs.webkit.org/show_bug.cgi?id=143977
+
+        Reviewed by Chris Dumez.
+
+        Added the UI to set the result of an analysis task to 'progression', 'regression', 'unchanged', and 'inconclusive'
+        as well as a boolean indicating whether creating the analysis task was the right thing to do or not.
+        The latter will be a useful metric once we start automatically creating analysis tasks.
+
+        * init-database.sql: Added two columns to analysis_tasks table.
+        * public/api/analysis-tasks.php: Include the added columns in the JSON.
+        * public/include/db.php:
+        (Database::to_database_boolean): Added.
+        * public/include/json-header.php:
+        (require_match_one_of_values): Added.
+        * public/privileged-api/update-analysis-task.php: Added. Updates 'result' and 'needed' values of an analysis task.
+        (main):
+        * public/v2/analysis.js:
+        (App.AnalysisTask.result): Added.
+        (App.AnalysisTask.needed): Added. We don't use DS.attr('boolean') here since that would coerce null into false
+        and we want to differentiate null from false in order to differentiate the null-ness of the value.
+        (App.AnalysisTask.saveStatus): Added.
+        (App.AnalysisTask.statusLabel): Use 'result' as the label if it's set and all build requests have been processed.
+        * public/v2/app.css:
+        * public/v2/app.js:
+        (App.AnalysisTaskController.analysisResultOptions): Added.
+        (App.AnalysisTaskController.shouldNotHaveBeenCreated): Added.
+        (App.AnalysisTaskController.needsFeedback): Added. Show the checkbox to indicate the analysis task should not have
+        been created if 'no change' is selected.
+        (App.AnalysisTaskController._updateChosenAnalysisResult): Added.
+        (App.AnalysisTaskController.actions.saveStatus): Added.
+        * public/v2/index.html: Extracted a partial template for updating the bug numbers. Also added the UI to update
+        'result' and 'needed' values of the analysis task.
+
</ins><span class="cx"> 2015-04-10  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed build fix. Updated config.json after recent changes.
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorginitdatabasesql"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/init-database.sql (183040 => 183041)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/init-database.sql        2015-04-21 02:37:40 UTC (rev 183040)
+++ trunk/Websites/perf.webkit.org/init-database.sql        2015-04-21 02:48:22 UTC (rev 183041)
</span><span class="lines">@@ -174,6 +174,7 @@
</span><span class="cx">     report_failure varchar(64),
</span><span class="cx">     report_failure_details text);
</span><span class="cx"> 
</span><ins>+CREATE TYPE analysis_task_result_type as ENUM ('progression', 'regression', 'unchanged', 'inconclusive');
</ins><span class="cx"> CREATE TABLE analysis_tasks (
</span><span class="cx">     task_id serial PRIMARY KEY,
</span><span class="cx">     task_name varchar(256) NOT NULL,
</span><span class="lines">@@ -183,6 +184,8 @@
</span><span class="cx">     task_metric integer REFERENCES test_metrics NOT NULL,
</span><span class="cx">     task_start_run integer REFERENCES test_runs,
</span><span class="cx">     task_end_run integer REFERENCES test_runs,
</span><ins>+    task_result analysis_task_result_type,
+    task_needed boolean,
</ins><span class="cx">     CONSTRAINT analysis_task_should_be_unique_for_range UNIQUE(task_start_run, task_end_run),
</span><span class="cx">     CONSTRAINT analysis_task_should_not_be_associated_with_single_run
</span><span class="cx">         CHECK ((task_start_run IS NULL AND task_end_run IS NULL) OR (task_start_run IS NOT NULL AND task_end_run IS NOT NULL)));
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgpublicapianalysistasksphp"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/public/api/analysis-tasks.php (183040 => 183041)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/public/api/analysis-tasks.php        2015-04-21 02:37:40 UTC (rev 183040)
+++ trunk/Websites/perf.webkit.org/public/api/analysis-tasks.php        2015-04-21 02:48:22 UTC (rev 183041)
</span><span class="lines">@@ -86,6 +86,8 @@
</span><span class="cx">         'metric' =&gt; $task_row['task_metric'],
</span><span class="cx">         'startRun' =&gt; $task_row['task_start_run'],
</span><span class="cx">         'endRun' =&gt; $task_row['task_end_run'],
</span><ins>+        'result' =&gt; $task_row['task_result'],
+        'needed' =&gt; $task_row['task_needed'] ? Database::is_true($task_row['task_needed']) : null,
</ins><span class="cx">         'bugs' =&gt; array(),
</span><span class="cx">     );
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgpublicincludedbphp"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/public/include/db.php (183040 => 183041)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/public/include/db.php        2015-04-21 02:37:40 UTC (rev 183040)
+++ trunk/Websites/perf.webkit.org/public/include/db.php        2015-04-21 02:48:22 UTC (rev 183041)
</span><span class="lines">@@ -64,6 +64,10 @@
</span><span class="cx">         return $value == 't';
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    static function to_database_boolean($value) {
+        return $value ? 't' : 'f';
+    }
+
</ins><span class="cx">     static function to_js_time($time_str) {
</span><span class="cx">         $timestamp_in_s = strtotime($time_str);
</span><span class="cx">         $dot_index = strrpos($time_str, '.');
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgpublicincludejsonheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/public/include/json-header.php (183040 => 183041)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/public/include/json-header.php        2015-04-21 02:37:40 UTC (rev 183040)
+++ trunk/Websites/perf.webkit.org/public/include/json-header.php        2015-04-21 02:48:22 UTC (rev 183041)
</span><span class="lines">@@ -56,6 +56,11 @@
</span><span class="cx">         exit_with_error('Invalid' . $name, array('value' =&gt; $value));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+function require_match_one_of_values($name, $value, $valid_values) {
+    if (!in_array($value, $valid_values))
+        exit_with_error('Invalid' . $name, array('value' =&gt; $value));
+}
+
</ins><span class="cx"> function require_existence_of($array, $list_of_arguments, $prefix = '') {
</span><span class="cx">     if ($prefix)
</span><span class="cx">         $prefix .= '_';
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgpublicprivilegedapiupdateanalysistaskphp"></a>
<div class="addfile"><h4>Added: trunk/Websites/perf.webkit.org/public/privileged-api/update-analysis-task.php (0 => 183041)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/public/privileged-api/update-analysis-task.php                                (rev 0)
+++ trunk/Websites/perf.webkit.org/public/privileged-api/update-analysis-task.php        2015-04-21 02:48:22 UTC (rev 183041)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+&lt;?php
+
+require_once('../include/json-header.php');
+
+function main() {
+    $data = ensure_privileged_api_data_and_token();
+
+    $analysis_task_id = array_get($data, 'task');
+    if (!$analysis_task_id)
+        exit_with_error('AnalysisTaskNotSpecified');
+
+    $values = array();
+
+    if (array_key_exists('result', $data)) {
+        require_match_one_of_values('Result', $data['result'], array(null, 'progression', 'regression', 'unchanged', 'inconclusive'));
+        $values['result'] = $data['result'];
+    }
+
+    if (array_key_exists('needed', $data)) {
+        $needed = $data['needed'];
+        if ($needed === null)
+            $values['needed'] = null;
+        else if (in_array($needed, array(0, false)))
+            $values['needed'] = Database::to_database_boolean(false);
+        else if (in_array($needed, array(1, true)))
+            $values['needed'] = Database::to_database_boolean(true);
+        else
+            exit_with_error('InvalidValueForFeedback', array('value' =&gt; $data['needed']));
+    }
+
+    if (!$values)
+        exit_with_error('NothingToUpdate');
+
+    $db = connect();
+    $db-&gt;begin_transaction();
+
+    if (!$db-&gt;update_row('analysis_tasks', 'task', array('id' =&gt; $analysis_task_id), $values)) {
+        $db-&gt;rollback_transaction();
+        exit_with_error('FailedToUpdateTask', array('id' =&gt; $analysis_task_id, 'values' =&gt; $values));
+    }
+
+    $db-&gt;commit_transaction();
+
+    exit_with_success();
+}
+
+main();
+
+?&gt;
</ins></span></pre></div>
<a id="trunkWebsitesperfwebkitorgpublicv2analysisjs"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/public/v2/analysis.js (183040 => 183041)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/public/v2/analysis.js        2015-04-21 02:37:40 UTC (rev 183040)
+++ trunk/Websites/perf.webkit.org/public/v2/analysis.js        2015-04-21 02:48:22 UTC (rev 183041)
</span><span class="lines">@@ -12,10 +12,23 @@
</span><span class="cx">     bugs: DS.hasMany('bugs'),
</span><span class="cx">     buildRequestCount: DS.attr('number'),
</span><span class="cx">     finishedBuildRequestCount: DS.attr('number'),
</span><ins>+    result: DS.attr('string'),
+    needed: DS.attr('number'), // DS.attr('boolean') treats null as false.
+    saveStatus: function ()
+    {
+        return PrivilegedAPI.sendRequest('update-analysis-task', {
+            task: this.get('id'),
+            result: this.get('result'),
+            needed: this.get('needed'),
+        });
+    },
</ins><span class="cx">     statusLabel: function ()
</span><span class="cx">     {
</span><span class="cx">         var total = this.get('buildRequestCount');
</span><span class="cx">         var finished = this.get('finishedBuildRequestCount');
</span><ins>+        var result = this.get('result');
+        if (result &amp;&amp; total == finished)
+            return result.capitalize();
</ins><span class="cx">         if (!total)
</span><span class="cx">             return 'Empty';
</span><span class="cx">         if (total != finished)
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgpublicv2appcss"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/public/v2/app.css (183040 => 183041)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/public/v2/app.css        2015-04-21 02:37:40 UTC (rev 183040)
+++ trunk/Websites/perf.webkit.org/public/v2/app.css        2015-04-21 02:48:22 UTC (rev 183041)
</span><span class="lines">@@ -570,7 +570,23 @@
</span><span class="cx">     margin: 0.2rem 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+.analysis-bugs {
+    margin: 0;
+    padding: 0;
+}
+
</ins><span class="cx"> .analysis-bugs th {
</span><span class="cx">     font-weight: normal;
</span><span class="cx">     text-align: right;
</span><ins>+    width: 8rem;
</ins><span class="cx"> }
</span><ins>+
+.analysis-bugs td {
+    font-weight: normal;
+    text-align: left;
+    font-size: 0.9rem;
+}
+
+.analysis-bugs .hidden {
+    display: none;
+}
</ins></span></pre></div>
<a id="trunkWebsitesperfwebkitorgpublicv2appjs"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/public/v2/app.js (183040 => 183041)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/public/v2/app.js        2015-04-21 02:37:40 UTC (rev 183040)
+++ trunk/Websites/perf.webkit.org/public/v2/app.js        2015-04-21 02:48:22 UTC (rev 183041)
</span><span class="lines">@@ -1146,6 +1146,32 @@
</span><span class="cx">     roots: [],
</span><span class="cx">     bugTrackers: [],
</span><span class="cx">     possibleRepetitionCounts: [1, 2, 3, 4, 5, 6],
</span><ins>+    analysisResultOptions: [
+        {label: 'Still in investigation', result: null},
+        {label: 'Inconclusive', result: 'inconclusive', needed: true},
+        {label: 'Definite progression', result: 'progression', needed: true},
+        {label: 'Definite regression', result: 'regression', needed: true},
+        {label: 'No change', result: 'unchanged', needsFeedback: true},
+    ],
+    shouldNotHaveBeenCreated: false,
+    needsFeedback: function ()
+    {
+        var chosen = this.get('chosenAnalysisResult');
+        return chosen &amp;&amp; chosen.needsFeedback;
+    }.property('chosenAnalysisResult'),
+    _updateChosenAnalysisResult: function ()
+    {
+        var analysisTask = this.get('model');
+        if (!analysisTask)
+            return;
+        var currentResult = analysisTask.get('result');
+        for (var option of this.analysisResultOptions) {
+            if (option.result == currentResult) {
+                this.set('chosenAnalysisResult', option);
+                break;                
+            }
+        }
+    }.observes('model'),
</ins><span class="cx">     _taskUpdated: function ()
</span><span class="cx">     {
</span><span class="cx">         var model = this.get('model');
</span><span class="lines">@@ -1286,6 +1312,24 @@
</span><span class="cx">                     alert('Failed to associate the bug: ' + error);
</span><span class="cx">                 });
</span><span class="cx">         },
</span><ins>+        saveStatus: function ()
+        {
+            var chosenResult = this.get('chosenAnalysisResult');
+            var analysisTask = this.get('model');
+            analysisTask.set('result', chosenResult.result);
+            if (chosenResult.needed)
+                analysisTask.set('needed', true);
+            else if (chosenResult.needsFeedback &amp;&amp; this.get('notNeeded'))
+                analysisTask.set('needed', false);
+            else
+                analysisTask.set('needed', null);
+
+            analysisTask.saveStatus().then(function () {
+                alert('Saved the status');
+            }, function (error) {
+                alert('Failed to save the status: ' + error);
+            });
+        },
</ins><span class="cx">         createTestGroup: function (name, repetitionCount)
</span><span class="cx">         {
</span><span class="cx">             var analysisTask = this.get('model');
</span></span></pre></div>
<a id="trunkWebsitesperfwebkitorgpublicv2indexhtml"></a>
<div class="modfile"><h4>Modified: trunk/Websites/perf.webkit.org/public/v2/index.html (183040 => 183041)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Websites/perf.webkit.org/public/v2/index.html        2015-04-21 02:37:40 UTC (rev 183040)
+++ trunk/Websites/perf.webkit.org/public/v2/index.html        2015-04-21 02:48:22 UTC (rev 183041)
</span><span class="lines">@@ -604,21 +604,11 @@
</span><span class="cx">                 &lt;/div&gt;
</span><span class="cx">                 &lt;div class=&quot;details&quot;&gt;
</span><span class="cx">                     &lt;div class=&quot;details-table-container&quot;&gt;
</span><del>-                        &lt;table class=&quot;analysis-bugs&quot;&gt;
-                            &lt;tbody&gt;
-                                {{#each bugTrackers}}
-                                    &lt;tr&gt;
-                                        &lt;th&gt;&lt;label {{bind-attr for=elementId}}&gt;{{label}}&lt;/label&gt;&lt;/th&gt;
-                                        &lt;td&gt;
-                                            &lt;form {{action &quot;associateBug&quot; this editedBugNumber on=&quot;submit&quot;}}&gt;
-                                                {{input id=elementId type=text value=editedBugNumber}}
-                                            &lt;/form&gt;
-                                        &lt;/td&gt;
-                                    &lt;/tr&gt;
-                                {{/each}}
-                            &lt;/tbody&gt;
-                        &lt;/table&gt;
-                        {{partial &quot;chart-details&quot;}}
</del><ins>+                        {{#if details}}
+                            {{partial &quot;chart-details&quot;}}
+                        {{else}}
+                            {{partial &quot;analysisStatusForm&quot;}}
+                        {{/if}}
</ins><span class="cx">                     &lt;/div&gt;
</span><span class="cx">                 &lt;/div&gt;
</span><span class="cx">             &lt;/section&gt;
</span><span class="lines">@@ -743,6 +733,36 @@
</span><span class="cx">     {{/if}}
</span><span class="cx">     &lt;/script&gt;
</span><span class="cx"> 
</span><ins>+    &lt;script type=&quot;text/x-handlebars&quot; data-template-name=&quot;analysisStatusForm&quot;&gt;
+        &lt;table class=&quot;analysis-bugs&quot;&gt;
+            &lt;tbody&gt;
+                {{#each bugTrackers}}
+                    &lt;tr&gt;
+                        &lt;th&gt;&lt;label {{bind-attr for=elementId}}&gt;{{label}}&lt;/label&gt;&lt;/th&gt;
+                        &lt;td&gt;
+                            &lt;form {{action &quot;associateBug&quot; this editedBugNumber on=&quot;submit&quot;}}&gt;
+                                {{input id=elementId type=text value=editedBugNumber}}
+                            &lt;/form&gt;
+                        &lt;/td&gt;
+                    &lt;/tr&gt;
+                {{/each}}
+            &lt;/tbody&gt;
+            &lt;tbody&gt;
+                &lt;tr&gt;
+                    &lt;th&gt;&lt;label for=&quot;analysis-status&quot;&gt;Status&lt;label&gt;&lt;/th&gt;
+                    &lt;td&gt;
+                        &lt;form class=&quot;analysis-bugs&quot; {{action &quot;saveStatus&quot; on=&quot;submit&quot;}}&gt;
+                            {{view Ember.Select id=&quot;analysis-status&quot; content=analysisResultOptions optionValuePath=&quot;content&quot;
+                                optionLabelPath=&quot;content.label&quot; selection=chosenAnalysisResult}}
+                            &lt;input type=&quot;submit&quot; value=&quot;Save&quot;&gt;&lt;br&gt;
+                            &lt;label {{bind-attr class=&quot;needsFeedback::hidden&quot;}}&gt;{{input type=checkbox checked=notNeeded}} This should not have been created&lt;/label&gt;
+                        &lt;/form&gt;
+                    &lt;/td&gt;
+                &lt;/tr&gt;
+            &lt;/tbody&gt;
+        &lt;/table&gt;
+    &lt;/script&gt;
+
</ins><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><span class="cx"> &lt;/body&gt;
</span></span></pre>
</div>
</div>

</body>
</html>