solid_cache_dashboard 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,9 +9,14 @@
9
9
  <% end %>
10
10
  </div>
11
11
 
12
- <div class="bg-white dark:bg-gray-800 shadow-sm overflow-hidden rounded-lg mb-6">
12
+ <div class="bg-white dark:bg-background shadow-sm overflow-hidden rounded-lg mb-6">
13
13
  <div class="px-4 py-5 sm:px-6 flex justify-between items-center">
14
- <h3 class="text-lg leading-6 font-medium text-gray-900 dark:text-white">Cache Entry Details</h3>
14
+ <div class="flex items-center">
15
+ <h3 class="text-lg leading-6 font-medium text-zinc-900 dark:text-white">Cache Entry Details</h3>
16
+ <div class="ml-3">
17
+ <%= @cache_entry.status_badge %>
18
+ </div>
19
+ </div>
15
20
  <div>
16
21
  <%= button_to delete_cache_entry_path(@cache_entry.key_hash), method: :delete, class: "inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500", data: { confirm: "Are you sure you want to delete this cache entry? This cannot be undone." } do %>
17
22
  <svg class="-ml-1 mr-2 h-5 w-5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
@@ -21,80 +26,208 @@
21
26
  <% end %>
22
27
  </div>
23
28
  </div>
24
- <div class="border-t border-gray-200 dark:border-gray-700">
29
+ <div class="border-t border-zinc-200 dark:border-zinc-700">
25
30
  <dl>
26
- <div class="bg-gray-50 dark:bg-gray-900 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
27
- <dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Key</dt>
28
- <dd class="mt-1 text-sm text-gray-900 dark:text-white sm:mt-0 sm:col-span-2 break-all">
31
+ <!-- Basic Information -->
32
+ <div class="bg-zinc-50 dark:bg-card px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
33
+ <dt class="text-sm font-medium text-zinc-500 dark:text-zinc-400">Key</dt>
34
+ <dd class="mt-1 text-sm text-zinc-900 dark:text-white sm:mt-0 sm:col-span-2 break-all">
29
35
  <%= @cache_entry.key %>
30
36
  </dd>
31
37
  </div>
32
- <div class="bg-white dark:bg-gray-800 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
33
- <dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Key Hash</dt>
34
- <dd class="mt-1 text-sm text-gray-900 dark:text-white sm:mt-0 sm:col-span-2">
38
+ <div class="bg-white dark:bg-background px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
39
+ <dt class="text-sm font-medium text-zinc-500 dark:text-zinc-400">Key Hash</dt>
40
+ <dd class="mt-1 text-sm text-zinc-900 dark:text-white sm:mt-0 sm:col-span-2">
35
41
  <%= @cache_entry.key_hash %>
36
42
  </dd>
37
43
  </div>
38
- <div class="bg-gray-50 dark:bg-gray-900 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
39
- <dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Size</dt>
40
- <dd class="mt-1 text-sm text-gray-900 dark:text-white sm:mt-0 sm:col-span-2">
41
- <%= @cache_entry.human_byte_size %> (<%= @cache_entry.byte_size %> bytes)
44
+ <div class="bg-zinc-50 dark:bg-card px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
45
+ <dt class="text-sm font-medium text-zinc-500 dark:text-zinc-400">Created At</dt>
46
+ <dd class="mt-1 text-sm text-zinc-900 dark:text-white sm:mt-0 sm:col-span-2">
47
+ <%= @cache_entry.created_at.to_fs(:long) %> (<%= @cache_entry.created_at_ago %>)
42
48
  </dd>
43
49
  </div>
