1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
import { useVersion } from '@/hooks/use-version'
export function VersionPage() {
const [isLoading, versions, error] = useVersion()
const { version, modules, subsystems, builds } = versions
return (
<div className="p-6">
<h1 className="text-2xl font-bold mb-4">Version Information</h1>
{isLoading ? (
<div className="flex items-center justify-center py-8">
<div className="text-muted-foreground">Loading version information...</div>
</div>
) : error ? (
<div className="bg-destructive/10 text-destructive p-4 rounded-lg">
Error loading version information: {error}
</div>
) : (
<div className="space-y-6">
<div className="rounded-lg border border-border bg-gradient-to-br from-primary/5 to-primary/10 p-6">
<div className="flex items-center justify-between">
<div>
<h3 className="text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-2">
ReifyDB Version
</h3>
<div className="flex items-baseline gap-3">
<span className="text-3xl font-bold text-primary">
{version}
</span>
</div>
</div>
</div>
</div>
{modules.length > 0 && (
<div className="rounded-lg border border-border overflow-hidden">
<div className="px-6 py-4 bg-muted/30 border-b border-border">
<h2 className="text-lg font-semibold">Modules</h2>
</div>
<div className="overflow-x-auto">
<table className="w-full table-fixed">
<colgroup>
<col className="w-[25%]"/>
<col className="w-[20%]"/>
<col className="w-[55%]"/>
</colgroup>
<thead>
<tr className="border-b border-border bg-muted/20">
<th className="text-left px-6 py-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground">Name</th>
<th className="text-left px-6 py-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground">Version</th>
<th className="text-left px-6 py-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground">Description</th>
</tr>
</thead>
<tbody className="divide-y divide-border">
{modules.map((row, index) => (
<tr key={index} className="hover:bg-muted/10 transition-colors">
<td className="px-6 py-4">
<span className="font-medium text-sm">{row.name}</span>
</td>
<td className="px-6 py-4">
<span className="inline-flex items-center px-2.5 py-0.5 rounded-md bg-primary/10 text-primary font-mono text-xs font-medium">
{row.version}
</span>
</td>
<td className="px-6 py-4 text-sm text-muted-foreground">
{row.description}
</td>
</tr>
))}
</tbody>
</table>
</div>
</div>
)}
{subsystems.length > 0 && (
<div className="rounded-lg border border-border overflow-hidden">
<div className="px-6 py-4 bg-muted/30 border-b border-border">
<h2 className="text-lg font-semibold">Subsystems</h2>
</div>
<div className="overflow-x-auto">
<table className="w-full table-fixed">
<colgroup>
<col className="w-[25%]"/>
<col className="w-[20%]"/>
<col className="w-[55%]"/>
</colgroup>
<thead>
<tr className="border-b border-border bg-muted/20">
<th className="text-left px-6 py-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground">Name</th>
<th className="text-left px-6 py-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground">Version</th>
<th className="text-left px-6 py-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground">Description</th>
</tr>
</thead>
<tbody className="divide-y divide-border">
{subsystems.map((row, index) => (
<tr key={index} className="hover:bg-muted/10 transition-colors">
<td className="px-6 py-4">
<span className="font-medium text-sm">{row.name}</span>
</td>
<td className="px-6 py-4">
<span className="inline-flex items-center px-2.5 py-0.5 rounded-md bg-primary/10 text-primary font-mono text-xs font-medium">
{row.version}
</span>
</td>
<td className="px-6 py-4 text-sm text-muted-foreground">
{row.description}
</td>
</tr>
))}
</tbody>
</table>
</div>
</div>
)}
{builds.length > 0 && (
<div className="rounded-lg border border-border overflow-hidden">
<div className="px-6 py-4 bg-muted/30 border-b border-border">
<h2 className="text-lg font-semibold">Build Information</h2>
</div>
<div className="overflow-x-auto">
<table className="w-full table-fixed">
<colgroup>
<col className="w-[25%]"/>
<col className="w-[20%]"/>
<col className="w-[55%]"/>
</colgroup>
<thead>
<tr className="border-b border-border bg-muted/20">
<th className="text-left px-6 py-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground">Component</th>
<th className="text-left px-6 py-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground">Version</th>
<th className="text-left px-6 py-4 text-xs font-semibold uppercase tracking-wider text-muted-foreground">Description</th>
</tr>
</thead>
<tbody className="divide-y divide-border">
{builds.map((row, index) => (
<tr key={index} className="hover:bg-muted/10 transition-colors">
<td className="px-6 py-4">
<span className="font-medium text-sm">{row.name}</span>
</td>
<td className="px-6 py-4">
<span className="inline-flex items-center px-2.5 py-0.5 rounded-md bg-slate-100 dark:bg-slate-800 text-slate-700 dark:text-slate-300 font-mono text-xs font-medium">
{row.version}
</span>
</td>
<td className="px-6 py-4 text-sm text-muted-foreground">
{row.description}
</td>
</tr>
))}
</tbody>
</table>
</div>
</div>
)}
</div>
)}
</div>
)
}