| ... | @@ -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">
|
| ... | |
... | |
| ... | | ... | |