diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-13 21:08:59 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-13 21:08:59 +0000 |
commit | d466ee5042520ad078fe050cb078d81dc2ebe196 (patch) | |
tree | 5648eb1aee8aeff5b5c5ff4669a184fd7676f778 /app/assets/javascripts/pipelines | |
parent | 6a9d7c009e4e5975a89bcc3e458da4b3ec484bd1 (diff) | |
download | gitlab-ce-d466ee5042520ad078fe050cb078d81dc2ebe196.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/pipelines')
7 files changed, 14 insertions, 16 deletions
diff --git a/app/assets/javascripts/pipelines/components/graph/graph_component.vue b/app/assets/javascripts/pipelines/components/graph/graph_component.vue index 4dc6e51d2fc..6a836adba01 100644 --- a/app/assets/javascripts/pipelines/components/graph/graph_component.vue +++ b/app/assets/javascripts/pipelines/components/graph/graph_component.vue @@ -1,5 +1,4 @@ <script> -import _ from 'underscore'; import { GlLoadingIcon } from '@gitlab/ui'; import StageColumnComponent from './stage_column_component.vue'; import GraphMixin from '../../mixins/graph_component_mixin'; @@ -70,7 +69,7 @@ export default { expandedTriggeredBy() { return ( this.pipeline.triggered_by && - _.isArray(this.pipeline.triggered_by) && + Array.isArray(this.pipeline.triggered_by) && this.pipeline.triggered_by.find(el => el.isExpanded) ); }, diff --git a/app/assets/javascripts/pipelines/components/graph/stage_column_component.vue b/app/assets/javascripts/pipelines/components/graph/stage_column_component.vue index db7714808fd..3d3dabbdf22 100644 --- a/app/assets/javascripts/pipelines/components/graph/stage_column_component.vue +++ b/app/assets/javascripts/pipelines/components/graph/stage_column_component.vue @@ -1,5 +1,5 @@ <script> -import _ from 'underscore'; +import { isEmpty, escape as esc } from 'lodash'; import stageColumnMixin from '../../mixins/stage_column_mixin'; import JobItem from './job_item.vue'; import JobGroupDropdown from './job_group_dropdown.vue'; @@ -39,12 +39,12 @@ export default { }, computed: { hasAction() { - return !_.isEmpty(this.action); + return !isEmpty(this.action); }, }, methods: { groupId(group) { - return `ci-badge-${_.escape(group.name)}`; + return `ci-badge-${esc(group.name)}`; }, pipelineActionRequestComplete() { this.$emit('refreshPipelineGraph'); diff --git a/app/assets/javascripts/pipelines/components/pipeline_stop_modal.vue b/app/assets/javascripts/pipelines/components/pipeline_stop_modal.vue index 6ca96bbba5e..f604edd8859 100644 --- a/app/assets/javascripts/pipelines/components/pipeline_stop_modal.vue +++ b/app/assets/javascripts/pipelines/components/pipeline_stop_modal.vue @@ -1,5 +1,5 @@ <script> -import _ from 'underscore'; +import { isEmpty } from 'lodash'; import { GlLink } from '@gitlab/ui'; import DeprecatedModal2 from '~/vue_shared/components/deprecated_modal_2.vue'; import CiIcon from '~/vue_shared/components/ci_icon.vue'; @@ -43,7 +43,7 @@ export default { ); }, hasRef() { - return !_.isEmpty(this.pipeline.ref); + return !isEmpty(this.pipeline.ref); }, }, methods: { diff --git a/app/assets/javascripts/pipelines/components/pipeline_url.vue b/app/assets/javascripts/pipelines/components/pipeline_url.vue index 743c3ea271d..0c9d242f509 100644 --- a/app/assets/javascripts/pipelines/components/pipeline_url.vue +++ b/app/assets/javascripts/pipelines/components/pipeline_url.vue @@ -1,11 +1,11 @@ <script> import { GlLink, GlTooltipDirective } from '@gitlab/ui'; -import _ from 'underscore'; +import { escape } from 'lodash'; import { __, sprintf } from '~/locale'; import popover from '~/vue_shared/directives/popover'; const popoverTitle = sprintf( - _.escape( + escape( __( `This pipeline makes use of a predefined CI/CD configuration enabled by %{strongStart}Auto DevOps.%{strongEnd}`, ), @@ -49,7 +49,7 @@ export default { href="${this.autoDevopsHelpPath}" target="_blank" rel="noopener noreferrer nofollow"> - ${_.escape(__('Learn more about Auto DevOps'))} + ${escape(__('Learn more about Auto DevOps'))} </a>`, }; }, diff --git a/app/assets/javascripts/pipelines/components/pipelines.vue b/app/assets/javascripts/pipelines/components/pipelines.vue index d730ef41b1a..accd6bf71f4 100644 --- a/app/assets/javascripts/pipelines/components/pipelines.vue +++ b/app/assets/javascripts/pipelines/components/pipelines.vue @@ -1,5 +1,5 @@ <script> -import _ from 'underscore'; +import { isEqual } from 'lodash'; import { __, sprintf, s__ } from '../../locale'; import createFlash from '../../flash'; import PipelinesService from '../services/pipelines_service'; @@ -218,7 +218,7 @@ export default { successCallback(resp) { // Because we are polling & the user is interacting verify if the response received // matches the last request made - if (_.isEqual(resp.config.params, this.requestData)) { + if (isEqual(resp.config.params, this.requestData)) { this.store.storeCount(resp.data.count); this.store.storePagination(resp.headers); this.setCommonData(resp.data.pipelines); diff --git a/app/assets/javascripts/pipelines/mixins/graph_component_mixin.js b/app/assets/javascripts/pipelines/mixins/graph_component_mixin.js index f383a4b3368..53b7a174517 100644 --- a/app/assets/javascripts/pipelines/mixins/graph_component_mixin.js +++ b/app/assets/javascripts/pipelines/mixins/graph_component_mixin.js @@ -1,4 +1,4 @@ -import _ from 'underscore'; +import { escape } from 'lodash'; export default { props: { @@ -18,7 +18,7 @@ export default { }, methods: { capitalizeStageName(name) { - const escapedName = _.escape(name); + const escapedName = escape(name); return escapedName.charAt(0).toUpperCase() + escapedName.slice(1); }, isFirstColumn(index) { diff --git a/app/assets/javascripts/pipelines/stores/pipeline_store.js b/app/assets/javascripts/pipelines/stores/pipeline_store.js index 441c9f3c25f..69e3579a3c7 100644 --- a/app/assets/javascripts/pipelines/stores/pipeline_store.js +++ b/app/assets/javascripts/pipelines/stores/pipeline_store.js @@ -1,5 +1,4 @@ import Vue from 'vue'; -import _ from 'underscore'; export default class PipelineStore { constructor() { @@ -61,7 +60,7 @@ export default class PipelineStore { Vue.set(newPipeline, 'isLoading', false); if (newPipeline.triggered_by) { - if (!_.isArray(newPipeline.triggered_by)) { + if (!Array.isArray(newPipeline.triggered_by)) { Object.assign(newPipeline, { triggered_by: [newPipeline.triggered_by] }); } this.parseTriggeredByPipelines(oldPipeline, newPipeline.triggered_by[0]); |