mirror of
https://github.com/rickbarrette/simple-aircraft-manager-rails.git
synced 2026-11-17 15:50:36 -05:00
AC 120-78B chapter 3:
- Every change to logbook entries, sub-components, signatures, inspection
records, AD compliance, major records, W&B, components, squawks and
documents is kept as a RecordVersion (who, IP, when, field changes),
hash-chained per aircraft; versions can't be edited or deleted. Shown on
each logbook entry and in Activity -> Record history
- Nightly job: SQLite online-backup copy to storage/backups, verified
(integrity_check + record counts), pruned to the configured number; then
an integrity check of the history chains and every signature's seal and
fingerprint. Results on Admin -> About ("Back up and check now"); admins
are emailed on failure
- Software versions recorded (first/last seen) on Admin -> About
- Records package (Access & Sharing): logbook entries PDF with signatures,
signatures.csv, record-history.csv, self-contained status report HTML,
the .sam.zip, and a README, for the FAA/NTSB or a buyer
- Legacy (paper) records: documents can be marked as legacy records;
aircraft have an "electronic records since" date (status report, package)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
36 lines
2.1 KiB
ERB
36 lines
2.1 KiB
ERB
<% content_for :title, "Settings" %>
|
|
<h1 class="mb-4 text-2xl font-bold">Settings</h1>
|
|
<%= form_with url: admin_settings_path, method: :patch, class: "card card-body max-w-xl space-y-4" do |f| %>
|
|
<% if @errors.present? %>
|
|
<div class="rounded-md bg-red-50 p-3 text-sm text-red-700 ring-1 ring-red-200" role="alert">
|
|
<ul class="list-disc pl-5"><% @errors.each do |e| %><li><%= e %></li><% end %></ul>
|
|
</div>
|
|
<% end %>
|
|
|
|
<h2 class="card-title">Uploads</h2>
|
|
<% upload = Setting::INTEGERS["max_upload_mb"] %>
|
|
<div>
|
|
<%= label_tag "settings[max_upload_mb]", upload[:label], class: "label" %>
|
|
<%= number_field_tag "settings[max_upload_mb]", @values["max_upload_mb"], id: "settings_max_upload_mb",
|
|
min: upload[:in].min, max: upload[:in].max, step: 1, required: true, class: "input w-32" %>
|
|
<p class="hint">
|
|
The largest single file anyone can upload: documents, squawk photos and bulk uploads. Default <%= upload[:default] %> MB, up to <%= upload[:in].max %> MB.
|
|
</p>
|
|
<p class="hint">
|
|
A proxy in front of the app can have its own, smaller limit. Cloudflare's proxy stops at 100 MB on its free plan; nginx needs <code>client_max_body_size</code>.
|
|
Logbook transcription with Claude reads PDFs up to <%= LogbookTranscriber::MAX_PDF_BYTES / 1.megabyte %> MB and images up to <%= LogbookTranscriber::MAX_IMAGE_BYTES / 1.megabyte %> MB, whatever this is set to.
|
|
</p>
|
|
</div>
|
|
|
|
<h2 class="card-title pt-2">Backups</h2>
|
|
<% kept = Setting::INTEGERS["backups_kept"] %>
|
|
<div>
|
|
<%= label_tag "settings[backups_kept]", kept[:label], class: "label" %>
|
|
<%= number_field_tag "settings[backups_kept]", @values["backups_kept"], id: "settings_backups_kept", min: kept[:in].min, max: kept[:in].max,
|
|
step: 1, required: true, class: "input w-32" %>
|
|
<p class="hint">A verified copy of the database is made nightly in storage/backups; this many of the newest are kept. Back up the whole storage volume off the server too.</p>
|
|
</div>
|
|
|
|
<div class="flex gap-2"><%= f.submit "Save Settings", class: "btn-primary" %><%= link_to "Cancel", admin_about_path, class: "btn-secondary" %></div>
|
|
<% end %>
|