ahoy_captain 0.91 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/Rakefile +23 -2
- data/app/assets/javascript/ahoy_captain/controllers/application_controller.js +20 -0
- data/app/assets/javascript/ahoy_captain/controllers/combobox_controller.js +371 -0
- data/app/assets/javascript/ahoy_captain/controllers/filter_modal_controller.js +45 -0
- data/app/assets/javascript/ahoy_captain/controllers/frame_link_controller.js +20 -0
- data/app/assets/javascript/ahoy_captain/controllers/funnel_chart_controller.js +58 -16
- data/app/assets/javascript/ahoy_captain/controllers/interval_controller.js +5 -0
- data/app/assets/javascript/ahoy_captain/controllers/line_chart_controller.js +235 -21
- data/app/assets/javascript/ahoy_captain/controllers/map_controller.js +47 -0
- data/app/assets/javascript/ahoy_captain/controllers/predicate_select_controller.js +1 -1
- data/app/assets/javascript/ahoy_captain/controllers/properties_controller.js +8 -0
- data/app/assets/javascript/ahoy_captain/controllers/property_filter_controller.js +45 -0
- data/app/assets/javascript/ahoy_captain/controllers/realtime_controller.js +4 -2
- data/app/assets/javascript/ahoy_captain/controllers/tile_controller.js +33 -0
- data/app/assets/javascript/ahoy_captain/helpers/chart_utils.js +156 -0
- data/app/assets/javascript/ahoy_captain/helpers/countries.js +2261 -0
- data/app/assets/javascript/ahoy_captain/helpers/number_formatters.js +55 -0
- data/app/components/ahoy_captain/combobox_component.html.erb +33 -0
- data/app/components/ahoy_captain/combobox_component.rb +13 -0
- data/app/components/ahoy_captain/comparison_link_component.html.erb +17 -0
- data/app/components/ahoy_captain/comparison_link_component.rb +44 -0
- data/app/components/ahoy_captain/dropdown_link_component.html.erb +2 -4
- data/app/components/ahoy_captain/dropdown_link_component.rb +4 -0
- data/app/components/ahoy_captain/filter/dropdown_component.html.erb +8 -6
- data/app/components/ahoy_captain/filter/modal_component.html.erb +7 -5
- data/app/components/ahoy_captain/filter/select_component.html.erb +23 -21
- data/app/components/ahoy_captain/filter/select_component.rb +2 -1
- data/app/components/ahoy_captain/filter/tag_component.html.erb +1 -1
- data/app/components/ahoy_captain/previous_next_component.html.erb +8 -0
- data/app/components/ahoy_captain/previous_next_component.rb +11 -0
- data/app/components/ahoy_captain/stats/comparable_container_component.html.erb +25 -0
- data/app/components/ahoy_captain/stats/comparable_container_component.rb +86 -0
- data/app/components/ahoy_captain/stats/container_component.html.erb +13 -6
- data/app/components/ahoy_captain/stats/container_component.rb +15 -1
- data/app/components/ahoy_captain/sticky_nav_component.html.erb +27 -20
- data/app/components/ahoy_captain/sticky_nav_component.rb +11 -0
- data/app/components/ahoy_captain/table_component.rb +13 -4
- data/app/components/ahoy_captain/tables/devices_table_component.rb +11 -0
- data/app/components/ahoy_captain/tables/dynamic_table.rb +13 -0
- data/app/components/ahoy_captain/tables/dynamic_table_component.rb +204 -0
- data/app/components/ahoy_captain/tables/goals_table_component.rb +17 -0
- data/app/components/ahoy_captain/tables/header_component.html.erb +5 -0
- data/app/components/ahoy_captain/tables/header_component.rb +18 -0
- data/app/components/ahoy_captain/tables/headers/header_component.rb +4 -0
- data/app/components/ahoy_captain/tables/properties_table_component.rb +27 -0
- data/app/components/ahoy_captain/tables/row_component.html.erb +4 -0
- data/app/components/ahoy_captain/tables/rows/row_component.rb +0 -1
- data/app/components/ahoy_captain/tile_component.html.erb +19 -9
- data/app/components/ahoy_captain/tile_component.rb +9 -1
- data/app/controllers/ahoy_captain/application_controller.rb +7 -16
- data/app/controllers/ahoy_captain/exports_controller.rb +1 -2
- data/app/controllers/ahoy_captain/filters/base_controller.rb +1 -3
- data/app/controllers/ahoy_captain/filters/goals_controller.rb +9 -0
- data/app/controllers/ahoy_captain/filters/pages/actions_controller.rb +1 -1
- data/app/controllers/ahoy_captain/filters/pages/entry_pages_controller.rb +1 -1
- data/app/controllers/ahoy_captain/filters/pages/exit_pages_controller.rb +1 -1
- data/app/controllers/ahoy_captain/filters/properties/values_controller.rb +4 -4
- data/app/controllers/ahoy_captain/filters/utms_controller.rb +1 -1
- data/app/controllers/ahoy_captain/locations/cities_controller.rb +22 -0
- data/app/controllers/ahoy_captain/locations/countries_controller.rb +22 -0
- data/app/controllers/ahoy_captain/locations/maps_controller.rb +24 -0
- data/app/controllers/ahoy_captain/locations/regions_controller.rb +22 -0
- data/app/controllers/ahoy_captain/properties_controller.rb +41 -0
- data/app/controllers/ahoy_captain/stats/base_controller.rb +86 -5
- data/app/controllers/ahoy_captain/stats/bounce_rates_controller.rb +1 -1
- data/app/controllers/ahoy_captain/stats/total_pageviews_controller.rb +1 -1
- data/app/controllers/ahoy_captain/stats/total_visits_controller.rb +1 -1
- data/app/controllers/ahoy_captain/stats/unique_visitors_controller.rb +2 -1
- data/app/controllers/ahoy_captain/stats/views_per_visits_controller.rb +1 -10
- data/app/controllers/ahoy_captain/stats/visit_durations_controller.rb +1 -1
- data/app/helpers/ahoy_captain/application_helper.rb +33 -9
- data/app/models/ahoy_captain/comparison_mode.rb +72 -0
- data/app/models/ahoy_captain/filter_parser.rb +33 -18
- data/app/models/ahoy_captain/range_from_params.rb +78 -0
- data/app/models/ahoy_captain/rangeable.rb +0 -3
- data/app/models/concerns/ahoy_captain/compare_mode.rb +19 -0
- data/app/models/concerns/ahoy_captain/limitable.rb +17 -0
- data/app/models/concerns/ahoy_captain/range_options.rb +1 -14
- data/app/presenters/ahoy_captain/dashboard_presenter.rb +18 -54
- data/app/queries/ahoy_captain/application_query.rb +74 -10
- data/app/queries/ahoy_captain/event_query.rb +7 -2
- data/app/queries/ahoy_captain/stats/average_views_per_visit_query.rb +11 -4
- data/app/queries/ahoy_captain/stats/average_visit_duration_query.rb +14 -2
- data/app/queries/ahoy_captain/stats/base_query.rb +18 -0
- data/app/queries/ahoy_captain/stats/bounce_rates_query.rb +15 -1
- data/app/queries/ahoy_captain/stats/total_pageviews_query.rb +2 -2
- data/app/queries/ahoy_captain/stats/total_visitors_query.rb +1 -1
- data/app/queries/ahoy_captain/stats/unique_visitors_query.rb +1 -1
- data/app/queries/ahoy_captain/stats/views_per_visit_query.rb +1 -1
- data/app/queries/ahoy_captain/stats/visit_duration_query.rb +2 -2
- data/app/queries/ahoy_captain/visit_query.rb +1 -2
- data/app/queries/concerns/ahoy_captain/comparable_queries.rb +25 -0
- data/app/queries/concerns/ahoy_captain/comparable_query.rb +138 -0
- data/app/queries/concerns/ahoy_captain/lazy_comparable_query.rb +42 -0
- data/app/views/ahoy_captain/devices/_table.html.erb +1 -4
- data/app/views/ahoy_captain/goals/index.html.erb +1 -4
- data/app/views/ahoy_captain/layouts/application.html.erb +0 -1
- data/app/views/ahoy_captain/layouts/shared/_tile_loader.html.erb +12 -0
- data/app/views/ahoy_captain/locations/maps/show.html.erb +3 -0
- data/app/views/ahoy_captain/properties/_form.html.erb +6 -0
- data/app/views/ahoy_captain/properties/index.html.erb +3 -0
- data/app/views/ahoy_captain/properties/show.html.erb +6 -0
- data/app/views/ahoy_captain/roots/_filters.html.erb +47 -1
- data/app/views/ahoy_captain/roots/show.html.erb +109 -48
- data/app/views/ahoy_captain/stats/base/index.html.erb +37 -8
- data/app/views/ahoy_captain/stats/show.html.erb +14 -11
- data/config/routes.rb +9 -3
- data/lib/ahoy_captain/ahoy/event_methods.rb +12 -14
- data/lib/ahoy_captain/configuration.rb +3 -2
- data/lib/ahoy_captain/engine.rb +4 -0
- data/lib/ahoy_captain/filters_configuration.rb +10 -6
- data/lib/ahoy_captain/version.rb +1 -1
- data/lib/ahoy_captain.rb +7 -1
- data/lib/generators/ahoy_captain/templates/config.rb.tt +7 -0
- metadata +137 -22
- data/app/assets/javascript/ahoy_captain/controllers/active_links_controller.js +0 -18
- data/app/assets/javascript/ahoy_captain/controllers/filter_tag_controller.js +0 -20
- data/app/assets/javascript/ahoy_captain/controllers/search_select_controller.js +0 -65
- data/app/components/ahoy_captain/tables/headers/devices_header_component.html.erb +0 -3
- data/app/components/ahoy_captain/tables/headers/devices_header_component.rb +0 -9
- data/app/components/ahoy_captain/tables/headers/goals_header_component.html.erb +0 -6
- data/app/components/ahoy_captain/tables/headers/goals_header_component.rb +0 -9
- data/app/components/ahoy_captain/tables/rows/devices_row_component.html.erb +0 -5
- data/app/components/ahoy_captain/tables/rows/devices_row_component.rb +0 -12
- data/app/components/ahoy_captain/tables/rows/goals_row_component.html.erb +0 -11
- data/app/components/ahoy_captain/tables/rows/goals_row_component.rb +0 -20
- data/app/controllers/ahoy_captain/cities_controller.rb +0 -20
- data/app/controllers/ahoy_captain/countries_controller.rb +0 -20
- data/app/controllers/ahoy_captain/regions_controller.rb +0 -20
- /data/app/views/ahoy_captain/{cities → locations/cities}/index.html+details.erb +0 -0
- /data/app/views/ahoy_captain/{cities → locations/cities}/index.html.erb +0 -0
- /data/app/views/ahoy_captain/{countries → locations/countries}/index.html+details.erb +0 -0
- /data/app/views/ahoy_captain/{countries → locations/countries}/index.html.erb +0 -0
- /data/app/views/ahoy_captain/{regions → locations/regions}/index.html+details.erb +0 -0
- /data/app/views/ahoy_captain/{regions → locations/regions}/index.html.erb +0 -0
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ahoy_captain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- joshmn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -262,6 +262,90 @@ dependencies:
|
|
262
262
|
- - ">="
|
263
263
|
- !ruby/object:Gem::Version
|
264
264
|
version: '0'
|
265
|
+
- !ruby/object:Gem::Dependency
|
266
|
+
name: factory_bot_rails
|
267
|
+
requirement: !ruby/object:Gem::Requirement
|
268
|
+
requirements:
|
269
|
+
- - ">="
|
270
|
+
- !ruby/object:Gem::Version
|
271
|
+
version: '0'
|
272
|
+
type: :development
|
273
|
+
prerelease: false
|
274
|
+
version_requirements: !ruby/object:Gem::Requirement
|
275
|
+
requirements:
|
276
|
+
- - ">="
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
version: '0'
|
279
|
+
- !ruby/object:Gem::Dependency
|
280
|
+
name: pry
|
281
|
+
requirement: !ruby/object:Gem::Requirement
|
282
|
+
requirements:
|
283
|
+
- - ">="
|
284
|
+
- !ruby/object:Gem::Version
|
285
|
+
version: '0'
|
286
|
+
type: :development
|
287
|
+
prerelease: false
|
288
|
+
version_requirements: !ruby/object:Gem::Requirement
|
289
|
+
requirements:
|
290
|
+
- - ">="
|
291
|
+
- !ruby/object:Gem::Version
|
292
|
+
version: '0'
|
293
|
+
- !ruby/object:Gem::Dependency
|
294
|
+
name: pry-rails
|
295
|
+
requirement: !ruby/object:Gem::Requirement
|
296
|
+
requirements:
|
297
|
+
- - ">="
|
298
|
+
- !ruby/object:Gem::Version
|
299
|
+
version: '0'
|
300
|
+
type: :development
|
301
|
+
prerelease: false
|
302
|
+
version_requirements: !ruby/object:Gem::Requirement
|
303
|
+
requirements:
|
304
|
+
- - ">="
|
305
|
+
- !ruby/object:Gem::Version
|
306
|
+
version: '0'
|
307
|
+
- !ruby/object:Gem::Dependency
|
308
|
+
name: rspec-rails
|
309
|
+
requirement: !ruby/object:Gem::Requirement
|
310
|
+
requirements:
|
311
|
+
- - ">="
|
312
|
+
- !ruby/object:Gem::Version
|
313
|
+
version: '0'
|
314
|
+
type: :development
|
315
|
+
prerelease: false
|
316
|
+
version_requirements: !ruby/object:Gem::Requirement
|
317
|
+
requirements:
|
318
|
+
- - ">="
|
319
|
+
- !ruby/object:Gem::Version
|
320
|
+
version: '0'
|
321
|
+
- !ruby/object:Gem::Dependency
|
322
|
+
name: simplecov
|
323
|
+
requirement: !ruby/object:Gem::Requirement
|
324
|
+
requirements:
|
325
|
+
- - ">="
|
326
|
+
- !ruby/object:Gem::Version
|
327
|
+
version: '0'
|
328
|
+
type: :development
|
329
|
+
prerelease: false
|
330
|
+
version_requirements: !ruby/object:Gem::Requirement
|
331
|
+
requirements:
|
332
|
+
- - ">="
|
333
|
+
- !ruby/object:Gem::Version
|
334
|
+
version: '0'
|
335
|
+
- !ruby/object:Gem::Dependency
|
336
|
+
name: sqlite3
|
337
|
+
requirement: !ruby/object:Gem::Requirement
|
338
|
+
requirements:
|
339
|
+
- - ">="
|
340
|
+
- !ruby/object:Gem::Version
|
341
|
+
version: '0'
|
342
|
+
type: :development
|
343
|
+
prerelease: false
|
344
|
+
version_requirements: !ruby/object:Gem::Requirement
|
345
|
+
requirements:
|
346
|
+
- - ">="
|
347
|
+
- !ruby/object:Gem::Version
|
348
|
+
version: '0'
|
265
349
|
description: A full-featured, mountable analytics dashboard for your Rails app, powered
|
266
350
|
by Ahoy.
|
267
351
|
email:
|
@@ -278,23 +362,34 @@ files:
|
|
278
362
|
- app/assets/images/ahoy_captain/logo.png
|
279
363
|
- app/assets/images/ahoy_captain/safari-pinned-tab.svg
|
280
364
|
- app/assets/javascript/ahoy_captain/application.js
|
281
|
-
- app/assets/javascript/ahoy_captain/controllers/active_links_controller.js
|
282
365
|
- app/assets/javascript/ahoy_captain/controllers/application.js
|
283
366
|
- app/assets/javascript/ahoy_captain/controllers/application_controller.js
|
367
|
+
- app/assets/javascript/ahoy_captain/controllers/combobox_controller.js
|
284
368
|
- app/assets/javascript/ahoy_captain/controllers/details_modal_controller.js
|
285
369
|
- app/assets/javascript/ahoy_captain/controllers/dropdown_label_controller.js
|
286
370
|
- app/assets/javascript/ahoy_captain/controllers/filter/item_controller.js
|
287
371
|
- app/assets/javascript/ahoy_captain/controllers/filter_form_controller.js
|
288
|
-
- app/assets/javascript/ahoy_captain/controllers/
|
372
|
+
- app/assets/javascript/ahoy_captain/controllers/filter_modal_controller.js
|
373
|
+
- app/assets/javascript/ahoy_captain/controllers/frame_link_controller.js
|
289
374
|
- app/assets/javascript/ahoy_captain/controllers/funnel_chart_controller.js
|
290
375
|
- app/assets/javascript/ahoy_captain/controllers/index.js
|
291
376
|
- app/assets/javascript/ahoy_captain/controllers/interval_controller.js
|
292
377
|
- app/assets/javascript/ahoy_captain/controllers/line_chart_controller.js
|
378
|
+
- app/assets/javascript/ahoy_captain/controllers/map_controller.js
|
293
379
|
- app/assets/javascript/ahoy_captain/controllers/predicate_select_controller.js
|
380
|
+
- app/assets/javascript/ahoy_captain/controllers/properties_controller.js
|
381
|
+
- app/assets/javascript/ahoy_captain/controllers/property_filter_controller.js
|
294
382
|
- app/assets/javascript/ahoy_captain/controllers/realtime_controller.js
|
295
|
-
- app/assets/javascript/ahoy_captain/controllers/
|
383
|
+
- app/assets/javascript/ahoy_captain/controllers/tile_controller.js
|
296
384
|
- app/assets/javascript/ahoy_captain/controllers/toggle_controller.js
|
385
|
+
- app/assets/javascript/ahoy_captain/helpers/chart_utils.js
|
386
|
+
- app/assets/javascript/ahoy_captain/helpers/countries.js
|
387
|
+
- app/assets/javascript/ahoy_captain/helpers/number_formatters.js
|
297
388
|
- app/assets/manifest/ahoy_captain/manifest.js
|
389
|
+
- app/components/ahoy_captain/combobox_component.html.erb
|
390
|
+
- app/components/ahoy_captain/combobox_component.rb
|
391
|
+
- app/components/ahoy_captain/comparison_link_component.html.erb
|
392
|
+
- app/components/ahoy_captain/comparison_link_component.rb
|
298
393
|
- app/components/ahoy_captain/dropdown_button_component.html.erb
|
299
394
|
- app/components/ahoy_captain/dropdown_button_component.rb
|
300
395
|
- app/components/ahoy_captain/dropdown_link_component.html.erb
|
@@ -309,22 +404,26 @@ files:
|
|
309
404
|
- app/components/ahoy_captain/filter/tag_component.rb
|
310
405
|
- app/components/ahoy_captain/filter/tag_container_component.html.erb
|
311
406
|
- app/components/ahoy_captain/filter/tag_container_component.rb
|
407
|
+
- app/components/ahoy_captain/previous_next_component.html.erb
|
408
|
+
- app/components/ahoy_captain/previous_next_component.rb
|
409
|
+
- app/components/ahoy_captain/stats/comparable_container_component.html.erb
|
410
|
+
- app/components/ahoy_captain/stats/comparable_container_component.rb
|
312
411
|
- app/components/ahoy_captain/stats/container_component.html.erb
|
313
412
|
- app/components/ahoy_captain/stats/container_component.rb
|
314
413
|
- app/components/ahoy_captain/sticky_nav_component.html.erb
|
315
414
|
- app/components/ahoy_captain/sticky_nav_component.rb
|
316
415
|
- app/components/ahoy_captain/table_component.html.erb
|
317
416
|
- app/components/ahoy_captain/table_component.rb
|
318
|
-
- app/components/ahoy_captain/tables/
|
319
|
-
- app/components/ahoy_captain/tables/
|
320
|
-
- app/components/ahoy_captain/tables/
|
321
|
-
- app/components/ahoy_captain/tables/
|
417
|
+
- app/components/ahoy_captain/tables/devices_table_component.rb
|
418
|
+
- app/components/ahoy_captain/tables/dynamic_table.rb
|
419
|
+
- app/components/ahoy_captain/tables/dynamic_table_component.rb
|
420
|
+
- app/components/ahoy_captain/tables/goals_table_component.rb
|
421
|
+
- app/components/ahoy_captain/tables/header_component.html.erb
|
422
|
+
- app/components/ahoy_captain/tables/header_component.rb
|
322
423
|
- app/components/ahoy_captain/tables/headers/header_component.html.erb
|
323
424
|
- app/components/ahoy_captain/tables/headers/header_component.rb
|
324
|
-
- app/components/ahoy_captain/tables/
|
325
|
-
- app/components/ahoy_captain/tables/
|
326
|
-
- app/components/ahoy_captain/tables/rows/goals_row_component.html.erb
|
327
|
-
- app/components/ahoy_captain/tables/rows/goals_row_component.rb
|
425
|
+
- app/components/ahoy_captain/tables/properties_table_component.rb
|
426
|
+
- app/components/ahoy_captain/tables/row_component.html.erb
|
328
427
|
- app/components/ahoy_captain/tables/rows/row_component.html.erb
|
329
428
|
- app/components/ahoy_captain/tables/rows/row_component.rb
|
330
429
|
- app/components/ahoy_captain/tile_component.html.erb
|
@@ -333,13 +432,12 @@ files:
|
|
333
432
|
- app/components/ahoy_captain/tooltip_component.rb
|
334
433
|
- app/controllers/ahoy_captain/application_controller.rb
|
335
434
|
- app/controllers/ahoy_captain/campaigns_controller.rb
|
336
|
-
- app/controllers/ahoy_captain/cities_controller.rb
|
337
|
-
- app/controllers/ahoy_captain/countries_controller.rb
|
338
435
|
- app/controllers/ahoy_captain/devices_controller.rb
|
339
436
|
- app/controllers/ahoy_captain/entry_pages_controller.rb
|
340
437
|
- app/controllers/ahoy_captain/exit_pages_controller.rb
|
341
438
|
- app/controllers/ahoy_captain/exports_controller.rb
|
342
439
|
- app/controllers/ahoy_captain/filters/base_controller.rb
|
440
|
+
- app/controllers/ahoy_captain/filters/goals_controller.rb
|
343
441
|
- app/controllers/ahoy_captain/filters/locations_controller.rb
|
344
442
|
- app/controllers/ahoy_captain/filters/operating_systems/names_controller.rb
|
345
443
|
- app/controllers/ahoy_captain/filters/operating_systems/versions_controller.rb
|
@@ -353,8 +451,12 @@ files:
|
|
353
451
|
- app/controllers/ahoy_captain/filters/utms_controller.rb
|
354
452
|
- app/controllers/ahoy_captain/funnels_controller.rb
|
355
453
|
- app/controllers/ahoy_captain/goals_controller.rb
|
454
|
+
- app/controllers/ahoy_captain/locations/cities_controller.rb
|
455
|
+
- app/controllers/ahoy_captain/locations/countries_controller.rb
|
456
|
+
- app/controllers/ahoy_captain/locations/maps_controller.rb
|
457
|
+
- app/controllers/ahoy_captain/locations/regions_controller.rb
|
458
|
+
- app/controllers/ahoy_captain/properties_controller.rb
|
356
459
|
- app/controllers/ahoy_captain/realtimes_controller.rb
|
357
|
-
- app/controllers/ahoy_captain/regions_controller.rb
|
358
460
|
- app/controllers/ahoy_captain/roots_controller.rb
|
359
461
|
- app/controllers/ahoy_captain/sources_controller.rb
|
360
462
|
- app/controllers/ahoy_captain/stats/base_controller.rb
|
@@ -378,10 +480,14 @@ files:
|
|
378
480
|
- app/decorators/ahoy_captain/source_decorator.rb
|
379
481
|
- app/decorators/ahoy_captain/top_page_decorator.rb
|
380
482
|
- app/helpers/ahoy_captain/application_helper.rb
|
483
|
+
- app/models/ahoy_captain/comparison_mode.rb
|
381
484
|
- app/models/ahoy_captain/export.rb
|
382
485
|
- app/models/ahoy_captain/filter_parser.rb
|
486
|
+
- app/models/ahoy_captain/range_from_params.rb
|
383
487
|
- app/models/ahoy_captain/rangeable.rb
|
384
488
|
- app/models/ahoy_captain/widget.rb
|
489
|
+
- app/models/concerns/ahoy_captain/compare_mode.rb
|
490
|
+
- app/models/concerns/ahoy_captain/limitable.rb
|
385
491
|
- app/models/concerns/ahoy_captain/range_options.rb
|
386
492
|
- app/presenters/ahoy_captain/dashboard_presenter.rb
|
387
493
|
- app/presenters/ahoy_captain/funnel_presenter.rb
|
@@ -398,6 +504,7 @@ files:
|
|
398
504
|
- app/queries/ahoy_captain/source_query.rb
|
399
505
|
- app/queries/ahoy_captain/stats/average_views_per_visit_query.rb
|
400
506
|
- app/queries/ahoy_captain/stats/average_visit_duration_query.rb
|
507
|
+
- app/queries/ahoy_captain/stats/base_query.rb
|
401
508
|
- app/queries/ahoy_captain/stats/bounce_rates_query.rb
|
402
509
|
- app/queries/ahoy_captain/stats/total_pageviews_query.rb
|
403
510
|
- app/queries/ahoy_captain/stats/total_visitors_query.rb
|
@@ -406,12 +513,11 @@ files:
|
|
406
513
|
- app/queries/ahoy_captain/stats/visit_duration_query.rb
|
407
514
|
- app/queries/ahoy_captain/top_page_query.rb
|
408
515
|
- app/queries/ahoy_captain/visit_query.rb
|
516
|
+
- app/queries/concerns/ahoy_captain/comparable_queries.rb
|
517
|
+
- app/queries/concerns/ahoy_captain/comparable_query.rb
|
518
|
+
- app/queries/concerns/ahoy_captain/lazy_comparable_query.rb
|
409
519
|
- app/views/ahoy_captain/campaigns/index.html+details.erb
|
410
520
|
- app/views/ahoy_captain/campaigns/index.html.erb
|
411
|
-
- app/views/ahoy_captain/cities/index.html+details.erb
|
412
|
-
- app/views/ahoy_captain/cities/index.html.erb
|
413
|
-
- app/views/ahoy_captain/countries/index.html+details.erb
|
414
|
-
- app/views/ahoy_captain/countries/index.html.erb
|
415
521
|
- app/views/ahoy_captain/devices/_table.html.erb
|
416
522
|
- app/views/ahoy_captain/devices/index.html+details.erb
|
417
523
|
- app/views/ahoy_captain/devices/index.html.erb
|
@@ -423,9 +529,18 @@ files:
|
|
423
529
|
- app/views/ahoy_captain/funnels/show.html.erb
|
424
530
|
- app/views/ahoy_captain/goals/index.html.erb
|
425
531
|
- app/views/ahoy_captain/layouts/application.html.erb
|
532
|
+
- app/views/ahoy_captain/layouts/shared/_tile_loader.html.erb
|
533
|
+
- app/views/ahoy_captain/locations/cities/index.html+details.erb
|
534
|
+
- app/views/ahoy_captain/locations/cities/index.html.erb
|
535
|
+
- app/views/ahoy_captain/locations/countries/index.html+details.erb
|
536
|
+
- app/views/ahoy_captain/locations/countries/index.html.erb
|
537
|
+
- app/views/ahoy_captain/locations/maps/show.html.erb
|
538
|
+
- app/views/ahoy_captain/locations/regions/index.html+details.erb
|
539
|
+
- app/views/ahoy_captain/locations/regions/index.html.erb
|
540
|
+
- app/views/ahoy_captain/properties/_form.html.erb
|
541
|
+
- app/views/ahoy_captain/properties/index.html.erb
|
542
|
+
- app/views/ahoy_captain/properties/show.html.erb
|
426
543
|
- app/views/ahoy_captain/realtimes/show.html.erb
|
427
|
-
- app/views/ahoy_captain/regions/index.html+details.erb
|
428
|
-
- app/views/ahoy_captain/regions/index.html.erb
|
429
544
|
- app/views/ahoy_captain/roots/_filters.html.erb
|
430
545
|
- app/views/ahoy_captain/roots/show.html.erb
|
431
546
|
- app/views/ahoy_captain/sources/index.html+details.erb
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import { Controller } from '@hotwired/stimulus';
|
2
|
-
|
3
|
-
export default class extends Controller {
|
4
|
-
static targets = ["link"]
|
5
|
-
static values = {
|
6
|
-
classes: { type: Array, default: ["text-primary", "font-semibold"] }
|
7
|
-
}
|
8
|
-
|
9
|
-
connect() {
|
10
|
-
this.handleLinkClick = (event) => {
|
11
|
-
this.linkTargets.forEach(link => this.classesValue.forEach(klass => link.classList.remove(klass)))
|
12
|
-
this.classesValue.forEach(klass => event.target.classList.add(klass))
|
13
|
-
}
|
14
|
-
this.linkTargets.forEach(link => {
|
15
|
-
link.addEventListener('click', this.handleLinkClick)
|
16
|
-
})
|
17
|
-
}
|
18
|
-
}
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import { Controller } from '@hotwired/stimulus';
|
2
|
-
|
3
|
-
export default class extends Controller {
|
4
|
-
static targets = ['delete'];
|
5
|
-
|
6
|
-
static values = {
|
7
|
-
columnPredicate: String,
|
8
|
-
category: String,
|
9
|
-
};
|
10
|
-
|
11
|
-
remove(event) {
|
12
|
-
event.preventDefault();
|
13
|
-
this.dispatch('remove', {
|
14
|
-
detail: {
|
15
|
-
paramKey: `q[${this.columnPredicateValue}]`,
|
16
|
-
paramValue: this.categoryValue,
|
17
|
-
},
|
18
|
-
});
|
19
|
-
}
|
20
|
-
}
|
@@ -1,65 +0,0 @@
|
|
1
|
-
import {Controller} from "@hotwired/stimulus"
|
2
|
-
import SlimSelect from 'slim-select'
|
3
|
-
|
4
|
-
export default class extends Controller {
|
5
|
-
static values = {
|
6
|
-
query: String,
|
7
|
-
url: String,
|
8
|
-
selected: Array
|
9
|
-
}
|
10
|
-
|
11
|
-
connect() {
|
12
|
-
this.loadedInitialData = false;
|
13
|
-
this.search = this.search.bind(this)
|
14
|
-
this.select = new SlimSelect({
|
15
|
-
select: this.element,
|
16
|
-
data: [],
|
17
|
-
settings: {
|
18
|
-
contentPosition: 'relative',
|
19
|
-
contentLocation: this.element.closest('fieldset'),
|
20
|
-
searchText: 'Sorry, no results found',
|
21
|
-
searchPlaceholder: 'Type to populate results',
|
22
|
-
placeholderText: `Search`,
|
23
|
-
searchHighlight: true
|
24
|
-
},
|
25
|
-
events: {
|
26
|
-
beforeOpen: async () => {
|
27
|
-
if (!this.loadedInitialData) {
|
28
|
-
const data = await this.search("");
|
29
|
-
this.select.setData(data);
|
30
|
-
this.loadedInitialData = true
|
31
|
-
}
|
32
|
-
},
|
33
|
-
search: this.search
|
34
|
-
}
|
35
|
-
});
|
36
|
-
|
37
|
-
if(this.selectedValue.length) {
|
38
|
-
this.select.setData(this.selectedValue.map(item => ({ "text": item, "value": item })))
|
39
|
-
this.select.setSelected(this.selectedValue)
|
40
|
-
}
|
41
|
-
}
|
42
|
-
|
43
|
-
async search(query) {
|
44
|
-
const searchParams = new URLSearchParams(window.location.search);
|
45
|
-
const formData = new FormData(this.element.form);
|
46
|
-
|
47
|
-
let deleted = [];
|
48
|
-
for (const [key, value] of formData) {
|
49
|
-
if(!deleted.includes(key)) {
|
50
|
-
searchParams.delete(key)
|
51
|
-
deleted.push(key)
|
52
|
-
}
|
53
|
-
|
54
|
-
searchParams.append(key, value)
|
55
|
-
}
|
56
|
-
|
57
|
-
searchParams.delete(this.element.name);
|
58
|
-
searchParams.set(this.queryValue, query);
|
59
|
-
|
60
|
-
const response = await fetch(`${this.urlValue}?${searchParams.toString()}`);
|
61
|
-
const data = await response.json();
|
62
|
-
return data;
|
63
|
-
}
|
64
|
-
|
65
|
-
}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
<%= progress_bar(@item.cr, 100, link_to(@item.name, url, target: :_top)) %>
|
2
|
-
<%= item do %>
|
3
|
-
<%= tooltip(@item.unique_visits) %>
|
4
|
-
<% end %>
|
5
|
-
<%= item do %>
|
6
|
-
<%= tooltip(@item.total_events) %>
|
7
|
-
<% end %>
|
8
|
-
<%= item do %>
|
9
|
-
<%= tooltip(@item.cr) %>
|
10
|
-
<% end %>
|
11
|
-
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module AhoyCaptain
|
2
|
-
module Tables
|
3
|
-
module Rows
|
4
|
-
class GoalsRowComponent < RowComponent
|
5
|
-
def search_params
|
6
|
-
view_context.search_params
|
7
|
-
end
|
8
|
-
|
9
|
-
def url
|
10
|
-
query = search_params.dup.merge(q: { goal_in: @item.goal_id}).to_query
|
11
|
-
AhoyCaptain::Engine.app.url_helpers.root_path + "?#{query}"
|
12
|
-
end
|
13
|
-
|
14
|
-
def total
|
15
|
-
@item.total_count
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module AhoyCaptain
|
2
|
-
class CitiesController < ApplicationController
|
3
|
-
include AhoyCaptain::Limitable
|
4
|
-
|
5
|
-
before_action do
|
6
|
-
if Widget.disabled?(:locations, :cities)
|
7
|
-
raise Widget::WidgetDisabled.new("Widget disabled", :geography)
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
def index
|
12
|
-
results = cached(:cities) do
|
13
|
-
CityQuery.call(params)
|
14
|
-
.limit(limit)
|
15
|
-
end
|
16
|
-
|
17
|
-
@cities = paginate(results).map { |city| CityDecorator.new(city, self) }
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module AhoyCaptain
|
2
|
-
class CountriesController < ApplicationController
|
3
|
-
include Limitable
|
4
|
-
|
5
|
-
before_action do
|
6
|
-
if Widget.disabled?(:locations, :countries)
|
7
|
-
raise Widget::WidgetDisabled.new("Widget disabled", :geography)
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
def index
|
12
|
-
results = cached(:countries) do
|
13
|
-
CountryQuery.call(params)
|
14
|
-
.limit(limit)
|
15
|
-
end
|
16
|
-
|
17
|
-
@countries = paginate(results).map { |country| CountryDecorator.new(country, self) }
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
module AhoyCaptain
|
2
|
-
class RegionsController < ApplicationController
|
3
|
-
include Limitable
|
4
|
-
|
5
|
-
before_action do
|
6
|
-
if Widget.disabled?(:locations, :regions)
|
7
|
-
raise Widget::WidgetDisabled.new("Widget disabled", :geography)
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
def index
|
12
|
-
results = cached(:regions) do
|
13
|
-
RegionQuery.call(params)
|
14
|
-
.limit(limit)
|
15
|
-
end
|
16
|
-
|
17
|
-
@regions = paginate(results).map { |region| RegionDecorator.new(region, self) }
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|