diff options
Diffstat (limited to 'app/assets/javascripts/error_tracking/components/error_tracking_list.vue')
-rw-r--r-- | app/assets/javascripts/error_tracking/components/error_tracking_list.vue | 34 |
1 files changed, 34 insertions, 0 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)" |