fixing merge conflict

This commit is contained in:
Greg DiCristofaro 2020-09-08 11:24:35 -04:00
parent c14aa5e935
commit e4d1994f22
3 changed files with 17 additions and 160 deletions

View File

@ -39,16 +39,10 @@ DataSourceSummaryNode.column.status.header=Ingest Status
DataSourceSummaryNode.column.tags.header=Tags
DataSourceSummaryNode.column.type.header=Type
DataSourceSummaryNode.viewDataSourceAction.text=Go to Data Source
<<<<<<< HEAD
DataSourceSummaryTabbedPane_detailsTab_title=Details
DataSourceSummaryTabbedPane_ingestHistoryTab_title=Ingest History
DataSourceSummaryTabbedPane_typesTab_title=Types
=======
DataSourceSummaryTabbedPane_countsTab_title=Counts
DataSourceSummaryTabbedPane_detailsTab_title=Container
DataSourceSummaryTabbedPane_ingestHistoryTab_title=Ingest History
DataSourceSummaryTabbedPane_recentFileTab_title=Recent Files
>>>>>>> fa0ae98de088d3573878927c94690af0154e5b00
DataSourceSummaryTabbedPane_typesTab_title=Types
DataSourceSummaryTabbedPane_userActivityTab_title=User Activity
DataSourceSummaryUserActivityPanel.programsRunLabel.text=Recent Programs
DataSourceSummaryUserActivityPanel.recentAccountsLabel.text=Recent Accounts
@ -69,7 +63,17 @@ DataSourceSummaryUserActivityPanel_TopProgramsTableModel_count_header=Run Times
DataSourceSummaryUserActivityPanel_TopProgramsTableModel_folder_header=Folder
DataSourceSummaryUserActivityPanel_TopProgramsTableModel_lastrun_header=Last Run
DataSourceSummaryUserActivityPanel_TopProgramsTableModel_name_header=Program
<<<<<<< HEAD
DataSourceSummaryUserActivityPanel_TopWebSearchTableModel_dateAccessed_header=Date Accessed
DataSourceSummaryUserActivityPanel_TopWebSearchTableModel_searchString_header=Search String
DataSourceSummaryUserActivityPanel_TopWebSearchTableModel_translatedResult_header=Translated
RecentFilePanel_col_header_domain=Domain
RecentFilePanel_col_header_path=Path
RecentFilePanel_col_header_sender=Sender
RecentFilePanel_no_open_documents=No recently open documents found.
RecentFilesPanel.openDocsLabel.text=Recently Opened Documents
RecentFilesPanel.downloadLabel.text=Recent Downloads
RecentFilesPanel.attachmentLabel.text=Recent Attachements
RecentFilesPanel_col_head_date=Date
SizeRepresentationUtil_units_bytes=\ bytes
SizeRepresentationUtil_units_gigabytes=\ GB
SizeRepresentationUtil_units_kilobytes=\ kB
@ -92,17 +96,4 @@ TypesPanel_filesByCategoryTable_unallocatedRow_title=Unallocated Files
TypesPanel_osLabel_title=OS
TypesPanel_sizeLabel_title=Size
TypesPanel_usageLabel_title=Usage
=======
DataSourceSummaryUserActivityPanel_TopWebSearchTableModel_dateAccessed_header=Date Accessed
DataSourceSummaryUserActivityPanel_TopWebSearchTableModel_searchString_header=Search String
DataSourceSummaryUserActivityPanel_TopWebSearchTableModel_translatedResult_header=Translated
RecentFilePanel_col_header_domain=Domain
RecentFilePanel_col_header_path=Path
RecentFilePanel_col_header_sender=Sender
RecentFilePanel_no_open_documents=No recently open documents found.
RecentFilesPanel.openDocsLabel.text=Recently Opened Documents
RecentFilesPanel.downloadLabel.text=Recent Downloads
RecentFilesPanel.attachmentLabel.text=Recent Attachements
RecentFilesPanel_col_head_date=Date
>>>>>>> fa0ae98de088d3573878927c94690af0154e5b00
ViewSummaryInformationAction.name.text=View Summary Information

