Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-21 00:08:00 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-21 00:08:00 +0300
commitbe59dd1d43332496def276c8d3e78fc82e94273a (patch)
tree19c25e5a7e7f88a0ac4bd797bf70ac48603656cc /app/assets/javascripts/sentry_error_stack_trace
parent855bf0533bc5d5df2821e9a5951fae4f153f7492 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/sentry_error_stack_trace')
-rw-r--r--app/assets/javascripts/sentry_error_stack_trace/components/sentry_error_stack_trace.vue43
-rw-r--r--app/assets/javascripts/sentry_error_stack_trace/index.js22
2 files changed, 65 insertions, 0 deletions
diff --git a/app/assets/javascripts/sentry_error_stack_trace/components/sentry_error_stack_trace.vue b/app/assets/javascripts/sentry_error_stack_trace/components/sentry_error_stack_trace.vue
new file mode 100644
index 00000000000..c90478db620
--- /dev/null
+++ b/app/assets/javascripts/sentry_error_stack_trace/components/sentry_error_stack_trace.vue
@@ -0,0 +1,43 @@
+<script>
+import Stacktrace from '~/error_tracking/components/stacktrace.vue';
+import { GlLoadingIcon } from '@gitlab/ui';
+import { mapActions, mapState, mapGetters } from 'vuex';
+
+export default {
+ name: 'SentryErrorStackTrace',
+ components: {
+ Stacktrace,
+ GlLoadingIcon,
+ },
+ props: {
+ issueStackTracePath: {
+ type: String,
+ required: true,
+ },
+ },
+ computed: {
+ ...mapState('details', ['loadingStacktrace', 'stacktraceData']),
+ ...mapGetters('details', ['stacktrace']),
+ },
+ mounted() {
+ this.startPollingStacktrace(this.issueStackTracePath);
+ },
+ methods: {
+ ...mapActions('details', ['startPollingStacktrace']),
+ },
+};
+</script>
+
+<template>
+ <div>
+ <div :class="{ 'border-bottom-0': loadingStacktrace }" class="card card-slim mt-4 mb-0">
+ <div class="card-header border-bottom-0">
+ <h5 class="card-title my-1">{{ __('Stack trace') }}</h5>
+ </div>
+ </div>
+ <div v-if="loadingStacktrace" class="card">
+ <gl-loading-icon class="py-2" label="Fetching stack trace" :size="1" />
+ </div>
+ <stacktrace v-else :entries="stacktrace" />
+ </div>
+</template>
diff --git a/app/assets/javascripts/sentry_error_stack_trace/index.js b/app/assets/javascripts/sentry_error_stack_trace/index.js
new file mode 100644
index 00000000000..9b24ddc335d
--- /dev/null
+++ b/app/assets/javascripts/sentry_error_stack_trace/index.js
@@ -0,0 +1,22 @@
+import Vue from 'vue';
+import SentryErrorStackTrace from './components/sentry_error_stack_trace.vue';
+import store from '~/error_tracking/store';
+
+export default function initSentryErrorStacktrace() {
+ const sentryErrorStackTraceEl = document.querySelector('#js-sentry-error-stack-trace');
+ if (sentryErrorStackTraceEl) {
+ const { issueStackTracePath } = sentryErrorStackTraceEl.dataset;
+ // eslint-disable-next-line no-new
+ new Vue({
+ el: sentryErrorStackTraceEl,
+ components: {
+ SentryErrorStackTrace,
+ },
+ store,
+ render: createElement =>
+ createElement('sentry-error-stack-trace', {
+ props: { issueStackTracePath },
+ }),
+ });
+ }
+}