44
- <div class="bg-white dark:bg-gray-800 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
45
- <dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Created At</dt>
46
- <dd class="mt-1 text-sm text-gray-900 dark:text-white sm:mt-0 sm:col-span-2">
47
- <%= @cache_entry.created_at.to_fs(:long) %> (<%= @cache_entry.created_at_ago %>)
50
+
51
+ <!-- Expiration Information -->
52
+ <div class="bg-white dark:bg-background px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
53
+ <dt class="text-sm font-medium text-zinc-500 dark:text-zinc-400">Expiration Status</dt>
54
+ <dd class="mt-1 text-sm text-zinc-900 dark:text-white sm:mt-0 sm:col-span-2">
55
+ <% if @cache_entry.expires_at %>
56
+ <div class="flex flex-col gap-2">
57
+ <% if @cache_entry.expires_at <= Time.now %>
58
+ <div class="flex items-center">
59
+ <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-amber-100 dark:bg-amber-800 text-amber-800 dark:text-amber-100 mr-2">
60
+ <svg class="mr-1 h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
61
+ <path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z" />
62
+ </svg>
63
+ Expired
64
+ </span>
65
+ </div>
66
+ <div>
67
+ <span class="font-medium">Expired at:</span> <%= @cache_entry.expires_at.to_fs(:long) %>
68
+ </div>
69
+ <div>
70
+ <span class="font-medium">Time since expiration:</span> <%= @cache_entry.time_ago_in_words(@cache_entry.expires_at, Time.now) %>
71
+ </div>
72
+ <% else %>
73
+ <div class="flex items-center">
74
+ <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 dark:bg-green-800 text-green-800 dark:text-green-100 mr-2">
75
+ <svg class="mr-1 h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
76
+ <path stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" />
77
+ </svg>
78
+ Active
79
+ </span>
80
+ </div>
81
+ <div>
82
+ <span class="font-medium">Expires at:</span> <%= @cache_entry.expires_at.to_fs(:long) %>
83
+ </div>
84
+ <div>
85
+ <span class="font-medium">Time remaining:</span> <%= @cache_entry.expires_in %>
86
+ </div>
87
+ <div>
88
+ <span class="font-medium">Total lifetime:</span>
89
+ <%= @cache_entry.total_lifetime || "Unknown" %>
90
+ </div>
91
+ <% end %>
92
+ </div>
93
+ <% else %>
94
+ <div class="flex items-center">
95
+ <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 dark:bg-blue-800 text-blue-800 dark:text-blue-100 mr-2">
96
+ <svg class="mr-1 h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
97
+ <path stroke-linecap="round" stroke-linejoin="round" d="M4.5 12.75l6 6 9-13.5" />
98
+ </svg>
99
+ Permanent
100
+ </span>
101
+ <span>No expiration (indefinite cache entry)</span>
102
+ </div>
103
+ <% end %>
48
104
  </dd>
49
105
  </div>
50
- <div class="bg-gray-50 dark:bg-gray-900 px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
51
- <dt class="text-sm font-medium text-gray-500 dark:text-gray-400">Value Type</dt>
52
- <dd class="mt-1 text-sm text-gray-900 dark:text-white sm:mt-0 sm:col-span-2">
106
+
107
+ <!-- Value Information -->
108
+ <div class="bg-zinc-50 dark:bg-card px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
109
+ <dt class="text-sm font-medium text-zinc-500 dark:text-zinc-400">Value Type</dt>
110
+ <dd class="mt-1 text-sm text-zinc-900 dark:text-white sm:mt-0 sm:col-span-2">
53
111
  <%= @cache_entry.value.class.name rescue "Unknown" %>
54
112
  </dd>
55
113
  </div>
