mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
Formatting.
This commit is contained in:
parent
a6b115b35e
commit
a5408e8a4a
@ -133,6 +133,7 @@ final class AutoIngestMetricsCollector {
|
||||
* A single job metric for an auto ingest cluster.
|
||||
*/
|
||||
static final class JobMetric {
|
||||
|
||||
private final long completedDate;
|
||||
private final long dataSourceSize;
|
||||
|
||||
|
@ -67,7 +67,7 @@ final class AutoIngestMetricsDialog extends javax.swing.JDialog {
|
||||
* Update the metrics shown in the report text area.
|
||||
*/
|
||||
private void updateMetrics() {
|
||||
if(datePicker.getDate() == null) {
|
||||
if (datePicker.getDate() == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -77,8 +77,8 @@ final class AutoIngestMetricsDialog extends javax.swing.JDialog {
|
||||
long dataSourceSizeTotal = 0;
|
||||
long pickedDate = datePicker.getDate().atStartOfDay().toEpochSecond(ZoneOffset.UTC) * 1000;
|
||||
|
||||
for(JobMetric jobMetric : completedJobMetrics) {
|
||||
if(jobMetric.getCompletedDate() >= pickedDate) {
|
||||
for (JobMetric jobMetric : completedJobMetrics) {
|
||||
if (jobMetric.getCompletedDate() >= pickedDate) {
|
||||
jobsCompleted++;
|
||||
dataSourceSizeTotal += jobMetric.getDataSourceSize();
|
||||
}
|
||||
@ -86,12 +86,12 @@ final class AutoIngestMetricsDialog extends javax.swing.JDialog {
|
||||
|
||||
SimpleDateFormat dateFormatter = new SimpleDateFormat("MMM d, yyyy");
|
||||
reportTextArea.setText(String.format(
|
||||
"Since %s:\n" +
|
||||
"Number of Jobs Completed: %d\n" +
|
||||
"Total Size of Data Sources: %.1f GB\n",
|
||||
"Since %s:\n"
|
||||
+ "Number of Jobs Completed: %d\n"
|
||||
+ "Total Size of Data Sources: %.1f GB\n",
|
||||
dateFormatter.format(Date.valueOf(datePicker.getDate())),
|
||||
jobsCompleted,
|
||||
(double)dataSourceSizeTotal / GIGABYTE_SIZE
|
||||
(double) dataSourceSizeTotal / GIGABYTE_SIZE
|
||||
));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user