Sha256: 5ad2c67d36a7aa26004c4200a788752a2f7d13569ee32865a253ba73fe1fa624

Contents?: true

Size: 1.56 KB

Versions: 52

Compression:

Stored size: 1.56 KB

Contents

<%= render Avo::PanelComponent.new(title: @dashboard.name, description: @dashboard.description) do |c| %>
  <% c.bare_content do %>
    <% if @dashboard.items.present? %>
      <div class="min-h-24">
        <%= content_tag(:div, class: "grid gap-4 grid-cols-1 #{@dashboard.classes}") do %>
          <% @dashboard.items.each do |item| %>
            <% if item.is_divider? %>
              <%= render Avo::Dashboards::DividerComponent.new(divider: item) %>
            <% elsif item.is_card? %>
              <%= content_tag(:div, class: "relative bg-white rounded shadow-panel space-y-2 #{item.card_classes} overflow-hidden") do %>
                <turbo-frame id="<%= item.turbo_frame %>"
                  src="<%= item.frame_url(enforced_range: @range, params: params) %>"
                  data-card-index="<%= item.index %>"
                >
                  <%= render(Avo::LoadingComponent.new(title: item.label)) %>
                </turbo-frame>
              <% end %>
            <% end %>
          <% end %>
        <% end %>
      </div>
    <% else %>
      <div class="w-full h-full">
        <% if Rails.env.development? %>
          <%= render Avo::PanelComponent.new do |c| %>
            <% c.body do %>
              <div class="p-6">
                <%= t 'avo.empty_dashboard_message' %>. <%= link_to 'Docs', 'https://docs.avohq.io/2.0/dashboards.html', target: '_blank' %>
              </div>
            <% end %>
          <% end %>
        <% end %>

        <%= empty_state message: t('avo.no_cards_present') %>
      </div>
    <% end %>
  <% end %>
<% end %>

Version data entries

52 entries across 52 versions & 1 rubygems

Version Path
avo-2.12.1.pre.1 app/views/avo/dashboards/show.html.erb
avo-2.12.0 app/views/avo/dashboards/show.html.erb
avo-2.11.3.pre.1 app/views/avo/dashboards/show.html.erb
avo-2.11.2.pre.3 app/views/avo/dashboards/show.html.erb
avo-2.11.2.pre.2 app/views/avo/dashboards/show.html.erb
avo-2.11.2.pre.1 app/views/avo/dashboards/show.html.erb
avo-2.11.1.pre.3 app/views/avo/dashboards/show.html.erb
avo-2.11.1 app/views/avo/dashboards/show.html.erb
avo-2.11.1.pre.2 app/views/avo/dashboards/show.html.erb
avo-2.11.1.pre.1 app/views/avo/dashboards/show.html.erb
avo-2.11.0 app/views/avo/dashboards/show.html.erb
avo-2.10.3.pre.1 app/views/avo/dashboards/show.html.erb
avo-2.10.2 app/views/avo/dashboards/show.html.erb
avo-2.9.2.pre1 app/views/avo/dashboards/show.html.erb
avo-2.10.0 app/views/avo/dashboards/show.html.erb
avo-2.9.1.pre7 app/views/avo/dashboards/show.html.erb
avo-2.9.1.pre6 app/views/avo/dashboards/show.html.erb
avo-2.9.1.pre5 app/views/avo/dashboards/show.html.erb
avo-2.9.1.pre4 app/views/avo/dashboards/show.html.erb
avo-2.9.1.pre3 app/views/avo/dashboards/show.html.erb