<% if @query.errors.any? %>
<%= @query.errors.full_messages.first %>
<% end %>
<%= form_for @query, url: (@query.persisted? ? query_path(@query, variable_params(@query)) : queries_path(variable_params(@query))), html: {autocomplete: "off"} do |f| %>
<%= f.hidden_field :statement %>
<%= @query.statement %>
<%= link_to "Back", :back %> Docs Schema
<%= f.select :data_source, Blazer.data_sources.values.select { |ds| q = @query.dup; q.data_source = ds.id; q.editable?(blazer_user) }.map { |ds| [ds.name, ds.id] }, {}, class: ("hide" if Blazer.data_sources.size <= 1), style: "width: 140px;" %>
Run Cancel
<%= f.label :name %> <%= f.text_field :name, class: "form-control" %>
<%= f.label :description %> <%= f.text_area :description, placeholder: "Optional", style: "height: 80px;", class: "form-control" %>
<%= f.submit "For Enter Press", class: "hide" %> <% if @query.persisted? %> <%= link_to "Delete", query_path(@query), method: :delete, "data-confirm" => "Are you sure?", class: "btn btn-danger" %> <%= f.submit "Fork", class: "btn btn-info" %> <% end %> <%= f.submit @query.persisted? ? "Update" : "Create", class: "btn btn-success" %>
<% 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? %>
Part of <%= words.to_sentence %>. Be careful when editing.
<% end %> <% end %>
<% end %>

Loading...