mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-12-02 17:13:33 +01:00
The admin Errors page now shows one list of issues: records grouped by error code (or exception type), service and route, each with a plain-language title, a likely cause, its impact (failures, repositories, users), a trend and when it was last seen. Expected 4xx answers sit in a collapsed group; slow and interrupted requests are left out and counted, with a link to Performance. - GET /api/admin/errors/issues groups server-side (admin-error-issues.ts). It reads central logs when they answer and the Redis history otherwise, accepts validated repoId/userId/service/window filters and resolves repository owners and user names when the database is connected. - The cause is derived from external_request records of the same requests (#990 field names), fast 429s, storage and network codes, and the first application stack frame; otherwise it says nothing is known. - Issue page (?issue=) with cause, affected repositories and owners, who hit it, failures over time and occurrences. Request view (&occurrence=) with a waterfall from the existing correlation lookup and Request, Exception and All fields tabs; missing data shows as "not recorded". - Repositories (search = one repoId) and user admin pages list their issues, with a "failing now" banner. - The source switch, export, clear history, telemetry and 24-hour counters move to a collapsed "Settings and diagnostics" section. - Synthetic fixtures shared by dev-mock and preview-errors; old errors-page CSS removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
26 lines
2.7 KiB
HTML
26 lines
2.7 KiB
HTML
<section class="errs-entity" aria-labelledby="errs-entity-title" :aria-busy="entityErrors.loading ? 'true' : 'false'" v-if="entityErrors.key">
|
|
<div class="errs-entity-banner" role="status" v-if="entityFailingNow().length">
|
|
<span class="errs-now">Failing now</span>
|
|
<span>{{ errPlural(entityFailingNow().reduce((sum, issue) => sum + issue.count, 0), 'failure') }} in the last 24 h, the latest {{ errRelTime(entityFailingNow()[0].last) }}: <a :href="errIssueHref(entityFailingNow()[0].id)">{{ entityFailingNow()[0].title }}</a><template v-if="entityFailingNow().length > 1"> and {{ entityFailingNow().length - 1 }} more</template>.</span>
|
|
</div>
|
|
<div class="errs-card-head"><h2 id="errs-entity-title">Errors <span class="errs-count" v-if="entityIssues().length">{{ entityIssues().length }}</span></h2></div>
|
|
<p class="errs-muted" role="status" v-if="entityErrors.loading">Loading errors…</p>
|
|
<p class="errs-muted" role="status" v-else-if="entityErrors.failed">Could not load errors. <button type="button" class="errs-link-button" @click="loadEntityErrors(true)">Retry</button></p>
|
|
<template v-else-if="entityErrors.data">
|
|
<ul class="errs-entity-list" v-if="entityIssues().length || entityExpected().length">
|
|
<li v-for="issue in entityIssues()" :key="issue.id">
|
|
<span class="errs-entity-main"><a :href="errIssueHref(issue.id)">{{ issue.title }}</a><span class="errs-muted"><code>{{ issue.code }}</code><template v-if="issue.route"> · {{ issue.method }} {{ issue.route }}</template><template v-else-if="issue.queue"> · job {{ issue.queue }}</template></span></span>
|
|
<span class="errs-entity-count">{{ errNumber(issue.count) }}</span>
|
|
<time :datetime="issue.last" :title="errDayTime(issue.last)">{{ issue.failingNow ? 'now' : errRelTime(issue.last) }}</time>
|
|
</li>
|
|
<li v-for="entry in entityExpected().slice(0, 5)" :key="'x' + entry.code + entry.status" class="is-expected">
|
|
<span class="errs-entity-main"><span><code>{{ entry.code }}</code> <span class="errs-tag">expected</span></span><span class="errs-muted">HTTP {{ entry.status || '—' }}</span></span>
|
|
<span class="errs-entity-count">{{ errNumber(entry.count) }}</span>
|
|
<time :datetime="entry.last">{{ errRelTime(entry.last) }}</time>
|
|
</li>
|
|
</ul>
|
|
<p class="errs-muted" v-else>No errors recorded in the last 24 h.</p>
|
|
<p class="errs-muted errs-entity-source">{{ entityErrors.data.source === 'central' ? 'From central logs' : 'From application history' }} · last 24 h · <a :href="'/admin/errors?q=' + (entityErrors.data.filters?.repoId ? 'repo:' + entityErrors.data.filters.repoId : 'user:' + (entityErrors.data.filters?.userId || ''))">Open in Errors</a></p>
|
|
</template>
|
|
</section>
|