Commit 162ef4b0 authored by Annabel Dunstone's avatar Annabel Dunstone

Display jobs as scrolling list in sidebar

parent 8dbb1b2f
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
this.populateJobs(build_stage); this.populateJobs(build_stage);
this.updateStageDropdownText(build_stage); this.updateStageDropdownText(build_stage);
this.updateJobDropdownText(build_name);
this.hideSidebar(); this.hideSidebar();
$(document).off('click', '.js-sidebar-build-toggle').on('click', '.js-sidebar-build-toggle', this.toggleSidebar); $(document).off('click', '.js-sidebar-build-toggle').on('click', '.js-sidebar-build-toggle', this.toggleSidebar);
...@@ -146,11 +145,6 @@ ...@@ -146,11 +145,6 @@
Build.prototype.updateStageDropdownText = function(stage) { Build.prototype.updateStageDropdownText = function(stage) {
$('.stage-selection').text(stage); $('.stage-selection').text(stage);
this.updateJobDropdownText('-');
};
Build.prototype.updateJobDropdownText = function(name) {
$('.build-selection').text(name);
}; };
Build.prototype.updateDropdown = function(e) { Build.prototype.updateDropdown = function(e) {
......
...@@ -53,22 +53,6 @@ ...@@ -53,22 +53,6 @@
left: 70px; left: 70px;
} }
} }
.build-dropdown {
display: inline-block;
margin-top: 16px;
svg {
position: relative;
top: 2px;
margin-right: 3px;
height: 13px;
}
.stage-item {
cursor: pointer;
}
}
} }
.build-header { .build-header {
...@@ -116,24 +100,70 @@ ...@@ -116,24 +100,70 @@
} }
.right-sidebar.build-sidebar { .right-sidebar.build-sidebar {
padding-top: $gl-padding; padding: $gl-padding 0;
padding-bottom: $gl-padding; border-left: 1px solid $border-color;
&.right-sidebar-collapsed { &.right-sidebar-collapsed {
display: none; display: none;
} }
.blocks-container {
padding: $gl-padding;
}
.block { .block {
width: 100%; width: 100%;
} }
.build-sidebar-header { .build-sidebar-header {
padding-top: 0; padding: 0 $gl-padding $gl-padding;
.gutter-toggle { .gutter-toggle {
margin-top: 0; margin-top: 0;
} }
} }
.stage-item {
cursor: pointer;
&:hover {
color: $gl-text-color;
}
}
.build-dropdown {
padding: 0 $gl-padding;
}
.builds-container {
margin: $gl-padding 0;
background-color: $white-light;
border-top: 1px solid $border-color;
border-bottom: 1px solid $border-color;
svg {
position: relative;
top: 2px;
margin-right: 3px;
height: 13px;
}
a {
display: block;
padding: $gl-padding 10px;
&:hover {
background-color: $row-hover;
color: $gl-text-color;
}
}
.build-job {
&.active {
font-weight: bold;
}
}
}
} }
.build-detail-row { .build-detail-row {
......
...@@ -23,14 +23,10 @@ ...@@ -23,14 +23,10 @@
%li %li
%a.stage-item= stage %a.stage-item= stage
.dropdown.build-dropdown .builds-container
%button.dropdown-menu-toggle{type: 'button', 'data-toggle' => 'dropdown'}
%span.build-selection More
= icon('caret-down')
%ul.dropdown-menu
- statuses.each do |build_status| - statuses.each do |build_status|
- builds.select{|build| build.status == build_status}.each do |build| - builds.select{|build| build.status == build_status}.each do |build|
%li.build-job{class: ('active' if build == @build), data: {stage: build.stage}} .build-job{class: ('active' if build == @build), data: {stage: build.stage}}
= link_to namespace_project_build_path(@project.namespace, @project, build) do = link_to namespace_project_build_path(@project.namespace, @project, build) do
= ci_icon_for_status(build.status) = ci_icon_for_status(build.status)
%span %span
...@@ -47,6 +43,7 @@ ...@@ -47,6 +43,7 @@
%i.fa.fa-warning %i.fa.fa-warning
This build was retried. This build was retried.
.blocks-container
- if can?(current_user, :read_build, @project) && (@build.artifacts? || @build.artifacts_expired?) - if can?(current_user, :read_build, @project) && (@build.artifacts? || @build.artifacts_expired?)
.block{ class: ("block-first" if !@build.coverage) } .block{ class: ("block-first" if !@build.coverage) }
.title .title
......
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