...@@ -213,7 +213,7 @@ ...@@ -213,7 +213,7 @@
- name: postgres:9.6 - name: postgres:9.6
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:alpine - name: redis:alpine
- name: elasticsearch:5.6.12 - name: elasticsearch:6.4.2
.use-pg10-ee: .use-pg10-ee:
image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-postgresql-10-graphicsmagick-1.3.33" image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-postgresql-10-graphicsmagick-1.3.33"
...@@ -221,7 +221,7 @@ ...@@ -221,7 +221,7 @@
- name: postgres:10.9 - name: postgres:10.9
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"] command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
- name: redis:alpine - name: redis:alpine
- name: elasticsearch:5.6.12 - name: elasticsearch:6.4.2
.only-ee: .only-ee:
only: only:
... ...
......
...@@ -361,6 +361,9 @@ RSpec/MissingExampleGroupArgument: ...@@ -361,6 +361,9 @@ RSpec/MissingExampleGroupArgument:
RSpec/UnspecifiedException: RSpec/UnspecifiedException:
Enabled: false Enabled: false
RSpec/HaveGitlabHttpStatus:
Enabled: false
Style/MultilineWhenThen: Style/MultilineWhenThen:
Enabled: false Enabled: false
... ...
......
1.5.0 2.0.0
...@@ -19,7 +19,7 @@ gem 'default_value_for', '~> 3.3.0' ...@@ -19,7 +19,7 @@ gem 'default_value_for', '~> 3.3.0'
gem 'pg', '~> 1.1' gem 'pg', '~> 1.1'
gem 'rugged', '~> 0.28' gem 'rugged', '~> 0.28'
gem 'grape-path-helpers', '~> 1.1' gem 'grape-path-helpers', '~> 1.2'
gem 'faraday', '~> 0.12' gem 'faraday', '~> 0.12'
gem 'marginalia', '~> 1.8.0' gem 'marginalia', '~> 1.8.0'
... ...
......
...@@ -432,7 +432,7 @@ GEM ...@@ -432,7 +432,7 @@ GEM
grape-entity (0.7.1) grape-entity (0.7.1)
activesupport (>= 4.0) activesupport (>= 4.0)
multi_json (>= 1.3.2) multi_json (>= 1.3.2)
grape-path-helpers (1.1.0) grape-path-helpers (1.2.0)
activesupport activesupport
grape (~> 1.0) grape (~> 1.0)
rake (~> 12) rake (~> 12)
...@@ -1230,7 +1230,7 @@ DEPENDENCIES ...@@ -1230,7 +1230,7 @@ DEPENDENCIES
gpgme (~> 2.0.19) gpgme (~> 2.0.19)
grape (~> 1.1.0) grape (~> 1.1.0)
grape-entity (~> 0.7.1) grape-entity (~> 0.7.1)
grape-path-helpers (~> 1.1) grape-path-helpers (~> 1.2)
grape_logging (~> 1.7) grape_logging (~> 1.7)
graphiql-rails (~> 1.4.10) graphiql-rails (~> 1.4.10)
graphql (~> 1.9.11) graphql (~> 1.9.11)
... ...
......
...@@ -30,6 +30,14 @@ export default { ...@@ -30,6 +30,14 @@ export default {
}, },
mixins: [timeagoMixin], mixins: [timeagoMixin],
props: { props: {
listPath: {
type: String,
required: true,
},
issueUpdatePath: {
type: String,
required: true,
},
issueId: { issueId: {
type: String, type: String,
required: true, required: true,
...@@ -81,7 +89,14 @@ export default { ...@@ -81,7 +89,14 @@ export default {
}; };
}, },
computed: { computed: {
...mapState('details', ['error', 'loading', 'loadingStacktrace', 'stacktraceData']), ...mapState('details', [
'error',
'loading',
'loadingStacktrace',
'stacktraceData',
'updatingResolveStatus',
'updatingIgnoreStatus',
]),
...mapGetters('details', ['stacktrace']), ...mapGetters('details', ['stacktrace']),
reported() { reported() {
return sprintf( return sprintf(
...@@ -137,12 +152,15 @@ export default { ...@@ -137,12 +152,15 @@ export default {
this.startPollingStacktrace(this.issueStackTracePath); this.startPollingStacktrace(this.issueStackTracePath);
}, },
methods: { methods: {
...mapActions('details', ['startPollingDetails', 'startPollingStacktrace']), ...mapActions('details', ['startPollingDetails', 'startPollingStacktrace', 'updateStatus']),
trackClickErrorLinkToSentryOptions, trackClickErrorLinkToSentryOptions,
createIssue() { createIssue() {
this.issueCreationInProgress = true; this.issueCreationInProgress = true;
this.$refs.sentryIssueForm.submit(); this.$refs.sentryIssueForm.submit();
}, },
updateIssueStatus(status) {
this.updateStatus({ endpoint: this.issueUpdatePath, redirectUrl: this.listPath, status });
},
formatDate(date) { formatDate(date) {
return `${this.timeFormatted(date)} (${dateFormat(date, 'UTC:yyyy-mm-dd h:MM:ssTT Z')})`; return `${this.timeFormatted(date)} (${dateFormat(date, 'UTC:yyyy-mm-dd h:MM:ssTT Z')})`;
}, },
...@@ -158,24 +176,42 @@ export default { ...@@ -158,24 +176,42 @@ export default {
<div v-else-if="showDetails" class="error-details"> <div v-else-if="showDetails" class="error-details">
<div class="top-area align-items-center justify-content-between py-3"> <div class="top-area align-items-center justify-content-between py-3">
<span v-if="!loadingStacktrace && stacktrace" v-html="reported"></span> <span v-if="!loadingStacktrace && stacktrace" v-html="reported"></span>
<form ref="sentryIssueForm" :action="projectIssuesPath" method="POST"> <div class="d-inline-flex">
<gl-form-input class="hidden" name="issue[title]" :value="issueTitle" /> <loading-button
<input name="issue[description]" :value="issueDescription" type="hidden" /> :label="__('Ignore')"
<gl-form-input :loading="updatingIgnoreStatus"
:value="GQLerror.id" @click="updateIssueStatus('ignored')"
class="hidden"
name="issue[sentry_issue_attributes][sentry_issue_identifier]"
/> />
<gl-form-input :value="csrfToken" class="hidden" name="authenticity_token" />
<loading-button <loading-button
v-if="!error.gitlab_issue" class="btn-outline-info ml-2"
class="btn-success" :label="__('Resolve')"
:label="__('Create issue')" :loading="updatingResolveStatus"
:loading="issueCreationInProgress" @click="updateIssueStatus('resolved')"
data-qa-selector="create_issue_button"
@click="createIssue"
/> />
</form> <form
ref="sentryIssueForm"
:action="projectIssuesPath"
method="POST"
class="d-inline-block ml-2"
>
<gl-form-input class="hidden" name="issue[title]" :value="issueTitle" />
<input name="issue[description]" :value="issueDescription" type="hidden" />
<gl-form-input
:value="GQLerror.id"
class="hidden"
name="issue[sentry_issue_attributes][sentry_issue_identifier]"
/>
<gl-form-input :value="csrfToken" class="hidden" name="authenticity_token" />
<loading-button
v-if="!error.gitlab_issue"
class="btn-success"
:label="__('Create issue')"
:loading="issueCreationInProgress"
data-qa-selector="create_issue_button"
@click="createIssue"
/>
</form>
</div>
</div> </div>
<div> <div>
<tooltip-on-truncate :title="GQLerror.title" truncate-target="child" placement="top"> <tooltip-on-truncate :title="GQLerror.title" truncate-target="child" placement="top">
... ...
......
...@@ -25,6 +25,8 @@ export default () => { ...@@ -25,6 +25,8 @@ export default () => {
const { const {
issueId, issueId,
projectPath, projectPath,
listPath,
issueUpdatePath,
issueDetailsPath, issueDetailsPath,
issueStackTracePath, issueStackTracePath,
projectIssuesPath, projectIssuesPath,
...@@ -34,6 +36,8 @@ export default () => { ...@@ -34,6 +36,8 @@ export default () => {
props: { props: {
issueId, issueId,
projectPath, projectPath,
listPath,
issueUpdatePath,
issueDetailsPath, issueDetailsPath,
issueStackTracePath, issueStackTracePath,
projectIssuesPath, projectIssuesPath,
... ...
......
...@@ -4,4 +4,7 @@ export default { ...@@ -4,4 +4,7 @@ export default {
getSentryData({ endpoint, params }) { getSentryData({ endpoint, params }) {
return axios.get(endpoint, { params }); return axios.get(endpoint, { params });
}, },
updateErrorStatus(endpoint, status) {
return axios.put(endpoint, { status });
},
}; };
import service from './../services';
import * as types from './mutation_types';
import createFlash from '~/flash';
import { visitUrl } from '~/lib/utils/url_utility';
import { __ } from '~/locale';
export function updateStatus({ commit }, { endpoint, redirectUrl, status }) {
const type =
status === 'resolved' ? types.SET_UPDATING_RESOLVE_STATUS : types.SET_UPDATING_IGNORE_STATUS;
commit(type, true);
return service
.updateErrorStatus(endpoint, status)
.then(() => visitUrl(redirectUrl))
.catch(() => createFlash(__('Failed to update issue status')))
.finally(() => commit(type, false));
}
export default () => {};
...@@ -3,4 +3,6 @@ export default () => ({ ...@@ -3,4 +3,6 @@ export default () => ({
stacktraceData: {}, stacktraceData: {},
loading: true, loading: true,
loadingStacktrace: true, loadingStacktrace: true,
updatingResolveStatus: false,
updatingIgnoreStatus: false,
}); });
import Vue from 'vue'; import Vue from 'vue';
import Vuex from 'vuex'; import Vuex from 'vuex';
import * as actions from './actions';
import mutations from './mutations';
import * as listActions from './list/actions'; import * as listActions from './list/actions';
import listMutations from './list/mutations'; import listMutations from './list/mutations';
import listState from './list/state'; import listState from './list/state';
...@@ -24,8 +27,8 @@ export const createStore = () => ...@@ -24,8 +27,8 @@ export const createStore = () =>
details: { details: {
namespaced: true, namespaced: true,
state: detailsState(), state: detailsState(),
actions: detailsActions, actions: { ...actions, ...detailsActions },
mutations: detailsMutations, mutations: { ...mutations, ...detailsMutations },
getters: detailsGetters, getters: detailsGetters,
}, },
}, },
... ...
......
export const SET_UPDATING_RESOLVE_STATUS = 'SET_UPDATING_RESOLVE_STATUS';
export const SET_UPDATING_IGNORE_STATUS = 'SET_UPDATING_IGNORE_STATUS';
import * as types from './mutation_types';
export default {
[types.SET_UPDATING_IGNORE_STATUS](state, updating) {
state.updatingIgnoreStatus = updating;
},
[types.SET_UPDATING_RESOLVE_STATUS](state, updating) {
state.updatingResolveStatus = updating;
},
};
...@@ -2,6 +2,11 @@ ...@@ -2,6 +2,11 @@
li { li {
@include gl-line-height-32; @include gl-line-height-32;
} }
.btn-outline-info {
color: $blue-500;
border-color: $blue-500;
}
} }
.stacktrace { .stacktrace {
... ...
......
...@@ -222,7 +222,7 @@ class Projects::EnvironmentsController < Projects::ApplicationController ...@@ -222,7 +222,7 @@ class Projects::EnvironmentsController < Projects::ApplicationController
def metrics_dashboard_params def metrics_dashboard_params
params params
.permit(:embedded, :group, :title, :y_label, :dashboard_path, :environment) .permit(:embedded, :group, :title, :y_label, :dashboard_path, :environment, :sample_metrics)
.merge(dashboard_path: params[:dashboard], environment: environment) .merge(dashboard_path: params[:dashboard], environment: environment)
end end
... ...
......
...@@ -51,7 +51,7 @@ class ProjectsController < Projects::ApplicationController ...@@ -51,7 +51,7 @@ class ProjectsController < Projects::ApplicationController
def edit def edit
@badge_api_endpoint = expose_url(api_v4_projects_badges_path(id: @project.id)) @badge_api_endpoint = expose_url(api_v4_projects_badges_path(id: @project.id))
render 'edit' render_edit
end end
def create def create
...@@ -85,7 +85,7 @@ class ProjectsController < Projects::ApplicationController ...@@ -85,7 +85,7 @@ class ProjectsController < Projects::ApplicationController
else else
flash.now[:alert] = result[:message] flash.now[:alert] = result[:message]
format.html { render 'edit' } format.html { render_edit }
end end
format.js format.js
...@@ -387,7 +387,6 @@ class ProjectsController < Projects::ApplicationController ...@@ -387,7 +387,6 @@ class ProjectsController < Projects::ApplicationController
:merge_method, :merge_method,
:initialize_with_readme, :initialize_with_readme,
:autoclose_referenced_issues, :autoclose_referenced_issues,
:suggestion_commit_message,
project_feature_attributes: %i[ project_feature_attributes: %i[
builds_access_level builds_access_level
...@@ -488,6 +487,10 @@ class ProjectsController < Projects::ApplicationController ...@@ -488,6 +487,10 @@ class ProjectsController < Projects::ApplicationController
def rate_limiter def rate_limiter
::Gitlab::ApplicationRateLimiter ::Gitlab::ApplicationRateLimiter
end end
def render_edit
render 'edit'
end
end end
ProjectsController.prepend_if_ee('EE::ProjectsController') ProjectsController.prepend_if_ee('EE::ProjectsController')
...@@ -20,6 +20,7 @@ module Projects::ErrorTrackingHelper ...@@ -20,6 +20,7 @@ module Projects::ErrorTrackingHelper
{ {
'issue-id' => issue_id, 'issue-id' => issue_id,
'project-path' => project.full_path, 'project-path' => project.full_path,
'list-path' => project_error_tracking_index_path(project),
'issue-details-path' => details_project_error_tracking_index_path(*opts), 'issue-details-path' => details_project_error_tracking_index_path(*opts),
'issue-update-path' => update_project_error_tracking_index_path(*opts), 'issue-update-path' => update_project_error_tracking_index_path(*opts),
'project-issues-path' => project_issues_path(project), 'project-issues-path' => project_issues_path(project),
... ...
......
...@@ -10,6 +10,8 @@ module ProtectedRef ...@@ -10,6 +10,8 @@ module ProtectedRef
validates :project, presence: true validates :project, presence: true
delegate :matching, :matches?, :wildcard?, to: :ref_matcher delegate :matching, :matches?, :wildcard?, to: :ref_matcher
scope :for_project, ->(project) { where(project: project) }
end end
def commit def commit
... ...
......
...@@ -4,7 +4,7 @@ module DiffViewer ...@@ -4,7 +4,7 @@ module DiffViewer
class Base class Base
PARTIAL_PATH_PREFIX = 'projects/diffs/viewers' PARTIAL_PATH_PREFIX = 'projects/diffs/viewers'
class_attribute :partial_name, :type, :extensions, :file_types, :binary, :switcher_icon, :switcher_title class_attribute :partial_name, :type, :extensions, :binary, :switcher_icon, :switcher_title
# These limits relate to the sum of the old and new blob sizes. # These limits relate to the sum of the old and new blob sizes.
# Limits related to the actual size of the diff are enforced in Gitlab::Diff::File. # Limits related to the actual size of the diff are enforced in Gitlab::Diff::File.
...@@ -50,7 +50,6 @@ module DiffViewer ...@@ -50,7 +50,6 @@ module DiffViewer
return true if blob.nil? return true if blob.nil?
return false if verify_binary && binary? != blob.binary_in_repo? return false if verify_binary && binary? != blob.binary_in_repo?
return true if extensions&.include?(blob.extension) return true if extensions&.include?(blob.extension)
return true if file_types&.include?(blob.file_type)
false false
end end
... ...
......
---
title: Drop support for ES5 add support for ES7
merge_request: 22859
author:
type: added