mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-13 08:26:15 +00:00
fixes
This commit is contained in:
parent
a79ef6610d
commit
75edce86eb
@ -57,12 +57,12 @@ public class AnalysisPanel extends BaseDataSourceSummaryPanel {
|
|||||||
private static final List<ColumnModel<Pair<String, Long>, DefaultCellModel<?>>> DEFAULT_COLUMNS = Arrays.asList(
|
private static final List<ColumnModel<Pair<String, Long>, DefaultCellModel<?>>> DEFAULT_COLUMNS = Arrays.asList(
|
||||||
new ColumnModel<>(
|
new ColumnModel<>(
|
||||||
Bundle.AnalysisPanel_keyColumn_title(),
|
Bundle.AnalysisPanel_keyColumn_title(),
|
||||||
(pair) -> new DefaultCellModel(pair.getKey()),
|
(pair) -> new DefaultCellModel<>(pair.getKey()),
|
||||||
300
|
300
|
||||||
),
|
),
|
||||||
new ColumnModel<>(
|
new ColumnModel<>(
|
||||||
Bundle.AnalysisPanel_countColumn_title(),
|
Bundle.AnalysisPanel_countColumn_title(),
|
||||||
(pair) -> new DefaultCellModel(pair.getValue()),
|
(pair) -> new DefaultCellModel<>(pair.getValue()),
|
||||||
100
|
100
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -497,7 +497,7 @@ abstract class BaseDataSourceSummaryPanel extends JPanel {
|
|||||||
String sheetName, List<T> data) {
|
String sheetName, List<T> data) {
|
||||||
|
|
||||||
return convertToExcel(
|
return convertToExcel(
|
||||||
(dataList) -> new ExcelExport.ExcelTableExport<T, C>(Bundle.AnalysisPanel_hashsetHits_tabName(), columnsModel, dataList),
|
(dataList) -> new ExcelExport.ExcelTableExport<T, C>(sheetName, columnsModel, dataList),
|
||||||
data,
|
data,
|
||||||
sheetName);
|
sheetName);
|
||||||
}
|
}
|
||||||
@ -508,7 +508,7 @@ abstract class BaseDataSourceSummaryPanel extends JPanel {
|
|||||||
|
|
||||||
return getExport(
|
return getExport(
|
||||||
dataFetcher,
|
dataFetcher,
|
||||||
(dataList) -> new ExcelExport.ExcelTableExport<T, C>(Bundle.AnalysisPanel_hashsetHits_tabName(), columnsModel, dataList),
|
(dataList) -> new ExcelExport.ExcelTableExport<T, C>(sheetName, columnsModel, dataList),
|
||||||
sheetName,
|
sheetName,
|
||||||
ds);
|
ds);
|
||||||
}
|
}
|
||||||
|
@ -58,4 +58,4 @@ UserActivityPanel.rightClickForMoreOptions3.text=Right click on row for more opt
|
|||||||
UserActivityPanel.rightClickForMoreOptions4.text=Right click on row for more options
|
UserActivityPanel.rightClickForMoreOptions4.text=Right click on row for more options
|
||||||
UserActivityPanel.rightClickForMoreOptions5.text=Right click on row for more options
|
UserActivityPanel.rightClickForMoreOptions5.text=Right click on row for more options
|
||||||
TimelinePanel.viewInTimelineBtn.text=View in Timeline
|
TimelinePanel.viewInTimelineBtn.text=View in Timeline
|
||||||
DataSourceSummaryTabbedPane.exportXLSXButton.text=Export to XLSX
|
DataSourceSummaryTabbedPane.exportXLSXButton.text=Export Summary Data
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
AnalysisPanel_countColumn_title=Count
|
AnalysisPanel_countColumn_title=Count
|
||||||
|
AnalysisPanel_hashsetHits_tabName=Hashset Hits
|
||||||
|
AnalysisPanel_interestingItemHits_tabName=Interesting Item Hits
|
||||||
AnalysisPanel_keyColumn_title=Name
|
AnalysisPanel_keyColumn_title=Name
|
||||||
|
AnalysisPanel_keywordHits_tabName=Keyword Hits
|
||||||
AnalysisPanel_keywordSearchModuleName=Keyword Search
|
AnalysisPanel_keywordSearchModuleName=Keyword Search
|
||||||
BaseDataSourceSummaryPanel_goToArtifact=View Source Result
|
BaseDataSourceSummaryPanel_goToArtifact=View Source Result
|
||||||
BaseDataSourceSummaryPanel_goToFile=View Source File in Directory
|
BaseDataSourceSummaryPanel_goToFile=View Source File in Directory
|
||||||
@ -45,26 +48,44 @@ DataSourceSummaryNode.column.type.header=Type
|
|||||||
DataSourceSummaryNode.viewDataSourceAction.text=Go to Data Source
|
DataSourceSummaryNode.viewDataSourceAction.text=Go to Data Source
|
||||||
DataSourceSummaryTabbedPane_analysisTab_title=Analysis
|
DataSourceSummaryTabbedPane_analysisTab_title=Analysis
|
||||||
DataSourceSummaryTabbedPane_detailsTab_title=Container
|
DataSourceSummaryTabbedPane_detailsTab_title=Container
|
||||||
|
DataSourceSummaryTabbedPane_exportToXLSX_beginExport=Beginning Export...
|
||||||
|
# {0} - tabName
|
||||||
|
DataSourceSummaryTabbedPane_exportToXLSX_gatheringTabData=Fetching Data for {0} Tab...
|
||||||
|
DataSourceSummaryTabbedPane_exportToXLSX_writingToFile=Writing to File...
|
||||||
DataSourceSummaryTabbedPane_geolocationTab_title=Geolocation
|
DataSourceSummaryTabbedPane_geolocationTab_title=Geolocation
|
||||||
DataSourceSummaryTabbedPane_ingestHistoryTab_title=Ingest History
|
DataSourceSummaryTabbedPane_ingestHistoryTab_title=Ingest History
|
||||||
DataSourceSummaryTabbedPane_pastCasesTab_title=Past Cases
|
DataSourceSummaryTabbedPane_pastCasesTab_title=Past Cases
|
||||||
|
# {0} - path
|
||||||
|
DataSourceSummaryTabbedPane_promptAndExportToXLSX_fileExistsMessage=File at {0} already exists.
|
||||||
|
DataSourceSummaryTabbedPane_promptAndExportToXLSX_fileExistsTitle=File Already Exists
|
||||||
DataSourceSummaryTabbedPane_recentFileTab_title=Recent Files
|
DataSourceSummaryTabbedPane_recentFileTab_title=Recent Files
|
||||||
|
DataSourceSummaryTabbedPane_runXLSXExport_progressCancelActionTitle=Cancelling...
|
||||||
|
DataSourceSummaryTabbedPane_runXLSXExport_progressCancelTitle=Cancel
|
||||||
|
# {0} - dataSource
|
||||||
|
DataSourceSummaryTabbedPane_runXLSXExport_progressTitle=Exporting {0} to XLSX
|
||||||
DataSourceSummaryTabbedPane_timelineTab_title=Timeline
|
DataSourceSummaryTabbedPane_timelineTab_title=Timeline
|
||||||
DataSourceSummaryTabbedPane_typesTab_title=Types
|
DataSourceSummaryTabbedPane_typesTab_title=Types
|
||||||
DataSourceSummaryTabbedPane_userActivityTab_title=User Activity
|
DataSourceSummaryTabbedPane_userActivityTab_title=User Activity
|
||||||
GeolocationPanel_cityColumn_title=Closest City
|
GeolocationPanel_cityColumn_title=Closest City
|
||||||
GeolocationPanel_countColumn_title=Count
|
GeolocationPanel_countColumn_title=Count
|
||||||
|
GeolocationPanel_mostCommon_tabName=Most Common Cities
|
||||||
|
GeolocationPanel_mostRecent_tabName=Most Recent Cities
|
||||||
GeolocationPanel_onNoCrIngest_message=No results will be shown because the GPX Parser was not run.
|
GeolocationPanel_onNoCrIngest_message=No results will be shown because the GPX Parser was not run.
|
||||||
GeolocationPanel_unknownRow_title=Unknown
|
GeolocationPanel_unknownRow_title=Unknown
|
||||||
PastCasesPanel_caseColumn_title=Case
|
PastCasesPanel_caseColumn_title=Case
|
||||||
PastCasesPanel_countColumn_title=Count
|
PastCasesPanel_countColumn_title=Count
|
||||||
|
PastCasesPanel_notableFileTable_tabName=Cases with Common Notable
|
||||||
PastCasesPanel_onNoCrIngest_message=No results will be shown because the Central Repository module was not run.
|
PastCasesPanel_onNoCrIngest_message=No results will be shown because the Central Repository module was not run.
|
||||||
|
PastCasesPanel_sameIdsTable_tabName=Past Cases with the Same Devices
|
||||||
RecentFilePanel_col_header_domain=Domain
|
RecentFilePanel_col_header_domain=Domain
|
||||||
RecentFilePanel_col_header_path=Path
|
RecentFilePanel_col_header_path=Path
|
||||||
RecentFilePanel_col_header_sender=Sender
|
RecentFilePanel_col_header_sender=Sender
|
||||||
RecentFilePanel_emailParserModuleName=Email Parser
|
RecentFilePanel_emailParserModuleName=Email Parser
|
||||||
RecentFilePanel_no_open_documents=No recently open documents found.
|
RecentFilePanel_no_open_documents=No recently open documents found.
|
||||||
|
RecentFilesPanel_attachmentsTable_tabName=Recent Attachments
|
||||||
RecentFilesPanel_col_head_date=Date
|
RecentFilesPanel_col_head_date=Date
|
||||||
|
RecentFilesPanel_docsTable_tabName=Recently Opened Documents
|
||||||
|
RecentFilesPanel_downloadsTable_tabName=Recently Downloads
|
||||||
SizeRepresentationUtil_units_bytes=\ bytes
|
SizeRepresentationUtil_units_bytes=\ bytes
|
||||||
SizeRepresentationUtil_units_gigabytes=\ GB
|
SizeRepresentationUtil_units_gigabytes=\ GB
|
||||||
SizeRepresentationUtil_units_kilobytes=\ kB
|
SizeRepresentationUtil_units_kilobytes=\ kB
|
||||||
@ -123,21 +144,27 @@ UserActivityPanel.rightClickForMoreOptions3.text=Right click on row for more opt
|
|||||||
UserActivityPanel.rightClickForMoreOptions4.text=Right click on row for more options
|
UserActivityPanel.rightClickForMoreOptions4.text=Right click on row for more options
|
||||||
UserActivityPanel.rightClickForMoreOptions5.text=Right click on row for more options
|
UserActivityPanel.rightClickForMoreOptions5.text=Right click on row for more options
|
||||||
TimelinePanel.viewInTimelineBtn.text=View in Timeline
|
TimelinePanel.viewInTimelineBtn.text=View in Timeline
|
||||||
|
DataSourceSummaryTabbedPane.exportXLSXButton.text=Export Summary Data
|
||||||
UserActivityPanel_noDataExists=No communication data exists
|
UserActivityPanel_noDataExists=No communication data exists
|
||||||
UserActivityPanel_tab_title=User Activity
|
UserActivityPanel_tab_title=User Activity
|
||||||
UserActivityPanel_TopAccountTableModel_accountType_header=Account Type
|
UserActivityPanel_TopAccountTableModel_accountType_header=Account Type
|
||||||
UserActivityPanel_TopAccountTableModel_lastAccess_header=Last Accessed
|
UserActivityPanel_TopAccountTableModel_lastAccess_header=Last Accessed
|
||||||
|
UserActivityPanel_TopAccountTableModel_tabName=Recent Account Types Used
|
||||||
UserActivityPanel_TopDeviceAttachedTableModel_dateAccessed_header=Last Accessed
|
UserActivityPanel_TopDeviceAttachedTableModel_dateAccessed_header=Last Accessed
|
||||||
UserActivityPanel_TopDeviceAttachedTableModel_deviceId_header=Device Id
|
UserActivityPanel_TopDeviceAttachedTableModel_deviceId_header=Device Id
|
||||||
UserActivityPanel_TopDeviceAttachedTableModel_makeModel_header=Make and Model
|
UserActivityPanel_TopDeviceAttachedTableModel_makeModel_header=Make and Model
|
||||||
|
UserActivityPanel_TopDeviceAttachedTableModel_tabName=Recent Devices Attached
|
||||||
UserActivityPanel_TopDomainsTableModel_count_header=Visits
|
UserActivityPanel_TopDomainsTableModel_count_header=Visits
|
||||||
UserActivityPanel_TopDomainsTableModel_domain_header=Domain
|
UserActivityPanel_TopDomainsTableModel_domain_header=Domain
|
||||||
UserActivityPanel_TopDomainsTableModel_lastAccess_header=Last Accessed
|
UserActivityPanel_TopDomainsTableModel_lastAccess_header=Last Accessed
|
||||||
|
UserActivityPanel_TopDomainsTableModel_tabName=Recent Domains
|
||||||
UserActivityPanel_TopProgramsTableModel_count_header=Run Times
|
UserActivityPanel_TopProgramsTableModel_count_header=Run Times
|
||||||
UserActivityPanel_TopProgramsTableModel_folder_header=Folder
|
UserActivityPanel_TopProgramsTableModel_folder_header=Folder
|
||||||
UserActivityPanel_TopProgramsTableModel_lastrun_header=Last Run
|
UserActivityPanel_TopProgramsTableModel_lastrun_header=Last Run
|
||||||
UserActivityPanel_TopProgramsTableModel_name_header=Program
|
UserActivityPanel_TopProgramsTableModel_name_header=Program
|
||||||
|
UserActivityPanel_TopProgramsTableModel_tabName=Recent Programs
|
||||||
UserActivityPanel_TopWebSearchTableModel_dateAccessed_header=Date Accessed
|
UserActivityPanel_TopWebSearchTableModel_dateAccessed_header=Date Accessed
|
||||||
UserActivityPanel_TopWebSearchTableModel_searchString_header=Search String
|
UserActivityPanel_TopWebSearchTableModel_searchString_header=Search String
|
||||||
|
UserActivityPanel_TopWebSearchTableModel_tabName=Recent Web Searches
|
||||||
UserActivityPanel_TopWebSearchTableModel_translatedResult_header=Translated
|
UserActivityPanel_TopWebSearchTableModel_translatedResult_header=Translated
|
||||||
ViewSummaryInformationAction.name.text=View Summary Information
|
ViewSummaryInformationAction.name.text=View Summary Information
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
<Properties>
|
<Properties>
|
||||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||||
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
|
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
|
||||||
<EmptyBorder bottom="5" left="5" right="5" top="5"/>
|
<EmptyBorder bottom="2" left="2" right="2" top="2"/>
|
||||||
</Border>
|
</Border>
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
@ -93,7 +93,7 @@
|
|||||||
</Events>
|
</Events>
|
||||||
<Constraints>
|
<Constraints>
|
||||||
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
<Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout" value="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout$BorderConstraintsDescription">
|
||||||
<BorderConstraints direction="East"/>
|
<BorderConstraints direction="West"/>
|
||||||
</Constraint>
|
</Constraint>
|
||||||
</Constraints>
|
</Constraints>
|
||||||
</Component>
|
</Component>
|
||||||
|
@ -25,20 +25,28 @@ import java.awt.event.ActionListener;
|
|||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.EnumSet;
|
import java.util.EnumSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.concurrent.CancellationException;
|
||||||
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
import java.util.logging.Level;
|
||||||
import javax.swing.JFileChooser;
|
import javax.swing.JFileChooser;
|
||||||
|
import javax.swing.JOptionPane;
|
||||||
import javax.swing.SwingWorker;
|
import javax.swing.SwingWorker;
|
||||||
import javax.swing.filechooser.FileNameExtensionFilter;
|
import javax.swing.filechooser.FileNameExtensionFilter;
|
||||||
import org.openide.util.NbBundle.Messages;
|
import org.openide.util.NbBundle.Messages;
|
||||||
import org.openide.windows.WindowManager;
|
import org.openide.windows.WindowManager;
|
||||||
import org.sleuthkit.autopsy.casemodule.Case;
|
import org.sleuthkit.autopsy.casemodule.Case;
|
||||||
import org.sleuthkit.autopsy.casemodule.IngestJobInfoPanel;
|
import org.sleuthkit.autopsy.casemodule.IngestJobInfoPanel;
|
||||||
import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil;
|
import org.sleuthkit.autopsy.coreutils.FileUtil;
|
||||||
|
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||||
import org.sleuthkit.autopsy.datasourcesummary.uiutils.ExcelExport;
|
import org.sleuthkit.autopsy.datasourcesummary.uiutils.ExcelExport;
|
||||||
import org.sleuthkit.autopsy.datasourcesummary.uiutils.ExcelExport.ExcelExportException;
|
import org.sleuthkit.autopsy.datasourcesummary.uiutils.ExcelExport.ExcelExportException;
|
||||||
import org.sleuthkit.autopsy.datasourcesummary.uiutils.ExcelExport.ExcelSheetExport;
|
import org.sleuthkit.autopsy.datasourcesummary.uiutils.ExcelExport.ExcelSheetExport;
|
||||||
@ -145,6 +153,8 @@ public class DataSourceSummaryTabbedPane extends javax.swing.JPanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
private static final Logger logger = Logger.getLogger(DataSourceSummaryTabbedPane.class.getName());
|
||||||
|
|
||||||
// needs to match value provided for card layout in designed
|
// needs to match value provided for card layout in designed
|
||||||
private static final String TABBED_PANE = "tabbedPane";
|
private static final String TABBED_PANE = "tabbedPane";
|
||||||
private static final String NO_DATASOURCE_PANE = "noDataSourcePane";
|
private static final String NO_DATASOURCE_PANE = "noDataSourcePane";
|
||||||
@ -271,19 +281,19 @@ public class DataSourceSummaryTabbedPane extends javax.swing.JPanel {
|
|||||||
@Messages({
|
@Messages({
|
||||||
"DataSourceSummaryTabbedPane_promptAndExportToXLSX_fileExistsTitle=File Already Exists",
|
"DataSourceSummaryTabbedPane_promptAndExportToXLSX_fileExistsTitle=File Already Exists",
|
||||||
"# {0} - path",
|
"# {0} - path",
|
||||||
"DataSourceSummaryTabbedPane_promptAndExportToXLSX_fileExistsMessage=File at {0} already exists.",
|
"DataSourceSummaryTabbedPane_promptAndExportToXLSX_fileExistsMessage=File at {0} already exists.",})
|
||||||
})
|
|
||||||
private void promptAndExportToXLSX() {
|
private void promptAndExportToXLSX() {
|
||||||
DataSource ds = this.dataSource;
|
DataSource ds = this.dataSource;
|
||||||
if (ds == null) {
|
if (ds == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String expectedExtension = "xlsx";
|
String expectedExtension = "xlsx";
|
||||||
JFileChooser fc = new JFileChooser();
|
JFileChooser fc = new JFileChooser();
|
||||||
FileNameExtensionFilter xmlFilter = new FileNameExtensionFilter("XLSX file (*.xlsx)", expectedExtension);
|
FileNameExtensionFilter xmlFilter = new FileNameExtensionFilter("XLSX file (*.xlsx)", expectedExtension);
|
||||||
fc.addChoosableFileFilter(xmlFilter);
|
fc.addChoosableFileFilter(xmlFilter);
|
||||||
fc.setFileFilter(xmlFilter);
|
fc.setFileFilter(xmlFilter);
|
||||||
|
DateFormat dateFormat = new SimpleDateFormat("MM-dd-yyyy-HH-mm-ss");
|
||||||
|
fc.setSelectedFile(new File(String.format("%s-%s.xlsx", ds.getName() == null ? "" : FileUtil.escapeFileName(ds.getName()), dateFormat.format(new Date()))));
|
||||||
|
|
||||||
int returnVal = fc.showSaveDialog(this);
|
int returnVal = fc.showSaveDialog(this);
|
||||||
|
|
||||||
@ -297,9 +307,10 @@ public class DataSourceSummaryTabbedPane extends javax.swing.JPanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
MessageNotifyUtil.Notify.error(
|
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||||
|
Bundle.DataSourceSummaryTabbedPane_promptAndExportToXLSX_fileExistsMessage(file.getAbsolutePath()),
|
||||||
Bundle.DataSourceSummaryTabbedPane_promptAndExportToXLSX_fileExistsTitle(),
|
Bundle.DataSourceSummaryTabbedPane_promptAndExportToXLSX_fileExistsTitle(),
|
||||||
Bundle.DataSourceSummaryTabbedPane_promptAndExportToXLSX_fileExistsMessage(file.getAbsolutePath()));
|
JOptionPane.WARNING_MESSAGE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -357,7 +368,15 @@ public class DataSourceSummaryTabbedPane extends javax.swing.JPanel {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void done() {
|
protected void done() {
|
||||||
progressIndicator.finish();
|
try {
|
||||||
|
get();
|
||||||
|
} catch (ExecutionException ex) {
|
||||||
|
logger.log(Level.WARNING, "Error while trying to export data source summary to xlsx.", ex);
|
||||||
|
} catch (InterruptedException | CancellationException ex) {
|
||||||
|
// no op on cancellation
|
||||||
|
} finally {
|
||||||
|
progressIndicator.finish();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -368,14 +387,15 @@ public class DataSourceSummaryTabbedPane extends javax.swing.JPanel {
|
|||||||
@Messages({
|
@Messages({
|
||||||
"DataSourceSummaryTabbedPane_exportToXLSX_beginExport=Beginning Export...",
|
"DataSourceSummaryTabbedPane_exportToXLSX_beginExport=Beginning Export...",
|
||||||
"# {0} - tabName",
|
"# {0} - tabName",
|
||||||
"DataSourceSummaryTabbedPane_exportToXLSX_gatheringTabData=Fetching Data for {0}...",
|
"DataSourceSummaryTabbedPane_exportToXLSX_gatheringTabData=Fetching Data for {0} Tab...",
|
||||||
"DataSourceSummaryTabbedPane_exportToXLSX_writingToFile=Writing to File...",})
|
"DataSourceSummaryTabbedPane_exportToXLSX_writingToFile=Writing to File...",})
|
||||||
|
|
||||||
private void exportToXLSX(ProgressIndicator progressIndicator, DataSource dataSource, File path)
|
private void exportToXLSX(ProgressIndicator progressIndicator, DataSource dataSource, File path)
|
||||||
throws InterruptedException, IOException, ExcelExportException {
|
throws InterruptedException, IOException, ExcelExportException {
|
||||||
|
|
||||||
int exportWeight = 3;
|
int exportWeight = 3;
|
||||||
int totalWeight = tabs.size() + exportWeight;
|
int totalWeight = tabs.size() + exportWeight;
|
||||||
progressIndicator.switchToDeterminate(Bundle.DataSourceSummaryTabbedPane_exportToXLSX_beginExport(), 0, totalWeight);
|
progressIndicator.start(Bundle.DataSourceSummaryTabbedPane_exportToXLSX_beginExport(), totalWeight);
|
||||||
List<ExcelSheetExport> sheetExports = new ArrayList<>();
|
List<ExcelSheetExport> sheetExports = new ArrayList<>();
|
||||||
for (int i = 0; i < tabs.size(); i++) {
|
for (int i = 0; i < tabs.size(); i++) {
|
||||||
if (Thread.interrupted()) {
|
if (Thread.interrupted()) {
|
||||||
@ -431,7 +451,7 @@ public class DataSourceSummaryTabbedPane extends javax.swing.JPanel {
|
|||||||
tabContentPane.setLayout(new java.awt.BorderLayout());
|
tabContentPane.setLayout(new java.awt.BorderLayout());
|
||||||
tabContentPane.add(tabbedPane, java.awt.BorderLayout.CENTER);
|
tabContentPane.add(tabbedPane, java.awt.BorderLayout.CENTER);
|
||||||
|
|
||||||
actionsPane.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
|
actionsPane.setBorder(javax.swing.BorderFactory.createEmptyBorder(2, 2, 2, 2));
|
||||||
actionsPane.setLayout(new java.awt.BorderLayout());
|
actionsPane.setLayout(new java.awt.BorderLayout());
|
||||||
|
|
||||||
org.openide.awt.Mnemonics.setLocalizedText(exportXLSXButton, org.openide.util.NbBundle.getMessage(DataSourceSummaryTabbedPane.class, "DataSourceSummaryTabbedPane.exportXLSXButton.text")); // NOI18N
|
org.openide.awt.Mnemonics.setLocalizedText(exportXLSXButton, org.openide.util.NbBundle.getMessage(DataSourceSummaryTabbedPane.class, "DataSourceSummaryTabbedPane.exportXLSXButton.text")); // NOI18N
|
||||||
@ -440,7 +460,7 @@ public class DataSourceSummaryTabbedPane extends javax.swing.JPanel {
|
|||||||
exportXLSXButtonActionPerformed(evt);
|
exportXLSXButtonActionPerformed(evt);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
actionsPane.add(exportXLSXButton, java.awt.BorderLayout.EAST);
|
actionsPane.add(exportXLSXButton, java.awt.BorderLayout.WEST);
|
||||||
|
|
||||||
tabContentPane.add(actionsPane, java.awt.BorderLayout.SOUTH);
|
tabContentPane.add(actionsPane, java.awt.BorderLayout.SOUTH);
|
||||||
|
|
||||||
|
@ -93,14 +93,14 @@ public class GeolocationPanel extends BaseDataSourceSummaryPanel {
|
|||||||
// The column indicating the city
|
// The column indicating the city
|
||||||
private static final ColumnModel<Pair<String, Integer>, DefaultCellModel<?>> CITY_COL = new ColumnModel<>(
|
private static final ColumnModel<Pair<String, Integer>, DefaultCellModel<?>> CITY_COL = new ColumnModel<>(
|
||||||
Bundle.GeolocationPanel_cityColumn_title(),
|
Bundle.GeolocationPanel_cityColumn_title(),
|
||||||
(pair) -> new DefaultCellModel(pair.getLeft()),
|
(pair) -> new DefaultCellModel<>(pair.getLeft()),
|
||||||
300
|
300
|
||||||
);
|
);
|
||||||
|
|
||||||
// The column indicating the count of points seen close to that city
|
// The column indicating the count of points seen close to that city
|
||||||
private static final ColumnModel<Pair<String, Integer>, DefaultCellModel<?>> COUNT_COL = new ColumnModel<>(
|
private static final ColumnModel<Pair<String, Integer>, DefaultCellModel<?>> COUNT_COL = new ColumnModel<>(
|
||||||
Bundle.GeolocationPanel_countColumn_title(),
|
Bundle.GeolocationPanel_countColumn_title(),
|
||||||
(pair) -> new DefaultCellModel(pair.getRight()),
|
(pair) -> new DefaultCellModel<>(pair.getRight()),
|
||||||
100
|
100
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -54,13 +54,13 @@ public class PastCasesPanel extends BaseDataSourceSummaryPanel {
|
|||||||
|
|
||||||
private static final ColumnModel<Pair<String, Long>, DefaultCellModel<?>> CASE_COL = new ColumnModel<>(
|
private static final ColumnModel<Pair<String, Long>, DefaultCellModel<?>> CASE_COL = new ColumnModel<>(
|
||||||
Bundle.PastCasesPanel_caseColumn_title(),
|
Bundle.PastCasesPanel_caseColumn_title(),
|
||||||
(pair) -> new DefaultCellModel(pair.getKey()),
|
(pair) -> new DefaultCellModel<>(pair.getKey()),
|
||||||
300
|
300
|
||||||
);
|
);
|
||||||
|
|
||||||
private static final ColumnModel<Pair<String, Long>, DefaultCellModel<?>> COUNT_COL = new ColumnModel<>(
|
private static final ColumnModel<Pair<String, Long>, DefaultCellModel<?>> COUNT_COL = new ColumnModel<>(
|
||||||
Bundle.PastCasesPanel_countColumn_title(),
|
Bundle.PastCasesPanel_countColumn_title(),
|
||||||
(pair) -> new DefaultCellModel(pair.getValue()),
|
(pair) -> new DefaultCellModel<>(pair.getValue()),
|
||||||
100
|
100
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ public final class RecentFilesPanel extends BaseDataSourceSummaryPanel {
|
|||||||
private final List<ColumnModel<RecentFileDetails, DefaultCellModel<?>>> docsTemplate = Arrays.asList(
|
private final List<ColumnModel<RecentFileDetails, DefaultCellModel<?>>> docsTemplate = Arrays.asList(
|
||||||
new ColumnModel<>(Bundle.RecentFilePanel_col_header_path(),
|
new ColumnModel<>(Bundle.RecentFilePanel_col_header_path(),
|
||||||
(prog) -> {
|
(prog) -> {
|
||||||
return new DefaultCellModel(prog.getPath())
|
return new DefaultCellModel<>(prog.getPath())
|
||||||
.setPopupMenuRetriever(getPopupFunct(prog));
|
.setPopupMenuRetriever(getPopupFunct(prog));
|
||||||
}, 250),
|
}, 250),
|
||||||
new ColumnModel<>(Bundle.RecentFilesPanel_col_head_date(),
|
new ColumnModel<>(Bundle.RecentFilesPanel_col_head_date(),
|
||||||
@ -82,12 +82,12 @@ public final class RecentFilesPanel extends BaseDataSourceSummaryPanel {
|
|||||||
private final List<ColumnModel<RecentDownloadDetails, DefaultCellModel<?>>> downloadsTemplate = Arrays.asList(
|
private final List<ColumnModel<RecentDownloadDetails, DefaultCellModel<?>>> downloadsTemplate = Arrays.asList(
|
||||||
new ColumnModel<>(Bundle.RecentFilePanel_col_header_domain(),
|
new ColumnModel<>(Bundle.RecentFilePanel_col_header_domain(),
|
||||||
(prog) -> {
|
(prog) -> {
|
||||||
return new DefaultCellModel(prog.getWebDomain())
|
return new DefaultCellModel<>(prog.getWebDomain())
|
||||||
.setPopupMenuRetriever(getPopupFunct(prog));
|
.setPopupMenuRetriever(getPopupFunct(prog));
|
||||||
}, 100),
|
}, 100),
|
||||||
new ColumnModel<>(Bundle.RecentFilePanel_col_header_path(),
|
new ColumnModel<>(Bundle.RecentFilePanel_col_header_path(),
|
||||||
(prog) -> {
|
(prog) -> {
|
||||||
return new DefaultCellModel(prog.getPath())
|
return new DefaultCellModel<>(prog.getPath())
|
||||||
.setPopupMenuRetriever(getPopupFunct(prog));
|
.setPopupMenuRetriever(getPopupFunct(prog));
|
||||||
}, 250),
|
}, 250),
|
||||||
new ColumnModel<>(Bundle.RecentFilesPanel_col_head_date(),
|
new ColumnModel<>(Bundle.RecentFilesPanel_col_head_date(),
|
||||||
@ -97,7 +97,7 @@ public final class RecentFilesPanel extends BaseDataSourceSummaryPanel {
|
|||||||
private final List<ColumnModel<RecentAttachmentDetails, DefaultCellModel<?>>> attachmentsTemplate = Arrays.asList(
|
private final List<ColumnModel<RecentAttachmentDetails, DefaultCellModel<?>>> attachmentsTemplate = Arrays.asList(
|
||||||
new ColumnModel<>(Bundle.RecentFilePanel_col_header_path(),
|
new ColumnModel<>(Bundle.RecentFilePanel_col_header_path(),
|
||||||
(prog) -> {
|
(prog) -> {
|
||||||
return new DefaultCellModel(prog.getPath())
|
return new DefaultCellModel<>(prog.getPath())
|
||||||
.setPopupMenuRetriever(getPopupFunct(prog));
|
.setPopupMenuRetriever(getPopupFunct(prog));
|
||||||
}, 250),
|
}, 250),
|
||||||
new ColumnModel<>(Bundle.RecentFilesPanel_col_head_date(),
|
new ColumnModel<>(Bundle.RecentFilesPanel_col_head_date(),
|
||||||
@ -105,7 +105,7 @@ public final class RecentFilesPanel extends BaseDataSourceSummaryPanel {
|
|||||||
80),
|
80),
|
||||||
new ColumnModel<>(Bundle.RecentFilePanel_col_header_sender(),
|
new ColumnModel<>(Bundle.RecentFilePanel_col_header_sender(),
|
||||||
(prog) -> {
|
(prog) -> {
|
||||||
return new DefaultCellModel(prog.getSender())
|
return new DefaultCellModel<>(prog.getSender())
|
||||||
.setPopupMenuRetriever(getPopupFunct(prog));
|
.setPopupMenuRetriever(getPopupFunct(prog));
|
||||||
}, 150));
|
}, 150));
|
||||||
|
|
||||||
@ -139,7 +139,7 @@ public final class RecentFilesPanel extends BaseDataSourceSummaryPanel {
|
|||||||
private <T extends RecentFileDetails> Function<T, DefaultCellModel<?>> getDateFunct() {
|
private <T extends RecentFileDetails> Function<T, DefaultCellModel<?>> getDateFunct() {
|
||||||
return (T lastAccessed) -> {
|
return (T lastAccessed) -> {
|
||||||
Function<Date, String> dateParser = (dt) -> dt == null ? "" : DATETIME_FORMAT.format(dt);
|
Function<Date, String> dateParser = (dt) -> dt == null ? "" : DATETIME_FORMAT.format(dt);
|
||||||
return new DefaultCellModel<>(new Date(lastAccessed.getDateAsLong()), dateParser, DATETIME_FORMAT_STR)
|
return new DefaultCellModel<>(new Date(lastAccessed.getDateAsLong() * 1000), dateParser, DATETIME_FORMAT_STR)
|
||||||
.setPopupMenuRetriever(getPopupFunct(lastAccessed));
|
.setPopupMenuRetriever(getPopupFunct(lastAccessed));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
AbstractLoadableComponent_errorMessage_defaultText=There was an error loading results.
|
AbstractLoadableComponent_errorMessage_defaultText=There was an error loading results.
|
||||||
AbstractLoadableComponent_loadingMessage_defaultText=Loading results...
|
AbstractLoadableComponent_loadingMessage_defaultText=Loading results...
|
||||||
AbstractLoadableComponent_noDataExists_defaultText=No data exists.
|
AbstractLoadableComponent_noDataExists_defaultText=No data exists.
|
||||||
|
# {0} - sheetNumber
|
||||||
|
ExcelExport_writeExcel_noSheetName=Sheet {0}
|
||||||
IngestRunningLabel_defaultMessage=Ingest is currently running.
|
IngestRunningLabel_defaultMessage=Ingest is currently running.
|
||||||
PieChartPanel_noDataLabel=No Data
|
PieChartPanel_noDataLabel=No Data
|
||||||
|
@ -80,7 +80,7 @@ public class DefaultCellModel<T> implements GuiCellModel, ExcelCellModel {
|
|||||||
*
|
*
|
||||||
* @return As a utility, returns this.
|
* @return As a utility, returns this.
|
||||||
*/
|
*/
|
||||||
public DefaultCellModel setTooltip(String tooltip) {
|
public DefaultCellModel<T> setTooltip(String tooltip) {
|
||||||
this.tooltip = tooltip;
|
this.tooltip = tooltip;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -97,7 +97,7 @@ public class DefaultCellModel<T> implements GuiCellModel, ExcelCellModel {
|
|||||||
*
|
*
|
||||||
* @return As a utility, returns this.
|
* @return As a utility, returns this.
|
||||||
*/
|
*/
|
||||||
public DefaultCellModel setHorizontalAlignment(CellModel.HorizontalAlign alignment) {
|
public DefaultCellModel<T> setHorizontalAlignment(CellModel.HorizontalAlign alignment) {
|
||||||
this.horizontalAlignment = alignment;
|
this.horizontalAlignment = alignment;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -114,7 +114,7 @@ public class DefaultCellModel<T> implements GuiCellModel, ExcelCellModel {
|
|||||||
*
|
*
|
||||||
* @return As a utility, returns this.
|
* @return As a utility, returns this.
|
||||||
*/
|
*/
|
||||||
public DefaultCellModel setInsets(Insets insets) {
|
public DefaultCellModel<T> setInsets(Insets insets) {
|
||||||
this.insets = insets;
|
this.insets = insets;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -138,7 +138,7 @@ public class DefaultCellModel<T> implements GuiCellModel, ExcelCellModel {
|
|||||||
* @param menuItemSupplier The lazy load function for popup items.
|
* @param menuItemSupplier The lazy load function for popup items.
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public DefaultCellModel setPopupMenuRetriever(Supplier<List<MenuItem>> menuItemSupplier) {
|
public DefaultCellModel<T> setPopupMenuRetriever(Supplier<List<MenuItem>> menuItemSupplier) {
|
||||||
this.menuItemSupplier = menuItemSupplier;
|
this.menuItemSupplier = menuItemSupplier;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -149,7 +149,7 @@ public class DefaultCellModel<T> implements GuiCellModel, ExcelCellModel {
|
|||||||
* @param popupMenu
|
* @param popupMenu
|
||||||
* @return As a utility, returns this.
|
* @return As a utility, returns this.
|
||||||
*/
|
*/
|
||||||
public DefaultCellModel setPopupMenu(List<MenuItem> popupMenu) {
|
public DefaultCellModel<T> setPopupMenu(List<MenuItem> popupMenu) {
|
||||||
this.popupMenu = popupMenu == null ? null : new ArrayList<>(popupMenu);
|
this.popupMenu = popupMenu == null ? null : new ArrayList<>(popupMenu);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
@ -86,10 +86,6 @@ public class ExcelExport {
|
|||||||
cell.setCellValue((Date) cellData);
|
cell.setCellValue((Date) cellData);
|
||||||
} else if (cellData instanceof Double) {
|
} else if (cellData instanceof Double) {
|
||||||
cell.setCellValue((Double) cellData);
|
cell.setCellValue((Double) cellData);
|
||||||
} else if (cellData instanceof LocalDate) {
|
|
||||||
cell.setCellValue((LocalDate) cellData);
|
|
||||||
} else if (cellData instanceof LocalDateTime) {
|
|
||||||
cell.setCellValue((LocalDateTime) cellData);
|
|
||||||
} else if (cellData instanceof String) {
|
} else if (cellData instanceof String) {
|
||||||
cell.setCellValue((String) cellData);
|
cell.setCellValue((String) cellData);
|
||||||
} else if (cellData instanceof Short) {
|
} else if (cellData instanceof Short) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user