View File

@ -33,13 +33,8 @@ import org.sleuthkit.datamodel.DataSource;
* IngestJobInfoPanel.
*/
@Messages({
<<<<<<< HEAD
"DataSourceSummaryTabbedPane_typesTab_title=Types",
"DataSourceSummaryTabbedPane_detailsTab_title=Details",
=======
"DataSourceSummaryTabbedPane_countsTab_title=Counts",
"DataSourceSummaryTabbedPane_detailsTab_title=Container",
>>>>>>> fa0ae98de088d3573878927c94690af0154e5b00
"DataSourceSummaryTabbedPane_userActivityTab_title=User Activity",
"DataSourceSummaryTabbedPane_ingestHistoryTab_title=Ingest History",
"DataSourceSummaryTabbedPane_recentFileTab_title=Recent Files"
@ -49,19 +44,12 @@ public class DataSourceSummaryTabbedPane extends JTabbedPane {
private static final long serialVersionUID = 1L;
// A pair of the tab name and the corresponding BaseDataSourceSummaryTabs to be displayed.
<<<<<<< HEAD
private final List<Pair<String, BaseDataSourceSummaryPanel>> tabs = Arrays.asList(
Pair.of(Bundle.DataSourceSummaryTabbedPane_detailsTab_title(), new DataSourceSummaryDetailsPanel()),
Pair.of(Bundle.DataSourceSummaryTabbedPane_typesTab_title(), new TypesPanel()),
Pair.of(Bundle.DataSourceSummaryTabbedPane_detailsTab_title(), new DataSourceSummaryUserActivityPanel())
);
=======
private final List<Pair<String, BaseDataSourceSummaryPanel>> tabs = new ArrayList<>(Arrays.asList(
Pair.of(Bundle.DataSourceSummaryTabbedPane_countsTab_title(), new DataSourceSummaryCountsPanel()),
Pair.of(Bundle.DataSourceSummaryTabbedPane_typesTab_title(), new TypesPanel()),
Pair.of(Bundle.DataSourceSummaryTabbedPane_userActivityTab_title(), new DataSourceSummaryUserActivityPanel()),
Pair.of(Bundle.DataSourceSummaryTabbedPane_recentFileTab_title(), new RecentFilesPanel())
));
>>>>>>> fa0ae98de088d3573878927c94690af0154e5b00
private final IngestJobInfoPanel ingestHistoryPanel = new IngestJobInfoPanel();

View File

@ -184,7 +184,7 @@ public class JTablePanel<T> extends AbstractLoadableComponent<List<T>> {
.map((colModel) -> colModel.getCellRenderer())
.collect(Collectors.toList());
return new DefaultListTableModel<>(columnRenderers);
return new DefaultListTableModel<T>(columnRenderers);
}
/**
@ -201,31 +201,10 @@ public class JTablePanel<T> extends AbstractLoadableComponent<List<T>> {
return resultTable.setColumnModel(getTableColumnModel(columns));
}
<<<<<<< HEAD
private final JScrollPane tableScrollPane;
private final Overlay overlayLayer;
private final ListTableModel<T> tableModel;
private final JTable table;
=======
/**
* @return The default error message.
*/
public static String getDefaultErrorMessage() {
return DEFAULT_ERROR_MESSAGE;
}
/**
* @return The default message for no results.
*/
public static String getDefaultNoResultsMessage() {
return DEFAULT_NO_RESULTS_MESSAGE;
}
private JScrollPane tableScrollPane;
private Overlay overlayLayer;
private ListTableModel<T> tableModel;
private JTable table;
>>>>>>> fa0ae98de088d3573878927c94690af0154e5b00
/**
* Panel constructor.
@ -258,7 +237,8 @@ public class JTablePanel<T> extends AbstractLoadableComponent<List<T>> {
this.tableModel = tableModel;
table.setModel(tableModel);
}
/**
* @return The underlying JTable's column model.
*/
@ -278,23 +258,8 @@ public class JTablePanel<T> extends AbstractLoadableComponent<List<T>> {
return this;
}
<<<<<<< HEAD
@Override
protected void setResults(List<T> data) {
=======
/**
* Sets the data to be shown in the JTable. Repaint is not handled in this
* method and should be handled separately.
*
* @param data The list of data objects to be shown.
*/
private void setResultList(List<T> data) {
if(tableModel == null) {
throw new IllegalStateException("ListTableModel has not be initialized");
}
>>>>>>> fa0ae98de088d3573878927c94690af0154e5b00
// set the list of data to be shown as either the data or an empty list
// on null.
List<T> dataToSet = (data == null) ? Collections.emptyList() : data;
@ -311,92 +276,6 @@ public class JTablePanel<T> extends AbstractLoadableComponent<List<T>> {
this.overlayLayer.setVisible(visible);
this.overlayLayer.setMessage(message);
}
<<<<<<< HEAD
=======
/**
* Clears the results from the underlying JTable and shows the provided
* message.
*
* @param message The message to be shown.
*/
public synchronized void showMessage(String message) {
setResultList(null);
setOverlay(true, message);
repaint();
}
/**
* Shows a default loading message on the table. This will clear any results
* in the table.
*/
public void showDefaultLoadingMessage() {
showMessage(DEFAULT_LOADING_MESSAGE);
}
/**
* Shows the list as rows of data in the table. If overlay message will be
* cleared if present.
*
* @param data The data to be shown where each item represents a row of
* data.
*/
public synchronized void showResults(List<T> data) {
setOverlay(false, null);
setResultList(data);
repaint();
}
/**
* Shows the data in a DataFetchResult. If there was an error during the
* operation, the errorMessage will be displayed. If the operation completed
* successfully and no data is present, noResultsMessage will be shown.
* Otherwise, the data will be shown as rows in the table.
*
* @param result The DataFetchResult.
* @param errorMessage The error message to be shown in the event of an
* error.
* @param noResultsMessage The message to be shown if there are no results
* but the operation completed successfully.
*/
public void showDataFetchResult(DataFetchResult<List<T>> result, String errorMessage, String noResultsMessage) {
if (result == null) {
logger.log(Level.SEVERE, "Null data processor result received.");
return;
}
switch (result.getResultType()) {
case SUCCESS:
if (result.getData() == null || result.getData().isEmpty()) {
showMessage(noResultsMessage);
} else {
showResults(result.getData());
}
break;
case ERROR:
// if there is an error, log accordingly, set result list to
// empty and display error message
logger.log(Level.WARNING, "An exception was caused while results were loaded.", result.getException());
showMessage(errorMessage);
break;
default:
// an unknown loading state was specified. log accordingly.
logger.log(Level.SEVERE, "No known loading state was found in result.");
break;
}
}
/**
* Shows the data in a DataFetchResult. If there was an error during the
* operation, the DEFAULT_ERROR_MESSAGE will be displayed. If the operation
* completed successfully and no data is present, DEFAULT_NO_RESULTS_MESSAGE
* will be shown. Otherwise, the data will be shown as rows in the table.
*
* @param result The DataFetchResult.
*/
public void showDataFetchResult(DataFetchResult<List<T>> result) {
showDataFetchResult(result, DEFAULT_ERROR_MESSAGE, DEFAULT_NO_RESULTS_MESSAGE);
}
/**
* Initialize the gui components.
@ -411,5 +290,4 @@ public class JTablePanel<T> extends AbstractLoadableComponent<List<T>> {
setLayout(new BorderLayout());
add(dualLayer, BorderLayout.CENTER);
}
>>>>>>> fa0ae98de088d3573878927c94690af0154e5b00
}