main
ts 72 lines 1.31 KB
Raw
1 export type DashboardPanelType = "stat" | "pie" | "bar_h" | "histogram"
2
3 export interface DashboardPanel {
4 id: string
5 title: string
6 type: DashboardPanelType
7 w: number
8 h: number
9 lucene: string
10 field?: string
11 size?: number
12 }
13
14 export interface DashboardTemplate {
15 id: string
16 title: string
17 description: string
18 panels: DashboardPanel[]
19 }
20
21 export interface DashboardCategory {
22 id: string
23 title: string
24 description: string
25 vendor: string
26 product: string
27 event_type: string
28 tags: string[]
29 color: string
30 icon: string
31 }
32
33 export interface DashboardCategoryWithTemplates extends DashboardCategory {
34 templates: DashboardTemplate[]
35 }
36
37 export interface EnabledDashboard {
38 id: number
39 customer_code: string
40 event_source_id: number
41 library_card: string
42 template_id: string
43 display_name: string
44 created_at: string
45 }
46
47 export interface EnableDashboardPayload {
48 customer_code: string
49 event_source_id: number
50 library_card: string
51 template_id: string
52 display_name: string
53 }
54
55 export interface PanelResult {
56 type: string
57 value: number | null
58 labels: string[]
59 data: number[]
60 error: string | null
61 }
62
63 export interface PanelDataResponse {
64 panels: Record<string, PanelResult>
65 template: DashboardTemplate
66 dashboard_id: number
67 customer_code: string
68 source_name: string
69 accent_color: string
70 success: boolean
71 message: string
72 }