Skip to content

Commit

Permalink
Apply ERB lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mjgiarlo committed Aug 9, 2024
1 parent 4fc56ef commit e1cf6bd
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 46 deletions.
52 changes: 26 additions & 26 deletions app/components/dashboard/audit_information_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ Note also:
<table class="table table-bordered border-dark table-hover table-sm">
<thead class="table-info">
<tr>
<th class="col-sm-2"/>
<th class="col-sm-2" />
<th class="col-sm-1">redis queue name</th>
<th class="col-sm-3">expected frequency<br/>(from app/config/schedule.rb)</th>
<th class="col-sm-3">expected frequency<br>(from app/config/schedule.rb)</th>
<th class="col-sm-1">how many objects get queued</th>
<th class="col-sm-2">objects with audit timestamps older than threshold</th>
<th>objects with errors</th>
Expand All @@ -23,50 +23,50 @@ Note also:
</thead>
<tbody class="table-group-divider">
<tr>
<td><strong>Validate Moab</strong><br/>moab-versioning gem validation for well-formedness (not checksums) run for locally stored Moabs.</td>
<td><strong>Validate Moab</strong><br>moab-versioning gem validation for well-formedness (not checksums) run for locally stored Moabs.</td>
<td>validate_moab</td>
<td><strong>on demand</strong></td>
<td><strong>one</strong>:<br/>queued by preservation robot step after updating a Moab</td>
<td class="text-end<%= ' table-warning' if moab_audits_older_than_threshold? %>">Moab audits older than <%= moab_audit_age_threshold %>:<hr/><%= num_moab_audits_older_than_threshold %></td>
<td><strong>one</strong>:<br>queued by preservation robot step after updating a Moab</td>
<td class="text-end<%= ' table-warning' if moab_audits_older_than_threshold? %>">Moab audits older than <%= moab_audit_age_threshold %>:<hr><%= num_moab_audits_older_than_threshold %></td>
<td class="text-end<%= ' table-danger' if any_moab_record_errors? %>"><%= num_moab_record_not_ok %></td>
<td class="table-secondary"/>
<td class="table-secondary" />
</tr>
<tr>
<td><strong>Moab to Catalog</strong><br/>moab-versioning gem validation for well-formedness (not checksums) run for locally stored Moabs and verified against database info.</td>
<td><strong>Moab to Catalog</strong><br>moab-versioning gem validation for well-formedness (not checksums) run for locally stored Moabs and verified against database info.</td>
<td>m2c</td>
<td><strong>Monthly</strong>: 11 am on the 1st of every month</td>
<td><strong>all</strong>:<br/>queued by walking directories on MoabStorageRoot.storage_location</td>
<td class="text-end<%= ' table-warning' if moab_audits_older_than_threshold? %>">Moab audits older than <%= moab_audit_age_threshold %>:<hr/><%= num_moab_audits_older_than_threshold %></td>
<td><strong>all</strong>:<br>queued by walking directories on MoabStorageRoot.storage_location</td>
<td class="text-end<%= ' table-warning' if moab_audits_older_than_threshold? %>">Moab audits older than <%= moab_audit_age_threshold %>:<hr><%= num_moab_audits_older_than_threshold %></td>
<td class="text-end<%= ' table-danger' if any_moab_record_errors? %>"><%= num_moab_record_not_ok %></td>
<td class="table-secondary"/>
<td class="table-secondary" />
</tr>
<tr>
<td><strong>Catalog to Moab</strong><br/>Database info verified against locally stored Moabs and moab-versioning integrity checks for Moabs.</td>
<td><strong>Catalog to Moab</strong><br>Database info verified against locally stored Moabs and moab-versioning integrity checks for Moabs.</td>
<td>c2m</td>
<td><strong>Monthly</strong>: 11 am on the 15th of every month</td>
<td><strong>all</strong>:<br/>queued by associated MoabStorageRoot</td>
<td class="text-end<%= ' table-warning' if moab_audits_older_than_threshold? %>">Moab audits older than <%= moab_audit_age_threshold %>:<hr/><%= num_moab_audits_older_than_threshold %></td>
<td><strong>all</strong>:<br>queued by associated MoabStorageRoot</td>
<td class="text-end<%= ' table-warning' if moab_audits_older_than_threshold? %>">Moab audits older than <%= moab_audit_age_threshold %>:<hr><%= num_moab_audits_older_than_threshold %></td>
<td class="text-end<%= ' table-danger' if any_moab_record_errors? %>"><%= num_moab_record_not_ok %></td>
<td class="table-secondary"/>
<td class="table-secondary" />
</tr>
<tr>
<td><strong>Checksum Validation (CV)</strong><br/>Compare checksums in Moab metadata files on local storage with computed checksums for Moab metadata and content files.</td>
<td><strong>Checksum Validation (CV)</strong><br>Compare checksums in Moab metadata files on local storage with computed checksums for Moab metadata and content files.</td>
<td>checksum_validation</td>
<td><strong>Weekly</strong>: 1am on Sunday<br/><em>for MoabRecords with expired checks</em></td>
<td><strong>subset</strong>:<br/>expired checksums queued by associated MoabStorageRoot</td>
<td class="text-end<%= ' table-warning' if moab_audits_older_than_threshold? %>">Moab audits older than <%= moab_audit_age_threshold %>:<hr/><%= num_moab_audits_older_than_threshold %></td>
<td><strong>Weekly</strong>: 1am on Sunday<br><em>for MoabRecords with expired checks</em></td>
<td><strong>subset</strong>:<br>expired checksums queued by associated MoabStorageRoot</td>
<td class="text-end<%= ' table-warning' if moab_audits_older_than_threshold? %>">Moab audits older than <%= moab_audit_age_threshold %>:<hr><%= num_moab_audits_older_than_threshold %></td>
<td class="text-end<%= ' table-danger' unless moab_checksum_validation_audit_ok? %>"><%= MoabRecord.invalid_checksum.count %></td>
<td class="text-center<%= ' table-warning' if moabs_with_expired_checksum_validation? %>"><%= num_moab_expired_checksum_validation %><br/><br/>(passing checks expire 90 days after they are run)</td>
<td class="text-center<%= ' table-warning' if moabs_with_expired_checksum_validation? %>"><%= num_moab_expired_checksum_validation %><br><br>(passing checks expire 90 days after they are run)</td>
</tr>
<tr>
<td><strong>Catalog to Archive</strong><br/>Confirm a PreservedObject has all versions/parts replicated for each of its target endpoints and attempts to backfill missing ones</td>
<td>moab_replication_audit<br/>part_audit_aws_s3_east_1<br/>part_audit_aws_s3_west_2<br/>part_audit_ibm_us_south</td>
<td><strong>Weekly</strong>: 12am on Wednesday<br/><em>for PreservedObjects with expired checks</em></td>
<td><strong>subset</strong>:<br/>expired archive checks for PreservedObjects and their associated ZipParts are queued</td>
<td class="text-end<%= ' table-warning' if replication_audits_older_than_threshold? %>">PreservedObject replication audits older than <%= replication_audit_age_threshold %>:<hr/><%= num_replication_audits_older_than_threshold %></td>
<td><strong>Catalog to Archive</strong><br>Confirm a PreservedObject has all versions/parts replicated for each of its target endpoints and attempts to backfill missing ones</td>
<td>moab_replication_audit<br>part_audit_aws_s3_east_1<br>part_audit_aws_s3_west_2<br>part_audit_ibm_us_south</td>
<td><strong>Weekly</strong>: 12am on Wednesday<br><em>for PreservedObjects with expired checks</em></td>
<td><strong>subset</strong>:<br>expired archive checks for PreservedObjects and their associated ZipParts are queued</td>
<td class="text-end<%= ' table-warning' if replication_audits_older_than_threshold? %>">PreservedObject replication audits older than <%= replication_audit_age_threshold %>:<hr><%= num_replication_audits_older_than_threshold %></td>
<td class="text-end<%= ' table-danger' unless zip_parts_ok? %>"><%= num_replication_errors %></td>
<td class="text-center"><%= PreservedObject.archive_check_expired.count %><br/><br/>(passing checks expire 90 days after they are run)</td>
<td class="text-center"><%= PreservedObject.archive_check_expired.count %><br><br>(passing checks expire 90 days after they are run)</td>
</tr>
</tbody>
</table>
</div>
</div>
2 changes: 1 addition & 1 deletion app/components/dashboard/audit_status_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@
</li>
</ul>
</div>
</div>
</div>
4 changes: 2 additions & 2 deletions app/components/dashboard/moab_records_component.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<th>count</th>
<th>total size</th>
<th>average size</th>
<%status_labels.map do |status| %>
<th class="text-center"><%=status %></th>
<% status_labels.map do |status| %>
<th class="text-center"><%= status %></th>
<% end %>
<th>expired checksum audit</th>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<th class="col-1">average size</th>
<th class="col-1">moab count</th>
<% status_labels.map do |status| %>
<th class="col-sm-1 text-center"><%=status %></th>
<th class="col-sm-1 text-center"><%= status %></th>
<% end %>
<th class="col-sm-1">expired checksum audit</th>
</tr>
Expand All @@ -39,9 +39,9 @@
<tfoot class="table-group-divider">
<tr>
<th>totals</th>
<td class="table-secondary"/>
<td class="table-secondary"/>
<td class="table-secondary"/>
<td class="table-secondary" />
<td class="table-secondary" />
<td class="table-secondary" />
<td class="text-end<%= ' table-danger' unless storage_roots_moab_count_ok? %>"><%= storage_roots_moab_count %></td>
<td class="text-end<%= ' table-danger' unless storage_roots_ok_count_ok? %>"><%= storage_roots_ok_count %></td>
<td class="text-end<%= ' table-danger' unless storage_roots_invalid_moab_count_ok? %>"><%= storage_roots_invalid_moab_count %></td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<table class="table table-bordered table-hover table-sm">
<thead class="table-info">
<tr>
<th/>
<th />
<th>count</th>
<th>object version count</th>
<th>highest version</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<tr>
<th>endpoint name</th>
<th>ActiveJob class for replication</th>
<th class="text-center">ZippedMoabVersion replicated count<br/>(according to database)</th>
<th class="text-center">Number of Object Versions<br/>(per PreservedObject)</th>
<th class="text-center">ZippedMoabVersion replicated count<br>(according to database)</th>
<th class="text-center">Number of Object Versions<br>(per PreservedObject)</th>
</tr>
</thead>
<tbody class="table-group-divider">
Expand All @@ -25,4 +25,4 @@
</tbody>
</table>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@
</table>
</div>
</div>

