rails_nexus 2.0.6 → 2.1.2
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/CHANGELOG.md +110 -0
- data/README.md +33 -6
- data/SECURITY.md +11 -0
- data/THIRD_PARTY_NOTICES.md +14 -0
- data/app/assets/config/rails_nexus_manifest.js +1 -1
- data/app/assets/javascripts/rails_nexus/application.js +55 -0
- data/app/assets/javascripts/rails_nexus/controllers.js +82 -5
- data/app/assets/stylesheets/rails_nexus/application.css +170 -60
- data/app/controllers/rails_nexus/analytics_controller.rb +13 -26
- data/app/controllers/rails_nexus/application_controller.rb +6 -2
- data/app/controllers/rails_nexus/backup_controller.rb +22 -19
- data/app/controllers/rails_nexus/cron_jobs_controller.rb +1 -9
- data/app/controllers/rails_nexus/database_health_controller.rb +0 -10
- data/app/controllers/rails_nexus/logged_exceptions_controller.rb +0 -2
- data/app/controllers/rails_nexus/n1_patterns_controller.rb +0 -2
- data/app/controllers/rails_nexus/settings_controller.rb +1 -39
- data/app/controllers/rails_nexus/source_code_controller.rb +9 -13
- data/app/controllers/rails_nexus/stats_controller.rb +43 -43
- data/app/helpers/rails_nexus/application_helper.rb +5 -0
- data/app/helpers/rails_nexus/logged_exceptions_helper.rb +4 -49
- data/app/helpers/rails_nexus/source_code_helper.rb +49 -10
- data/app/javascript/controllers/rails_nexus_controller.js +6 -2
- data/app/javascript/controllers/rails_nexus_sidebar_controller.js +71 -3
- data/app/javascript/rails_nexus/application.js +15 -3
- data/app/jobs/rails_nexus/backup_job.rb +18 -0
- data/app/models/rails_nexus/backup.rb +11 -11
- data/app/models/rails_nexus/backup_config.rb +38 -2
- data/app/models/rails_nexus/logged_exception.rb +27 -13
- data/app/services/rails_nexus/backup_service.rb +342 -120
- data/app/views/layouts/rails_nexus/_sidebar_navigation.html.erb +40 -10
- data/app/views/layouts/rails_nexus/application.html.erb +72 -14
- data/app/views/rails_nexus/backup/_form.html.erb +3 -0
- data/app/views/rails_nexus/backup/history.html.erb +17 -2
- data/app/views/rails_nexus/backup/index.html.erb +29 -72
- data/app/views/rails_nexus/logged_exceptions/_exceptions.html.erb +12 -44
- data/app/views/rails_nexus/logged_exceptions/index.html.erb +21 -99
- data/app/views/rails_nexus/stats/index.html.erb +1 -1
- data/db/seeds/backup_configs.rb +5 -4
- data/lib/generators/rails_nexus/install_generator.rb +1 -1
- data/lib/generators/rails_nexus/templates/INSTALL.md +1 -0
- data/lib/generators/rails_nexus/templates/migration.rb +8 -2
- data/lib/generators/rails_nexus/templates/rails_nexus.rb +3 -0
- data/lib/generators/rails_nexus/templates/views/layouts/rails_nexus/application.html.erb +1 -1
- data/lib/rails_nexus/configuration.rb +10 -0
- data/lib/rails_nexus/database_adapter.rb +53 -0
- data/lib/rails_nexus/engine.rb +0 -13
- data/lib/rails_nexus/logger.rb +1 -12
- data/lib/rails_nexus/notifications.rb +27 -20
- data/lib/rails_nexus/version.rb +1 -1
- data/lib/rails_nexus/webhook_client.rb +151 -0
- data/lib/rails_nexus.rb +37 -23
- data/lib/tasks/rails_nexus.rake +4 -4
- data/rails_nexus.gemspec +3 -2
- metadata +9 -16
- data/config/importmap.rb +0 -15
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
<nav class="rn-sidebar-nav" aria-label="RailsNexus navigation">
|
|
2
|
-
<
|
|
3
|
-
<
|
|
2
|
+
<details class="rn-nav-section" data-action="toggle->rails_nexus-sidebar#closeOtherMenus" <%= "open" if monitor_menu_active %>>
|
|
3
|
+
<summary class="rn-nav-section-toggle">
|
|
4
|
+
<span class="rn-nav-section-title">
|
|
5
|
+
<span class="rn-nav-section-icon"><svg width="15" height="15" fill="none" viewBox="0 0 24 24" stroke-width="1.75" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M3 12h3l2.25-6 4.5 12 2.25-6H21" /></svg></span>
|
|
6
|
+
<span>Monitor</span>
|
|
7
|
+
</span>
|
|
8
|
+
<svg class="rn-nav-section-chevron" width="14" height="14" fill="none" viewBox="0 0 24 24" stroke-width="1.75" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" /></svg>
|
|
9
|
+
</summary>
|
|
10
|
+
<div class="rn-nav-section-items">
|
|
4
11
|
|
|
5
12
|
<%= link_to root_path,
|
|
6
13
|
class: "rn-nav-item #{request.path == rails_nexus.root_path ? 'active' : ''}" do %>
|
|
@@ -34,10 +41,18 @@
|
|
|
34
41
|
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 013 19.875v-6.75zM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V8.625zM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 01-1.125-1.125V4.125z" /></svg>
|
|
35
42
|
Statistics
|
|
36
43
|
<% end %>
|
|
37
|
-
|
|
44
|
+
</div>
|
|
45
|
+
</details>
|
|
38
46
|
|
|
39
|
-
<
|
|
40
|
-
<
|
|
47
|
+
<details class="rn-nav-section" data-action="toggle->rails_nexus-sidebar#closeOtherMenus" <%= "open" if operations_menu_active %>>
|
|
48
|
+
<summary class="rn-nav-section-toggle">
|
|
49
|
+
<span class="rn-nav-section-title">
|
|
50
|
+
<span class="rn-nav-section-icon"><svg width="15" height="15" fill="none" viewBox="0 0 24 24" stroke-width="1.75" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 6.75h15M7.5 12h9m-6 5.25h3" /></svg></span>
|
|
51
|
+
<span>Operations</span>
|
|
52
|
+
</span>
|
|
53
|
+
<svg class="rn-nav-section-chevron" width="14" height="14" fill="none" viewBox="0 0 24 24" stroke-width="1.75" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" /></svg>
|
|
54
|
+
</summary>
|
|
55
|
+
<div class="rn-nav-section-items">
|
|
41
56
|
|
|
42
57
|
<%= link_to cron_jobs_path,
|
|
43
58
|
class: "rn-nav-item #{request.path.start_with?(rails_nexus.cron_jobs_path) ? 'active' : ''}" do %>
|
|
@@ -46,20 +61,34 @@
|
|
|
46
61
|
<% end %>
|
|
47
62
|
|
|
48
63
|
<%= link_to backup_path,
|
|
49
|
-
class: "rn-nav-item #{
|
|
64
|
+
class: "rn-nav-item #{controller_path == 'rails_nexus/backup' && !%w[all_history history].include?(action_name) ? 'active' : ''}" do %>
|
|
50
65
|
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125" /></svg>
|
|
51
66
|
Backups
|
|
52
67
|
<% end %>
|
|
53
68
|
|
|
69
|
+
<%= link_to backup_history_path,
|
|
70
|
+
class: "rn-nav-item #{controller_path == 'rails_nexus/backup' && %w[all_history history].include?(action_name) ? 'active' : ''}" do %>
|
|
71
|
+
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
|
|
72
|
+
Backup History
|
|
73
|
+
<% end %>
|
|
74
|
+
|
|
54
75
|
<%= link_to settings_path,
|
|
55
76
|
class: "rn-nav-item #{request.path == rails_nexus.settings_path ? 'active' : ''}" do %>
|
|
56
77
|
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z" /><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /></svg>
|
|
57
78
|
Settings
|
|
58
79
|
<% end %>
|
|
59
|
-
|
|
80
|
+
</div>
|
|
81
|
+
</details>
|
|
60
82
|
|
|
61
|
-
<
|
|
62
|
-
<
|
|
83
|
+
<details class="rn-nav-section" data-action="toggle->rails_nexus-sidebar#closeOtherMenus" <%= "open" if resources_menu_active %>>
|
|
84
|
+
<summary class="rn-nav-section-toggle">
|
|
85
|
+
<span class="rn-nav-section-title">
|
|
86
|
+
<span class="rn-nav-section-icon"><svg width="15" height="15" fill="none" viewBox="0 0 24 24" stroke-width="1.75" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M10.5 6H6.75A3.75 3.75 0 003 9.75v7.5A3.75 3.75 0 006.75 21h7.5A3.75 3.75 0 0018 17.25V13.5m-6-1.5L21 3m0 0h-5.25M21 3v5.25" /></svg></span>
|
|
87
|
+
<span>Resources</span>
|
|
88
|
+
</span>
|
|
89
|
+
<svg class="rn-nav-section-chevron" width="14" height="14" fill="none" viewBox="0 0 24 24" stroke-width="1.75" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" /></svg>
|
|
90
|
+
</summary>
|
|
91
|
+
<div class="rn-nav-section-items">
|
|
63
92
|
|
|
64
93
|
<% if main_app.respond_to?(:root_path) %>
|
|
65
94
|
<%= link_to main_app.root_path, class: "rn-nav-item rn-nav-item--muted" do %>
|
|
@@ -79,5 +108,6 @@
|
|
|
79
108
|
<%= link[:label] %>
|
|
80
109
|
<% end %>
|
|
81
110
|
<% end %>
|
|
82
|
-
|
|
111
|
+
</div>
|
|
112
|
+
</details>
|
|
83
113
|
</nav>
|
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
6
|
<meta name="color-scheme" content="light dark">
|
|
7
|
+
<meta name="turbo-prefetch" content="false">
|
|
7
8
|
<title><%= content_for?(:title) ? yield(:title) : RailsNexus.configuration.application_name || "RailsNexus" %></title>
|
|
8
9
|
|
|
9
10
|
<%= stylesheet_link_tag "rails_nexus/application", "data-turbo-track": "reload" %>
|
|
10
11
|
|
|
11
|
-
<%=
|
|
12
|
+
<%= javascript_include_tag "rails_nexus/application", defer: true, "data-turbo-track": "reload" %>
|
|
12
13
|
|
|
13
14
|
<% if respond_to?(:turbo_refreshes_with) %>
|
|
14
15
|
<%= turbo_refreshes_with method: :morph, scroll: :preserve %>
|
|
@@ -16,12 +17,24 @@
|
|
|
16
17
|
<%= csrf_meta_tags %>
|
|
17
18
|
<%= csp_meta_tag %>
|
|
18
19
|
</head>
|
|
19
|
-
<%
|
|
20
|
+
<%
|
|
21
|
+
exception_count = RailsNexus::LoggedException.count
|
|
22
|
+
monitor_menu_active = %w[
|
|
23
|
+
rails_nexus/logged_exceptions rails_nexus/database_health rails_nexus/n1_patterns
|
|
24
|
+
rails_nexus/analytics rails_nexus/stats
|
|
25
|
+
].include?(controller_path)
|
|
26
|
+
operations_menu_active = %w[
|
|
27
|
+
rails_nexus/cron_jobs rails_nexus/backup rails_nexus/settings
|
|
28
|
+
].include?(controller_path)
|
|
29
|
+
resources_menu_active = RailsNexus.configuration.sidebar_links.any? do |link|
|
|
30
|
+
link[:url].to_s == request.path
|
|
31
|
+
end
|
|
32
|
+
%>
|
|
20
33
|
<body class="h-full <%= RailsNexus.configuration.body_class %>" data-controller="rails_nexus-sidebar">
|
|
21
34
|
<div class="min-h-full flex">
|
|
22
35
|
|
|
23
36
|
<%# Sidebar %>
|
|
24
|
-
<aside class="rn-sidebar">
|
|
37
|
+
<aside id="rn-desktop-sidebar" class="rn-sidebar" data-rails_nexus-sidebar-target="sidebar">
|
|
25
38
|
<%# Logo %>
|
|
26
39
|
<div class="rn-sidebar-logo">
|
|
27
40
|
<%= link_to root_path, class: "flex items-center gap-2.5" do %>
|
|
@@ -34,8 +47,16 @@
|
|
|
34
47
|
</div>
|
|
35
48
|
|
|
36
49
|
<%# Navigation %>
|
|
37
|
-
<nav class="rn-sidebar-nav">
|
|
38
|
-
<
|
|
50
|
+
<nav class="rn-sidebar-nav" aria-label="RailsNexus navigation">
|
|
51
|
+
<details class="rn-nav-section" data-action="toggle->rails_nexus-sidebar#closeOtherMenus" <%= "open" if monitor_menu_active %>>
|
|
52
|
+
<summary class="rn-nav-section-toggle">
|
|
53
|
+
<span class="rn-nav-section-title">
|
|
54
|
+
<span class="rn-nav-section-icon"><svg width="15" height="15" fill="none" viewBox="0 0 24 24" stroke-width="1.75" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M3 12h3l2.25-6 4.5 12 2.25-6H21" /></svg></span>
|
|
55
|
+
<span>Monitor</span>
|
|
56
|
+
</span>
|
|
57
|
+
<svg class="rn-nav-section-chevron" width="14" height="14" fill="none" viewBox="0 0 24 24" stroke-width="1.75" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" /></svg>
|
|
58
|
+
</summary>
|
|
59
|
+
<div class="rn-nav-section-items">
|
|
39
60
|
<%= link_to root_path,
|
|
40
61
|
class: "rn-nav-item #{request.path == rails_nexus.root_path ? 'active' : ''}" do %>
|
|
41
62
|
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z" /></svg>
|
|
@@ -69,7 +90,18 @@
|
|
|
69
90
|
Statistics
|
|
70
91
|
<% end %>
|
|
71
92
|
|
|
72
|
-
|
|
93
|
+
</div>
|
|
94
|
+
</details>
|
|
95
|
+
|
|
96
|
+
<details class="rn-nav-section" data-action="toggle->rails_nexus-sidebar#closeOtherMenus" <%= "open" if operations_menu_active %>>
|
|
97
|
+
<summary class="rn-nav-section-toggle">
|
|
98
|
+
<span class="rn-nav-section-title">
|
|
99
|
+
<span class="rn-nav-section-icon"><svg width="15" height="15" fill="none" viewBox="0 0 24 24" stroke-width="1.75" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M4.5 6.75h15M7.5 12h9m-6 5.25h3" /></svg></span>
|
|
100
|
+
<span>Operations</span>
|
|
101
|
+
</span>
|
|
102
|
+
<svg class="rn-nav-section-chevron" width="14" height="14" fill="none" viewBox="0 0 24 24" stroke-width="1.75" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" /></svg>
|
|
103
|
+
</summary>
|
|
104
|
+
<div class="rn-nav-section-items">
|
|
73
105
|
|
|
74
106
|
<%= link_to cron_jobs_path,
|
|
75
107
|
class: "rn-nav-item #{request.path.start_with?(rails_nexus.cron_jobs_path) ? 'active' : ''}" do %>
|
|
@@ -78,18 +110,35 @@
|
|
|
78
110
|
<% end %>
|
|
79
111
|
|
|
80
112
|
<%= link_to backup_path,
|
|
81
|
-
class: "rn-nav-item #{
|
|
113
|
+
class: "rn-nav-item #{controller_path == 'rails_nexus/backup' && !%w[all_history history].include?(action_name) ? 'active' : ''}" do %>
|
|
82
114
|
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125" /></svg>
|
|
83
115
|
Backups
|
|
84
116
|
<% end %>
|
|
85
117
|
|
|
118
|
+
<%= link_to backup_history_path,
|
|
119
|
+
class: "rn-nav-item #{controller_path == 'rails_nexus/backup' && %w[all_history history].include?(action_name) ? 'active' : ''}" do %>
|
|
120
|
+
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
|
|
121
|
+
Backup History
|
|
122
|
+
<% end %>
|
|
123
|
+
|
|
86
124
|
<%= link_to settings_path,
|
|
87
125
|
class: "rn-nav-item #{request.path == rails_nexus.settings_path ? 'active' : ''}" do %>
|
|
88
126
|
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z" /><path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /></svg>
|
|
89
127
|
Settings
|
|
90
128
|
<% end %>
|
|
91
129
|
|
|
92
|
-
|
|
130
|
+
</div>
|
|
131
|
+
</details>
|
|
132
|
+
|
|
133
|
+
<details class="rn-nav-section" data-action="toggle->rails_nexus-sidebar#closeOtherMenus" <%= "open" if resources_menu_active %>>
|
|
134
|
+
<summary class="rn-nav-section-toggle">
|
|
135
|
+
<span class="rn-nav-section-title">
|
|
136
|
+
<span class="rn-nav-section-icon"><svg width="15" height="15" fill="none" viewBox="0 0 24 24" stroke-width="1.75" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M10.5 6H6.75A3.75 3.75 0 003 9.75v7.5A3.75 3.75 0 006.75 21h7.5A3.75 3.75 0 0018 17.25V13.5m-6-1.5L21 3m0 0h-5.25M21 3v5.25" /></svg></span>
|
|
137
|
+
<span>Resources</span>
|
|
138
|
+
</span>
|
|
139
|
+
<svg class="rn-nav-section-chevron" width="14" height="14" fill="none" viewBox="0 0 24 24" stroke-width="1.75" stroke="currentColor" aria-hidden="true"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" /></svg>
|
|
140
|
+
</summary>
|
|
141
|
+
<div class="rn-nav-section-items">
|
|
93
142
|
|
|
94
143
|
<% if main_app.respond_to?(:root_path) %>
|
|
95
144
|
<%= link_to main_app.root_path,
|
|
@@ -113,6 +162,8 @@
|
|
|
113
162
|
<%= link[:label] %>
|
|
114
163
|
<% end %>
|
|
115
164
|
<% end %>
|
|
165
|
+
</div>
|
|
166
|
+
</details>
|
|
116
167
|
</nav>
|
|
117
168
|
|
|
118
169
|
<%# Footer %>
|
|
@@ -128,10 +179,13 @@
|
|
|
128
179
|
<header class="rn-topbar">
|
|
129
180
|
<div class="rn-topbar-title">
|
|
130
181
|
<button type="button"
|
|
131
|
-
class="rn-icon-btn rn-
|
|
182
|
+
class="rn-icon-btn rn-sidebar-toggle"
|
|
132
183
|
data-action="click->rails_nexus-sidebar#toggle"
|
|
133
|
-
|
|
134
|
-
|
|
184
|
+
data-rails_nexus-sidebar-target="toggleButton"
|
|
185
|
+
title="Toggle navigation"
|
|
186
|
+
aria-label="Hide navigation"
|
|
187
|
+
aria-controls="rn-desktop-sidebar rn-mobile-sidebar"
|
|
188
|
+
aria-expanded="true">
|
|
135
189
|
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" /></svg>
|
|
136
190
|
</button>
|
|
137
191
|
<div>
|
|
@@ -193,7 +247,7 @@
|
|
|
193
247
|
<% end %>
|
|
194
248
|
|
|
195
249
|
<%# Main Content %>
|
|
196
|
-
<main class="rn-main flex-1
|
|
250
|
+
<main class="rn-main flex-1 p-4 sm:p-6">
|
|
197
251
|
<%= yield %>
|
|
198
252
|
</main>
|
|
199
253
|
|
|
@@ -216,7 +270,7 @@
|
|
|
216
270
|
<div class="rn-overlay" data-rails_nexus-sidebar-target="overlay" data-action="click->rails_nexus-sidebar#close"></div>
|
|
217
271
|
|
|
218
272
|
<%# Mobile sidebar drawer %>
|
|
219
|
-
<div class="rn-mobile-sidebar" data-rails_nexus-sidebar-target="drawer">
|
|
273
|
+
<div id="rn-mobile-sidebar" class="rn-mobile-sidebar" data-rails_nexus-sidebar-target="drawer">
|
|
220
274
|
<div class="rn-sidebar-logo">
|
|
221
275
|
<%= link_to root_path, class: "flex items-center gap-2.5" do %>
|
|
222
276
|
<div class="rn-logo-icon">⚡</div>
|
|
@@ -229,7 +283,11 @@
|
|
|
229
283
|
<svg class="w-5 h-5" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12" /></svg>
|
|
230
284
|
</button>
|
|
231
285
|
</div>
|
|
232
|
-
<%= render "layouts/rails_nexus/sidebar_navigation",
|
|
286
|
+
<%= render "layouts/rails_nexus/sidebar_navigation",
|
|
287
|
+
exception_count: exception_count,
|
|
288
|
+
monitor_menu_active: monitor_menu_active,
|
|
289
|
+
operations_menu_active: operations_menu_active,
|
|
290
|
+
resources_menu_active: resources_menu_active %>
|
|
233
291
|
<div class="rn-sidebar-footer">
|
|
234
292
|
<span class="rn-sidebar-status"><span class="rn-status-dot"></span>Operational</span>
|
|
235
293
|
<span>v<%= RailsNexus::VERSION %></span>
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
<div class="rn-filter-group">
|
|
71
71
|
<label>Password</label>
|
|
72
72
|
<%= f.password_field :password, class: "rn-input", placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" %>
|
|
73
|
+
<p class="text-xs mt-1" style="color: var(--rn-text-muted)">ENV[VAR], ${VAR}, credentials[:key], or plain text</p>
|
|
73
74
|
</div>
|
|
74
75
|
<div class="rn-filter-group md:col-span-3">
|
|
75
76
|
<label>Skip Tables (comma-separated)</label>
|
|
@@ -147,6 +148,7 @@
|
|
|
147
148
|
<div class="rn-filter-group" id="encrypt-password-group" style="<%= 'display:none' unless @config.encrypted? %>">
|
|
148
149
|
<label>Encryption Password</label>
|
|
149
150
|
<%= f.password_field :encryption_password, class: "rn-input", placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" %>
|
|
151
|
+
<p class="text-xs mt-1" style="color: var(--rn-text-muted)">ENV[VAR], ${VAR}, credentials[:key], or plain text</p>
|
|
150
152
|
</div>
|
|
151
153
|
<div class="rn-filter-group">
|
|
152
154
|
<label style="display:flex;align-items:center;gap:8px;cursor:pointer">
|
|
@@ -157,6 +159,7 @@
|
|
|
157
159
|
<div class="rn-filter-group" id="gpg-password-group" style="<%= 'display:none' unless @config.gpg_enabled? %>">
|
|
158
160
|
<label>GPG Password</label>
|
|
159
161
|
<%= f.password_field :gpg_password, class: "rn-input", placeholder: "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022" %>
|
|
162
|
+
<p class="text-xs mt-1" style="color: var(--rn-text-muted)">ENV[VAR], ${VAR}, credentials[:key], or plain text</p>
|
|
160
163
|
</div>
|
|
161
164
|
<div class="rn-filter-group">
|
|
162
165
|
<label style="display:flex;align-items:center;gap:8px;cursor:pointer">
|
|
@@ -9,7 +9,16 @@
|
|
|
9
9
|
<span class="rn-breadcrumb-current">History</span>
|
|
10
10
|
</nav>
|
|
11
11
|
|
|
12
|
-
<
|
|
12
|
+
<div class="flex items-center justify-between">
|
|
13
|
+
<div>
|
|
14
|
+
<h1 class="text-2xl font-bold" style="color: var(--rn-text)">Backup History</h1>
|
|
15
|
+
<p class="text-sm mt-1" style="color: var(--rn-text-muted)">Review completed runs, failures, and backup logs.</p>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="flex items-center gap-2">
|
|
18
|
+
<%= link_to "Configurations", backup_path, class: "rn-btn rn-btn-ghost" %>
|
|
19
|
+
<%= link_to "New Config", new_backup_path, class: "rn-btn rn-btn-primary" %>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
13
22
|
|
|
14
23
|
<div class="rn-card">
|
|
15
24
|
<% if @records.any? %>
|
|
@@ -30,11 +39,17 @@
|
|
|
30
39
|
<tbody>
|
|
31
40
|
<% @records.each do |record| %>
|
|
32
41
|
<tr>
|
|
33
|
-
<td><span class="font-medium" style="color: var(--rn-text)"><%= record.
|
|
42
|
+
<td><span class="font-medium" style="color: var(--rn-text)"><%= record.config_name %></span></td>
|
|
34
43
|
<td>
|
|
35
44
|
<span class="rn-badge rn-badge-<%= record.status == 'success' ? 'success' : record.status == 'failed' ? 'danger' : 'warning' %>">
|
|
36
45
|
<%= record.status.capitalize %>
|
|
37
46
|
</span>
|
|
47
|
+
<% if record.status == 'failed' && record.error_message.present? %>
|
|
48
|
+
<div class="text-xs mt-1" style="color: var(--rn-danger); cursor: pointer; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap" title="Click to expand" onclick="var el=this.nextElementSibling; el.style.display=el.style.display==='none'?'block':'none'">
|
|
49
|
+
✖ <%= truncate(record.error_message, length: 60) %>
|
|
50
|
+
</div>
|
|
51
|
+
<pre class="text-xs" style="display:none; color: var(--rn-danger); background: var(--rn-bg-secondary); padding: 8px; border-radius: 4px; margin-top: 4px; max-height: 120px; overflow: auto; white-space: pre-wrap; word-break: break-word"><%= record.error_message %></pre>
|
|
52
|
+
<% end %>
|
|
38
53
|
</td>
|
|
39
54
|
<td><span class="text-xs rn-mono" style="color: var(--rn-text-secondary)"><%= record.file_path ? File.basename(record.file_path) : "—" %></span></td>
|
|
40
55
|
<td><span class="text-xs" style="color: var(--rn-text-secondary)"><%= record.file_size ? number_to_human_size(record.file_size) : "—" %></span></td>
|
|
@@ -8,31 +8,13 @@
|
|
|
8
8
|
</nav>
|
|
9
9
|
|
|
10
10
|
<div class="flex items-center justify-between">
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<%# ─── Stats ──────────────────────────────────────────────── %>
|
|
16
|
-
<div class="rn-stats">
|
|
17
|
-
<div class="rn-stat">
|
|
18
|
-
<span class="rn-stat-label">Configs</span>
|
|
19
|
-
<span class="rn-stat-value"><%= @stats[:total_configs] %></span>
|
|
20
|
-
<span class="rn-stat-change"><%= @stats[:enabled_configs] %> enabled</span>
|
|
21
|
-
</div>
|
|
22
|
-
<div class="rn-stat">
|
|
23
|
-
<span class="rn-stat-label">Total Backups</span>
|
|
24
|
-
<span class="rn-stat-value"><%= @stats[:total_backups] %></span>
|
|
25
|
-
<span class="rn-stat-change">All time</span>
|
|
26
|
-
</div>
|
|
27
|
-
<div class="rn-stat">
|
|
28
|
-
<span class="rn-stat-label">Successful</span>
|
|
29
|
-
<span class="rn-stat-value" style="color: var(--rn-success)"><%= @stats[:successful] %></span>
|
|
30
|
-
<span class="rn-stat-change">All time</span>
|
|
11
|
+
<div>
|
|
12
|
+
<h1 class="text-2xl font-bold" style="color: var(--rn-text)">Backup Configurations</h1>
|
|
13
|
+
<p class="text-sm mt-1" style="color: var(--rn-text-muted)">Configure storage, schedules, and run backups.</p>
|
|
31
14
|
</div>
|
|
32
|
-
<div class="
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<span class="rn-stat-change">All time</span>
|
|
15
|
+
<div class="flex items-center gap-2">
|
|
16
|
+
<%= link_to "Backup History", backup_history_path, class: "rn-btn rn-btn-ghost" %>
|
|
17
|
+
<%= link_to "New Config", new_backup_path, class: "rn-btn rn-btn-primary" %>
|
|
36
18
|
</div>
|
|
37
19
|
</div>
|
|
38
20
|
|
|
@@ -80,16 +62,23 @@
|
|
|
80
62
|
<span class="rn-badge <%= config.enabled? ? 'rn-badge-success' : 'rn-badge-muted' %>">
|
|
81
63
|
<%= config.enabled? ? 'Enabled' : 'Disabled' %>
|
|
82
64
|
</span>
|
|
83
|
-
<% if config.
|
|
65
|
+
<% if config.encrypted? %><span class="rn-badge rn-badge-warning">Encrypted</span><% end %>
|
|
84
66
|
<% if config.rsync_enabled? %><span class="rn-badge rn-badge-info">RSync</span><% end %>
|
|
85
67
|
</td>
|
|
86
68
|
<td style="text-align: right">
|
|
87
69
|
<div class="flex items-center justify-end gap-1">
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
class
|
|
91
|
-
|
|
92
|
-
|
|
70
|
+
<% running = RailsNexus::Backup.where(config_name: config.name, status: "running").exists? %>
|
|
71
|
+
<% if running %>
|
|
72
|
+
<span class="rn-badge rn-badge-info">
|
|
73
|
+
<svg class="animate-spin" style="width:12px;height:12px;display:inline" viewBox="0 0 24 24" fill="none"><circle cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4" opacity="0.25"/><path d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" fill="currentColor"/></svg>
|
|
74
|
+
Running
|
|
75
|
+
</span>
|
|
76
|
+
<% else %>
|
|
77
|
+
<%= button_to "Run", backup_trigger_path(config),
|
|
78
|
+
method: :post,
|
|
79
|
+
class: "rn-btn rn-btn-primary rn-btn-xs",
|
|
80
|
+
data: { turbo_confirm: "Run #{config.name} backup now?" } %>
|
|
81
|
+
<% end %>
|
|
93
82
|
<%= link_to "Edit", edit_backup_path(config), class: "rn-btn rn-btn-ghost rn-btn-xs" %>
|
|
94
83
|
<%= button_to "Delete", backup_destroy_path(config),
|
|
95
84
|
method: :delete,
|
|
@@ -110,46 +99,14 @@
|
|
|
110
99
|
</div>
|
|
111
100
|
<% end %>
|
|
112
101
|
</div>
|
|
113
|
-
|
|
114
|
-
<%# ─── Recent Backups ─────────────────────────────────────── %>
|
|
115
|
-
<% if @records.any? %>
|
|
116
|
-
<div class="rn-card">
|
|
117
|
-
<div class="p-4" style="border-bottom: 1px solid var(--rn-border-light)">
|
|
118
|
-
<div class="flex items-center justify-between">
|
|
119
|
-
<h2 class="text-sm font-semibold" style="color: var(--rn-text)">Recent Backups</h2>
|
|
120
|
-
<%= link_to "View All", backup_history_path, class: "text-xs font-medium", style: "color: var(--rn-primary)" %>
|
|
121
|
-
</div>
|
|
122
|
-
</div>
|
|
123
|
-
<div class="rn-table-wrap">
|
|
124
|
-
<table class="rn-table">
|
|
125
|
-
<thead>
|
|
126
|
-
<tr>
|
|
127
|
-
<th>Config</th>
|
|
128
|
-
<th>Status</th>
|
|
129
|
-
<th>Size</th>
|
|
130
|
-
<th>Duration</th>
|
|
131
|
-
<th>Triggered By</th>
|
|
132
|
-
<th>Time</th>
|
|
133
|
-
</tr>
|
|
134
|
-
</thead>
|
|
135
|
-
<tbody>
|
|
136
|
-
<% @records.each do |record| %>
|
|
137
|
-
<tr>
|
|
138
|
-
<td><span class="font-medium" style="color: var(--rn-text)"><%= record.model_name %></span></td>
|
|
139
|
-
<td>
|
|
140
|
-
<span class="rn-badge rn-badge-<%= record.status == 'success' ? 'success' : record.status == 'failed' ? 'danger' : 'warning' %>">
|
|
141
|
-
<%= record.status.capitalize %>
|
|
142
|
-
</span>
|
|
143
|
-
</td>
|
|
144
|
-
<td><span class="text-xs" style="color: var(--rn-text-secondary)"><%= record.file_size ? number_to_human_size(record.file_size) : "—" %></span></td>
|
|
145
|
-
<td><span class="text-xs" style="color: var(--rn-text-secondary)"><%= record.duration ? "#{record.duration.round(1)}s" : "—" %></span></td>
|
|
146
|
-
<td><span class="text-xs" style="color: var(--rn-text-muted)"><%= record.triggered_by || "—" %></span></td>
|
|
147
|
-
<td><span class="text-xs" style="color: var(--rn-text-muted)"><%= record.started_at ? time_ago_in_words(record.started_at) + " ago" : "—" %></span></td>
|
|
148
|
-
</tr>
|
|
149
|
-
<% end %>
|
|
150
|
-
</tbody>
|
|
151
|
-
</table>
|
|
152
|
-
</div>
|
|
153
|
-
</div>
|
|
154
|
-
<% end %>
|
|
155
102
|
</div>
|
|
103
|
+
|
|
104
|
+
<script>
|
|
105
|
+
// Auto-refresh when a backup is running
|
|
106
|
+
(function() {
|
|
107
|
+
var running = document.querySelector('.animate-spin');
|
|
108
|
+
if (running) {
|
|
109
|
+
setTimeout(function() { location.reload(); }, 5000);
|
|
110
|
+
}
|
|
111
|
+
})();
|
|
112
|
+
</script>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<div id="exceptions-content" class="rn-
|
|
1
|
+
<div id="exceptions-content" class="rn-exceptions-results overflow-hidden">
|
|
2
2
|
<% if @exceptions.empty? %>
|
|
3
3
|
<div class="py-16 text-center">
|
|
4
4
|
<div class="w-12 h-12 rounded-full flex items-center justify-center mx-auto" style="background: var(--rn-success-light)">
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
<div class="rn-exceptions-toolbar-actions">
|
|
40
40
|
<%# Keyboard hint %>
|
|
41
|
-
<span class="text-xs flex items-center gap-1" style="color: var(--rn-text-muted)">
|
|
41
|
+
<span class="rn-shortcuts-hint text-xs flex items-center gap-1" style="color: var(--rn-text-muted)">
|
|
42
42
|
<span class="rn-kbd">?</span> shortcuts
|
|
43
43
|
</span>
|
|
44
44
|
|
|
@@ -58,11 +58,7 @@
|
|
|
58
58
|
<caption class="sr-only">Logged application exceptions</caption>
|
|
59
59
|
<thead>
|
|
60
60
|
<tr>
|
|
61
|
-
<th class="rn-col-severity"><span class="sr-only">Severity</span></th>
|
|
62
61
|
<th class="rn-col-exception <%= sort_header_class(:exception_class) %>"><%= sort_link @q, :exception_class, "Exception" %></th>
|
|
63
|
-
<% if exception_feature?(:platform) %>
|
|
64
|
-
<th class="rn-col-platform <%= sort_header_class(:platform) %>"><%= sort_link @q, :platform, "Platform" %></th>
|
|
65
|
-
<% end %>
|
|
66
62
|
<th class="rn-col-source <%= sort_header_class(:controller_name) %>"><%= sort_link @q, :controller_name, "Source" %></th>
|
|
67
63
|
<th class="rn-col-message <%= sort_header_class(:message) %>"><%= sort_link @q, :message, "Message" %></th>
|
|
68
64
|
<% if exception_feature?(:occurrence_count) %>
|
|
@@ -70,9 +66,6 @@
|
|
|
70
66
|
<% else %>
|
|
71
67
|
<th class="rn-col-count">Count</th>
|
|
72
68
|
<% end %>
|
|
73
|
-
<th class="rn-col-workflow <%= sort_header_class(:priority) if exception_feature?(:priority) && exception_searchable?(:priority) %>">
|
|
74
|
-
<%= exception_feature?(:priority) && exception_searchable?(:priority) ? sort_link(@q, :priority, "Workflow") : "Workflow" %>
|
|
75
|
-
</th>
|
|
76
69
|
<th class="rn-col-time <%= sort_header_class(:created_at) %>"><%= sort_link @q, :created_at, "Last Seen" %></th>
|
|
77
70
|
<th class="rn-col-actions"><span class="sr-only">Actions</span></th>
|
|
78
71
|
</tr>
|
|
@@ -88,28 +81,19 @@
|
|
|
88
81
|
data-index="<%= index %>"
|
|
89
82
|
data-rails_nexus-index-param="<%= index %>">
|
|
90
83
|
|
|
91
|
-
<%#
|
|
92
|
-
<td class="rn-col-severity">
|
|
93
|
-
<span class="rn-severity-dot rn-severity-<%= severity_for(exception) %>" aria-hidden="true"></span>
|
|
94
|
-
</td>
|
|
95
|
-
|
|
96
|
-
<%# Exception class with severity badge %>
|
|
84
|
+
<%# Exception class with severity indicator %>
|
|
97
85
|
<td class="rn-col-exception">
|
|
98
|
-
<
|
|
99
|
-
|
|
100
|
-
<
|
|
101
|
-
|
|
86
|
+
<div class="rn-exception-cell">
|
|
87
|
+
<span class="rn-severity-dot rn-severity-<%= severity_for(exception) %>" aria-hidden="true"></span>
|
|
88
|
+
<div class="min-w-0">
|
|
89
|
+
<span class="rn-exception-name" title="<%= exception.exception_class %>"><%= exception.exception_class %></span>
|
|
90
|
+
<% if exception.respond_to?(:fingerprint) && exception.fingerprint.present? %>
|
|
91
|
+
<span class="rn-row-meta rn-mono" title="Fingerprint <%= exception.fingerprint %>">#<%= exception.fingerprint.first(10) %></span>
|
|
92
|
+
<% end %>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
102
95
|
</td>
|
|
103
96
|
|
|
104
|
-
<%# Platform badge %>
|
|
105
|
-
<% if exception_feature?(:platform) %>
|
|
106
|
-
<td class="rn-col-platform">
|
|
107
|
-
<span class="rn-badge rn-badge-<%= exception.platform == 'ios' ? 'success' : exception.platform == 'android' ? 'warning' : exception.platform == 'api' ? 'info' : exception.platform == 'bot' ? 'muted' : 'primary' %>">
|
|
108
|
-
<%= exception.platform&.upcase || 'WEB' %>
|
|
109
|
-
</span>
|
|
110
|
-
</td>
|
|
111
|
-
<% end %>
|
|
112
|
-
|
|
113
97
|
<%# Source (controller + action) %>
|
|
114
98
|
<td class="rn-col-source">
|
|
115
99
|
<div class="rn-source" title="<%= [exception.controller_name, exception.action_name].compact.join('#') %>">
|
|
@@ -132,22 +116,6 @@
|
|
|
132
116
|
<span class="rn-occurrence-count" title="<%= pluralize(exception_occurrence_count(exception), 'occurrence') %>"><%= number_with_delimiter(exception_occurrence_count(exception)) %></span>
|
|
133
117
|
</td>
|
|
134
118
|
|
|
135
|
-
<%# Workflow indicators %>
|
|
136
|
-
<td class="rn-col-workflow">
|
|
137
|
-
<% status_label, status_style = exception_status(exception) %>
|
|
138
|
-
<div class="rn-workflow-state">
|
|
139
|
-
<span class="rn-badge rn-badge-xs rn-badge-<%= status_style %>"><%= status_label %></span>
|
|
140
|
-
<% if exception.respond_to?(:priority) && exception.priority.present? %>
|
|
141
|
-
<span class="rn-badge rn-badge-xs rn-badge-<%= exception.priority == 'critical' ? 'danger' : exception.priority == 'high' ? 'warning' : exception.priority == 'medium' ? 'info' : 'muted' %>"><%= exception.priority.upcase %></span>
|
|
142
|
-
<% end %>
|
|
143
|
-
<% if exception.respond_to?(:assigned_to) && exception.assigned_to.present? %>
|
|
144
|
-
<span class="rn-row-meta" title="Assigned to <%= exception.assigned_to %>">👤 <%= exception.assigned_to %></span>
|
|
145
|
-
<% elsif exception.respond_to?(:comments_count) && exception.comments_count.to_i > 0 %>
|
|
146
|
-
<span class="rn-row-meta"><%= exception.comments_count %> comments</span>
|
|
147
|
-
<% end %>
|
|
148
|
-
</div>
|
|
149
|
-
</td>
|
|
150
|
-
|
|
151
119
|
<%# Time (relative) %>
|
|
152
120
|
<td class="rn-col-time rn-date"><%= pretty_exception_date(exception) %></td>
|
|
153
121
|
|