114
+
115
+ <!-- Size Information -->
116
+ <div class="bg-white dark:bg-background px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
117
+ <dt class="text-sm font-medium text-zinc-500 dark:text-zinc-400">Total Size</dt>
118
+ <dd class="mt-1 text-sm text-zinc-900 dark:text-white sm:mt-0 sm:col-span-2">
119
+ <%= @cache_entry.human_byte_size %> (<%= @cache_entry.byte_size %> bytes)
120
+ </dd>
121
+ </div>
122
+ <div class="bg-zinc-50 dark:bg-card px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
123
+ <dt class="text-sm font-medium text-zinc-500 dark:text-zinc-400">Size Breakdown</dt>
124
+ <dd class="mt-1 text-sm text-zinc-900 dark:text-white sm:mt-0 sm:col-span-2">
125
+ <div class="flex flex-col space-y-2">
126
+ <div>
127
+ <span class="font-medium">Key Size:</span> <%= ActiveSupport::NumberHelper.number_to_human_size(@cache_entry.key_size) %> (<%= @cache_entry.key_size %> bytes)
128
+ </div>
129
+ <div>
130
+ <span class="font-medium">Value Size:</span> <%= ActiveSupport::NumberHelper.number_to_human_size(@cache_entry.value_size) %> (<%= @cache_entry.value_size %> bytes)
131
+ </div>
132
+ <div>
133
+ <span class="font-medium">Overhead:</span> <%= ActiveSupport::NumberHelper.number_to_human_size(@cache_entry.overhead_size) %> (<%= @cache_entry.overhead_size %> bytes, <%= @cache_entry.overhead_percentage %>% of total)
134
+ </div>
135
+ </div>
136
+ </dd>
137
+ </div>
138
+
139
+ <!-- Security Information -->
140
+ <div class="bg-white dark:bg-background px-4 py-5 sm:grid sm:grid-cols-3 sm:gap-4 sm:px-6">
141
+ <dt class="text-sm font-medium text-zinc-500 dark:text-zinc-400">Encryption</dt>
142
+ <dd class="mt-1 text-sm text-zinc-900 dark:text-white sm:mt-0 sm:col-span-2">
143
+ <div class="flex flex-col gap-2">
144
+ <% if @cache_entry.encrypted? %>
145
+ <div class="flex items-center">
146
+ <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 dark:bg-green-800 text-green-800 dark:text-green-100 mr-2">
147
+ <svg class="mr-1.5 h-3 w-3" fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
148
+ <path fill-rule="evenodd" d="M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z" clip-rule="evenodd" />
149
+ </svg>
150
+ Encrypted
151
+ </span>
152
+ </div>
153
+ <div>
154
+ <span class="font-medium">Configuration:</span> Using SolidCache encryption
155
+ </div>
156
+ <div>
157
+ <span class="font-medium">Encryption Overhead:</span>
158
+ <%= ActiveSupport::NumberHelper.number_to_human_size(SolidCache::Entry::ESTIMATED_ENCRYPTION_OVERHEAD) rescue "~170 bytes" %>
159
+ added to each entry
160
+ </div>
161
+ <div>
162
+ <span class="font-medium">Security Note:</span>
163
+ <span class="text-green-600 dark:text-green-400">
164
+ The cache data is encrypted at rest, providing additional security for sensitive information.
165
+ </span>
166
+ </div>
167
+ <% else %>
168
+ <div class="flex items-center">
169
+ <span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-zinc-100 dark:bg-zinc-800 text-zinc-800 dark:text-zinc-100 mr-2">
170
+ <svg class="mr-1.5 h-3 w-3" fill="currentColor" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
171
+ <path fill-rule="evenodd" d="M10 2a5 5 0 00-5 5v2a2 2 0 00-2 2v5a2 2 0 002 2h10a2 2 0 002-2v-5a2 2 0 00-2-2H7V7a3 3 0 015.905-.75 1 1 0 001.937-.5A5.002 5.002 0 0010 2z" clip-rule="evenodd" />
172
+ </svg>
173
+ Not Encrypted
174
+ </span>
175
+ </div>
176
+ <div>
177
+ <span class="font-medium">Configuration:</span> SolidCache encryption is not enabled
178
+ </div>
179
+ <div>
180
+ <span class="font-medium">Performance Note:</span>
181
+ <span class="text-blue-600 dark:text-blue-400">
182
+ No encryption overhead means faster read/write operations but data is stored in plain text.
183
+ </span>
184
+ </div>
185
+ <% end %>
186
+ </div>
187
+ </dd>
188
+ </div>
56
189
  </dl>
57
190
  </div>
58
191
  </div>
59
192
 
60
- <div class="bg-white dark:bg-gray-800 shadow-sm overflow-hidden rounded-lg">
193
+ <div class="mt-6 bg-white dark:bg-background shadow-sm overflow-hidden rounded-lg">
61
194
  <div class="px-4 py-5 sm:px-6">
62
- <h3 class="text-lg leading-6 font-medium text-gray-900 dark:text-white">Cache Value</h3>
195
+ <h3 class="text-lg leading-6 font-medium text-zinc-900 dark:text-white">Cache Value</h3>
63
196
  </div>
