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.
- checksums.yaml +4 -4
- data/app/assets/javascripts/solid_cache_dashboard/application.js +0 -1
- data/app/assets/stylesheets/solid_cache_dashboard/application.css +257 -82
- data/app/assets/stylesheets/solid_cache_dashboard/tailwind.css +8 -8
- data/app/controllers/solid_cache_dashboard/cache_entries_controller.rb +2 -3
- data/app/controllers/solid_cache_dashboard/cache_events_controller.rb +9 -3
- data/app/views/layouts/solid_cache_dashboard/application.html.erb +1 -1
- data/app/views/solid_cache_dashboard/application/_footer.html.erb +2 -2
- data/app/views/solid_cache_dashboard/application/_navbar.html.erb +28 -7
- data/app/views/solid_cache_dashboard/application/_pagination.html.erb +61 -0
- data/app/views/solid_cache_dashboard/cache_entries/index.html.erb +38 -24
- data/app/views/solid_cache_dashboard/cache_entries/show.html.erb +171 -38
- data/app/views/solid_cache_dashboard/cache_events/index.html.erb +34 -28
- data/app/views/solid_cache_dashboard/dashboard/index.html.erb +41 -41
- data/app/views/solid_cache_dashboard/stats/index.html.erb +55 -55
- data/lib/solid_cache_dashboard/cache_entry.rb +33 -0
- data/lib/solid_cache_dashboard/decorators/cache_entry_decorator.rb +91 -10
- data/lib/solid_cache_dashboard/engine.rb +13 -0
- data/lib/solid_cache_dashboard/version.rb +1 -1
- metadata +17 -2
@@ -85,7 +85,7 @@
|
|
85
85
|
::before,
|
86
86
|
::backdrop,
|
87
87
|
::file-selector-button {
|
88
|
-
border-color: var(--color-
|
88
|
+
border-color: var(--color-zinc-200, currentColor);
|
89
89
|
}
|
90
90
|
}
|
91
91
|
|
@@ -578,23 +578,23 @@
|
|
578
578
|
}
|
579
579
|
|
580
580
|
.dark {
|
581
|
-
--background:
|
581
|
+
--background: 0 0% 1%;
|
582
582
|
--foreground: 0 0% 92%;
|
583
|
-
--card: 240
|
583
|
+
--card: 240 0% 10%;
|
584
584
|
--card-foreground: 0 0% 92%;
|
585
|
-
--popover: 240
|
585
|
+
--popover: 240 0% 12%;
|
586
586
|
--popover-foreground: 0 0% 98%;
|
587
587
|
--primary: 0 0% 95%;
|
588
588
|
--primary-foreground: 240 5.9% 10%;
|
589
|
-
--secondary: 240 3.7%
|
589
|
+
--secondary: 240 3.7% 20%;
|
590
590
|
--secondary-foreground: 0 0% 98%;
|
591
|
-
--muted: 240 3.7%
|
591
|
+
--muted: 240 3.7% 20%;
|
592
592
|
--muted-foreground: 240 5% 64.9%;
|
593
|
-
--accent: 240 3.7%
|
593
|
+
--accent: 240 3.7% 20%;
|
594
594
|
--accent-foreground: 0 0% 98%;
|
595
595
|
--destructive: 0 62.8% 30.6%;
|
596
596
|
--destructive-foreground: 0 0% 98%;
|
597
|
-
--border: 240 3.7%
|
597
|
+
--border: 240 3.7% 16%;
|
598
598
|
--input: 240 3.7% 15.9%;
|
599
599
|
--ring: 240 4.9% 83.9%;
|
600
600
|
--chart-1: 220 70% 50%;
|
@@ -1,9 +1,8 @@
|
|
1
1
|
module SolidCacheDashboard
|
2
2
|
class CacheEntriesController < ApplicationController
|
3
3
|
def index
|
4
|
-
@
|
5
|
-
|
6
|
-
)
|
4
|
+
@pagy, entries = pagy(SolidCache::Entry.order(created_at: :desc), items: 25)
|
5
|
+
@cache_entries = SolidCacheDashboard.decorate(entries)
|
7
6
|
end
|
8
7
|
|
9
8
|
def show
|
@@ -1,9 +1,15 @@
|
|
1
1
|
module SolidCacheDashboard
|
2
2
|
class CacheEventsController < ApplicationController
|
3
3
|
def index
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
events = SolidCacheDashboard::CacheEvent.order(created_at: :desc)
|
5
|
+
|
6
|
+
# Filter by event type if specified
|
7
|
+
if params[:event_type].present? && params[:event_type] != "all"
|
8
|
+
events = events.where(event_type: params[:event_type])
|
9
|
+
end
|
10
|
+
|
11
|
+
@pagy, events = pagy(events, items: 25)
|
12
|
+
@cache_events = SolidCacheDashboard.decorate(events)
|
7
13
|
end
|
8
14
|
end
|
9
15
|
end
|
@@ -13,7 +13,7 @@
|
|
13
13
|
<%= javascript_include_tag "solid_cache_dashboard/alpine.js", defer: true %>
|
14
14
|
<%= yield :head %>
|
15
15
|
</head>
|
16
|
-
<body class="antialiased bg-white dark:bg-
|
16
|
+
<body class="antialiased bg-white dark:bg-background text-zinc-900 dark:text-white">
|
17
17
|
<div class="min-h-screen flex flex-col">
|
18
18
|
<%= render "solid_cache_dashboard/application/navbar" %>
|
19
19
|
|
@@ -1,6 +1,6 @@
|
|
1
|
-
<footer class="bg-white dark:bg-
|
1
|
+
<footer class="bg-white dark:bg-background border-t border-zinc-200 dark:border-zinc-700 py-4 mt-auto">
|
2
2
|
<div class="container mx-auto px-4">
|
3
|
-
<div class="flex justify-between text-
|
3
|
+
<div class="flex justify-between text-zinc-500 dark:text-zinc-400 text-sm">
|
4
4
|
<div>
|
5
5
|
<p>© <%= Time.current.year %> Solid Cache Dashboard</p>
|
6
6
|
</div>
|
@@ -1,21 +1,42 @@
|
|
1
|
-
<nav class="bg-white dark:bg-
|
1
|
+
<nav class="bg-white dark:bg-background border-b border-zinc-200 dark:border-zinc-700">
|
2
2
|
<div class="container mx-auto px-4">
|
3
3
|
<div class="flex justify-between h-16">
|
4
4
|
<div class="flex">
|
5
5
|
<div class="shrink-0 flex items-center">
|
6
6
|
<h1 class="text-xl font-bold">
|
7
|
-
<%= link_to SolidCacheDashboard.configuration.title, root_path, class: "text-
|
7
|
+
<%= link_to SolidCacheDashboard.configuration.title, root_path, class: "text-zinc-900 dark:text-white" %>
|
8
8
|
</h1>
|
9
9
|
</div>
|
10
10
|
<div class="hidden sm:ml-6 sm:flex sm:items-center sm:space-x-4">
|
11
|
-
<%= link_to "Dashboard", root_path, class: "px-3 py-2 rounded-md text-sm font-medium #{'bg-
|
12
|
-
<%= link_to "Cache Entries", cache_entries_path, class: "px-3 py-2 rounded-md text-sm font-medium #{'bg-
|
13
|
-
<%= link_to "Cache Events", cache_events_path, class: "px-3 py-2 rounded-md text-sm font-medium #{'bg-
|
14
|
-
<%= link_to "Stats", stats_path, class: "px-3 py-2 rounded-md text-sm font-medium #{'bg-
|
11
|
+
<%= link_to "Dashboard", root_path, class: "px-3 py-2 rounded-md text-sm font-medium #{'bg-zinc-100 dark:bg-secondary' if controller_name == 'dashboard'} hover:bg-zinc-100 dark:hover:bg-secondary text-zinc-900 dark:text-white" %>
|
12
|
+
<%= link_to "Cache Entries", cache_entries_path, class: "px-3 py-2 rounded-md text-sm font-medium #{'bg-zinc-100 dark:bg-secondary' if controller_name == 'cache_entries'} hover:bg-zinc-100 dark:hover:bg-secondary text-zinc-900 dark:text-white" %>
|
13
|
+
<%= link_to "Cache Events", cache_events_path, class: "px-3 py-2 rounded-md text-sm font-medium #{'bg-zinc-100 dark:bg-secondary' if controller_name == 'cache_events'} hover:bg-zinc-100 dark:hover:bg-secondary text-zinc-900 dark:text-white" %>
|
14
|
+
<%= link_to "Stats", stats_path, class: "px-3 py-2 rounded-md text-sm font-medium #{'bg-zinc-100 dark:bg-secondary' if controller_name == 'stats'} hover:bg-zinc-100 dark:hover:bg-secondary text-zinc-900 dark:text-white" %>
|
15
15
|
</div>
|
16
16
|
</div>
|
17
17
|
<div class="hidden sm:ml-6 sm:flex sm:items-center">
|
18
|
-
|
18
|
+
<% if current_page?(controller: 'dashboard', action: 'index') %>
|
19
|
+
<%= form_with url: root_path, method: :get, class: "flex gap-1.5 items-center" do |form| %>
|
20
|
+
<%= form.hidden_field :chart_period %>
|
21
|
+
|
22
|
+
<!-- Refresh icon with size-4 and text-muted-foreground class -->
|
23
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-4 text-muted-foreground">
|
24
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" />
|
25
|
+
</svg>
|
26
|
+
|
27
|
+
|
28
|
+
<%= form.select :auto_refresh_period,
|
29
|
+
[["Auto-Refresh Off", "off"], ["15 seconds", "15"], ["30 seconds", "30"], ["1 minute", "60"], ["3 minutes", "180"], ["5 minutes", "300"], ["10 minutes", "600"], ["15 minutes", "900"], ["30 minutes", "1800"], ["1 hour", "3600"]],
|
30
|
+
{ selected: params[:auto_refresh_period].presence || "off" },
|
31
|
+
class: "select w-40",
|
32
|
+
data: { auto_submit: true }
|
33
|
+
%>
|
34
|
+
<% end %>
|
35
|
+
<% end %>
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
<%= button_to toggle_appearance_path, method: :post, class: "bg-white dark:bg-background p-1 rounded-full text-zinc-400 hover:text-zinc-500 dark:hover:text-zinc-300 focus:outline-hidden" do %>
|
19
40
|
<% if dark_mode? %>
|
20
41
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
21
42
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" />
|
@@ -0,0 +1,61 @@
|
|
1
|
+
<!-- Pagination -->
|
2
|
+
<% if pagy.pages > 1 %>
|
3
|
+
<div class="px-4 py-3 flex items-center justify-between border-t border-zinc-200 dark:border-zinc-700">
|
4
|
+
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
|
5
|
+
<div>
|
6
|
+
<p class="text-sm text-zinc-700 dark:text-zinc-300">
|
7
|
+
Showing <span class="font-medium"><%= pagy.from %></span> to <span class="font-medium"><%= pagy.to %></span> of <span class="font-medium"><%= pagy.count %></span> <%= item_name.pluralize(pagy.count) %>
|
8
|
+
</p>
|
9
|
+
</div>
|
10
|
+
<div>
|
11
|
+
<nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
|
12
|
+
<% if pagy.prev %>
|
13
|
+
<%= link_to path_for_page.call(pagy.prev), class: "relative inline-flex items-center px-2 py-2 rounded-l-md border border-zinc-300 dark:border-zinc-600 bg-white dark:bg-card text-sm font-medium text-zinc-500 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:bg-zinc-700" do %>
|
14
|
+
<span class="sr-only">Previous</span>
|
15
|
+
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
16
|
+
<path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" />
|
17
|
+
</svg>
|
18
|
+
<% end %>
|
19
|
+
<% else %>
|
20
|
+
<span class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-zinc-300 dark:border-zinc-600 bg-zinc-100 dark:bg-zinc-800 text-sm font-medium text-zinc-400 dark:text-zinc-500">
|
21
|
+
<span class="sr-only">Previous</span>
|
22
|
+
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
23
|
+
<path fill-rule="evenodd" d="M12.707 5.293a1 1 0 010 1.414L9.414 10l3.293 3.293a1 1 0 01-1.414 1.414l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 0z" clip-rule="evenodd" />
|
24
|
+
</svg>
|
25
|
+
</span>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<% pagy.series.each do |item| %>
|
29
|
+
<% if item.is_a?(Integer) %>
|
30
|
+
<%= link_to item, path_for_page.call(item), class: "relative inline-flex items-center px-4 py-2 border border-zinc-300 dark:border-zinc-600 bg-white dark:bg-card text-sm font-medium #{'text-blue-600 dark:text-blue-400' if item == pagy.page} #{'text-zinc-500 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:bg-zinc-700' if item != pagy.page}" %>
|
31
|
+
<% elsif item.is_a?(String) && item == pagy.page.to_s %>
|
32
|
+
<span class="relative inline-flex items-center px-4 py-2 border border-blue-500 dark:border-blue-600 bg-blue-50 dark:bg-blue-900 text-sm font-medium text-blue-600 dark:text-blue-300">
|
33
|
+
<%= item %>
|
34
|
+
</span>
|
35
|
+
<% elsif item == :gap %>
|
36
|
+
<span class="relative inline-flex items-center px-4 py-2 border border-zinc-300 dark:border-zinc-600 bg-white dark:bg-card text-sm font-medium text-zinc-500 dark:text-zinc-400">
|
37
|
+
...
|
38
|
+
</span>
|
39
|
+
<% end %>
|
40
|
+
<% end %>
|
41
|
+
|
42
|
+
<% if pagy.next %>
|
43
|
+
<%= link_to path_for_page.call(pagy.next), class: "relative inline-flex items-center px-2 py-2 rounded-r-md border border-zinc-300 dark:border-zinc-600 bg-white dark:bg-card text-sm font-medium text-zinc-500 dark:text-zinc-400 hover:bg-zinc-50 dark:hover:bg-zinc-700" do %>
|
44
|
+
<span class="sr-only">Next</span>
|
45
|
+
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
46
|
+
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
|
47
|
+
</svg>
|
48
|
+
<% end %>
|
49
|
+
<% else %>
|
50
|
+
<span class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-zinc-300 dark:border-zinc-600 bg-zinc-100 dark:bg-zinc-800 text-sm font-medium text-zinc-400 dark:text-zinc-500">
|
51
|
+
<span class="sr-only">Next</span>
|
52
|
+
<svg class="h-5 w-5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
53
|
+
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd" />
|
54
|
+
</svg>
|
55
|
+
</span>
|
56
|
+
<% end %>
|
57
|
+
</nav>
|
58
|
+
</div>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
<% end %>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<% content_for :page_title, "Cache Entries" %>
|
2
2
|
|
3
|
-
<div class="bg-white dark:bg-
|
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-
|
5
|
+
<h3 class="text-lg leading-6 font-medium text-zinc-900 dark:text-white">Cache Entries</h3>
|
6
6
|
<div class="flex space-x-2">
|
7
7
|
<%= button_to clear_all_cache_entries_path, 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 clear all cache entries? This cannot be undone." } do %>
|
8
8
|
<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">
|
@@ -12,31 +12,39 @@
|
|
12
12
|
<% end %>
|
13
13
|
</div>
|
14
14
|
</div>
|
15
|
-
<div class="border-t border-
|
15
|
+
<div class="border-t border-zinc-200 dark:border-zinc-700">
|
16
16
|
<div class="overflow-x-auto">
|
17
|
-
<table class="min-w-full divide-y divide-
|
18
|
-
<thead class="bg-
|
17
|
+
<table class="min-w-full divide-y divide-zinc-200 dark:divide-zinc-700">
|
18
|
+
<thead class="bg-zinc-50 dark:bg-card">
|
19
19
|
<tr>
|
20
|
-
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-
|
21
|
-
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-
|
22
|
-
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-
|
23
|
-
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-
|
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">Status</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">Size</th>
|
23
|
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wider">Created</th>
|
24
|
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wider">Expires</th>
|
25
|
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-zinc-500 dark:text-zinc-400 uppercase tracking-wider">Actions</th>
|
24
26
|
</tr>
|
25
27
|
</thead>
|
26
|
-
<tbody class="bg-white dark:bg-
|
28
|
+
<tbody class="bg-white dark:bg-background divide-y divide-zinc-200 dark:divide-zinc-700">
|
27
29
|
<% if @cache_entries.present? %>
|
28
30
|
<% @cache_entries.each do |entry| %>
|
29
31
|
<tr>
|
30
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-
|
32
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-zinc-900 dark:text-white truncate max-w-[400px]">
|
31
33
|
<%= link_to entry.key, cache_entry_path(entry.key_hash), class: "hover:underline" %>
|
32
34
|
</td>
|
33
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-
|
35
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-zinc-500 dark:text-zinc-400">
|
36
|
+
<%= entry.status_badge %>
|
37
|
+
</td>
|
38
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-zinc-500 dark:text-zinc-400">
|
34
39
|
<%= entry.human_byte_size %>
|
35
40
|
</td>
|
36
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-
|
41
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-zinc-500 dark:text-zinc-400">
|
37
42
|
<%= entry.created_at_ago %>
|
38
43
|
</td>
|
39
|
-
<td class="px-6 py-4 whitespace-nowrap text-sm text-
|
44
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-zinc-500 dark:text-zinc-400">
|
45
|
+
<%= entry.expires_in || "Never" %>
|
46
|
+
</td>
|
47
|
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-zinc-500 dark:text-zinc-400">
|
40
48
|
<%= button_to delete_cache_entry_path(entry.key_hash), method: :delete, class: "text-red-600 hover:text-red-900 dark:text-red-400 dark:hover:text-red-300" do %>
|
41
49
|
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
42
50
|
<path stroke-linecap="round" stroke-linejoin="round" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
|
@@ -47,7 +55,7 @@
|
|
47
55
|
<% end %>
|
48
56
|
<% else %>
|
49
57
|
<tr>
|
50
|
-
<td colspan="
|
58
|
+
<td colspan="6" class="px-6 py-4 text-sm text-center text-zinc-500 dark:text-zinc-400">
|
51
59
|
No cache entries found
|
52
60
|
</td>
|
53
61
|
</tr>
|
@@ -55,12 +63,18 @@
|
|
55
63
|
</tbody>
|
56
64
|
</table>
|
57
65
|
</div>
|
66
|
+
|
67
|
+
<%= render partial: 'solid_cache_dashboard/application/pagination', locals: {
|
68
|
+
pagy: @pagy,
|
69
|
+
item_name: "entry",
|
70
|
+
path_for_page: -> (page) { cache_entries_path(page: page) }
|
71
|
+
} %>
|
58
72
|
</div>
|
59
73
|
</div>
|
60
74
|
|
61
75
|
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
62
76
|
<!-- Total Entries -->
|
63
|
-
<div class="bg-white dark:bg-
|
77
|
+
<div class="bg-white dark:bg-card overflow-hidden shadow-sm rounded-lg">
|
64
78
|
<div class="px-4 py-5 sm:p-6">
|
65
79
|
<div class="flex items-center">
|
66
80
|
<div class="shrink-0 bg-blue-100 dark:bg-blue-700 rounded-md p-3">
|
@@ -69,11 +83,11 @@
|
|
69
83
|
</svg>
|
70
84
|
</div>
|
71
85
|
<div class="ml-5 w-0 flex-1">
|
72
|
-
<dt class="text-sm font-medium text-
|
86
|
+
<dt class="text-sm font-medium text-zinc-500 dark:text-zinc-400 truncate">
|
73
87
|
Total Entries
|
74
88
|
</dt>
|
75
89
|
<dd class="flex items-baseline">
|
76
|
-
<div class="text-2xl font-semibold text-
|
90
|
+
<div class="text-2xl font-semibold text-zinc-900 dark:text-white">
|
77
91
|
<%= SolidCache::Entry.count %>
|
78
92
|
</div>
|
79
93
|
</dd>
|
@@ -83,7 +97,7 @@
|
|
83
97
|
</div>
|
84
98
|
|
85
99
|
<!-- Total Size -->
|
86
|
-
<div class="bg-white dark:bg-
|
100
|
+
<div class="bg-white dark:bg-card overflow-hidden shadow-sm rounded-lg">
|
87
101
|
<div class="px-4 py-5 sm:p-6">
|
88
102
|
<div class="flex items-center">
|
89
103
|
<div class="shrink-0 bg-purple-100 dark:bg-purple-700 rounded-md p-3">
|
@@ -92,11 +106,11 @@
|
|
92
106
|
</svg>
|
93
107
|
</div>
|
94
108
|
<div class="ml-5 w-0 flex-1">
|
95
|
-
<dt class="text-sm font-medium text-
|
109
|
+
<dt class="text-sm font-medium text-zinc-500 dark:text-zinc-400 truncate">
|
96
110
|
Total Size
|
97
111
|
</dt>
|
98
112
|
<dd class="flex items-baseline">
|
99
|
-
<div class="text-2xl font-semibold text-
|
113
|
+
<div class="text-2xl font-semibold text-zinc-900 dark:text-white">
|
100
114
|
<%= ActiveSupport::NumberHelper.number_to_human_size(SolidCache::Entry.sum(:byte_size)) %>
|
101
115
|
</div>
|
102
116
|
</dd>
|
@@ -106,7 +120,7 @@
|
|
106
120
|
</div>
|
107
121
|
|
108
122
|
<!-- Average Size -->
|
109
|
-
<div class="bg-white dark:bg-
|
123
|
+
<div class="bg-white dark:bg-card overflow-hidden shadow-sm rounded-lg">
|
110
124
|
<div class="px-4 py-5 sm:p-6">
|
111
125
|
<div class="flex items-center">
|
112
126
|
<div class="shrink-0 bg-indigo-100 dark:bg-indigo-700 rounded-md p-3">
|
@@ -115,11 +129,11 @@
|
|
115
129
|
</svg>
|
116
130
|
</div>
|
117
131
|
<div class="ml-5 w-0 flex-1">
|
118
|
-
<dt class="text-sm font-medium text-
|
132
|
+
<dt class="text-sm font-medium text-zinc-500 dark:text-zinc-400 truncate">
|
119
133
|
Average Entry Size
|
120
134
|
</dt>
|
121
135
|
<dd class="flex items-baseline">
|
122
|
-
<div class="text-2xl font-semibold text-
|
136
|
+
<div class="text-2xl font-semibold text-zinc-900 dark:text-white">
|
123
137
|
<% count = SolidCache::Entry.count %>
|
124
138
|
<% size = SolidCache::Entry.sum(:byte_size) %>
|
125
139
|
<% if count > 0 %>
|