feat(db): enhance PostgreSQL statistics monitoring and error handling
CI / changes (push) Successful in 8s
CI / commitlint (push) Has been skipped
CI / openapi (push) Has been skipped
CI / web (push) Successful in 30s
CI / go (push) Failing after 24s
CI / bird2 (push) Has been skipped
CI / release (push) Has been skipped
CI / changes (push) Successful in 8s
CI / commitlint (push) Has been skipped
CI / openapi (push) Has been skipped
CI / web (push) Successful in 30s
CI / go (push) Failing after 24s
CI / bird2 (push) Has been skipped
CI / release (push) Has been skipped
Updated the PostgreSQL monitoring service to improve handling of `pg_stat_statements` availability. Introduced a new method to check if the extension is queryable and updated the response structure to include availability status and hints. Enhanced the documentation to clarify the requirements for enabling `pg_stat_statements`. Adjusted related components to reflect these changes, ensuring better user feedback in the monitoring interface.
This commit is contained in:
@@ -281,12 +281,18 @@
|
||||
<CardTitle>Медленные запросы</CardTitle>
|
||||
<CardDescription>
|
||||
Источник: {queries?.source ?? '—'}
|
||||
{#if overview && !overview.pg_stat_statements_enabled}
|
||||
· pg_stat_statements не включён
|
||||
{#if queries?.statements_available === false || (overview && !overview.pg_stat_statements_enabled)}
|
||||
· pg_stat_statements недоступен
|
||||
{/if}
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
{#if queries?.statements_hint}
|
||||
<Alert class="mb-4">
|
||||
<AlertTitle>Нет статистики запросов</AlertTitle>
|
||||
<AlertDescription>{queries.statements_hint}</AlertDescription>
|
||||
</Alert>
|
||||
{/if}
|
||||
<Table>
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
|
||||
@@ -48,6 +48,8 @@ export type PostgresQueriesResponse = {
|
||||
collected_at: string;
|
||||
source: string;
|
||||
items: PostgresQueryRow[];
|
||||
statements_available?: boolean;
|
||||
statements_hint?: string;
|
||||
};
|
||||
|
||||
export type PostgresLockRow = {
|
||||
|
||||
Reference in New Issue
Block a user