64
- <div class="border-t border-gray-200 dark:border-gray-700 px-4 py-5 sm:p-6">
65
- <div class="bg-gray-100 dark:bg-gray-900 rounded-md p-4 overflow-x-auto">
66
- <pre class="text-sm text-gray-800 dark:text-gray-300 whitespace-pre-wrap"><%= @cache_entry.value.inspect rescue "Unable to inspect value" %></pre>
197
+ <div class="border-t border-zinc-200 dark:border-zinc-700 px-4 py-5 sm:p-6">
198
+ <div class="bg-zinc-100 dark:bg-card rounded-md p-4 overflow-x-auto">
199
+ <pre class="text-sm text-zinc-800 dark:text-zinc-300 whitespace-pre-wrap"><%= @cache_entry.value.inspect rescue "Unable to inspect value" %></pre>
67
200
  </div>
68
201
  </div>
69
202
  </div>
70
203
 
71
204
  <% if defined?(SolidCacheDashboard::CacheEvent) %>
72
- <div class="mt-6 bg-white dark:bg-gray-800 shadow-sm overflow-hidden rounded-lg">
205
+ <div class="mt-6 bg-white dark:bg-background shadow-sm overflow-hidden rounded-lg">
73
206
  <div class="px-4 py-5 sm:px-6">
74
- <h3 class="text-lg leading-6 font-medium text-gray-900 dark:text-white">Recent Events for this Key</h3>
207
+ <h3 class="text-lg leading-6 font-medium text-zinc-900 dark:text-white">Recent Events for this Key</h3>
75
208
  </div>
76
- <div class="border-t border-gray-200 dark:border-gray-700">
209
+ <div class="border-t border-zinc-200 dark:border-zinc-700">
77
210
  <div class="overflow-x-auto">
78
- <table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
79
- <thead class="bg-gray-50 dark:bg-gray-900">
211
+ <table class="min-w-full divide-y divide-zinc-200 dark:divide-zinc-700">
212
+ <thead class="bg-zinc-50 dark:bg-card">
80
213
  <tr>
81
- <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Type</th>
82
- <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Time</th>
83
- <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Duration</th>
214
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wider">Type</th>
215
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wider">Time</th>
216
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wider">Duration</th>
84
217
  </tr>
85
218
  </thead>
86
- <tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700">
219
+ <tbody class="bg-white dark:bg-background divide-y divide-zinc-200 dark:divide-zinc-700">
87
220
  <% events = SolidCacheDashboard.decorate(SolidCacheDashboard::CacheEvent.where(key_hash: @cache_entry.key_hash).order(created_at: :desc).limit(10)) %>
88
221
  <% if events.present? %>
89
222
  <% events.each do |event| %>
90
223
  <tr>
91
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400">
224
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-zinc-500 dark:text-zinc-400">
92
225
  <%= badge event.event_type.to_s.capitalize, event.color %>
93
226
  </td>
94
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400">
227
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-zinc-500 dark:text-zinc-400">
95
228
  <%= event.created_at_ago %>
96
229
  </td>
97
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400">
230
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-zinc-500 dark:text-zinc-400">
98
231
  <% if event.duration %>
99
232
  <%= "#{event.duration.round(2)} ms" %>
100
233
  <% else %>
@@ -105,7 +238,7 @@
105
238
  <% end %>
106
239
  <% else %>
107
240
  <tr>
108
- <td colspan="3" class="px-6 py-4 text-sm text-center text-gray-500 dark:text-gray-400">
241
+ <td colspan="3" class="px-6 py-4 text-sm text-center text-zinc-500 dark:text-zinc-400">
109
242
  No events found for this key
110
243
  </td>
111
244
  </tr>
@@ -1,41 +1,41 @@
1
1
  <% content_for :page_title, "Cache Events" %>
2
2
 
3
- <div class="bg-white dark:bg-gray-800 shadow-sm overflow-hidden rounded-lg mb-6">
3
+ <div class="bg-white dark:bg-background shadow-sm overflow-hidden rounded-lg mb-6">
4
4
  <div class="px-4 py-5 sm:px-6 flex justify-between items-center">
5
- <h3 class="text-lg leading-6 font-medium text-gray-900 dark:text-white">Cache Events</h3>
5
+ <h3 class="text-lg leading-6 font-medium text-zinc-900 dark:text-white">Cache Events</h3>
6
6
  <div class="flex space-x-2">
7
7
  <div class="inline-flex rounded-md shadow-xs">
8
8
  <% ["all", "hit", "miss", "write", "delete"].each do |type| %>
