Sha256: 93102a982fa0a67f24db12676dfd896977a9d5d013a2600ce796766d4ce90881

Contents?: true

Size: 1.57 KB

Versions: 47

Compression:

Stored size: 1.57 KB

Contents

<%= render Avo::PanelComponent.new(name: @dashboard.name, description: @dashboard.description) do |c| %>
  <% c.with_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.with_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

47 entries across 47 versions & 1 rubygems

Version Path
avo-2.53.0 app/views/avo/dashboards/show.html.erb
avo-2.52.0 app/views/avo/dashboards/show.html.erb
avo-2.49.0 app/views/avo/dashboards/show.html.erb
avo-2.48.0 app/views/avo/dashboards/show.html.erb
avo-2.47.0 app/views/avo/dashboards/show.html.erb
avo-2.46.0 app/views/avo/dashboards/show.html.erb
avo-2.45.0 app/views/avo/dashboards/show.html.erb
avo-2.44.0 app/views/avo/dashboards/show.html.erb
avo-2.43.0 app/views/avo/dashboards/show.html.erb
avo-2.42.2 app/views/avo/dashboards/show.html.erb
avo-2.42.1 app/views/avo/dashboards/show.html.erb
avo-2.42.0 app/views/avo/dashboards/show.html.erb
avo-2.41.0 app/views/avo/dashboards/show.html.erb
avo-2.40.0 app/views/avo/dashboards/show.html.erb
avo-2.39.0 app/views/avo/dashboards/show.html.erb
avo-2.38.0 app/views/avo/dashboards/show.html.erb
avo-2.37.2 app/views/avo/dashboards/show.html.erb
avo-2.37.1 app/views/avo/dashboards/show.html.erb
avo-2.37.0 app/views/avo/dashboards/show.html.erb
avo-2.36.3 app/views/avo/dashboards/show.html.erb