Class: Sentiero::Web::Views::AnalyzerView

Inherits:
BaseView
  • Object
show all
Defined in:
lib/sentiero/web/views/analyzer_view.rb

Direct Known Subclasses

FrustrationView, ScrollView, VitalsView

Constant Summary

Constants inherited from BaseView

BaseView::TEMPLATES_DIR, BaseView::TEMPLATE_CACHE

Constants included from Escaping

Escaping::HTML_UNSAFE_IN_SCRIPT, Escaping::HTML_UNSAFE_IN_SCRIPT_PATTERN

Instance Attribute Summary collapse

Attributes inherited from BaseView

#base_path, #csrf_token

Instance Method Summary collapse

Methods inherited from BaseView

#built_asset, compiled_template, #escape_js, #h, #range_pairs, #render, #render_layout, #render_partial, #render_session_row, #template

Methods included from Formatting

#format_duration, #format_vital, #parse_browser, #parse_device

Methods included from Escaping

#escape_html, #escape_js_string, #escape_json

Constructor Details

#initialize(pages:, was_truncated:, since:, until_str:) ⇒ AnalyzerView

Returns a new instance of AnalyzerView.



10
11
12
13
14
15
16
# File 'lib/sentiero/web/views/analyzer_view.rb', line 10

def initialize(pages:, was_truncated:, since:, until_str:)
  super()
  @pages = pages
  @was_truncated = was_truncated
  @since = since
  @until_str = until_str
end

Instance Attribute Details

#pagesObject (readonly)

Returns the value of attribute pages.



18
19
20
# File 'lib/sentiero/web/views/analyzer_view.rb', line 18

def pages
  @pages
end

#sinceObject (readonly)

Returns the value of attribute since.



18
19
20
# File 'lib/sentiero/web/views/analyzer_view.rb', line 18

def since
  @since
end

#until_strObject (readonly)

Returns the value of attribute until_str.



18
19
20
# File 'lib/sentiero/web/views/analyzer_view.rb', line 18

def until_str
  @until_str
end

#was_truncatedObject (readonly)

Returns the value of attribute was_truncated.



18
19
20
# File 'lib/sentiero/web/views/analyzer_view.rb', line 18

def was_truncated
  @was_truncated
end

Instance Method Details

#page_report_href(url) ⇒ Object



20
21
22
23
# File 'lib/sentiero/web/views/analyzer_view.rb', line 20

def page_report_href(url)
  q = {"url" => url}.merge(range_pairs)
  "#{base_path}/analytics/page?" + Rack::Utils.build_query(q)
end