2 changes: 1 addition & 1 deletion app/views/dashboard/_audit_info.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<turbo-frame id="audit-info">
<%= render Dashboard::AuditInformationComponent.new %>
</turbo-frame>
</turbo-frame>
6 changes: 3 additions & 3 deletions app/views/dashboard/_moab_information.html.erb
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<h2>Moabs on Storage - Status Information</h2>
<p><strong class="fs-4">PreservedObject</strong> records store the druid and links to db records about both the Moab on local storage and all the replicated instances in the cloud.</p>
<p><strong class="fs-4">MoabRecord</strong> records are about the Moab on storage.</p>
<hr/>
<hr>
<turbo-frame id="moab-record-versions" src="<%= dashboard_moab_record_versions_path %>" loading="lazy">
<%= render Spinner.new %>
</turbo-frame>
<hr/>
<hr>
<turbo-frame id="moab-record-info" src="<%= dashboard_moab_record_info_path %>" loading="lazy">
<%= render Spinner.new %>
</turbo-frame>
<hr/>
<hr>
<turbo-frame id="storage-root-data" src="<%= dashboard_storage_root_data_path %>" loading="lazy">
<%= render Spinner.new %>
</turbo-frame>
6 changes: 3 additions & 3 deletions app/views/dashboard/_replication_information.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<p><strong class="fs-4">ZippedMoabVersion</strong> records are about a single version of the Moab that is archived as zip file(s) on a particular cloud endpoint.</p>
<p><strong class="fs-4">ZipPart</strong> records represent the individual zip segments for a ZippedMoabVersion (zips larger than <%= Replication::DruidVersionZip::ZIP_SPLIT_SIZE %> are split into segments) that are replicated to the particular cloud endpoint.</p>
<p>See <a href="https://github.com/sul-dlss/preservation_catalog/wiki/Replication-Flow">Replication Flow wiki</a> for details about the replication process.</p>
<hr/>
<hr>
<turbo-frame id="replication-endpoints" src="<%= dashboard_replication_endpoints_path %>" loading="lazy">
<%= render Spinner.new %>
</turbo-frame>
<hr/>
<hr>
<turbo-frame id="replicated-files" src="<%= dashboard_replicated_files_path %>" loading="lazy">
<%= render Spinner.new %>
</turbo-frame>
<hr/>
<hr>
2 changes: 1 addition & 1 deletion app/views/dashboard/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</li>
</ul>
</div>
<hr/>
<hr>
<div class="row row-cols-2">
<div class="col-3 col-rows-3 sidenav">
<ul class="nav nav-pills row-3" id="dashboardTab">
Expand Down

0 comments on commit e1cf6bd

Please sign in to comment.