1
0
mirror of https://github.com/elisspace/autopsy.git synced 2026-09-02 19:15:51 +00:00

5217 provide users feed back when image gallery fails to open

This commit is contained in:
William Schaefer
2019-07-30 15:51:11 -04:00
parent 41116e63b3
commit 06dc0fc5eb
2 changed files with 7 additions and 1 deletions

View File

@@ -35,6 +35,8 @@ OpenAction.multiUserDialog.Header=Multi-user Image Gallery
OpenAction.noControllerDialog.header=Cannot open Image Gallery
OpenAction.noControllerDialog.text=An initialization error ocurred.\nPlease see the log for details.
OpenAction.notAnalyzedDlg.msg=No image/video files available to display yet.\nPlease run FileType and EXIF ingest modules.
OpenAction.openTopComponent.error.message=An error occurred while attempting to open Image Gallery.
OpenAction.openTopComponent.error.title=Failed to open Image Gallery
OpenAction.stale.confDlg.msg=The image / video database may be out of date. Do you want to update and listen for further ingest results?\nChoosing 'yes' will update the database and enable listening to future ingests.
OpenAction.stale.confDlg.title=Image Gallery
OpenExternalViewerAction.displayName=External Viewer

View File

@@ -34,6 +34,7 @@ import javafx.stage.Modality;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import org.openide.awt.ActionID;
import org.openide.awt.ActionReference;
@@ -43,6 +44,7 @@ import org.openide.util.HelpCtx;
import org.openide.util.NbBundle;
import org.openide.util.NbBundle.Messages;
import org.openide.util.actions.CallableSystemAction;
import org.openide.windows.WindowManager;
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.core.Installer;
@@ -292,13 +294,15 @@ public final class OpenAction extends CallableSystemAction {
);
}
@Messages({"OpenAction.openTopComponent.error.message=An error occurred while attempting to open Image Gallery.",
"OpenAction.openTopComponent.error.title=Failed to open Image Gallery"})
private void openTopComponent() {
SwingUtilities.invokeLater(() -> {
try {
ImageGalleryTopComponent.openTopComponent();
} catch (TskCoreException ex) {
logger.log(Level.SEVERE, "Failed to open Image Gallery top component", ex); //NON-NLS}
// TODO (JIRA-5217): Give the user some feedback here
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(), Bundle.OpenAction_openTopComponent_error_message(), Bundle.OpenAction_openTopComponent_error_title(), JOptionPane.PLAIN_MESSAGE);
}
});
}