9
- <%= link_to type.capitalize, cache_events_path(event_type: type), class: "relative inline-flex items-center px-3 py-2 text-sm font-medium #{params[:event_type] == type ? 'bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-white' : 'bg-white dark:bg-gray-800 text-gray-500 dark:text-gray-400 hover:bg-gray-50 dark:hover:bg-gray-700'} border border-gray-300 dark:border-gray-600" %>
9
+ <%= link_to type.capitalize, cache_events_path(event_type: type), class: "relative inline-flex items-center px-3 py-2 text-sm font-medium #{params[:event_type] == type ? 'bg-zinc-100 dark:bg-secondary text-zinc-700 dark:text-white' : 'bg-white dark:bg-background text-zinc-500 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:bg-secondary'} border border-zinc-300 dark:border-zinc-600" %>
10
10
  <% end %>
11
11
  </div>
12
12
  </div>
13
13
  </div>
14
- <div class="border-t border-gray-200 dark:border-gray-700">
14
+ <div class="border-t border-zinc-200 dark:border-zinc-700">
15
15
  <div class="overflow-x-auto">
16
- <table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
17
- <thead class="bg-gray-50 dark:bg-gray-900">
16
+ <table class="min-w-full divide-y divide-zinc-200 dark:divide-zinc-700">
17
+ <thead class="bg-zinc-50 dark:bg-card">
18
18
  <tr>
19
- <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Type</th>
20
- <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Key</th>
21
- <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Time</th>
22
- <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wider">Duration</th>
19
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wider">Type</th>
20
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wider">Key</th>
21
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wider">Time</th>
22
+ <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wider">Duration</th>
23
23
  </tr>
24
24
  </thead>
25
- <tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700">
25
+ <tbody class="bg-white dark:bg-background divide-y divide-zinc-200 dark:divide-zinc-700">
26
26
  <% if @cache_events.present? %>
27
27
  <% @cache_events.each do |event| %>
28
28
  <tr>
29
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400">
29
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-zinc-500 dark:text-zinc-400">
30
30
  <%= badge event.event_type.to_s.capitalize, event.color %>
31
31
  </td>
32
- <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900 dark:text-white truncate max-w-[400px]">
32
+ <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-zinc-900 dark:text-white truncate max-w-[400px]">
33
33
  <%= event.key_string %>
34
34
  </td>
35
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400">
35
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-zinc-500 dark:text-zinc-400">
36
36
  <%= event.created_at_ago %>
37
37
  </td>
38
- <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400">
38
+ <td class="px-6 py-4 whitespace-nowrap text-sm text-zinc-500 dark:text-zinc-400">
39
39
  <% if event.duration %>
40
40
  <%= "#{event.duration.round(2)} ms" %>
41
41
  <% else %>
@@ -46,7 +46,7 @@
46
46
  <% end %>
47
47
  <% else %>
48
48
  <tr>
49
- <td colspan="4" class="px-6 py-4 text-sm text-center text-gray-500 dark:text-gray-400">
49
+ <td colspan="4" class="px-6 py-4 text-sm text-center text-zinc-500 dark:text-zinc-400">
50
50
  No cache events found
51
51
  </td>
52
52
  </tr>
@@ -54,12 +54,18 @@
54
54
  </tbody>
55
55
  </table>
56
56
  </div>
57
+
58
+ <%= render partial: 'solid_cache_dashboard/application/pagination', locals: {
59
+ pagy: @pagy,
60
+ item_name: "event",
61
+ path_for_page: -> (page) { cache_events_path(page: page, event_type: params[:event_type]) }
62
+ } %>
57
63
  </div>
58
64
  </div>
59
65
 
60
66
  <div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-6">
61
67
  <!-- Hit Count -->
62
- <div class="bg-white dark:bg-gray-800 overflow-hidden shadow-sm rounded-lg">
68
+ <div class="bg-white dark:bg-card overflow-hidden shadow-sm rounded-lg">
63
69
  <div class="px-4 py-5 sm:p-6">
64
70
  <div class="flex items-center">
65
71
  <div class="shrink-0 bg-green-100 dark:bg-green-700 rounded-md p-3">
@@ -68,11 +74,11 @@
68
74
  </svg>
69
75
  </div>
70
76
  <div class="ml-5 w-0 flex-1">
71
- <dt class="text-sm font-medium text-gray-500 dark:text-gray-400 truncate">
77
+ <dt class="text-sm font-medium text-zinc-500 dark:text-zinc-400 truncate">
72
78
  Cache Hits
