<% content_for :title, "About" %> <% info = @info %>

About

Simple Aircraft Manager: what's running, and how it's set up.

Version

<%= info.version %>

Build <%= info.revision_url ? link_to(info.revision, info.revision_url, class: "link font-mono", target: "_blank", rel: "noopener", title: "This commit on GitHub") : tag.span(info.revision, class: "font-mono") %>

<%= link_to "What's new", help_page_path("changelog"), class: "link" %><%= link_to "Disclaimer", help_page_path("disclaimer"), class: "link" %><% if info.repository_url %><%= link_to "Source code", info.repository_url, class: "link", target: "_blank", rel: "noopener" %><% end %>

Built
<%= info.built_at ? fmt_time(info.built_at.in_time_zone) : "—" %>
Started
<%= fmt_time(info.booted_at.in_time_zone) %>
Uptime
<%= distance_of_time_in_words(info.booted_at, Time.current) %>

Runtime

<%= render "pairs", pairs: info.runtime %>

Features

<%= render "pairs", pairs: info.features %>

Key components

<%= render "pairs", pairs: info.key_gems %>

Storage

<% s = info.storage %> <%= render "pairs", pairs: [ [ "Uploaded files", "#{number_with_delimiter(s[:files])} (#{number_to_human_size(s[:bytes])})" ], [ "Saved by storing duplicates once", number_to_human_size(s[:shared_bytes]) ], [ "Free disk space", s[:free_bytes] && number_to_human_size(s[:free_bytes]) ] ] + info.databases.map { |label, bytes| [ "#{label} database", bytes && number_to_human_size(bytes) ] } %>

Email

<%= button_to "Send test email", admin_test_email_path, class: "btn-secondary btn-sm", disabled: !MailSettings.configured?, data: { turbo_submits_with: "Sending…" }, title: "Sends to #{current_user.email_address}" %>
<%= render "pairs", pairs: MailSettings.summary.merge("Weekly reminders" => "Mondays, to owners who haven't turned them off") %>
<%= button_to "Send me this week's reminder", admin_test_reminder_path, class: "btn-secondary btn-sm", disabled: !MailSettings.configured? %>

Background jobs

<% if (j = info.jobs) %> <%= render "pairs", pairs: [ [ "Workers running", j[:workers].zero? ? tag.span("none", class: "badge-red") : j[:workers] ], [ "Waiting", j[:ready] ], [ "Scheduled", j[:scheduled] ], [ "Failed", j[:failed].positive? ? tag.span(j[:failed], class: "badge-orange") : 0 ] ] %> <% else %> <%= empty_state "Job queue not available." %> <% end %>

Records

<%= render "pairs", pairs: info.record_counts.transform_values { number_with_delimiter(_1) } %>

Records integrity

Nightly: a verified database backup, then a check of the record history chains and every electronic signature (AC 120-78B 3.2).

<%= button_to "Back up and check now", admin_check_records_path, class: "btn-secondary btn-sm", data: { turbo_submits_with: "Checking…" } %>
<% check = IntegrityCheck.latest %> <% backup = BackupRun.latest %> <%= render "pairs", pairs: [ [ "Last check", check ? "#{fmt_time(check.created_at)} · #{check.ok ? 'no problems' : pluralize(check.problems.size, 'problem')}" : "not run yet" ], [ "Checked", check ? "#{number_with_delimiter(check.versions_checked)} history entries, #{number_with_delimiter(check.signatures_checked)} signatures" : nil ], [ "Last backup", backup ? "#{fmt_time(backup.created_at)} · #{backup.ok ? number_to_human_size(backup.bytes) : 'FAILED'}" : "not run yet" ], [ "Backup check", backup&.message ], [ "Backups kept", "#{Setting.integer('backups_kept')} (in storage/backups)" ], [ "Off-site backup", OffsiteConnection.connected? ? ((o = OffsiteRun.latest_backup) ? tag.span("#{o.ok ? 'OK' : 'FAILED'} #{fmt_date(o.created_at.to_date)}", class: (o.ok && o.recent? ? nil : "badge-orange")) + " · Google Drive (#{OffsiteConnection.current.account_email})" : "Google Drive connected, none yet") : link_to("not set up", admin_offsite_backup_path, class: "badge-orange") ], [ "Procedures", (r = ProceduresRevision.current) ? "Revision #{r.number}, adopted #{fmt_date(r.adopted_at.to_date)}" : tag.span("not adopted", class: "badge-orange") ], [ "Last audit", AuditRun.latest ? "#{fmt_date(AuditRun.latest.performed_at.to_date)} · #{AuditRun.latest.passed ? 'passed' : 'items not passed'}" : "none yet" ], [ "Next audit due", AuditRun.due_soon? ? tag.span(fmt_date(AuditRun.next_due), class: "badge-orange") : fmt_date(AuditRun.next_due) ] ] %> <% if check && !check.ok %> <% end %>

Software versions

<% revisions = AppRevision.latest_first.limit(20) %> <% if revisions.any? %> <%= render "pairs", pairs: revisions.map { |r| [ [ r.version, "build #{r.revision}" ].compact.join(" · "), "#{fmt_time(r.first_seen_at)} – #{fmt_time(r.last_seen_at)}" ] } %> <% else %> <%= empty_state "No versions recorded yet." %> <% end %>
All gems (<%= info.all_gems.size %>)
<% info.all_gems.each do |name, version| %>
<%= name %><%= version %>
<% end %>