<% content_for :title, "Map settings" %>
<%= render 'settings/navigation' %>

Maps settings

<%= form_for :maps, url: settings_maps_path, method: :patch, autocomplete: "off", data: { turbo_method: :patch, turbo: false } do |f| %>
<%= f.label :name %> <%= f.text_field :name, value: @maps['name'], placeholder: 'Example: OpenStreetMap', class: "input input-bordered" %>
<%= f.label :url, 'URL' %> <%= f.text_field :url, value: @maps['url'], autocomplete: "off", placeholder: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', class: "input input-bordered", data: { map_preview_target: "urlInput", action: "input->map-preview#updatePreview" } %>
<%= f.submit 'Save', class: "btn btn-primary", data: { map_preview_target: "saveButton" } %> <% end %>

Tile usage

<%= line_chart( @tile_usage, height: '200px', xtitle: 'Days', ytitle: 'Tiles', suffix: ' tiles loaded' ) %>