Commit f8557559 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix small CI UI regressions

parent 6721215f
...@@ -13,6 +13,8 @@ v 8.1.0 ...@@ -13,6 +13,8 @@ v 8.1.0
- Fix error preventing displaying of commit data for a directory with a leading dot (Stan Hu) - Fix error preventing displaying of commit data for a directory with a leading dot (Stan Hu)
- Speed up load times of issue detail pages by roughly 1.5x - Speed up load times of issue detail pages by roughly 1.5x
- Require CI jobs to be named - Require CI jobs to be named
- Fix CI rendering regressions
- Allow developer to manage builds
- If a merge request is to close an issue, show this on the issue page (Zeger-Jan van de Weg) - If a merge request is to close an issue, show this on the issue page (Zeger-Jan van de Weg)
- Add a system note and update relevant merge requests when a branch is deleted or re-added (Stan Hu) - Add a system note and update relevant merge requests when a branch is deleted or re-added (Stan Hu)
- Make diff file view easier to use on mobile screens (Stan Hu) - Make diff file view easier to use on mobile screens (Stan Hu)
......
...@@ -31,7 +31,7 @@ class CiBuild ...@@ -31,7 +31,7 @@ class CiBuild
$('#build-trace code').html build.trace_html $('#build-trace code').html build.trace_html
$('#build-trace code').append '<i class="fa fa-refresh fa-spin"/>' $('#build-trace code').append '<i class="fa fa-refresh fa-spin"/>'
@checkAutoscroll() @checkAutoscroll()
else else if build.status != build_status
Turbolinks.visit build_url Turbolinks.visit build_url
, 4000 , 4000
......
...@@ -9,16 +9,17 @@ class Projects::BuildsController < Projects::ApplicationController ...@@ -9,16 +9,17 @@ class Projects::BuildsController < Projects::ApplicationController
def index def index
@scope = params[:scope] @scope = params[:scope]
@all_builds = project.ci_builds @all_builds = project.ci_builds
@builds = @all_builds.order('created_at DESC')
@builds = @builds =
case @scope case @scope
when 'all' when 'all'
@all_builds @builds
when 'finished' when 'finished'
@all_builds.finished @builds.finished
else else
@all_builds.running_or_pending @builds.running_or_pending.reverse_order
end end
@builds = @builds.order('created_at DESC').page(params[:page]).per(30) @builds = @builds.page(params[:page]).per(30)
end end
def cancel_all def cancel_all
......
...@@ -20,7 +20,6 @@ class CommitStatus < ActiveRecord::Base ...@@ -20,7 +20,6 @@ class CommitStatus < ActiveRecord::Base
scope :latest, -> { where(id: unscope(:select).select('max(id)').group(:name, :ref)) } scope :latest, -> { where(id: unscope(:select).select('max(id)').group(:name, :ref)) }
scope :ordered, -> { order(:ref, :stage_idx, :name) } scope :ordered, -> { order(:ref, :stage_idx, :name) }
scope :for_ref, ->(ref) { where(ref: ref) } scope :for_ref, ->(ref) { where(ref: ref) }
scope :running_or_pending, -> { where(status: [:running, :pending]) }
state_machine :status, initial: :pending do state_machine :status, initial: :pending do
event :run do event :run do
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
%td #{stage.capitalize} Job - #{build[:name]} %td #{stage.capitalize} Job - #{build[:name]}
%td %td
%pre %pre
= simple_format build[:script] = simple_format build[:commands]
%br %br
%b Tag list: %b Tag list:
...@@ -27,6 +27,11 @@ ...@@ -27,6 +27,11 @@
%br %br
%b Refs except: %b Refs except:
= build[:except] && build[:except].join(", ") = build[:except] && build[:except].join(", ")
%br
%b When:
= build[:when]
- if build[:allow_failure]
%b Allowed to fail
-else -else
%p %p
......
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
- if @builds.present? - if @builds.present?
.build-widget .build-widget
%h4.title #{pluralize(@builds.count, "other build")} for #{@build.short_sha}: %h4.title #{pluralize(@builds.count(:id), "other build")} for #{@build.short_sha}:
%table.table.builds %table.table.builds
- @builds.each_with_index do |build, i| - @builds.each_with_index do |build, i|
%tr.build %tr.build
......
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