kaui 4.0.16 → 4.0.17

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ebd7c6655e0d1bad878e92414dfe4172beb34bd5285eb6032a862519cbf8b891
4
- data.tar.gz: 8886bda85a848030e5b057da3a567e0c5a65bd6c0a5c021961960fc524edcdc6
3
+ metadata.gz: 98e5dfbab802d1505c3e5c5e85dcde9ee8c98724f35ad5a007acd2849f75eb6e
4
+ data.tar.gz: 5cdcd79cdc9a95951c09bed2b2cbda90f3fe750e59d2adb93e1b83196f0a91a9
5
5
  SHA512:
6
- metadata.gz: f23ecc404eda3252987e4fad61ad61618aa0b4211c7f60a9454f97ffdcc06a67222c684b012babd2a25598400639318bb6e84f2adae9b9b5fae7347b75cda73a
7
- data.tar.gz: 6378adf68310234434460ec333dbb2ce956e119c744146478034a11d581287386875b04c2f9eb1adfd50f98ee99264171b3f209dcd2107f4f5b7c171a672a242
6
+ metadata.gz: fde50f9e9a89e44b0370a9c2b31713735fc3603accab084bede5bf03ca8586da3f12809be9cdf6a098d272ae02e5f7ee5a531d5cd056b5ed1820944f1fd72071
7
+ data.tar.gz: 4539ef5e1f52389fb34d1905e31fd58d3c4d9941dc491b0d79fe31db83c1b431fdb5268b6bbe47a652c1f15edb69d0d6e4012898a06f650dc5af516b1470c530
@@ -4,9 +4,22 @@
4
4
  <%= render :template => 'kaui/layouts/kaui_account_sidebar' %>
5
5
  <div class="queues w-100">
6
6
 
7
- <div class="queues-main-header mb-4">
8
- <h1 class="queues-title">Queues</h1>
9
- <p class="queues-subtitle">View and monitor bus events and notifications.</p>
7
+ <div class="queues-main-header mb-4 d-flex justify-content-between align-items-start">
8
+ <div>
9
+ <h1 class="queues-title">Queues</h1>
10
+ <p class="queues-subtitle">View and monitor bus events and notifications.</p>
11
+ </div>
12
+ <%= render "kaui/components/button/button", {
13
+ label: "Download JSON",
14
+ icon: 'kaui/download.svg',
15
+ html_class: "kaui-button custom-hover",
16
+ variant: "btn-outline-secondary d-inline-flex align-items-center gap-1",
17
+ type: "button",
18
+ html_options: {
19
+ id: "queuesDownloadButton",
20
+ onclick: "downloadActiveQueuesTab()"
21
+ }
22
+ } %>
10
23
  </div>
11
24
 
12
25
  <div class="queues-card">
@@ -139,7 +152,7 @@
139
152
  <span class="dot"></span>
140
153
  </td>
141
154
  <td><span><%= truncate_millis(bus_event['createdDate']) %></span></td>
142
- <td><%= truncate_class_name(bus_event['className'], false) %></td>
155
+ <td data-full-value="<%= bus_event['className'] %>"><%= truncate_class_name(bus_event['className'], false) %></td>
143
156
  <td><%= "<pre>#{JSON.pretty_generate(bus_event['event'])}</pre>".html_safe %></td>
144
157
  <td><%= bus_event['userToken'] %></td>
145
158
  <% if @account_id.blank? %>
@@ -278,6 +291,62 @@
278
291
  </div>
279
292
 
280
293
  <%= javascript_tag do %>
294
+ function downloadActiveQueuesTab() {
295
+ var activeTab = $('#queuesNavTabs .nav-link.active').attr('id');
296
+ var tableId, filename;
297
+ if (activeTab === 'notifications-tab') {
298
+ tableId = '#notifications-table';
299
+ filename = 'notifications-' + new Date().toISOString().split('T')[0] + '.json';
300
+ } else {
301
+ tableId = '#bus-table';
302
+ filename = 'bus-events-' + new Date().toISOString().split('T')[0] + '.json';
303
+ }
304
+
305
+ var table = $(tableId).DataTable();
306
+ var headers = [];
307
+ var visibleColumnIndexes = [];
308
+
309
+ $(tableId + ' thead th').each(function(index) {
310
+ if (index === 0) return; // skip timeline dot column
311
+ var column = table.column(index);
312
+ if (column.visible()) {
313
+ var headerText = $(this).find('.header-text').text().trim();
314
+ headers.push(headerText);
315
+ visibleColumnIndexes.push(index);
316
+ }
317
+ });
318
+
319
+ var jsonRows = [];
320
+
321
+ table.rows({ search: 'applied' }).nodes().each(function(row) {
322
+ var cells = $(row).find('td');
323
+ var obj = {};
324
+ visibleColumnIndexes.forEach(function(colIdx, i) {
325
+ var $cell = $(cells[colIdx]);
326
+ var fullValue = $cell.data('full-value');
327
+ var cellText = fullValue !== undefined ? String(fullValue) : $cell.text().trim();
328
+ var key = headers[i];
329
+ try {
330
+ obj[key] = JSON.parse(cellText);
331
+ } catch (e) {
332
+ obj[key] = cellText;
333
+ }
334
+ });
335
+ jsonRows.push(obj);
336
+ });
337
+
338
+ var jsonContent = JSON.stringify(jsonRows, null, 2);
339
+ var blob = new Blob([jsonContent], { type: 'application/json;charset=utf-8;' });
340
+ var url = URL.createObjectURL(blob);
341
+ var a = document.createElement('a');
342
+ a.href = url;
343
+ a.download = filename;
344
+ document.body.appendChild(a);
345
+ a.click();
346
+ document.body.removeChild(a);
347
+ URL.revokeObjectURL(url);
348
+ }
349
+
281
350
  $(document).ready(function() {
282
351
  var busTable = $('#bus-table').DataTable({
283
352
  "dom": "t<'row dt-footer-row'<'col-md-6'i><'col-md-6'p>>",
@@ -31,7 +31,7 @@
31
31
  <path d="M17.8333 10.8333V4.99992C17.8333 4.07944 17.0871 3.33325 16.1666 3.33325H4.49992C3.57944 3.33325 2.83325 4.07944 2.83325 4.99992V16.6666C2.83325 17.5871 3.57944 18.3333 4.49992 18.3333H10.3333" stroke="#A4A7AE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
32
32
  <path d="M2.83325 8.33325H17.8333" stroke="#A4A7AE" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
33
33
  </svg>
34
- <input class="form-control" value="<%=Date.parse(Time.now.to_s).to_s%>" id="effective_from_date" name="effective_from_date" type="text" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-today-highlight="true">
34
+ <input class="form-control" value="<%= Time.zone.today.strftime('%Y-%m-%d') %>" id="effective_from_date" name="effective_from_date" type="text" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-today-highlight="true">
35
35
  </div>
36
36
  </div>
37
37
  </div>
data/lib/kaui/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Kaui
4
- VERSION = '4.0.16'
4
+ VERSION = '4.0.17'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kaui
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.16
4
+ version: 4.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kill Bill core team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-20 00:00:00.000000000 Z
11
+ date: 2026-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack