mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
fix: healthcheck system
This commit is contained in:
@@ -68,6 +68,7 @@ export async function handleDatabases(body: Body, agent: Agent, lastContact: Dat
|
||||
dbms: db.dbms as EDbmsSchema,
|
||||
agentDatabaseId: db.generatedId,
|
||||
lastContact: db.pingStatus ? lastContact : null,
|
||||
healthErrorCount: null
|
||||
})
|
||||
.returning();
|
||||
|
||||
@@ -97,6 +98,7 @@ export async function handleDatabases(body: Body, agent: Agent, lastContact: Dat
|
||||
name: db.name,
|
||||
agentId: agent.id,
|
||||
lastContact: db.pingStatus ? lastContact : existingDatabase.lastContact,
|
||||
healthErrorCount: db.pingStatus ? null : existingDatabase.healthErrorCount,
|
||||
}))
|
||||
.where(eq(drizzleDb.schemas.database.id, existingDatabase.id))
|
||||
.returning();
|
||||
|
||||
@@ -8,6 +8,7 @@ import {ConnectionIndicator} from "@/components/wrappers/common/connection-indic
|
||||
import {formatDateLastContact} from "@/utils/date-formatting";
|
||||
import {Database} from "@/db/schema/07_database";
|
||||
import {ChevronRight, Activity, Fingerprint, Copy, Check} from "lucide-react";
|
||||
import {Badge} from "@/components/ui/badge";
|
||||
|
||||
export type projectDatabaseCardProps = {
|
||||
data: Database;
|
||||
|
||||
Reference in New Issue
Block a user