diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/assets/javascripts/jobs | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) | |
download | gitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/jobs')
9 files changed, 35 insertions, 29 deletions
diff --git a/app/assets/javascripts/jobs/components/job_app.vue b/app/assets/javascripts/jobs/components/job_app.vue index 30093224631..b0ba6ce52d1 100644 --- a/app/assets/javascripts/jobs/components/job_app.vue +++ b/app/assets/javascripts/jobs/components/job_app.vue @@ -134,7 +134,7 @@ export default { if (isEmpty(oldVal) && !isEmpty(newVal.pipeline)) { const stages = this.job.pipeline.details.stages || []; - const defaultStage = stages.find(stage => stage && stage.name === this.selectedStage); + const defaultStage = stages.find((stage) => stage && stage.name === this.selectedStage); if (defaultStage) { this.fetchJobsForStage(defaultStage); diff --git a/app/assets/javascripts/jobs/components/job_retry_forward_deployment_modal.vue b/app/assets/javascripts/jobs/components/job_retry_forward_deployment_modal.vue index 5ce9d08035d..e83ed6c6332 100644 --- a/app/assets/javascripts/jobs/components/job_retry_forward_deployment_modal.vue +++ b/app/assets/javascripts/jobs/components/job_retry_forward_deployment_modal.vue @@ -11,6 +11,11 @@ export default { i18n: { ...JOB_RETRY_FORWARD_DEPLOYMENT_MODAL, }, + inject: { + retryOutdatedJobDocsUrl: { + default: '', + }, + }, props: { modalId: { type: String, @@ -21,11 +26,6 @@ export default { required: true, }, }, - inject: { - retryOutdatedJobDocsUrl: { - default: '', - }, - }, data() { return { primaryProps: { diff --git a/app/assets/javascripts/jobs/components/log/line.vue b/app/assets/javascripts/jobs/components/log/line.vue index 87af387ca91..2d9714cd06b 100644 --- a/app/assets/javascripts/jobs/components/log/line.vue +++ b/app/assets/javascripts/jobs/components/log/line.vue @@ -18,7 +18,7 @@ export default { render(h, { props }) { const { line, path } = props; - const chars = line.content.map(content => { + const chars = line.content.map((content) => { return h( 'span', { @@ -26,7 +26,7 @@ export default { }, // Simple "tokenization": Split text in chunks of text // which alternate between text and urls. - content.text.split(linkRegex).map(chunk => { + content.text.split(linkRegex).map((chunk) => { // Return normal string for non-links if (!chunk.match(linkRegex)) { return chunk; diff --git a/app/assets/javascripts/jobs/components/manual_variables_form.vue b/app/assets/javascripts/jobs/components/manual_variables_form.vue index bf1930c9a37..24276cbe60a 100644 --- a/app/assets/javascripts/jobs/components/manual_variables_form.vue +++ b/app/assets/javascripts/jobs/components/manual_variables_form.vue @@ -93,7 +93,10 @@ export default { this.secretValue = ''; }, deleteVariable(id) { - this.variables.splice(this.variables.findIndex(el => el.id === id), 1); + this.variables.splice( + this.variables.findIndex((el) => el.id === id), + 1, + ); }, }, }; diff --git a/app/assets/javascripts/jobs/components/stages_dropdown.vue b/app/assets/javascripts/jobs/components/stages_dropdown.vue index aeae9f26ed3..7d4fe0a0680 100644 --- a/app/assets/javascripts/jobs/components/stages_dropdown.vue +++ b/app/assets/javascripts/jobs/components/stages_dropdown.vue @@ -48,7 +48,10 @@ export default { <ci-icon :status="pipeline.details.status" class="vertical-align-middle" /> <span class="font-weight-bold">{{ s__('Job|Pipeline') }}</span> - <gl-link :href="pipeline.path" class="js-pipeline-path link-commit qa-pipeline-path" + <gl-link + :href="pipeline.path" + class="js-pipeline-path link-commit" + data-qa-selector="pipeline_path" >#{{ pipeline.id }}</gl-link > <template v-if="hasRef"> diff --git a/app/assets/javascripts/jobs/components/trigger_block.vue b/app/assets/javascripts/jobs/components/trigger_block.vue index 3cb5e63fd36..1d46dd8cea4 100644 --- a/app/assets/javascripts/jobs/components/trigger_block.vue +++ b/app/assets/javascripts/jobs/components/trigger_block.vue @@ -27,7 +27,7 @@ export default { return this.showVariableValues ? __('Hide values') : __('Reveal values'); }, hasValues() { - return this.trigger.variables.some(v => v.value); + return this.trigger.variables.some((v) => v.value); }, }, methods: { diff --git a/app/assets/javascripts/jobs/store/actions.js b/app/assets/javascripts/jobs/store/actions.js index e3ded725168..e76a3693db9 100644 --- a/app/assets/javascripts/jobs/store/actions.js +++ b/app/assets/javascripts/jobs/store/actions.js @@ -2,7 +2,7 @@ import Visibility from 'visibilityjs'; import * as types from './mutation_types'; import axios from '~/lib/utils/axios_utils'; import Poll from '~/lib/utils/poll'; -import { setFaviconOverlay, resetFavicon } from '~/lib/utils/common_utils'; +import { setFaviconOverlay, resetFavicon } from '~/lib/utils/favicon'; import { deprecatedCreateFlash as flash } from '~/flash'; import { __ } from '~/locale'; import { @@ -173,7 +173,7 @@ export const fetchTrace = ({ dispatch, state }) => dispatch('startPollingTrace'); } }) - .catch(e => + .catch((e) => e.response.status === httpStatusCodes.FORBIDDEN ? dispatch('receiveTraceUnauthorizedError') : dispatch('receiveTraceError'), @@ -229,7 +229,7 @@ export const fetchJobsForStage = ({ dispatch }, stage = {}) => { }, }) .then(({ data }) => { - const retriedJobs = data.retried.map(job => ({ ...job, retried: true })); + const retriedJobs = data.retried.map((job) => ({ ...job, retried: true })); const jobs = data.latest_statuses.concat(retriedJobs); dispatch('receiveJobsForStageSuccess', jobs); @@ -244,7 +244,7 @@ export const receiveJobsForStageError = ({ commit }) => { }; export const triggerManualJob = ({ state }, variables) => { - const parsedVariables = variables.map(variable => { + const parsedVariables = variables.map((variable) => { const copyVar = { ...variable }; delete copyVar.id; return copyVar; diff --git a/app/assets/javascripts/jobs/store/getters.js b/app/assets/javascripts/jobs/store/getters.js index 8c2d1dd8ab2..30a4a247dc4 100644 --- a/app/assets/javascripts/jobs/store/getters.js +++ b/app/assets/javascripts/jobs/store/getters.js @@ -1,37 +1,37 @@ import { isEmpty, isString } from 'lodash'; import { isScrolledToBottom } from '~/lib/utils/scroll_utils'; -export const headerTime = state => (state.job.started ? state.job.started : state.job.created_at); +export const headerTime = (state) => (state.job.started ? state.job.started : state.job.created_at); -export const hasForwardDeploymentFailure = state => +export const hasForwardDeploymentFailure = (state) => state?.job?.failure_reason === 'forward_deployment_failure'; -export const hasUnmetPrerequisitesFailure = state => +export const hasUnmetPrerequisitesFailure = (state) => state?.job?.failure_reason === 'unmet_prerequisites'; -export const shouldRenderCalloutMessage = state => +export const shouldRenderCalloutMessage = (state) => !isEmpty(state.job.status) && !isEmpty(state.job.callout_message); /** * When job has not started the key will be null * When job started the key will be a string with a date. */ -export const shouldRenderTriggeredLabel = state => isString(state.job.started); +export const shouldRenderTriggeredLabel = (state) => isString(state.job.started); -export const hasEnvironment = state => !isEmpty(state.job.deployment_status); +export const hasEnvironment = (state) => !isEmpty(state.job.deployment_status); /** * Checks if it the job has trace. * Used to check if it should render the job log or the empty state * @returns {Boolean} */ -export const hasTrace = state => +export const hasTrace = (state) => state.job.has_trace || (!isEmpty(state.job.status) && state.job.status.group === 'running'); -export const emptyStateIllustration = state => +export const emptyStateIllustration = (state) => (state.job && state.job.status && state.job.status.illustration) || {}; -export const emptyStateAction = state => +export const emptyStateAction = (state) => (state.job && state.job.status && state.job.status.action) || null; /** @@ -40,12 +40,12 @@ export const emptyStateAction = state => * * @returns {Boolean} */ -export const shouldRenderSharedRunnerLimitWarning = state => +export const shouldRenderSharedRunnerLimitWarning = (state) => !isEmpty(state.job.runners) && !isEmpty(state.job.runners.quota) && state.job.runners.quota.used >= state.job.runners.quota.limit; -export const isScrollingDown = state => isScrolledToBottom() && !state.isTraceComplete; +export const isScrollingDown = (state) => isScrolledToBottom() && !state.isTraceComplete; -export const hasRunnersForProject = state => +export const hasRunnersForProject = (state) => state.job.runners.available && !state.job.runners.online; diff --git a/app/assets/javascripts/jobs/store/utils.js b/app/assets/javascripts/jobs/store/utils.js index ea9c214de32..a0e0a0fb8bd 100644 --- a/app/assets/javascripts/jobs/store/utils.js +++ b/app/assets/javascripts/jobs/store/utils.js @@ -43,7 +43,7 @@ export const parseHeaderLine = (line = {}, lineNumber) => ({ * @param Object durationLine */ export function addDurationToHeader(data, durationLine) { - data.forEach(el => { + data.forEach((el) => { if (el.line && el.line.section === durationLine.section) { el.line.section_duration = durationLine.section_duration; } @@ -72,7 +72,7 @@ export const isCollapsibleSection = (acc = [], last = {}, section = {}) => * @param Array acc * @returns Number */ -export const getIncrementalLineNumber = acc => { +export const getIncrementalLineNumber = (acc) => { let lineNumberValue; const lastIndex = acc.length - 1; const lastElement = acc[lastIndex]; |