Add partial for the build outputs

This commit is contained in:
Jose 2018-05-30 10:18:18 -05:00
parent 43e08b1a38
commit 7644edd8aa
5 changed files with 8 additions and 8 deletions

View File

@ -32,10 +32,6 @@ export default class Job extends LogOutputBehaviours {
this.$buildTraceOutput = $('.js-build-output');
this.$topBar = $('.js-top-bar');
// Scroll controllers
this.$scrollTopBtn = $('.js-scroll-up');
this.$scrollBottomBtn = $('.js-scroll-down');
clearTimeout(this.timeout);
this.initSidebar();

View File

@ -2,6 +2,9 @@ import $ from 'jquery';
export const canScroll = () => $(document).height() > $(window).height();
/**
* Checks if the entire page is scrolled down all the way to the bottom
*/
export const isScrolledToBottom = () => {
const $document = $(document);

View File

@ -86,9 +86,7 @@
%button.js-scroll-down.btn-scroll.btn-transparent.btn-blank{ type: 'button', disabled: true }
= custom_icon('scroll_down')
%pre.build-trace#build-trace
%code.bash.js-build-output
.build-loader-animation.js-build-refresh
= render 'shared/builds/build_output'
- else
= render "empty_states"

View File

@ -0,0 +1,3 @@
%pre.build-trace#build-trace
%code.bash.js-build-output
.build-loader-animation.js-build-refresh

View File

@ -4,7 +4,7 @@ module QA::Page
COMPLETED_STATUSES = %w[passed failed canceled blocked skipped manual].freeze # excludes created, pending, running
PASSED_STATUS = 'passed'.freeze
view 'app/views/projects/jobs/show.html.haml' do
view 'app/views/shared/builds/_build_output.html.haml' do
element :build_output, '.js-build-output'
end