Skip to content

Commit

Permalink
Update records threshold display
Browse files Browse the repository at this point in the history
Updates the records page size threshold error display to also show the threshold size.
  • Loading branch information
ItIsJordan committed Nov 29, 2023
1 parent 62b7318 commit 66724be
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hepdata/modules/records/assets/js/hepdata_tables.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,9 @@ HEPDATA.table_renderer = {
// Set up filesize attempt section
$("#hepdata_table_loader").addClass("hidden");
var megabyte_size = (table_data.size / (1024 * 1024)).toFixed(2);
d3.select("#filesize_table_size").html("Table size is: " + megabyte_size + " MB");
var additional_size = (HEPDATA.size_load_check_threshold / (1024 * 1024)).toFixed(2);
var message = "Table size is: " + megabyte_size + " MB, which is larger than our threshold of " + additional_size + " MB.";
d3.select("#filesize_table_size").html(message);
$("#hepdata_filesize_loader").removeClass("hidden");
$("filesize_table_confirm").removeClass("hidden");
}
Expand Down

0 comments on commit 66724be

Please sign in to comment.