BigW Consortium Gitlab

Commit 283c1dc3 by Annabel Dunstone

Add overflow tests to dropdown

parent 8e4ec561
......@@ -20,6 +20,7 @@
$(document).off('click', '.js-sidebar-build-toggle').on('click', '.js-sidebar-build-toggle', this.toggleSidebar);
$(window).off('resize.build').on('resize.build', this.hideSidebar);
this.updateArtifactRemoveDate();
this.displayTestStatuses();
if ($('#build-trace').length) {
this.getInitialBuildTrace();
this.initScrollButtonAffix();
......@@ -132,6 +133,16 @@
}
};
Build.prototype.displayTestStatuses = function() {
$jobTopPosition = $('.build-job').first().offset().top;
$('.build-job').each(function() {
if ($(this).offset().top > $jobTopPosition) {
$('.overflow-jobs > li').append($(this));
}
})
};
return Build;
})();
......
......@@ -12,23 +12,19 @@
- statuses.each do |build_status|
- builds.select{|build| build.status == build_status}.each do |build|
%li{class: ('active' if build == @build) }
= link_to namespace_project_build_path(@project.namespace, @project, build) do
= link_to namespace_project_build_path(@project.namespace, @project, build), class: 'build-job' do
= ci_icon_for_status(build.status)
%span
- if build.name
= build.name
- else
= build.id
- builds.select{|build| build.status == "success"}.each do |build|
%li{class: ('active' if build == @build) }
= link_to namespace_project_build_path(@project.namespace, @project, build) do
= ci_icon_for_status(build.status)
%span
- if build.name
= build.name
- else
= build.id
.dropdown
%button.dropdown-menu-toggle{type: 'button', 'data-toggle' => 'dropdown'}
%span Test Name
= icon('chevron-down')
%ul.dropdown-menu.overflow-jobs
%li
- if @build.retried?
%li.active
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment