diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-17 03:09:17 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-17 03:09:17 +0000 |
commit | d9e821dbd908f40ff9828357452cd55a651283fa (patch) | |
tree | ff45e11312c7853cdf4056d26f5a8c10778a5c5a /app/assets | |
parent | efb0c7f501e4a8883796b5acfdc584e2720febba (diff) | |
download | gitlab-ce-d9e821dbd908f40ff9828357452cd55a651283fa.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets')
3 files changed, 45 insertions, 3 deletions
diff --git a/app/assets/javascripts/error_tracking/components/error_tracking_list.vue b/app/assets/javascripts/error_tracking/components/error_tracking_list.vue index aa275d63c3f..eb4150b010d 100644 --- a/app/assets/javascripts/error_tracking/components/error_tracking_list.vue +++ b/app/assets/javascripts/error_tracking/components/error_tracking_list.vue @@ -48,6 +48,11 @@ export default { tdClass: 'table-col d-flex align-items-center d-sm-table-cell', }, { + key: 'ignore', + label: '', + tdClass: 'table-col d-flex align-items-center d-sm-table-cell', + }, + { key: 'details', tdClass: 'table-col d-sm-none d-flex align-items-center', thClass: 'invisible w-0', @@ -97,6 +102,14 @@ export default { type: Boolean, required: true, }, + projectPath: { + type: String, + required: true, + }, + listPath: { + type: String, + required: true, + }, }, hasLocalStorage: AccessorUtils.isLocalStorageAccessSafe(), data() { @@ -144,6 +157,7 @@ export default { 'loadRecentSearches', 'setIndexPath', 'fetchPaginatedResults', + 'updateStatus', ]), setSearchText(text) { this.errorSearchQuery = text; @@ -166,6 +180,16 @@ export default { isCurrentSortField(field) { return field === this.sortField; }, + getIssueUpdatePath(errorId) { + return `/${this.projectPath}/-/error_tracking/${errorId}.json`; + }, + updateIssueStatus(errorId, status) { + this.updateStatus({ + endpoint: this.getIssueUpdatePath(errorId), + redirectUrl: this.listPath, + status, + }); + }, }, }; </script> @@ -299,6 +323,16 @@ export default { <time-ago :time="errors.item.lastSeen" class="text-secondary" /> </div> </template> + <template v-slot:ignore="errors"> + <gl-button + ref="ignoreError" + v-gl-tooltip.hover + :title="__('Ignore')" + @click="updateIssueStatus(errors.item.id, 'ignored')" + > + <gl-icon name="eye-slash" :size="12" /> + </gl-button> + </template> <template v-slot:details="errors"> <gl-button :href="getDetailsLink(errors.item.id)" diff --git a/app/assets/javascripts/error_tracking/list.js b/app/assets/javascripts/error_tracking/list.js index 073e2c8f1c7..8f3700249da 100644 --- a/app/assets/javascripts/error_tracking/list.js +++ b/app/assets/javascripts/error_tracking/list.js @@ -13,7 +13,13 @@ export default () => { store, render(createElement) { const domEl = document.querySelector(this.$options.el); - const { indexPath, enableErrorTrackingLink, illustrationPath } = domEl.dataset; + const { + indexPath, + enableErrorTrackingLink, + illustrationPath, + projectPath, + listPath, + } = domEl.dataset; let { errorTrackingEnabled, userCanEnableErrorTracking } = domEl.dataset; errorTrackingEnabled = parseBoolean(errorTrackingEnabled); @@ -26,6 +32,8 @@ export default () => { errorTrackingEnabled, illustrationPath, userCanEnableErrorTracking, + projectPath, + listPath, }, }); }, diff --git a/app/assets/javascripts/error_tracking/store/index.js b/app/assets/javascripts/error_tracking/store/index.js index 75aa78d9c07..d9206bc8d7c 100644 --- a/app/assets/javascripts/error_tracking/store/index.js +++ b/app/assets/javascripts/error_tracking/store/index.js @@ -21,8 +21,8 @@ export const createStore = () => list: { namespaced: true, state: listState(), - actions: listActions, - mutations: listMutations, + actions: { ...actions, ...listActions }, + mutations: { ...mutations, ...listMutations }, }, details: { namespaced: true, |