log_sense 1.7.0 → 1.8.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.
@@ -1,37 +1,37 @@
1
1
  <ul class="stats-list">
2
2
  <li>
3
- <%= data[:first_day_in_analysis]&.strftime("%b %d, %Y") %>
4
3
  <span class="stats-list-label">From</span>
4
+ <%= data[:first_day_in_analysis]&.strftime("%b %d, %Y") %>
5
5
  </li>
6
6
  <li>
7
- <%= data[:last_day_in_analysis]&.strftime("%b %d, %Y") %>
8
7
  <span class="stats-list-label">To</span>
8
+ <%= data[:last_day_in_analysis]&.strftime("%b %d, %Y") %>
9
9
  </li>
10
10
  <li class="stats-list-positive">
11
- <%= data[:total_days_in_analysis] %>
12
11
  <span class="stats-list-label">Days</span>
12
+ <%= data[:total_days_in_analysis] %>
13
13
  </li>
14
14
  <% if data[:total_size] %>
15
15
  <li class="stats-list-positive">
16
- <%= data[:total_size] %>
17
16
  <span class="stats-list-label">Data Transferred</span>
17
+ <%= data[:total_size] %>
18
18
  </li>
19
19
  <% end %>
20
20
  <li class="stats-list-negative">
21
- <%= data[:events] %>
22
21
  <span class="stats-list-label">Hits</span>
22
+ <%= data[:events] %>
23
23
  </li>
24
24
  <li class="stats-list-negative">
25
- <%= data[:total_unique_visits] %>
26
25
  <span class="stats-list-label">Unique Visits</span>
26
+ <%= data[:total_unique_visits] %>
27
27
  </li>
28
28
  <li class="stats-list-negative">
29
+ <span class="stats-list-label">Unique Visits / Day</span>
29
30
  <% days = data[:total_days_in_analysis] %>
30
31
  <%= days > 0 ? "%d" % (data[:total_unique_visits] / days) : "N/A" %>
31
- <span class="stats-list-label">Unique Visits / Day</span>
32
32
  </li>
33
33
  <li class="stats-list-negative">
34
- <%= data[:total_unique_visits] != 0 ? data[:events] / data[:total_unique_visits] : "N/A" %>
35
34
  <span class="stats-list-label">Hits / Unique Visitor</span>
35
+ <%= data[:total_unique_visits] != 0 ? data[:events] / data[:total_unique_visits] : "N/A" %>
36
36
  </li>
37
37
  </ul>
@@ -56,7 +56,9 @@
56
56
  <%= report[:title] %>
57
57
  </h2>
58
58
 
59
- <%= render "report_data.html.erb", report: report, index: index %>
59
+ <% if report[:rows] %>
60
+ <%= render "report_data.html.erb", report: report, index: index %>
61
+ <% end %>
60
62
  <% if report[:vega_spec] %>
61
63
  <div id="<%= "plot-#{index}" %>" class="plot-canvas">
62
64
  </div>
@@ -74,8 +76,22 @@
74
76
  vegaEmbed('#<%= "plot-#{index}"%>', plot_spec_<%= index %>);
75
77
  </script>
76
78
  <% end %>
79
+ <% if report[:echarts_spec] %>
80
+ <% height = report[:echarts_height] || "400px"%>
81
+ <div id="<%= "echart-#{index}" %>" style="width: 100%;height: <%= height %>;"></div>
82
+ <script>
83
+ // Initialize the echarts instance based on the prepared dom
84
+ <%= report[:echarts_extra] %>;
85
+ var plot_index = "<%= "echart-#{index}" %>"
86
+ var myChart = echarts.init(document.getElementById(plot_index));
87
+ var options = <%= report[:echarts_spec].gsub("SERIES_DATA", "data_#{index}") %>
88
+ myChart.setOption(options)
77
89
 
78
- <%= render "output_table.html.erb", report: report, index: index %>
90
+ </script>
91
+ <% end %>
92
+ <% if report[:rows] %>
93
+ <%= render "output_table.html.erb", report: report, index: index %>
94
+ <% end %>
79
95
  </article>
80
96
  <% end %>
81
97
 
@@ -1,3 +1,3 @@
1
1
  module LogSense
2
- VERSION = "1.7.0"
2
+ VERSION = "1.8.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: log_sense
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adolfo Villafiorita
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-06-16 00:00:00.000000000 Z
11
+ date: 2024-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser