|
@@ -1,18 +1,21 @@
|
|
-<% @queries.each do |query| %>
|
|
|
|
|
|
+<% (@dashboards + @queries).each do |query| %>
|
|
|
|
+ <% is_query = query.is_a?(Blazer::Query) %>
|
|
<tr>
|
|
<tr>
|
|
- <td class="query">
|
|
|
|
|
|
+ <td class="query <%= "dashboard" unless is_query %>">
|
|
<%= link_to query.name, query %>
|
|
<%= link_to query.name, query %>
|
|
- <span style="color: #ccc;"><%= extract_vars(query.statement).join(", ") %></span>
|
|
|
|
- <% if @queries.size < 1000 && query.created_at > 2.days.ago %>
|
|
|
|
- <small style="font-weight: bold; color: #5cb85c;">NEW</small>
|
|
|
|
- <% end %>
|
|
|
|
- <% if @trending_queries[query.id] %>
|
|
|
|
- <small style="font-weight: bold; color: #f60;">TRENDING</small>
|
|
|
|
- <% end %>
|
|
|
|
- <% if @checks[query.id] %>
|
|
|
|
- <small style="font-weight: bold; color: #f60;">CHECK</small>
|
|
|
|
|
|
+ <% if is_query %>
|
|
|
|
+ <span style="color: #ccc;"><%= extract_vars(query.statement).join(", ") %></span>
|
|
|
|
+ <% if @queries.size < 1000 && query.created_at > 2.days.ago %>
|
|
|
|
+ <small style="font-weight: bold; color: #5cb85c;">NEW</small>
|
|
|
|
+ <% end %>
|
|
|
|
+ <% if @trending_queries[query.id] %>
|
|
|
|
+ <small style="font-weight: bold; color: #f60;">TRENDING</small>
|
|
|
|
+ <% end %>
|
|
|
|
+ <% if @checks[query.id] %>
|
|
|
|
+ <small style="font-weight: bold; color: #f60;">CHECK</small>
|
|
|
|
+ <% end %>
|
|
|
|
+ <div class="hide"><%= query.name.gsub(/\s+/, "") %></div>
|
|
<% end %>
|
|
<% end %>
|
|
- <div class="hide"><%= query.name.gsub(/\s+/, "") %></div>
|
|
|
|
</td>
|
|
</td>
|
|
<td class="creator text-right text-muted">
|
|
<td class="creator text-right text-muted">
|
|
<% if query.respond_to?(:creator) && (creator = query.creator) && creator.respond_to?(Blazer.user_name) %>
|
|
<% if query.respond_to?(:creator) && (creator = query.creator) && creator.respond_to?(Blazer.user_name) %>
|