glib-web 0.6.10 → 0.6.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/concerns/glib/analytics/funnel.rb +20 -8
- data/app/helpers/glib/json_ui/list_builders.rb +2 -0
- data/app/helpers/glib/json_ui/view_builder/fields.rb +2 -0
- data/app/helpers/glib/json_ui/view_builder.rb +2 -0
- data/app/views/json_ui/garage/lists/templating.json.jbuilder +1 -1
- data/app/views/json_ui/garage/tables/layout.json.jbuilder +7 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c56cc5b0cb3eac25758cb566dcf2b69f10470a65df7fa00d25325db8958961d
|
4
|
+
data.tar.gz: 5d2d0bdef7274ec75442b5c8f6a2336463c51f73b07a40905ff5916168eaa349
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa471dad31b61bd7f6562627ece6574b56e68260d456c3f0b4a5f5b3e2ed344cccb6b682654ec286b1b4761a5bcdc51524cb96729dd8896fbc92adff0f141149
|
7
|
+
data.tar.gz: 281c3ceba5a2a22320ff553420d4c0a962e41123a35ebcf868127af880742c6e04cc6b2314413191d62b3cc9f0b71f08a9fd727ef2421f709f7209ea839f77ac
|
@@ -35,14 +35,26 @@ module Glib::Analytics
|
|
35
35
|
action = request.headers['GApp-Analytics-Referer-Action']
|
36
36
|
segment = request.headers['GApp-Analytics-Referer-Segment']
|
37
37
|
placement = request.headers['GApp-Analytics-Referer-Placement']
|
38
|
-
|
39
|
-
if group.nil? && action.nil? && !
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
38
|
+
referrer_url = request.headers['referer'] # Notice that the HTTP header uses one "r"
|
39
|
+
if group.nil? && action.nil? && !referrer_url.nil?
|
40
|
+
current_host = request.host
|
41
|
+
referrer_host = URI.parse(referrer_url).host
|
42
|
+
|
43
|
+
# Replace the subdomain portion with regex so it will only match the non-subdomain part.
|
44
|
+
# This will allow cross-subdomain referral, but it will not work if the host is a bare domain,
|
45
|
+
# which is something that we should avoid doing anyway.
|
46
|
+
regex = '^([^\.]*)\.'
|
47
|
+
if current_host == referrer_host || !/#{current_host.sub(/#{regex}/, regex)}/.match(referrer_host).nil?
|
48
|
+
referrer_url = referrer_url.delete_suffix('/')
|
49
|
+
|
50
|
+
begin
|
51
|
+
route = Rails.application.routes.recognize_path(referrer_url)
|
52
|
+
group = route[:controller]
|
53
|
+
action = route[:action]
|
54
|
+
rescue ActionController::RoutingError
|
55
|
+
# Do nothing. This may happen when the referrer is from the same domain,
|
56
|
+
# but not from the same Rails app.
|
57
|
+
end
|
46
58
|
end
|
47
59
|
end
|
48
60
|
|
@@ -12,7 +12,7 @@ json_ui_page json do |page|
|
|
12
12
|
template.thumbnail title: 'Click me', onClick: ->(action) do
|
13
13
|
action.windows_open url: json_ui_garage_url(path: 'home/blank')
|
14
14
|
end
|
15
|
-
template.thumbnail title: 'Item with subtitle', subtitle: 'Item subtitle'
|
15
|
+
template.thumbnail title: 'Item with icon and subtitle', subtitle: 'Item subtitle', icon: 'facebook'
|
16
16
|
template.thumbnail title: 'Item with chips', chips: ->(menu) do
|
17
17
|
menu.button text: 'Finished', styleClass: 'info'
|
18
18
|
menu.button props: { text: 'Succeeded', styleClass: 'success' }
|
@@ -24,6 +24,8 @@ page.table sections: [
|
|
24
24
|
action.windows_reload url: json_ui_garage_url(path: 'tables/layout', orders: reversed_order_params(order_key))
|
25
25
|
end
|
26
26
|
end
|
27
|
+
|
28
|
+
header.label text: "Markdown"
|
27
29
|
end
|
28
30
|
|
29
31
|
items = [1, 2, 3]
|
@@ -32,8 +34,11 @@ page.table sections: [
|
|
32
34
|
column_indexes.each do |i|
|
33
35
|
cell.label text: "Data #{item}"
|
34
36
|
end
|
35
|
-
|
36
|
-
|
37
|
+
|
38
|
+
markdown = "* [Item 1](#{json_ui_garage_url(path: 'home/blank')})\n"\
|
39
|
+
"* Item 2\n"\
|
40
|
+
'* Item 3'
|
41
|
+
cell.markdown text: markdown
|
37
42
|
end
|
38
43
|
end
|
39
44
|
end
|