Only add changes to status page with jobs

In v3, changes get added to pipelines and then it is determined what, if
any, jobs they have. This leads to two UX 'issues'. The first is that a
change can flash into the check pipeline for a second even if zuul isn't
doing anything with it. The second is that for changes that zuul IS
doing things with, the change box will appear before it is expandable.

If we only append changes that have jobs, then they won't show up in a
pipeline if they aren't going to do anything, nor will the user be
presented with a box that looks expandable but isn't.

Change-Id: I4c39505dbba5c02790132a3f52afad5d68578a2e
This commit is contained in:
Monty Taylor 2017-08-30 10:16:29 -05:00
parent a96e8c3740
commit d9f1f82b4e
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594
1 changed files with 8 additions and 5 deletions

View File

@ -554,11 +554,14 @@
}
$.each(changes, function (change_i, change) {
var $change_box =
format.change_with_status_tree(
change, change_queue);
$html.append($change_box);
format.display_patchset($change_box);
// Only add a change when it has jobs
if (change.jobs.length > 0) {
var $change_box =
format.change_with_status_tree(
change, change_queue);
$html.append($change_box);
format.display_patchset($change_box);
}
});
});
});