From 00c7d78d49ab94f963e1e6b0bb0428b395aa036a Mon Sep 17 00:00:00 2001 From: Filipa Lacerda Date: Mon, 5 Nov 2018 13:22:25 +0000 Subject: [ci skip] Renders a warning block for archieved job When the job is archieved we render a affixed warning on the top of the job log --- app/assets/javascripts/jobs/components/job_app.vue | 29 ++++++++++++++++++++-- .../jobs/components/job_log_controllers.vue | 2 +- app/assets/stylesheets/pages/builds.scss | 20 +++++++++++++++ 3 files changed, 48 insertions(+), 3 deletions(-) (limited to 'app/assets') diff --git a/app/assets/javascripts/jobs/components/job_app.vue b/app/assets/javascripts/jobs/components/job_app.vue index 6e95e3d16f8..c3fb4c30b06 100644 --- a/app/assets/javascripts/jobs/components/job_app.vue +++ b/app/assets/javascripts/jobs/components/job_app.vue @@ -3,9 +3,11 @@ import _ from 'underscore'; import { mapGetters, mapState, mapActions } from 'vuex'; import { GlLoadingIcon } from '@gitlab-org/gitlab-ui'; import { isScrolledToBottom } from '~/lib/utils/scroll_utils'; +import { polyfillSticky } from '~/lib/utils/sticky'; import bp from '~/breakpoints'; import CiHeader from '~/vue_shared/components/header_ci_component.vue'; import Callout from '~/vue_shared/components/callout.vue'; +import Icon from '~/vue_shared/components/icon.vue'; import createStore from '../store'; import EmptyState from './empty_state.vue'; import EnvironmentsBlock from './environments_block.vue'; @@ -25,6 +27,7 @@ export default { EnvironmentsBlock, ErasedBlock, GlLoadingIcon, + Icon, Log, LogTopBar, StuckBlock, @@ -119,6 +122,14 @@ export default { this.updateSidebar(); }, + updated() { + this.$nextTick(() => { + if (this.$refs.sticky) { + polyfillSticky(this.$refs.sticky); + } + }); + }, + destroyed() { window.removeEventListener('resize', this.onResize); window.removeEventListener('scroll', this.updateScroll); @@ -218,14 +229,28 @@ export default { :erased-at="job.erased_at" /> +
+ + + {{ __('This job is archived. Only the complete pipeline can be retried.') }} +
+ class="build-trace-container" + >