diff --git a/app/assets/javascripts/diffs/components/diff_stats.vue b/app/assets/javascripts/diffs/components/diff_stats.vue index 5329cb1e241..0138790cf0e 100644 --- a/app/assets/javascripts/diffs/components/diff_stats.vue +++ b/app/assets/javascripts/diffs/components/diff_stats.vue @@ -17,7 +17,7 @@ export default { diffFilesLength: { type: Number, required: false, - default: 0, + default: null, }, }, computed: { diff --git a/app/assets/javascripts/error_tracking/components/error_details.vue b/app/assets/javascripts/error_tracking/components/error_details.vue index 98fc121d39f..88861b7da0e 100644 --- a/app/assets/javascripts/error_tracking/components/error_details.vue +++ b/app/assets/javascripts/error_tracking/components/error_details.vue @@ -2,7 +2,15 @@ import { mapActions, mapGetters, mapState } from 'vuex'; import dateFormat from 'dateformat'; import createFlash from '~/flash'; -import { GlButton, GlFormInput, GlLink, GlLoadingIcon, GlBadge } from '@gitlab/ui'; +import { + GlButton, + GlFormInput, + GlLink, + GlLoadingIcon, + GlBadge, + GlAlert, + GlSprintf, +} from '@gitlab/ui'; import { __, sprintf, n__ } from '~/locale'; import LoadingButton from '~/vue_shared/components/loading_button.vue'; import Icon from '~/vue_shared/components/icon.vue'; @@ -26,6 +34,8 @@ export default { Icon, Stacktrace, GlBadge, + GlAlert, + GlSprintf, }, directives: { TrackEvent: TrackEventDirective, @@ -85,6 +95,8 @@ export default { return { GQLerror: null, issueCreationInProgress: false, + isAlertVisible: false, + closedIssueId: null, }; }, computed: { @@ -184,7 +196,14 @@ export default { onResolveStatusUpdate() { const status = this.errorStatus === errorStatus.RESOLVED ? errorStatus.UNRESOLVED : errorStatus.RESOLVED; - this.updateResolveStatus({ endpoint: this.issueUpdatePath, status }); + + // eslint-disable-next-line promise/catch-or-return + this.updateResolveStatus({ endpoint: this.issueUpdatePath, status }).then(res => { + this.closedIssueId = res.closed_issue_iid; + if (this.closedIssueId) { + this.isAlertVisible = true; + } + }); }, formatDate(date) { return `${this.timeFormatted(date)} (${dateFormat(date, 'UTC:yyyy-mm-dd h:MM:ssTT Z')})`; @@ -199,6 +218,18 @@ export default {
+ + + + + +
diff --git a/app/assets/javascripts/error_tracking/store/actions.js b/app/assets/javascripts/error_tracking/store/actions.js index 49fa5f3cec5..8f6f404ef8a 100644 --- a/app/assets/javascripts/error_tracking/store/actions.js +++ b/app/assets/javascripts/error_tracking/store/actions.js @@ -11,9 +11,11 @@ export const setStatus = ({ commit }, status) => { export const updateStatus = ({ commit }, { endpoint, redirectUrl, status }) => service .updateErrorStatus(endpoint, status) - .then(() => { - if (redirectUrl) visitUrl(redirectUrl); + .then(resp => { commit(types.SET_ERROR_STATUS, status); + if (redirectUrl) visitUrl(redirectUrl); + + return resp.data.result; }) .catch(() => createFlash(__('Failed to update issue status'))); diff --git a/app/assets/javascripts/releases/list/components/release_block_author.vue b/app/assets/javascripts/releases/list/components/release_block_author.vue index ff6b00d8221..e7075d4d67a 100644 --- a/app/assets/javascripts/releases/list/components/release_block_author.vue +++ b/app/assets/javascripts/releases/list/components/release_block_author.vue @@ -27,7 +27,7 @@ export default {