summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/error_tracking/components
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-11-22 12:06:25 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-11-22 12:06:25 +0000
commit4db9eeb44af5644eb1d080b4ccf4aff8b90656b9 (patch)
tree4ca630fe181e6c66134579694fc97a60430ff7e9 /app/assets/javascripts/error_tracking/components
parent8a3fdede9607c806d88856d46d4f5394b630a006 (diff)
downloadgitlab-ce-4db9eeb44af5644eb1d080b4ccf4aff8b90656b9.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/error_tracking/components')
-rw-r--r--app/assets/javascripts/error_tracking/components/error_details.vue30
1 files changed, 29 insertions, 1 deletions
diff --git a/app/assets/javascripts/error_tracking/components/error_details.vue b/app/assets/javascripts/error_tracking/components/error_details.vue
index ab782f955c6..2000377530b 100644
--- a/app/assets/javascripts/error_tracking/components/error_details.vue
+++ b/app/assets/javascripts/error_tracking/components/error_details.vue
@@ -62,6 +62,34 @@ export default {
showStacktrace() {
return Boolean(!this.loadingStacktrace && this.stacktrace && this.stacktrace.length);
},
+ errorTitle() {
+ return `${this.error.title}`;
+ },
+ errorUrl() {
+ return sprintf(__('Sentry event: %{external_url}'), {
+ external_url: this.error.external_url,
+ });
+ },
+ errorFirstSeen() {
+ return sprintf(__('First seen: %{first_seen}'), { first_seen: this.error.first_seen });
+ },
+ errorLastSeen() {
+ return sprintf(__('Last seen: %{last_seen}'), { last_seen: this.error.last_seen });
+ },
+ errorCount() {
+ return sprintf(__('Events: %{count}'), { count: this.error.count });
+ },
+ errorUserCount() {
+ return sprintf(__('Users: %{user_count}'), { user_count: this.error.user_count });
+ },
+ issueLink() {
+ return `${this.issueProjectPath}?issue[title]=${encodeURIComponent(
+ this.errorTitle,
+ )}&issue[description]=${encodeURIComponent(this.issueDescription)}`;
+ },
+ issueDescription() {
+ return `${this.errorUrl}${this.errorFirstSeen}${this.errorLastSeen}${this.errorCount}${this.errorUserCount}`;
+ },
},
mounted() {
this.startPollingDetails(this.issueDetailsPath);
@@ -86,7 +114,7 @@ export default {
<div v-else-if="showDetails" class="error-details">
<div class="top-area align-items-center justify-content-between py-3">
<span v-if="!loadingStacktrace && stacktrace" v-html="reported"></span>
- <gl-button variant="success" :href="issueProjectPath">
+ <gl-button variant="success" :href="issueLink">
{{ __('Create issue') }}
</gl-button>
</div>