Sha256: 0c1999d41f143eabf74b82b174e97f9c2b96fa7a4fc77dfc0563a3450dd93159

Contents?: true

Size: 1.58 KB

Versions: 2

Compression:

Stored size: 1.58 KB

Contents

<% blazer_title @dashboard.name %>
<% content_for :nav do %>
  <ul class="navbar-nav justify-content-end flex-grow-1 pe-3">
    <li class="nav-item">
      <%= link_to "Edit", blazer.edit_dashboard_path(@dashboard, params: variable_params(@dashboard)), class: "nav-link" %>
    </li>
  </ul>
<% end %>

<% if @data_sources.any? { |ds| ds.cache_mode != "off" } %>
  <p class="text-muted" style="float: right;">
    Some queries may be cached
    <%= link_to "Refresh", refresh_dashboard_path(@dashboard, params: variable_params(@dashboard)), method: :post %>
  </p>
<% end %>

<% if @bind_vars.any? %>
  <%= render partial: "blazer/variables", locals: {action: dashboard_path(@dashboard)} %>
<% else %>
  <div style="padding-bottom: 15px;"></div>
<% end %>

<% @queries.each_with_index do |query, i| %>
  <div class="chart-container">
    <h4><%= link_to query.friendly_name, query_path(query, params: variable_params(query)), target: "_blank" %></h4>
    <div id="chart-<%= i %>" class="chart">
      <p class="text-muted">Loading...</p>
    </div>
  </div>
  <script>
    <% data = {statement: query.statement, query_id: query.id, data_source: query.data_source, variables: variable_params(query), only_chart: true} %>
    <% data.merge!(cohort_period: params[:cohort_period]) if params[:cohort_period] %>
    <%= blazer_js_var "data", data %>

    runQuery(data, function (data) {
      $("#chart-<%= i %>").html(data)
      $("#chart-<%= i %> table").stupidtable(stupidtableCustomSettings)
    }, function (message) {
      $("#chart-<%= i %>").addClass("query-error").html(message)
    });
  </script>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
finery-3.0.3 app/views/blazer/dashboards/show.html.erb
finery-3.0.2 app/views/blazer/dashboards/show.html.erb