diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-28 00:08:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-28 00:08:47 +0300 |
commit | e4ea43b2b85ad5f3115f00220601eb719705139a (patch) | |
tree | 1888a43f802e45ebb8dfed59595a790807777c6f /app/assets/javascripts | |
parent | 390582e118752426acf5cb25ec99103d312d891c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts')
5 files changed, 8 insertions, 24 deletions
diff --git a/app/assets/javascripts/monitoring/components/dashboard.vue b/app/assets/javascripts/monitoring/components/dashboard.vue index 9b9c380c9af..c34623cf858 100644 --- a/app/assets/javascripts/monitoring/components/dashboard.vue +++ b/app/assets/javascripts/monitoring/components/dashboard.vue @@ -132,11 +132,6 @@ export default { type: String, required: true, }, - environmentsEndpoint: { - type: String, - required: false, - default: '', - }, currentEnvironmentName: { type: String, required: true, @@ -218,9 +213,7 @@ export default { ]), ...mapGetters('monitoringDashboard', ['getMetricStates', 'filteredEnvironments']), firstDashboard() { - return this.environmentsEndpoint.length > 0 && this.allDashboards.length > 0 - ? this.allDashboards[0] - : {}; + return this.allDashboards.length > 0 ? this.allDashboards[0] : {}; }, selectedDashboard() { return this.allDashboards.find(d => d.path === this.currentDashboard) || this.firstDashboard; @@ -246,7 +239,6 @@ export default { created() { this.setEndpoints({ metricsEndpoint: this.metricsEndpoint, - environmentsEndpoint: this.environmentsEndpoint, deploymentsEndpoint: this.deploymentsEndpoint, dashboardEndpoint: this.dashboardEndpoint, dashboardsEndpoint: this.dashboardsEndpoint, diff --git a/app/assets/javascripts/monitoring/stores/mutations.js b/app/assets/javascripts/monitoring/stores/mutations.js index e14425d7c6c..f0390bfc636 100644 --- a/app/assets/javascripts/monitoring/stores/mutations.js +++ b/app/assets/javascripts/monitoring/stores/mutations.js @@ -172,7 +172,6 @@ export default { [types.SET_ENDPOINTS](state, endpoints) { state.metricsEndpoint = endpoints.metricsEndpoint; - state.environmentsEndpoint = endpoints.environmentsEndpoint; state.deploymentsEndpoint = endpoints.deploymentsEndpoint; state.dashboardEndpoint = endpoints.dashboardEndpoint; state.dashboardsEndpoint = endpoints.dashboardsEndpoint; diff --git a/app/assets/javascripts/monitoring/stores/state.js b/app/assets/javascripts/monitoring/stores/state.js index 2c6758dfce2..2a2a7c9c88d 100644 --- a/app/assets/javascripts/monitoring/stores/state.js +++ b/app/assets/javascripts/monitoring/stores/state.js @@ -2,7 +2,6 @@ import invalidUrl from '~/lib/utils/invalid_url'; export default () => ({ metricsEndpoint: null, - environmentsEndpoint: null, deploymentsEndpoint: null, dashboardEndpoint: invalidUrl, emptyState: 'gettingStarted', diff --git a/app/assets/javascripts/serverless/components/url.vue b/app/assets/javascripts/serverless/components/url.vue index 5e30c8d614e..d6de5e56a5c 100644 --- a/app/assets/javascripts/serverless/components/url.vue +++ b/app/assets/javascripts/serverless/components/url.vue @@ -1,12 +1,8 @@ <script> -import { GlButton } from '@gitlab/ui'; import ClipboardButton from '../../vue_shared/components/clipboard_button.vue'; -import Icon from '~/vue_shared/components/icon.vue'; export default { components: { - Icon, - GlButton, ClipboardButton, }, props: { @@ -26,13 +22,5 @@ export default { :title="s__('ServerlessURL|Copy URL')" class="input-group-text js-clipboard-btn" /> - <gl-button - :href="uri" - target="_blank" - rel="noopener noreferrer nofollow" - class="input-group-text btn btn-default" - > - <icon name="external-link" /> - </gl-button> </div> </template> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue index d230ac566de..66167a0d748 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue @@ -146,9 +146,15 @@ export default { auto_merge_strategy: useAutoMerge ? this.mr.preferredAutoMergeStrategy : undefined, should_remove_source_branch: this.removeSourceBranch === true, squash: this.squashBeforeMerge, - squash_commit_message: this.squashCommitMessage, }; + // If users can't alter the squash message (e.g. for 1-commit merge requests), + // we shouldn't send the commit message because that would make the backend + // do unnecessary work. + if (this.shouldShowSquashBeforeMerge) { + options.squash_commit_message = this.squashCommitMessage; + } + this.isMakingRequest = true; this.service .merge(options) |