diff options
Diffstat (limited to 'app/assets/javascripts/error_tracking')
3 files changed, 56 insertions, 50 deletions
diff --git a/app/assets/javascripts/error_tracking/components/error_details.vue b/app/assets/javascripts/error_tracking/components/error_details.vue index 1e8f5a26125..52444d2c493 100644 --- a/app/assets/javascripts/error_tracking/components/error_details.vue +++ b/app/assets/javascripts/error_tracking/components/error_details.vue @@ -2,7 +2,7 @@ import { mapActions, mapGetters, mapState } from 'vuex'; import createFlash from '~/flash'; import { - GlDeprecatedButton, + GlButton, GlFormInput, GlLink, GlLoadingIcon, @@ -33,7 +33,7 @@ const SENTRY_TIMEOUT = 10000; export default { components: { - GlDeprecatedButton, + GlButton, GlFormInput, GlLink, GlLoadingIcon, @@ -106,6 +106,7 @@ export default { errorPollTimeout: 0, issueCreationInProgress: false, isAlertVisible: false, + isStacktraceEmptyAlertVisible: true, closedIssueId: null, }; }, @@ -119,10 +120,10 @@ export default { ]), ...mapGetters('details', ['stacktrace']), firstReleaseLink() { - return `${this.error.externalBaseUrl}/releases/${this.error.firstReleaseShortVersion}`; + return `${this.error.externalBaseUrl}/releases/${this.error.firstReleaseVersion}`; }, lastReleaseLink() { - return `${this.error.externalBaseUrl}/releases/${this.error.lastReleaseShortVersion}`; + return `${this.error.externalBaseUrl}/releases/${this.error.lastReleaseVersion}`; }, showStacktrace() { return Boolean(this.stacktrace?.length); @@ -167,6 +168,9 @@ export default { resolveBtnLabel() { return this.errorStatus !== errorStatus.RESOLVED ? __('Resolve') : __('Unresolve'); }, + showEmptyStacktraceAlert() { + return !this.loadingStacktrace && !this.showStacktrace && this.isStacktraceEmptyAlertVisible; + }, }, watch: { error(val) { @@ -254,6 +258,10 @@ export default { </gl-sprintf> </gl-alert> + <gl-alert v-if="showEmptyStacktraceAlert" @dismiss="isStacktraceEmptyAlertVisible = false"> + {{ __('No stack trace for this error') }} + </gl-alert> + <div class="error-details-header d-flex py-2 justify-content-between"> <div v-if="!loadingStacktrace && stacktrace" @@ -271,22 +279,24 @@ export default { </div> <div class="error-details-actions"> <div class="d-inline-flex bv-d-sm-down-none"> - <gl-deprecated-button + <gl-button :loading="updatingIgnoreStatus" data-testid="update-ignore-status-btn" @click="onIgnoreStatusUpdate" > {{ ignoreBtnLabel }} - </gl-deprecated-button> - <gl-deprecated-button - class="btn-outline-info ml-2" + </gl-button> + <gl-button + class="ml-2" + category="secondary" + variant="info" :loading="updatingResolveStatus" data-testid="update-resolve-status-btn" @click="onResolveStatusUpdate" > {{ resolveBtnLabel }} - </gl-deprecated-button> - <gl-deprecated-button + </gl-button> + <gl-button v-if="error.gitlabIssuePath" class="ml-2" data-testid="view_issue_button" @@ -294,7 +304,7 @@ export default { variant="success" > {{ __('View issue') }} - </gl-deprecated-button> + </gl-button> <form ref="sentryIssueForm" :action="projectIssuesPath" @@ -309,15 +319,16 @@ export default { name="issue[sentry_issue_attributes][sentry_issue_identifier]" /> <gl-form-input :value="csrfToken" class="hidden" name="authenticity_token" /> - <gl-deprecated-button + <gl-button v-if="!error.gitlabIssuePath" - class="btn-success" + category="primary" + variant="success" :loading="issueCreationInProgress" data-qa-selector="create_issue_button" @click="createIssue" > {{ __('Create issue') }} - </gl-deprecated-button> + </gl-button> </form> </div> <gl-dropdown @@ -389,18 +400,18 @@ export default { <icon name="external-link" class="ml-1 flex-shrink-0" /> </gl-link> </li> - <li v-if="error.firstReleaseShortVersion"> + <li v-if="error.firstReleaseVersion"> <strong class="bold">{{ __('First seen') }}:</strong> <time-ago-tooltip :time="error.firstSeen" /> <gl-link :href="firstReleaseLink" target="_blank"> - <span>{{ __('Release') }}: {{ error.firstReleaseShortVersion.substr(0, 10) }}</span> + <span>{{ __('Release') }}: {{ error.firstReleaseVersion }}</span> </gl-link> </li> - <li v-if="error.lastReleaseShortVersion"> + <li v-if="error.lastReleaseVersion"> <strong class="bold">{{ __('Last seen') }}:</strong> <time-ago-tooltip :time="error.lastSeen" /> <gl-link :href="lastReleaseLink" target="_blank"> - <span>{{ __('Release') }}: {{ error.lastReleaseShortVersion.substr(0, 10) }}</span> + <span>{{ __('Release') }}: {{ error.lastReleaseVersion }}</span> </gl-link> </li> <li> diff --git a/app/assets/javascripts/error_tracking/components/stacktrace_entry.vue b/app/assets/javascripts/error_tracking/components/stacktrace_entry.vue index d806c6934a3..c22f34b5a8d 100644 --- a/app/assets/javascripts/error_tracking/components/stacktrace_entry.vue +++ b/app/assets/javascripts/error_tracking/components/stacktrace_entry.vue @@ -80,14 +80,9 @@ export default { <div ref="header" class="file-title file-title-flex-parent"> <div class="file-header-content d-flex align-content-center"> <div v-if="hasCode" class="d-inline-block cursor-pointer" @click="toggle()"> - <icon :name="collapseIcon" :size="16" aria-hidden="true" class="append-right-5" /> + <icon :name="collapseIcon" :size="16" aria-hidden="true" class="gl-mr-2" /> </div> - <file-icon - :file-name="filePath" - :size="18" - aria-hidden="true" - css-classes="append-right-5" - /> + <file-icon :file-name="filePath" :size="18" aria-hidden="true" css-classes="gl-mr-2" /> <strong v-gl-tooltip :title="filePath" diff --git a/app/assets/javascripts/error_tracking/queries/details.query.graphql b/app/assets/javascripts/error_tracking/queries/details.query.graphql index fa579c94257..593cbf2ae52 100644 --- a/app/assets/javascripts/error_tracking/queries/details.query.graphql +++ b/app/assets/javascripts/error_tracking/queries/details.query.graphql @@ -1,29 +1,29 @@ query errorDetails($fullPath: ID!, $errorId: ID!) { - project(fullPath: $fullPath) { - sentryErrors { - detailedError(id: $errorId) { - id - sentryId - title - userCount - count - status - firstSeen - lastSeen - message - culprit - tags { - level - logger - } - externalUrl - externalBaseUrl - firstReleaseShortVersion - lastReleaseShortVersion - gitlabCommit - gitlabCommitPath - gitlabIssuePath - } + project(fullPath: $fullPath) { + sentryErrors { + detailedError(id: $errorId) { + id + sentryId + title + userCount + count + status + firstSeen + lastSeen + message + culprit + tags { + level + logger } + externalUrl + externalBaseUrl + firstReleaseVersion + lastReleaseVersion + gitlabCommit + gitlabCommitPath + gitlabIssuePath + } } + } } |