summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-17 03:09:17 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-17 03:09:17 +0000
commitd9e821dbd908f40ff9828357452cd55a651283fa (patch)
treeff45e11312c7853cdf4056d26f5a8c10778a5c5a
parentefb0c7f501e4a8883796b5acfdc584e2720febba (diff)
downloadgitlab-ce-d9e821dbd908f40ff9828357452cd55a651283fa.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--GITLAB_PAGES_VERSION2
-rw-r--r--app/assets/javascripts/error_tracking/components/error_tracking_list.vue34
-rw-r--r--app/assets/javascripts/error_tracking/list.js10
-rw-r--r--app/assets/javascripts/error_tracking/store/index.js4
-rw-r--r--app/helpers/projects/error_tracking_helper.rb2
-rw-r--r--changelogs/unreleased/lm-ignore-sentry-errors-from-list-view.yml5
-rw-r--r--changelogs/unreleased/pages-version-v1-13-0.yml5
-rw-r--r--doc/user/project/repository/forking_workflow.md2
-rw-r--r--spec/frontend/error_tracking/components/error_tracking_list_spec.js40
-rw-r--r--spec/helpers/projects/error_tracking_helper_spec.rb4
-rw-r--r--spec/lib/gitlab/import_export/import_test_coverage_spec.rb13
11 files changed, 108 insertions, 13 deletions
diff --git a/GITLAB_PAGES_VERSION b/GITLAB_PAGES_VERSION
index feaae22bac7..0eed1a29efd 100644
--- a/GITLAB_PAGES_VERSION
+++ b/GITLAB_PAGES_VERSION
@@ -1 +1 @@
-1.13.0
+1.12.0
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,
diff --git a/app/helpers/projects/error_tracking_helper.rb b/app/helpers/projects/error_tracking_helper.rb
index a55f99f9b19..ed5c7640ec1 100644
--- a/app/helpers/projects/error_tracking_helper.rb
+++ b/app/helpers/projects/error_tracking_helper.rb
@@ -10,6 +10,8 @@ module Projects::ErrorTrackingHelper
'user-can-enable-error-tracking' => can?(current_user, :admin_operations, project).to_s,
'enable-error-tracking-link' => project_settings_operations_path(project),
'error-tracking-enabled' => error_tracking_enabled.to_s,
+ 'project-path' => project.full_path,
+ 'list-path' => project_error_tracking_index_path(project),
'illustration-path' => image_path('illustrations/cluster_popover.svg')
}
end
diff --git a/changelogs/unreleased/lm-ignore-sentry-errors-from-list-view.yml b/changelogs/unreleased/lm-ignore-sentry-errors-from-list-view.yml
new file mode 100644
index 00000000000..02da56f02af
--- /dev/null
+++ b/changelogs/unreleased/lm-ignore-sentry-errors-from-list-view.yml
@@ -0,0 +1,5 @@
+---
+title: Implement ability to ignore Sentry errrors from the list view
+merge_request: 22819
+author:
+type: added
diff --git a/changelogs/unreleased/pages-version-v1-13-0.yml b/changelogs/unreleased/pages-version-v1-13-0.yml
deleted file mode 100644
index fe238f758db..00000000000
--- a/changelogs/unreleased/pages-version-v1-13-0.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Upgrade Pages to 1.13.0
-merge_request: 23023
-author:
-type: added
diff --git a/doc/user/project/repository/forking_workflow.md b/doc/user/project/repository/forking_workflow.md
index a879f534511..dddabfce4b3 100644
--- a/doc/user/project/repository/forking_workflow.md
+++ b/doc/user/project/repository/forking_workflow.md
@@ -14,7 +14,7 @@ document more information about using branches to work together.
Forking a project is in most cases a two-step process.
-1. Click on the fork button located located in between the star and clone buttons on the project's home page.
+1. Click on the fork button located in between the star and clone buttons on the project's home page.
![Fork button](img/forking_workflow_fork_button.png)
diff --git a/spec/frontend/error_tracking/components/error_tracking_list_spec.js b/spec/frontend/error_tracking/components/error_tracking_list_spec.js
index a747e07d70d..10b24cf04d3 100644
--- a/spec/frontend/error_tracking/components/error_tracking_list_spec.js
+++ b/spec/frontend/error_tracking/components/error_tracking_list_spec.js
@@ -31,6 +31,8 @@ describe('ErrorTrackingList', () => {
store,
propsData: {
indexPath: '/path',
+ listPath: '/error_tracking',
+ projectPath: 'project/test',
enableErrorTrackingLink: '/link',
userCanEnableErrorTracking,
errorTrackingEnabled,
@@ -59,6 +61,7 @@ describe('ErrorTrackingList', () => {
searchByQuery: jest.fn(),
sortByField: jest.fn(),
fetchPaginatedResults: jest.fn(),
+ updateStatus: jest.fn(),
};
const state = {
@@ -139,6 +142,14 @@ describe('ErrorTrackingList', () => {
});
});
+ it('each error in the list should have an ignore button', () => {
+ const error = wrapper.findAll('tbody tr');
+
+ error.wrappers.forEach((_, index) => {
+ expect(error.at(index).exists('glicon-stub[name="eye-slash"]')).toBe(true);
+ });
+ });
+
describe('filtering', () => {
const findSearchBox = () => wrapper.find(GlFormInput);
@@ -205,6 +216,35 @@ describe('ErrorTrackingList', () => {
});
});
+ describe('When the ignore button on an error is clicked', () => {
+ beforeEach(() => {
+ store.state.list.loading = false;
+ store.state.list.errors = errorsList;
+
+ mountComponent({
+ stubs: {
+ GlTable: false,
+ GlLink: false,
+ GlButton: false,
+ },
+ });
+ });
+
+ it('sends the "ignored" status and error ID', () => {
+ const ignoreButton = wrapper.find({ ref: 'ignoreError' });
+ ignoreButton.trigger('click');
+ expect(actions.updateStatus).toHaveBeenCalledWith(
+ expect.anything(),
+ {
+ endpoint: '/project/test/-/error_tracking/3.json',
+ redirectUrl: '/error_tracking',
+ status: 'ignored',
+ },
+ undefined,
+ );
+ });
+ });
+
describe('When error tracking is disabled and user is not allowed to enable it', () => {
beforeEach(() => {
mountComponent({
diff --git a/spec/helpers/projects/error_tracking_helper_spec.rb b/spec/helpers/projects/error_tracking_helper_spec.rb
index 583b1c76d7b..325ff32dd89 100644
--- a/spec/helpers/projects/error_tracking_helper_spec.rb
+++ b/spec/helpers/projects/error_tracking_helper_spec.rb
@@ -11,6 +11,8 @@ describe Projects::ErrorTrackingHelper do
describe '#error_tracking_data' do
let(:can_enable_error_tracking) { true }
let(:setting_path) { project_settings_operations_path(project) }
+ let(:list_path) { project_error_tracking_index_path(project) }
+ let(:project_path) { project.full_path }
let(:index_path) do
project_error_tracking_index_path(project, format: :json)
@@ -30,6 +32,8 @@ describe Projects::ErrorTrackingHelper do
'user-can-enable-error-tracking' => 'true',
'enable-error-tracking-link' => setting_path,
'error-tracking-enabled' => 'false',
+ 'list-path' => list_path,
+ 'project-path' => project_path,
'illustration-path' => match_asset_path('/assets/illustrations/cluster_popover.svg')
)
end
diff --git a/spec/lib/gitlab/import_export/import_test_coverage_spec.rb b/spec/lib/gitlab/import_export/import_test_coverage_spec.rb
index d94abe613e8..97d5ce07d47 100644
--- a/spec/lib/gitlab/import_export/import_test_coverage_spec.rb
+++ b/spec/lib/gitlab/import_export/import_test_coverage_spec.rb
@@ -17,6 +17,7 @@ describe 'Test coverage of the Project Import' do
# opening a follow-up issue to fix this.
MUTED_RELATIONS = %w[
project.milestones.events.push_event_payload
+ project.issues.events
project.issues.events.push_event_payload
project.issues.notes.events
project.issues.notes.events.push_event_payload
@@ -55,13 +56,19 @@ describe 'Test coverage of the Project Import' do
# Note that we use separate fixture to test ee-only features.
# Most of the relations are present in `complex/project.json`
# which is our main fixture.
+ PROJECT_JSON_FIXTURES_EE =
+ if Gitlab.ee?
+ ['ee/spec/fixtures/lib/gitlab/import_export/designs/project.json'].freeze
+ else
+ []
+ end
+
PROJECT_JSON_FIXTURES = [
'spec/fixtures/lib/gitlab/import_export/complex/project.json',
'spec/fixtures/lib/gitlab/import_export/group/project.json',
'spec/fixtures/lib/gitlab/import_export/light/project.json',
- 'spec/fixtures/lib/gitlab/import_export/milestone-iid/project.json',
- 'ee/spec/fixtures/lib/gitlab/import_export/designs/project.json'
- ].freeze
+ 'spec/fixtures/lib/gitlab/import_export/milestone-iid/project.json'
+ ].freeze + PROJECT_JSON_FIXTURES_EE
it 'ensures that all imported/exported relations are present in test JSONs' do
not_tested_relations = (relations_from_config - tested_relations) - MUTED_RELATIONS