diff options
Diffstat (limited to 'app/assets/javascripts/jobs/components')
3 files changed, 50 insertions, 57 deletions
diff --git a/app/assets/javascripts/jobs/components/job_app.vue b/app/assets/javascripts/jobs/components/job_app.vue index c6adf2f231f..30093224631 100644 --- a/app/assets/javascripts/jobs/components/job_app.vue +++ b/app/assets/javascripts/jobs/components/job_app.vue @@ -1,12 +1,11 @@ <script> import { throttle, isEmpty } from 'lodash'; import { mapGetters, mapState, mapActions } from 'vuex'; -import { GlLoadingIcon, GlIcon, GlSafeHtmlDirective as SafeHtml } from '@gitlab/ui'; +import { GlLoadingIcon, GlIcon, GlSafeHtmlDirective as SafeHtml, GlAlert } from '@gitlab/ui'; import { GlBreakpointInstance as bp } from '@gitlab/ui/dist/utils'; import { isScrolledToBottom } from '~/lib/utils/scroll_utils'; import { polyfillSticky } from '~/lib/utils/sticky'; import CiHeader from '~/vue_shared/components/header_ci_component.vue'; -import Callout from '~/vue_shared/components/callout.vue'; import EmptyState from './empty_state.vue'; import EnvironmentsBlock from './environments_block.vue'; import ErasedBlock from './erased_block.vue'; @@ -22,7 +21,6 @@ export default { name: 'JobPageApp', components: { CiHeader, - Callout, EmptyState, EnvironmentsBlock, ErasedBlock, @@ -34,6 +32,7 @@ export default { Sidebar, GlLoadingIcon, SharedRunner: () => import('ee_component/jobs/components/shared_runner_limit_block.vue'), + GlAlert, }, directives: { SafeHtml, @@ -223,10 +222,14 @@ export default { @clickedSidebarButton="toggleSidebar" /> </div> - - <callout v-if="shouldRenderHeaderCallout"> + <gl-alert + v-if="shouldRenderHeaderCallout" + variant="danger" + class="gl-mt-3" + :dismissible="false" + > <div v-safe-html="job.callout_message"></div> - </callout> + </gl-alert> </header> <!-- EO Header Section --> diff --git a/app/assets/javascripts/jobs/components/log/line.vue b/app/assets/javascripts/jobs/components/log/line.vue index affaddcdee2..87af387ca91 100644 --- a/app/assets/javascripts/jobs/components/log/line.vue +++ b/app/assets/javascripts/jobs/components/log/line.vue @@ -18,46 +18,33 @@ export default { render(h, { props }) { const { line, path } = props; - let chars; - if (gon?.features?.ciJobLineLinks) { - chars = line.content.map(content => { - return h( - 'span', - { - class: ['gl-white-space-pre-wrap', content.style], - }, - // Simple "tokenization": Split text in chunks of text - // which alternate between text and urls. - content.text.split(linkRegex).map(chunk => { - // Return normal string for non-links - if (!chunk.match(linkRegex)) { - return chunk; - } - return h( - 'a', - { - attrs: { - href: chunk, - class: 'gl-reset-color! gl-text-decoration-underline', - rel: 'nofollow noopener noreferrer', // eslint-disable-line @gitlab/require-i18n-strings - }, + const chars = line.content.map(content => { + return h( + 'span', + { + class: ['gl-white-space-pre-wrap', content.style], + }, + // Simple "tokenization": Split text in chunks of text + // which alternate between text and urls. + content.text.split(linkRegex).map(chunk => { + // Return normal string for non-links + if (!chunk.match(linkRegex)) { + return chunk; + } + return h( + 'a', + { + attrs: { + href: chunk, + class: 'gl-reset-color! gl-text-decoration-underline', + rel: 'nofollow noopener noreferrer', // eslint-disable-line @gitlab/require-i18n-strings }, - chunk, - ); - }), - ); - }); - } else { - chars = line.content.map(content => { - return h( - 'span', - { - class: ['gl-white-space-pre-wrap', content.style], - }, - content.text, - ); - }); - } + }, + chunk, + ); + }), + ); + }); return h('div', { class: 'js-line log-line' }, [ h(LineNumber, { diff --git a/app/assets/javascripts/jobs/components/unmet_prerequisites_block.vue b/app/assets/javascripts/jobs/components/unmet_prerequisites_block.vue index 633561c879e..c9747ca9f02 100644 --- a/app/assets/javascripts/jobs/components/unmet_prerequisites_block.vue +++ b/app/assets/javascripts/jobs/components/unmet_prerequisites_block.vue @@ -1,11 +1,19 @@ <script> -import { GlLink } from '@gitlab/ui'; +import { GlLink, GlAlert } from '@gitlab/ui'; +import { __, s__ } from '~/locale'; /** * Renders Unmet Prerequisites block for job's view. */ export default { + i18n: { + failMessage: s__( + 'Job|This job failed because the necessary resources were not successfully created.', + ), + moreInformation: __('More information'), + }, components: { GlLink, + GlAlert, }, props: { helpPath: { @@ -16,15 +24,10 @@ export default { }; </script> <template> - <div class="bs-callout bs-callout-danger"> - <p class="js-failed-unmet-prerequisites gl-mb-0"> - {{ - s__(`Job|This job failed because the necessary resources were not successfully created.`) - }} - - <gl-link :href="helpPath" class="js-help-path"> - <strong> {{ __('More information') }} </strong> - </gl-link> - </p> - </div> + <gl-alert variant="danger" class="gl-mt-3" :dismissible="false"> + {{ $options.i18n.failMessage }} + <gl-link :href="helpPath"> + {{ $options.i18n.moreInformation }} + </gl-link> + </gl-alert> </template> |