Class: Sentiero::Web::Views::HeatmapView
- Defined in:
- lib/sentiero/web/views/heatmap_view.rb
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
-
#config_json ⇒ Object
readonly
Returns the value of attribute config_json.
-
#selected_url ⇒ Object
readonly
Returns the value of attribute selected_url.
-
#since ⇒ Object
readonly
Returns the value of attribute since.
-
#until_str ⇒ Object
readonly
Returns the value of attribute until_str.
-
#urls ⇒ Object
readonly
Returns the value of attribute urls.
-
#was_truncated ⇒ Object
readonly
Returns the value of attribute was_truncated.
Attributes inherited from BaseView
Instance Method Summary collapse
-
#initialize(urls:, selected_url:, was_truncated:, config_json:, since:, until_str:) ⇒ HeatmapView
constructor
A new instance of HeatmapView.
-
#page_report_href ⇒ Object
Query holds server-side strings only; escaped at the h.call sink.
- #template ⇒ Object
Methods inherited from BaseView
#built_asset, compiled_template, #escape_js, #h, #range_pairs, #render, #render_layout, #render_partial, #render_session_row
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(urls:, selected_url:, was_truncated:, config_json:, since:, until_str:) ⇒ HeatmapView
Returns a new instance of HeatmapView.
10 11 12 13 14 15 16 17 18 |
# File 'lib/sentiero/web/views/heatmap_view.rb', line 10 def initialize(urls:, selected_url:, was_truncated:, config_json:, since:, until_str:) super() @urls = urls @selected_url = selected_url @was_truncated = was_truncated @config_json = config_json @since = since @until_str = until_str end |
Instance Attribute Details
#config_json ⇒ Object (readonly)
Returns the value of attribute config_json.
20 21 22 |
# File 'lib/sentiero/web/views/heatmap_view.rb', line 20 def config_json @config_json end |
#selected_url ⇒ Object (readonly)
Returns the value of attribute selected_url.
20 21 22 |
# File 'lib/sentiero/web/views/heatmap_view.rb', line 20 def selected_url @selected_url end |
#since ⇒ Object (readonly)
Returns the value of attribute since.
20 21 22 |
# File 'lib/sentiero/web/views/heatmap_view.rb', line 20 def since @since end |
#until_str ⇒ Object (readonly)
Returns the value of attribute until_str.
20 21 22 |
# File 'lib/sentiero/web/views/heatmap_view.rb', line 20 def until_str @until_str end |
#urls ⇒ Object (readonly)
Returns the value of attribute urls.
20 21 22 |
# File 'lib/sentiero/web/views/heatmap_view.rb', line 20 def urls @urls end |
#was_truncated ⇒ Object (readonly)
Returns the value of attribute was_truncated.
20 21 22 |
# File 'lib/sentiero/web/views/heatmap_view.rb', line 20 def was_truncated @was_truncated end |
Instance Method Details
#page_report_href ⇒ Object
Query holds server-side strings only; escaped at the h.call sink.
25 26 27 28 29 30 |
# File 'lib/sentiero/web/views/heatmap_view.rb', line 25 def page_report_href q = {} q["url"] = selected_url if selected_url && !selected_url.to_s.empty? q.merge!(range_pairs) "#{base_path}/analytics/page" + (q.empty? ? "" : "?" + Rack::Utils.build_query(q)) end |
#template ⇒ Object
22 |
# File 'lib/sentiero/web/views/heatmap_view.rb', line 22 def template = "heatmap.html.erb" |