Skip to content

Business intelligence made simple

Added notice for check

Andrew Kane6d1796003ca2
diff --git a/app/views/blazer/queries/_form.html.erb b/app/views/blazer/queries/_form.html.erb
index 0ba148d5..c18b7bde 100644
--- a/app/views/blazer/queries/_form.html.erb
+++ b/app/views/blazer/queries/_form.html.erb
@@ -48,8 +48,17 @@
<% end %>
<%= f.submit @query.persisted? ? "Update" : "Create", class: "btn btn-success" %>
</div>
- <% if @query.persisted? && (dashboards_count = @query.dashboards.count) > 0 %>
- <div class="alert alert-info" style="margin-top: 10px; padding: 8px 12px;">Part of <%= pluralize(dashboards_count, "dashboard") %>. Be careful when editing.</div>
+ <% if @query.persisted? %>
+ <% dashboards_count = @query.dashboards.count %>
+ <% checks_count = @query.checks.count %>
+ <% words = [] %>
+ <% words << pluralize(dashboards_count, "dashboard") if dashboards_count > 0 %>
+ <% words << pluralize(checks_count, "check") if checks_count > 0 %>
+ <% if words.any? %>
+ <div class="alert alert-info" style="margin-top: 10px; padding: 8px 12px;">
+ Part of <%= words.to_sentence %>. Be careful when editing.
+ </div>
+ <% end %>
<% end %>
</div>
</div>