73
79
  </dt>
74
80
  <dd class="flex items-baseline">
75
- <div class="text-2xl font-semibold text-gray-900 dark:text-white">
81
+ <div class="text-2xl font-semibold text-zinc-900 dark:text-white">
76
82
  <%= SolidCacheDashboard::CacheEvent.hits.count %>
77
83
  </div>
78
84
  </dd>
@@ -82,7 +88,7 @@
82
88
  </div>
83
89
 
84
90
  <!-- Miss Count -->
85
- <div class="bg-white dark:bg-gray-800 overflow-hidden shadow-sm rounded-lg">
91
+ <div class="bg-white dark:bg-card overflow-hidden shadow-sm rounded-lg">
86
92
  <div class="px-4 py-5 sm:p-6">
87
93
  <div class="flex items-center">
88
94
  <div class="shrink-0 bg-amber-100 dark:bg-amber-700 rounded-md p-3">
@@ -91,11 +97,11 @@
91
97
  </svg>
92
98
  </div>
93
99
  <div class="ml-5 w-0 flex-1">
94
- <dt class="text-sm font-medium text-gray-500 dark:text-gray-400 truncate">
100
+ <dt class="text-sm font-medium text-zinc-500 dark:text-zinc-400 truncate">
95
101
  Cache Misses
96
102
  </dt>
97
103
  <dd class="flex items-baseline">
98
- <div class="text-2xl font-semibold text-gray-900 dark:text-white">
104
+ <div class="text-2xl font-semibold text-zinc-900 dark:text-white">
99
105
  <%= SolidCacheDashboard::CacheEvent.misses.count %>
100
106
  </div>
101
107
  </dd>
@@ -105,7 +111,7 @@
105
111
  </div>
106
112
 
107
113
  <!-- Write Count -->
108
- <div class="bg-white dark:bg-gray-800 overflow-hidden shadow-sm rounded-lg">
114
+ <div class="bg-white dark:bg-card overflow-hidden shadow-sm rounded-lg">
109
115
  <div class="px-4 py-5 sm:p-6">
110
116
  <div class="flex items-center">
111
117
  <div class="shrink-0 bg-blue-100 dark:bg-blue-700 rounded-md p-3">
@@ -114,11 +120,11 @@
114
120
  </svg>
115
121
  </div>
116
122
  <div class="ml-5 w-0 flex-1">
117
- <dt class="text-sm font-medium text-gray-500 dark:text-gray-400 truncate">
123
+ <dt class="text-sm font-medium text-zinc-500 dark:text-zinc-400 truncate">
118
124
  Cache Writes
119
125
  </dt>
120
126
  <dd class="flex items-baseline">
121
- <div class="text-2xl font-semibold text-gray-900 dark:text-white">
127
+ <div class="text-2xl font-semibold text-zinc-900 dark:text-white">
122
128
  <%= SolidCacheDashboard::CacheEvent.writes.count %>
123
129
  </div>
124
130
  </dd>
@@ -128,7 +134,7 @@
128
134
  </div>
129
135
 
130
136
  <!-- Delete Count -->
131
- <div class="bg-white dark:bg-gray-800 overflow-hidden shadow-sm rounded-lg">
137
+ <div class="bg-white dark:bg-card overflow-hidden shadow-sm rounded-lg">
132
138
  <div class="px-4 py-5 sm:p-6">
133
139
  <div class="flex items-center">
134
140
  <div class="shrink-0 bg-red-100 dark:bg-red-700 rounded-md p-3">
@@ -137,11 +143,11 @@
137
143
  </svg>
138
144
  </div>
139
145
  <div class="ml-5 w-0 flex-1">
140
- <dt class="text-sm font-medium text-gray-500 dark:text-gray-400 truncate">
146
+ <dt class="text-sm font-medium text-zinc-500 dark:text-zinc-400 truncate">
141
147
  Cache Deletes
142
148
  </dt>
143
149
  <dd class="flex items-baseline">
144
- <div class="text-2xl font-semibold text-gray-900 dark:text-white">
150
+ <div class="text-2xl font-semibold text-zinc-900 dark:text-white">
145
151
  <%= SolidCacheDashboard::CacheEvent.deletes.count %>
146
152
  </div>
147
153
  </dd>