diff --git a/src/components/tickets/TicketList.tsx b/src/components/tickets/TicketList.tsx
index 27e0c3f..1ad516a 100644
--- a/src/components/tickets/TicketList.tsx
+++ b/src/components/tickets/TicketList.tsx
@@ -86,6 +86,9 @@ export default function TicketList() {
#{ticket.artifact_id}
+
+ {ticket.source}
+
{ticket.artifact_title}
diff --git a/src/lib/api.ts b/src/lib/api.ts
index 0456473..f4e5de7 100644
--- a/src/lib/api.ts
+++ b/src/lib/api.ts
@@ -18,6 +18,9 @@ import type {
LiveMessage,
LiveAgentExchange,
AgentTask,
+ GraylogCredentialsSafe,
+ GraylogSubject,
+ GraylogDetection,
} from "./types";
export async function createProject(
@@ -107,6 +110,60 @@ export async function testTuleapConnection(projectId: string | null): Promise {
+ return invoke("set_graylog_credentials", {
+ projectId,
+ baseUrl,
+ apiToken,
+ analystAgentId,
+ developerAgentId,
+ streamId,
+ queryFilter,
+ pollingIntervalMinutes,
+ lookbackMinutes,
+ scoreThreshold,
+ });
+}
+
+export async function getGraylogCredentials(projectId: string): Promise {
+ return invoke("get_graylog_credentials", { projectId });
+}
+
+export async function deleteGraylogCredentials(projectId: string): Promise {
+ return invoke("delete_graylog_credentials", { projectId });
+}
+
+export async function testGraylogConnection(projectId: string): Promise {
+ return invoke("test_graylog_connection", { projectId });
+}
+
+export async function manualGraylogPoll(projectId: string): Promise {
+ return invoke("manual_graylog_poll", { projectId });
+}
+
+export async function listGraylogSubjects(projectId: string): Promise {
+ return invoke("list_graylog_subjects", { projectId });
+}
+
+export async function listGraylogDetections(
+ projectId: string,
+ subjectId?: string
+): Promise {
+ return invoke("list_graylog_detections", { projectId, subjectId });
+}
+
// Trackers
export async function addTracker(
projectId: string,
diff --git a/src/lib/types.ts b/src/lib/types.ts
index b41a923..f39fa10 100644
--- a/src/lib/types.ts
+++ b/src/lib/types.ts
@@ -67,7 +67,10 @@ export interface WatchedTracker {
export interface ProcessedTicket {
id: string;
- tracker_id: string;
+ tracker_id: string | null;
+ project_id: string;
+ source: string;
+ source_ref: string | null;
artifact_id: number;
artifact_title: string;
artifact_data: string;
@@ -80,6 +83,52 @@ export interface ProcessedTicket {
processed_at: string | null;
}
+export interface GraylogCredentialsSafe {
+ id: string;
+ project_id: string;
+ base_url: string;
+ analyst_agent_id: string;
+ developer_agent_id: string;
+ stream_id: string | null;
+ query_filter: string;
+ polling_interval_minutes: number;
+ lookback_minutes: number;
+ score_threshold: number;
+ created_at: string;
+ updated_at: string;
+}
+
+export interface GraylogSubject {
+ id: string;
+ project_id: string;
+ subject_key: string;
+ source: string;
+ normalized_message: string;
+ first_seen_at: string;
+ last_seen_at: string;
+ last_score: number;
+ active_ticket_id: string | null;
+ status: string;
+ created_at: string;
+ updated_at: string;
+}
+
+export interface GraylogDetection {
+ id: string;
+ subject_id: string;
+ window_start: string;
+ window_end: string;
+ critical_count: number;
+ error_count: number;
+ warning_count: number;
+ total_count: number;
+ last_seen_at: string;
+ score: number;
+ triggered: boolean;
+ triggered_ticket_id: string | null;
+ created_at: string;
+}
+
export interface ProjectThroughputStats {
backlog_count: number;
done_last_24h: number;