side_bro 0.2.2 → 0.2.3
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/README.md +4 -0
- data/lib/side_bro/version.rb +1 -1
- data/lib/side_bro/web/application.rb +6 -2
- data/lib/side_bro/web/helpers.rb +7 -0
- data/web/assets/javascripts/dashboard.js +68 -127
- data/web/assets/stylesheets/style.css +271 -472
- data/web/views/_nav.html.erb +1 -2
- data/web/views/dashboard.html.erb +11 -9
- data/web/views/dead.html.erb +1 -1
- data/web/views/layout.html.erb +3 -4
- data/web/views/queue.html.erb +21 -14
- data/web/views/retry.html.erb +1 -1
- data/web/views/scheduled_job_info.html.erb +1 -1
- metadata +2 -3
- data/web/views/_footer.html.erb +0 -3
data/web/views/_nav.html.erb
CHANGED
|
@@ -14,9 +14,8 @@
|
|
|
14
14
|
<div class="brand">
|
|
15
15
|
<div class="brand-mark"></div>
|
|
16
16
|
<div>
|
|
17
|
-
<div class="brand-name">Side
|
|
17
|
+
<div class="brand-name">Side Bro</div>
|
|
18
18
|
</div>
|
|
19
|
-
<div class="brand-pill">live</div>
|
|
20
19
|
</div>
|
|
21
20
|
|
|
22
21
|
<div class="nav-label">Overview</div>
|
|
@@ -30,23 +30,24 @@
|
|
|
30
30
|
</div>
|
|
31
31
|
</div>
|
|
32
32
|
|
|
33
|
+
<div class="chart-grid">
|
|
33
34
|
<!-- Realtime chart panel -->
|
|
34
35
|
<div class="panel">
|
|
35
36
|
<div class="panel-head">
|
|
36
37
|
<div class="ph-title">Throughput · last <span id="chartWindow">60s</span></div>
|
|
37
38
|
<div class="ph-meta"><span id="chartTime"></span></div>
|
|
38
39
|
<div class="ph-spacer"></div>
|
|
39
|
-
<div
|
|
40
|
-
<span
|
|
41
|
-
<span
|
|
40
|
+
<div class="chart-legend">
|
|
41
|
+
<span><span class="legend-dot legend-processed"></span>Processed</span>
|
|
42
|
+
<span><span class="legend-dot legend-failed"></span>Failed</span>
|
|
42
43
|
</div>
|
|
43
44
|
</div>
|
|
44
45
|
<div class="chart-wrap">
|
|
45
|
-
<svg id="liveChart"
|
|
46
|
+
<svg id="liveChart"></svg>
|
|
46
47
|
<div class="chart-tooltip" id="chartTip">
|
|
47
48
|
<div class="tip-time" id="tipTime"></div>
|
|
48
|
-
<div class="tip-row"><span class="legend-dot
|
|
49
|
-
<div class="tip-row"><span class="legend-dot
|
|
49
|
+
<div class="tip-row"><span class="legend-dot legend-processed"></span>Processed: <b id="tipProc">0</b></div>
|
|
50
|
+
<div class="tip-row"><span class="legend-dot legend-failed"></span>Failed: <b id="tipFail">0</b></div>
|
|
50
51
|
</div>
|
|
51
52
|
</div>
|
|
52
53
|
</div>
|
|
@@ -64,10 +65,11 @@
|
|
|
64
65
|
<button class="chip" data-range="6m">6 months</button>
|
|
65
66
|
</div>
|
|
66
67
|
</div>
|
|
67
|
-
<div class="chart-wrap"
|
|
68
|
-
<svg id="historyChart"
|
|
68
|
+
<div class="chart-wrap">
|
|
69
|
+
<svg id="historyChart"></svg>
|
|
69
70
|
</div>
|
|
70
71
|
</div>
|
|
72
|
+
</div>
|
|
71
73
|
|
|
72
74
|
<!-- Redis panel -->
|
|
73
75
|
<div class="panel">
|
|
@@ -121,4 +123,4 @@ window.HISTORY_DATA = {
|
|
|
121
123
|
};
|
|
122
124
|
window.SIDE_BRO_ROOT = '<%= action.root_path %>';
|
|
123
125
|
</script>
|
|
124
|
-
<script src="<%= action.
|
|
126
|
+
<script src="<%= action.asset_path("javascripts/dashboard.js") %>" nonce="<%= nonce %>"></script>
|
data/web/views/dead.html.erb
CHANGED
data/web/views/layout.html.erb
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<title>SideBro<%= @page_title ? " — #{@page_title}" : "" %></title>
|
|
7
7
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
8
8
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
9
|
-
<link href="https://fonts.googleapis.com/css2?family=
|
|
10
|
-
<link rel="stylesheet" href="<%= action.
|
|
9
|
+
<link href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500;600&display=swap" rel="stylesheet">
|
|
10
|
+
<link rel="stylesheet" href="<%= action.asset_path("stylesheets/style.css") %>" nonce="<%= nonce %>">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
13
13
|
<div class="app">
|
|
@@ -52,10 +52,9 @@
|
|
|
52
52
|
|
|
53
53
|
<%= content %>
|
|
54
54
|
|
|
55
|
-
<%= action.render_partial(:footer) %>
|
|
56
55
|
</main>
|
|
57
56
|
|
|
58
57
|
</div>
|
|
59
|
-
<script src="<%= action.
|
|
58
|
+
<script src="<%= action.asset_path("javascripts/application.js") %>" nonce="<%= nonce %>"></script>
|
|
60
59
|
</body>
|
|
61
60
|
</html>
|
data/web/views/queue.html.erb
CHANGED
|
@@ -21,11 +21,15 @@
|
|
|
21
21
|
</div>
|
|
22
22
|
|
|
23
23
|
<div class="toolbar">
|
|
24
|
-
<
|
|
24
|
+
<form class="search" method="get" action="<%= action.root_path %>queues/<%= action.h(@queue.name) %>">
|
|
25
|
+
<%- request_params = action.request.params.reject { |k, _| %w[q page].include?(k) } %>
|
|
26
|
+
<%- request_params.each do |k, v| %>
|
|
27
|
+
<input type="hidden" name="<%= action.h(k) %>" value="<%= action.h(v) %>">
|
|
28
|
+
<%- end %>
|
|
25
29
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
|
|
26
|
-
<input id="queueSearch" placeholder="Search
|
|
27
|
-
<
|
|
28
|
-
</
|
|
30
|
+
<input id="queueSearch" name="q" value="<%= action.h(@search) %>" placeholder="Search class, args, JID — press Enter" autocomplete="off" />
|
|
31
|
+
<button type="submit" class="btn ghost search-btn">Search</button>
|
|
32
|
+
</form>
|
|
29
33
|
|
|
30
34
|
<div class="divider-v"></div>
|
|
31
35
|
|
|
@@ -76,6 +80,16 @@
|
|
|
76
80
|
</div>
|
|
77
81
|
<%- end %>
|
|
78
82
|
|
|
83
|
+
<%- if @searching %>
|
|
84
|
+
<div class="active-filters">
|
|
85
|
+
<span>Search results for</span>
|
|
86
|
+
<span class="filter-tag">
|
|
87
|
+
<span><%= action.h(@search) %></span>
|
|
88
|
+
<a href="?<%= action.query_string("q" => nil, "page" => "1") %>" class="x" title="Clear search">✕</a>
|
|
89
|
+
</span>
|
|
90
|
+
</div>
|
|
91
|
+
<%- end %>
|
|
92
|
+
|
|
79
93
|
<%- if @jobs.empty? %>
|
|
80
94
|
<div class="panel">
|
|
81
95
|
<div class="empty"><%= action.t(:no_jobs) %></div>
|
|
@@ -85,7 +99,7 @@
|
|
|
85
99
|
<div class="panel-head">
|
|
86
100
|
<div class="ph-title">Jobs</div>
|
|
87
101
|
<div class="ph-meta">
|
|
88
|
-
<%- if @filtering %>
|
|
102
|
+
<%- if @filtering || @searching %>
|
|
89
103
|
first <%= @jobs.size %> matches · newest first
|
|
90
104
|
<%- else %>
|
|
91
105
|
<%= @total %> total · sorted <%= @asc ? "newest first" : "oldest first" %>
|
|
@@ -158,7 +172,7 @@
|
|
|
158
172
|
</div>
|
|
159
173
|
|
|
160
174
|
<div class="panel-foot">
|
|
161
|
-
<%- if @filtering %>
|
|
175
|
+
<%- if @filtering || @searching %>
|
|
162
176
|
<div class="paging" style="color:var(--text-faint);font-size:12px;justify-content:center">
|
|
163
177
|
Showing first <%= @per_page %> matches — filtered results are not paginated
|
|
164
178
|
</div>
|
|
@@ -172,14 +186,7 @@
|
|
|
172
186
|
<script nonce="<%= nonce %>">
|
|
173
187
|
(function () {
|
|
174
188
|
var input = document.getElementById("queueSearch");
|
|
175
|
-
|
|
176
|
-
if (!input || !table) return;
|
|
177
|
-
input.addEventListener("input", function () {
|
|
178
|
-
var q = input.value.toLowerCase();
|
|
179
|
-
table.querySelectorAll("tbody tr").forEach(function (row) {
|
|
180
|
-
row.style.display = q === "" || row.textContent.toLowerCase().includes(q) ? "" : "none";
|
|
181
|
-
});
|
|
182
|
-
});
|
|
189
|
+
if (!input) return;
|
|
183
190
|
document.addEventListener("keydown", function (e) {
|
|
184
191
|
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "k") {
|
|
185
192
|
e.preventDefault();
|
data/web/views/retry.html.erb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: side_bro
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ruby Dev SRL
|
|
@@ -79,7 +79,6 @@ files:
|
|
|
79
79
|
- web/assets/javascripts/metrics.js
|
|
80
80
|
- web/assets/stylesheets/style.css
|
|
81
81
|
- web/locales/en.yml
|
|
82
|
-
- web/views/_footer.html.erb
|
|
83
82
|
- web/views/_job_info.html.erb
|
|
84
83
|
- web/views/_metrics_period_select.html.erb
|
|
85
84
|
- web/views/_nav.html.erb
|
|
@@ -120,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
120
119
|
- !ruby/object:Gem::Version
|
|
121
120
|
version: '0'
|
|
122
121
|
requirements: []
|
|
123
|
-
rubygems_version: 4.0.
|
|
122
|
+
rubygems_version: 4.0.22
|
|
124
123
|
specification_version: 4
|
|
125
124
|
summary: A Rack-mountable Sidekiq Web UI alternative
|
|
126
125
|
test_files: []
|
data/web/views/_footer.html.erb
DELETED