|
|
<script>
|
|
<script>
|
|
|
import { mapActions, mapGetters, mapState } from 'vuex';
|
|
import { mapActions, mapGetters, mapState } from 'vuex';
|
|
|
import dateFormat from 'dateformat';
|
|
import dateFormat from 'dateformat';
|
|
|
import { GlFormInput, GlLink, GlLoadingIcon } from '@gitlab/ui';
|
|
import { GlFormInput, GlLink, GlLoadingIcon, GlSprintf } from '@gitlab/ui';
|
|
|
import { __, sprintf, n__ } from '~/locale';
|
|
import { __, sprintf, n__ } from '~/locale';
|
|
|
import LoadingButton from '~/vue_shared/components/loading_button.vue';
|
|
import LoadingButton from '~/vue_shared/components/loading_button.vue';
|
|
|
import Icon from '~/vue_shared/components/icon.vue';
|
|
import Icon from '~/vue_shared/components/icon.vue';
|
| ... | @@ -17,6 +17,7 @@ export default { |
... | @@ -17,6 +17,7 @@ export default { |
|
|
GlFormInput,
|
|
GlFormInput,
|
|
|
GlLink,
|
|
GlLink,
|
|
|
GlLoadingIcon,
|
|
GlLoadingIcon,
|
|
|
|
GlSprintf,
|
|
|
TooltipOnTruncate,
|
|
TooltipOnTruncate,
|
|
|
Icon,
|
|
Icon,
|
|
|
Stacktrace,
|
|
Stacktrace,
|
| ... | @@ -51,16 +52,6 @@ export default { |
... | @@ -51,16 +52,6 @@ export default { |
|
|
computed: {
|
|
computed: {
|
|
|
...mapState('details', ['error', 'loading', 'loadingStacktrace', 'stacktraceData']),
|
|
...mapState('details', ['error', 'loading', 'loadingStacktrace', 'stacktraceData']),
|
|
|
...mapGetters('details', ['stacktrace']),
|
|
...mapGetters('details', ['stacktrace']),
|
|
|
reported() {
|
|
|
|
|
return sprintf(
|
|
|
|
|
__('Reported %{timeAgo} by %{reportedBy}'),
|
|
|
|
|
{
|
|
|
|
|
reportedBy: `<strong>${this.error.culprit}</strong>`,
|
|
|
|
|
timeAgo: this.timeFormatted(this.stacktraceData.date_received),
|
|
|
|
|
},
|
|
|
|
|
false,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
firstReleaseLink() {
|
|
firstReleaseLink() {
|
|
|
return `${this.error.external_base_url}/releases/${this.error.first_release_short_version}`;
|
|
return `${this.error.external_base_url}/releases/${this.error.first_release_short_version}`;
|
|
|
},
|
|
},
|
| ... | @@ -120,7 +111,16 @@ export default { |
... | @@ -120,7 +111,16 @@ export default { |
|
|
</div>
|
|
</div>
|
|
|
<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>
|
|
<div v-if="!loadingStacktrace && stacktrace" data-qa-selector="reported_text">
|
|
|
|
<gl-sprintf :message="__('Reported %{timeAgo} by %{reportedBy}')">
|
|
|
|
<template #reportedBy>
|
|
|
|
<strong>{{ error.culprit }}</strong>
|
|
|
|
</template>
|
|
|
|
<template #timeAgo>
|
|
|
|
{{ timeFormatted(stacktraceData.date_received) }}
|
|
|
|
</template>
|
|
|
|
</gl-sprintf>
|
|
|
|
</div>
|
|
|
<form ref="sentryIssueForm" :action="projectIssuesPath" method="POST">
|
|
<form ref="sentryIssueForm" :action="projectIssuesPath" method="POST">
|
|
|
<gl-form-input class="hidden" name="issue[title]" :value="issueTitle" />
|
|
<gl-form-input class="hidden" name="issue[title]" :value="issueTitle" />
|
|
|
<input name="issue[description]" :value="issueDescription" type="hidden" />
|
|
<input name="issue[description]" :value="issueDescription" type="hidden" />
|
| ... | |
... | |
| ... | | ... | |