diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle.properties b/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle.properties index f1bbf775af..c6bd24f38e 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle.properties @@ -1,3 +1,34 @@ + +FXVideoPanel.pauseButton.infoLabel.playbackErr=Unable to play video. +FXVideoPanel.progress.bufferingCancelled=media buffering was canceled +FXVideoPanel.progress.bufferingInterrupted=media buffering was interrupted +FXVideoPanel.progress.errorWritingVideoToDisk=Error writing video to disk +FXVideoPanel.mediaPane.infoLabel=Playback of deleted videos is not supported, use an external player. +FXVideoPanel.progress.bufferingFile=Buffering {0} +FXVideoPanel.progressLabel.buffering=Buffering... +FXVideoPanel.media.unsupportedFormat=Unsupported Format. +GstVideoPanel.cannotProcFile.err=The media player cannot process this file. +GstVideoPanel.initGst.gstException.msg=Error initializing gstreamer for audio/video viewing and frame extraction capabilities. Video and audio viewing will be disabled. +GstVideoPanel.initGst.otherException.msg=Error initializing gstreamer for audio/video viewing frame extraction capabilities. Video and audio viewing will be disabled. +GstVideoPanel.setupVideo.infoLabel.text=Playback of deleted videos is not supported, use an external player. +GstVideoPanel.exception.problemFile.msg=Cannot capture frames from this file ({0}). +GstVideoPanel.exception.problemPlay.msg=Problem with video file; problem when attempting to play while obtaining duration. +GstVideoPanel.exception.problemPause.msg=Problem with video file; problem when attempting to pause while obtaining duration. +GstVideoPanel.exception.problemPauseCaptFrame.msg=Problem with video file; problem when attempting to pause while capturing a frame. +GstVideoPanel.exception.problemPlayCaptFrame.msg=Problem with video file; problem when attempting to play while capturing a frame. +GstVideoPanel.exception.problemStopCaptFrame.msg=Problem with video file; problem when attempting to stop while capturing a frame. +GstVideoPanel.progress.buffering=Buffering... +GstVideoPanel.progressLabel.bufferingErr=Error buffering file +GstVideoPanel.progress.infoLabel.updateErr=Error updating video progress\: {0} +GstVideoPanel.ExtractMedia.progress.buffering=Buffering {0} +MediaFileViewer.AccessibleContext.accessibleDescription= +MediaFileViewer.title=Media +MediaFileViewer.toolTip=Displays supported multimedia files (images, videos, audio) +MediaViewVideoPanel.pauseButton.text=\u25ba +MediaViewVideoPanel.progressLabel.text=00:00 +MediaViewVideoPanel.infoLabel.text=info +MediaViewImagePanel.imgFileTooLarge.msg=Could not load image file (too large)\: {0} + Metadata.tableRowTitle.name=Name Metadata.tableRowTitle.size=Size Metadata.tableRowTitle.fileNameAlloc=File Name Allocation diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle_ja.properties index d2bbdc2081..38f772cbf0 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/Bundle_ja.properties @@ -1,19 +1,49 @@ -Metadata.tableRowTitle.name=\u540D\u524D -Metadata.tableRowTitle.size=\u30B5\u30A4\u30BA -Metadata.tableRowTitle.fileNameAlloc=\u30D5\u30A1\u30A4\u30EB\u540D\u30A2\u30ED\u30B1\u30FC\u30B7\u30E7\u30F3 -Metadata.tableRowTitle.metadataAlloc=\u30E1\u30BF\u30C7\u30FC\u30BF\u30A2\u30ED\u30B1\u30FC\u30B7\u30E7\u30F3 -Metadata.tableRowTitle.modified=\u4FEE\u6B63\u6E08\u307F -Metadata.tableRowTitle.accessed=\u30A2\u30AF\u30BB\u30B9\u6E08\u307F -Metadata.tableRowTitle.created=\u4F5C\u6210\u6E08\u307F -Metadata.tableRowTitle.changed=\u5909\u66F4\u6E08\u307F -Metadata.tableRowContent.md5notCalc=\u672A\u8A08\u7B97 + +FXVideoPanel.pauseButton.infoLabel.playbackErr=\u30d3\u30c7\u30aa\u3092\u518d\u751f\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 +FXVideoPanel.progress.bufferingCancelled=\u30e1\u30c7\u30a3\u30a2\u306e\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u307e\u3057\u305f +FXVideoPanel.progress.bufferingInterrupted=\u30e1\u30c7\u30a3\u30a2\u306e\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u304c\u4e2d\u65ad\u3055\u308c\u307e\u3057\u305f +FXVideoPanel.progress.errorWritingVideoToDisk=\u30d3\u30c7\u30aa\u3092\u30c7\u30a3\u30b9\u30af\u3078\u66f8\u304d\u8fbc\u307f\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f +FXVideoPanel.mediaPane.infoLabel=\u524a\u9664\u3055\u308c\u305f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u5916\u90e8\u30d7\u30ec\u30fc\u30e4\u30fc\u3092\u4f7f\u7528\u3057\u3066\u4e0b\u3055\u3044\u3002 +FXVideoPanel.progress.bufferingFile={0}\u3092\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0 +FXVideoPanel.progressLabel.buffering=\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u4e2d\u2026 +FXVideoPanel.media.unsupportedFormat=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3059\u3002 +GstVideoPanel.cannotProcFile.err=\u30e1\u30c7\u30a4\u30a2\u30d7\u30ec\u30fc\u30e4\u30fc\u3067\u306f\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u51e6\u7406\u3067\u304d\u307e\u305b\u3093\u3002 +GstVideoPanel.initGst.gstException.msg=\u30aa\u30fc\u30c7\u30a3\u30aa\uff0f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u304a\u3088\u3073\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u306b\u4f7f\u7528\u3059\u308bGStreamer\u306e\u521d\u671f\u5316\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d3\u30c7\u30aa\u304a\u3088\u3073\u30aa\u30fc\u30c7\u30a3\u30aa\u518d\u751f\u304c\u7121\u52b9\u5316\u3055\u308c\u307e\u3059\u3002 +GstVideoPanel.initGst.otherException.msg=\u30aa\u30fc\u30c7\u30a3\u30aa\uff0f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u304a\u3088\u3073\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u306b\u4f7f\u7528\u3059\u308bGStreamer\u306e\u521d\u671f\u5316\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d3\u30c7\u30aa\u304a\u3088\u3073\u30aa\u30fc\u30c7\u30a3\u30aa\u518d\u751f\u304c\u7121\u52b9\u5316\u3055\u308c\u307e\u3059\u3002 +GstVideoPanel.setupVideo.infoLabel.text=\u524a\u9664\u3055\u308c\u305f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u5916\u90e8\u30d7\u30ec\u30fc\u30e4\u30fc\u3092\u4f7f\u7528\u3057\u3066\u4e0b\u3055\u3044\u3002 +GstVideoPanel.exception.problemFile.msg=\u30d5\u30a1\u30a4\u30eb({0})\u304b\u3089\u30d5\u30ec\u30fc\u30e0\u3092\u62bd\u51fa\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 +GstVideoPanel.exception.problemPlay.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u9577\u3055\u3092\u78ba\u8a8d\u4e2d\u306b\u518d\u751f\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 +GstVideoPanel.exception.problemPause.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u9577\u3055\u3092\u78ba\u8a8d\u4e2d\u306b\u4e00\u6642\u505c\u6b62\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 +GstVideoPanel.exception.problemPauseCaptFrame.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u4e2d\u306b\u4e00\u6642\u505c\u6b62\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 +GstVideoPanel.exception.problemPlayCaptFrame.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u4e2d\u306b\u518d\u751f\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 +GstVideoPanel.exception.problemStopCaptFrame.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u4e2d\u306b\u505c\u6b62\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 +GstVideoPanel.progress.buffering=\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u4e2d\u2026 +GstVideoPanel.progressLabel.bufferingErr=\u30d5\u30a1\u30a4\u30eb\u306e\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u30a8\u30e9\u30fc +GstVideoPanel.progress.infoLabel.updateErr=\u30d3\u30c7\u30aa\u30d7\u30ed\u30b0\u30ec\u30b9\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\uff1a {0} +GstVideoPanel.ExtractMedia.progress.buffering={0}\u3092\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u4e2d +MediaFileViewer.title=\u30e1\u30c7\u30a3\u30a2 +MediaFileViewer.toolTip=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30de\u30eb\u30c1\u30e1\u30c7\u30a3\u30a2\u30d5\u30a1\u30a4\u30eb\uff08\u30a4\u30e1\u30fc\u30b8\u3001\u30d3\u30c7\u30aa\u3001\u30aa\u30fc\u30c7\u30a3\u30aa\uff09\u3092\u8868\u793a\u3057\u307e\u3059\u3002 +MediaViewImagePanel.imgFileTooLarge.msg=\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093\u3067\u3057\u305f\uff08\u5927\u304d\u3059\u304e\u3067\u3059\uff09\uff1a {0} +MediaViewVideoPanel.pauseButton.text=\u25ba +MediaViewVideoPanel.progressLabel.text=00\:00 +MediaViewVideoPanel.infoLabel.text=\u60c5\u5831 + +Metadata.tableRowTitle.name=\u540d\u524d +Metadata.tableRowTitle.size=\u30b5\u30a4\u30ba +Metadata.tableRowTitle.fileNameAlloc=\u30d5\u30a1\u30a4\u30eb\u540d\u30a2\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 +Metadata.tableRowTitle.metadataAlloc=\u30e1\u30bf\u30c7\u30fc\u30bf\u30a2\u30ed\u30b1\u30fc\u30b7\u30e7\u30f3 +Metadata.tableRowTitle.modified=\u4fee\u6b63\u6e08\u307f +Metadata.tableRowTitle.accessed=\u30a2\u30af\u30bb\u30b9\u6e08\u307f +Metadata.tableRowTitle.created=\u4f5c\u6210\u6e08\u307f +Metadata.tableRowTitle.changed=\u5909\u66f4\u6e08\u307f +Metadata.tableRowContent.md5notCalc=\u672a\u8a08\u7b97 Metadata.tableRowTitle.md5=MD5 -Metadata.tableRowTitle.hashLookupResults=\u30CF\u30C3\u30B7\u30E5\u30EB\u30C3\u30AF\u30A2\u30C3\u30D7\u7D50\u679C -Metadata.tableRowTitle.internalid=\u5185\u90E8ID -Metadata.tableRowTitle.localPath=\u30ED\u30FC\u30AB\u30EB\u30D1\u30B9 -Metadata.title=\u30D5\u30A1\u30A4\u30EB\u30E1\u30BF\u30C7\u30FC\u30BF -Metadata.toolTip=\u30D5\u30A1\u30A4\u30EB\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u8868\u793A\u3057\u307E\u3059\u3002 -Metadata.tableRowTitle.type=\u30BF\u30A4\u30D7 -Metadata.nodeText.exceptionNotice.text=\u30D5\u30A1\u30A4\u30EB\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u53D6\u5F97\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\uFF1A -Metadata.nodeText.text=Sleuth Kit istat\u30C4\u30FC\u30EB\u304B\u3089\uFF1A -Metadata.nodeText.nonFilePassedIn=\u5165\u529B\u3055\u308C\u305F\u3082\u306E\u306F\u30D5\u30A1\u30A4\u30EB\u3067\u306F\u3042\u308A\u307E\u305B\u3093 \ No newline at end of file +Metadata.tableRowTitle.hashLookupResults=\u30cf\u30c3\u30b7\u30e5\u30eb\u30c3\u30af\u30a2\u30c3\u30d7\u7d50\u679c +Metadata.tableRowTitle.internalid=\u5185\u90e8ID +Metadata.tableRowTitle.localPath=\u30ed\u30fc\u30ab\u30eb\u30d1\u30b9 +Metadata.title=\u30d5\u30a1\u30a4\u30eb\u30e1\u30bf\u30c7\u30fc\u30bf +Metadata.toolTip=\u30d5\u30a1\u30a4\u30eb\u306e\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u8868\u793a\u3057\u307e\u3059\u3002 +Metadata.tableRowTitle.type=\u30bf\u30a4\u30d7 +Metadata.nodeText.exceptionNotice.text=\u30d5\u30a1\u30a4\u30eb\u30e1\u30bf\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\uff1a +Metadata.nodeText.text=Sleuth Kit istat\u30c4\u30fc\u30eb\u304b\u3089\uff1a +Metadata.nodeText.nonFilePassedIn=\u5165\u529b\u3055\u308c\u305f\u3082\u306e\u306f\u30d5\u30a1\u30a4\u30eb\u3067\u306f\u3042\u308a\u307e\u305b\u3093 \ No newline at end of file diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/FXVideoPanel.form b/Core/src/org/sleuthkit/autopsy/contentviewers/FXVideoPanel.form similarity index 100% rename from Core/src/org/sleuthkit/autopsy/corecomponents/FXVideoPanel.form rename to Core/src/org/sleuthkit/autopsy/contentviewers/FXVideoPanel.form diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/FXVideoPanel.java b/Core/src/org/sleuthkit/autopsy/contentviewers/FXVideoPanel.java similarity index 99% rename from Core/src/org/sleuthkit/autopsy/corecomponents/FXVideoPanel.java rename to Core/src/org/sleuthkit/autopsy/contentviewers/FXVideoPanel.java index f12839bd20..64203d674b 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/FXVideoPanel.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/FXVideoPanel.java @@ -16,7 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.corecomponents; +package org.sleuthkit.autopsy.contentviewers; import com.google.common.io.Files; import java.awt.Dimension; @@ -60,6 +60,8 @@ import org.openide.util.lookup.ServiceProvider; import org.openide.util.lookup.ServiceProviders; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.core.Installer; +import org.sleuthkit.autopsy.corecomponents.FrameCapture; +import org.sleuthkit.autopsy.corecomponents.VideoFrame; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.VideoUtils; import org.sleuthkit.autopsy.datamodel.ContentUtils; diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/FileViewer.java b/Core/src/org/sleuthkit/autopsy/contentviewers/FileViewer.java index d42d834395..c4bb4a3fc8 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/FileViewer.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/FileViewer.java @@ -18,6 +18,7 @@ */ package org.sleuthkit.autopsy.contentviewers; + import com.google.common.base.Strings; import java.awt.Component; import java.util.HashMap; @@ -30,6 +31,7 @@ import org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.modules.filetypeid.FileTypeDetector; import org.sleuthkit.datamodel.AbstractFile; +import org.sleuthkit.autopsy.corecomponentinterfaces.FileTypeViewer; /** * Generic Application content viewer @@ -47,7 +49,8 @@ public class FileViewer extends javax.swing.JPanel implements DataContentViewer private static final FileTypeViewer[] KNOWN_VIEWERS = new FileTypeViewer[]{ // new JPEGViewerDummy(), // this if for testing only new SQLiteViewer(), - new PListViewer() + new PListViewer(), + new MediaFileViewer() }; private FileTypeViewer lastViewer; diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/GstVideoPanel.form b/Core/src/org/sleuthkit/autopsy/contentviewers/GstVideoPanel.form similarity index 100% rename from Core/src/org/sleuthkit/autopsy/corecomponents/GstVideoPanel.form rename to Core/src/org/sleuthkit/autopsy/contentviewers/GstVideoPanel.form diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/GstVideoPanel.java b/Core/src/org/sleuthkit/autopsy/contentviewers/GstVideoPanel.java similarity index 99% rename from Core/src/org/sleuthkit/autopsy/corecomponents/GstVideoPanel.java rename to Core/src/org/sleuthkit/autopsy/contentviewers/GstVideoPanel.java index f338a77308..e32c551d65 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/GstVideoPanel.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/GstVideoPanel.java @@ -16,7 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.corecomponents; +package org.sleuthkit.autopsy.contentviewers; import com.google.common.io.Files; import java.awt.Dimension; @@ -55,6 +55,8 @@ import org.netbeans.api.progress.ProgressHandle; import org.openide.util.NbBundle; import org.openide.util.lookup.ServiceProvider; import org.openide.util.lookup.ServiceProviders; +import org.sleuthkit.autopsy.corecomponents.FrameCapture; +import org.sleuthkit.autopsy.corecomponents.VideoFrame; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.MessageNotifyUtil; import org.sleuthkit.autopsy.coreutils.VideoUtils; @@ -85,7 +87,7 @@ public class GstVideoPanel extends MediaViewVideoPanel { private boolean autoTracking = false; // true if the slider is moving automatically private final Object playbinLock = new Object(); // lock for synchronization of gstPlaybin2 player private AbstractFile currentFile; - private final Set badVideoFiles = Collections.synchronizedSet(new HashSet()); + private final Set badVideoFiles = Collections.synchronizedSet(new HashSet<>()); /** * Creates new form MediaViewVideoPanel diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/JPEGViewerDummy.java b/Core/src/org/sleuthkit/autopsy/contentviewers/JPEGViewerDummy.java index 8aea7540e1..479eefab99 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/JPEGViewerDummy.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/JPEGViewerDummy.java @@ -5,10 +5,12 @@ */ package org.sleuthkit.autopsy.contentviewers; + import java.awt.Component; import java.util.Arrays; import java.util.List; import org.sleuthkit.datamodel.AbstractFile; +import org.sleuthkit.autopsy.corecomponentinterfaces.FileTypeViewer; public class JPEGViewerDummy extends javax.swing.JPanel implements FileTypeViewer { diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerMedia.form b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaFileViewer.form similarity index 89% rename from Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerMedia.form rename to Core/src/org/sleuthkit/autopsy/contentviewers/MediaFileViewer.form index 42f990a713..d26c9f72e7 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerMedia.form +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaFileViewer.form @@ -3,7 +3,7 @@
- + diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerMedia.java b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaFileViewer.java similarity index 56% rename from Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerMedia.java rename to Core/src/org/sleuthkit/autopsy/contentviewers/MediaFileViewer.java index b8e03d51d6..1d9695712b 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataContentViewerMedia.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaFileViewer.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2015 Basis Technology Corp. + * Copyright 2011-2018 Basis Technology Corp. * Contact: carrier sleuthkit org *s * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,31 +16,24 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.corecomponents; +package org.sleuthkit.autopsy.contentviewers; import java.awt.CardLayout; import java.awt.Component; import java.awt.Dimension; +import java.util.ArrayList; import java.util.List; import java.util.logging.Level; -import org.openide.nodes.Node; -import org.openide.util.NbBundle; -import org.openide.util.lookup.ServiceProvider; -import org.openide.util.lookup.ServiceProviders; -import org.sleuthkit.autopsy.corecomponentinterfaces.DataContentViewer; +import org.sleuthkit.autopsy.corecomponentinterfaces.FileTypeViewer; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.datamodel.AbstractFile; -import org.sleuthkit.datamodel.TskData.TSK_FS_NAME_FLAG_ENUM; /** * Media content viewer for videos, sounds and images. */ -@ServiceProviders(value = { - @ServiceProvider(service = DataContentViewer.class, position = 5) -}) -public class DataContentViewerMedia extends javax.swing.JPanel implements DataContentViewer { +public class MediaFileViewer extends javax.swing.JPanel implements FileTypeViewer { - private static final Logger logger = Logger.getLogger(DataContentViewerMedia.class.getName()); + private static final Logger LOGGER = Logger.getLogger(MediaFileViewer.class.getName()); private AbstractFile lastFile; //UI private final MediaViewVideoPanel videoPanel; @@ -54,7 +47,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo /** * Creates new form DataContentViewerVideo */ - public DataContentViewerMedia() { + public MediaFileViewer() { initComponents(); @@ -66,7 +59,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo imagePanelInited = imagePanel.isInited(); customizeComponents(); - logger.log(Level.INFO, "Created MediaView instance: {0}", this); //NON-NLS + LOGGER.log(Level.INFO, "Created MediaView instance: {0}", this); //NON-NLS } private void customizeComponents() { @@ -86,20 +79,37 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo private void initComponents() { setLayout(new java.awt.CardLayout()); - getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(DataContentViewerMedia.class, "DataContentViewerMedia.AccessibleContext.accessibleDescription")); // NOI18N + getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(MediaFileViewer.class, "MediaFileViewer.AccessibleContext.accessibleDescription")); // NOI18N }// //GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables // End of variables declaration//GEN-END:variables + /** + * Returns a list of mimetypes supported by this viewer + * + * @return list of supported mimetypes + */ @Override - public void setNode(Node selectedNode) { + public List getSupportedMIMETypes() { + + List mimeTypes = new ArrayList<>(); + + mimeTypes.addAll(this.imagePanel.getMimeTypes()); + mimeTypes.addAll(this.videoPanel.getMimeTypes()); + + return mimeTypes; + } + + + /** + * Set up the view to display the given file. + * + * @param file file to display + */ + @Override + public void setFile(AbstractFile file) { try { - if (selectedNode == null) { - resetComponent(); - return; - } - - AbstractFile file = selectedNode.getLookup().lookup(AbstractFile.class); + if (file == null) { resetComponent(); return; @@ -111,7 +121,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo lastFile = file; - final Dimension dims = DataContentViewerMedia.this.getSize(); + final Dimension dims = MediaFileViewer.this.getSize(); //logger.info("setting node on media viewer"); //NON-NLS if (videoPanelInited && videoPanel.isSupported(file)) { videoPanel.setupVideo(file, dims); @@ -121,7 +131,7 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo this.showVideoPanel(false); } } catch (Exception e) { - logger.log(Level.SEVERE, "Exception while setting node", e); //NON-NLS + LOGGER.log(Level.SEVERE, "Exception while setting node", e); //NON-NLS } } @@ -139,21 +149,6 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo } } - @Override - public String getTitle() { - return NbBundle.getMessage(this.getClass(), "DataContentViewerMedia.title"); - } - - @Override - public String getToolTip() { - return NbBundle.getMessage(this.getClass(), "DataContentViewerMedia.toolTip"); - } - - @Override - public DataContentViewer createInstance() { - return new DataContentViewerMedia(); - } - @Override public Component getComponent() { return this; @@ -166,73 +161,6 @@ public class DataContentViewerMedia extends javax.swing.JPanel implements DataCo lastFile = null; } - /** - * Is the given file a video we can display? - * - * @param file - * - * @return True if a video file that can be displayed - */ - private boolean isVideoSupported(AbstractFile file) { - if (null == file || file.getSize() == 0) { - return false; - } - return videoPanel.isSupported(file); - } - - /** - * Is the given file an image that we can display? - * - * @param file - * - * @return True if an image file that can be displayed - */ - private boolean isImageSupported(AbstractFile file) { - if (null == file || file.getSize() == 0) { - return false; - } - - return imagePanel.isSupported(file); - } - - @Override - public boolean isSupported(Node node) { - if (node == null) { - return false; - } - - AbstractFile file = node.getLookup().lookup(AbstractFile.class); - if (file == null) { - return false; - } - - if (file.getSize() == 0) { - return false; - } - - if (imagePanelInited && isImageSupported(file)) { - return true; - } - - return videoPanelInited && isVideoSupported(file); - } - - @Override - public int isPreferred(Node node) { - //special case, check if deleted video, then do not make it preferred - AbstractFile file = node.getLookup().lookup(AbstractFile.class); - if (file == null) { - return 0; - } - boolean deleted = file.isDirNameFlagSet(TSK_FS_NAME_FLAG_ENUM.UNALLOC); - - if (videoPanel.isSupported(file) && deleted) { - return 0; - } else { - return 7; - } - } - interface MediaViewPanel { /** diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.css b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewImagePanel.css similarity index 100% rename from Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.css rename to Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewImagePanel.css diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.form b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewImagePanel.form similarity index 100% rename from Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.form rename to Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewImagePanel.form diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.java b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewImagePanel.java similarity index 98% rename from Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.java rename to Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewImagePanel.java index f57bc27b9c..b6505544ba 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewImagePanel.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewImagePanel.java @@ -16,7 +16,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.corecomponents; +package org.sleuthkit.autopsy.contentviewers; + import java.awt.Dimension; import java.awt.EventQueue; @@ -46,6 +47,7 @@ import org.controlsfx.control.MaskerPane; import org.openide.util.NbBundle; import org.python.google.common.collect.Lists; import org.sleuthkit.autopsy.casemodule.Case; +//import org.sleuthkit.autopsy.corecomponents.Bundle; import org.sleuthkit.autopsy.coreutils.ImageUtils; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.datamodel.FileNode; @@ -59,7 +61,7 @@ import org.sleuthkit.datamodel.AbstractFile; @NbBundle.Messages({"MediaViewImagePanel.externalViewerButton.text=Open in External Viewer", "MediaViewImagePanel.errorLabel.text=Could not load file into Media View.", "MediaViewImagePanel.errorLabel.OOMText=Could not load file into Media View: insufficent memory."}) -public class MediaViewImagePanel extends JPanel implements DataContentViewerMedia.MediaViewPanel { +public class MediaViewImagePanel extends JPanel implements MediaFileViewer.MediaViewPanel { private static final Image EXTERNAL = new Image(MediaViewImagePanel.class.getResource("/org/sleuthkit/autopsy/images/external.png").toExternalForm()); diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewVideoPanel.java b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewVideoPanel.java similarity index 97% rename from Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewVideoPanel.java rename to Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewVideoPanel.java index 28efdac6ff..8848164683 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/MediaViewVideoPanel.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/MediaViewVideoPanel.java @@ -16,7 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.corecomponents; +package org.sleuthkit.autopsy.contentviewers; import java.awt.Dimension; import java.util.Arrays; @@ -26,6 +26,7 @@ import java.util.SortedSet; import java.util.TreeSet; import java.util.logging.Level; import javax.swing.JPanel; +import org.sleuthkit.autopsy.corecomponents.FrameCapture; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.modules.filetypeid.FileTypeDetector; import org.sleuthkit.datamodel.AbstractFile; @@ -34,7 +35,7 @@ import org.sleuthkit.datamodel.AbstractFile; * Video viewer part of the Media View layered pane. Uses different engines * depending on platform. */ -public abstract class MediaViewVideoPanel extends JPanel implements FrameCapture, DataContentViewerMedia.MediaViewPanel { +public abstract class MediaViewVideoPanel extends JPanel implements FrameCapture, MediaFileViewer.MediaViewPanel { private static final Set AUDIO_EXTENSIONS = new TreeSet<>(Arrays.asList(".mp3", ".wav", ".wma")); //NON-NLS diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/PListViewer.java b/Core/src/org/sleuthkit/autopsy/contentviewers/PListViewer.java index 7d76f3deba..64c5db3542 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/PListViewer.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/PListViewer.java @@ -57,6 +57,7 @@ import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.datamodel.TskCoreException; import org.xml.sax.SAXException; +import org.sleuthkit.autopsy.corecomponentinterfaces.FileTypeViewer; /** * PListViewer - a file viewer for binary plist files. @@ -505,6 +506,7 @@ public class PListViewer extends javax.swing.JPanel implements FileTypeViewer, E .map(child -> new PropKeyValue(child)) .toArray(PropKeyValue[]::new); } + } } diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/SQLiteViewer.java b/Core/src/org/sleuthkit/autopsy/contentviewers/SQLiteViewer.java index 76d86f3d43..d60797c8b6 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/SQLiteViewer.java +++ b/Core/src/org/sleuthkit/autopsy/contentviewers/SQLiteViewer.java @@ -51,6 +51,7 @@ import org.sleuthkit.autopsy.datamodel.ContentUtils; import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.SleuthkitCase; import org.sleuthkit.datamodel.TskCoreException; +import org.sleuthkit.autopsy.corecomponentinterfaces.FileTypeViewer; /** * A file content viewer for SQLITE db files. diff --git a/Core/src/org/sleuthkit/autopsy/contentviewers/FileTypeViewer.java b/Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/FileTypeViewer.java similarity index 93% rename from Core/src/org/sleuthkit/autopsy/contentviewers/FileTypeViewer.java rename to Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/FileTypeViewer.java index f4a677c4f4..b3ae7210a2 100644 --- a/Core/src/org/sleuthkit/autopsy/contentviewers/FileTypeViewer.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponentinterfaces/FileTypeViewer.java @@ -16,7 +16,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.sleuthkit.autopsy.contentviewers; +package org.sleuthkit.autopsy.corecomponentinterfaces; import java.awt.Component; import java.util.List; @@ -26,7 +26,7 @@ import org.sleuthkit.datamodel.AbstractFile; * Defines an interface for application specific content viewer * */ -interface FileTypeViewer { +public interface FileTypeViewer { /** * Returns list of MIME types supported by this viewer diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties index 5f43502f8f..3976f755f0 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle.properties @@ -26,9 +26,7 @@ LBL_Description=
Autopsy™ is a digital forensics platform based on The Sleuth Kit™ and other tools.
Copyright © 2003-2017.
URL_ON_IMG=http://www.sleuthkit.org/ - URL_ON_HELP=http://sleuthkit.org/autopsy/docs/user-docs/4.6.0/ - FILE_FOR_LOCAL_HELP=file:/// INDEX_FOR_LOCAL_HELP=/docs/index.html LBL_Close=Close @@ -45,7 +43,6 @@ DataContentViewerArtifact.ofLabel.text=of DataContentViewerArtifact.copyMenuItem.text=Copy DataContentViewerArtifact.selectAllMenuItem.text=Select All DataContentViewerArtifact.pageLabel.text=Result: - AdvancedConfigurationDialog.applyButton.text=OK DataContentViewerString.goToPageLabel.text=Go to Page: DataContentViewerString.goToPageTextField.text= @@ -68,10 +65,6 @@ AdvancedConfigurationDialog.cancelButton.text=Cancel DataResultPanel.directoryTablePath.text=directoryPath DataResultPanel.numberMatchLabel.text=0 DataResultPanel.matchLabel.text=Results -MediaViewVideoPanel.pauseButton.text=\u25ba -MediaViewVideoPanel.progressLabel.text=00:00 -DataContentViewerMedia.AccessibleContext.accessibleDescription= -MediaViewVideoPanel.infoLabel.text=info DataContentViewerArtifact.waitText=Retrieving and preparing data, please wait... DataContentViewerArtifact.errorText=Error retrieving result DataContentViewerArtifact.title=Results @@ -81,8 +74,6 @@ DataContentViewerHex.goToPageTextField.err=Invalid page number DataContentViewerHex.setDataView.errorText=(offset {0}-{1} could not be read) DataContentViewerHex.title=Hex DataContentViewerHex.toolTip=Displays the binary contents of a file as hexidecimal, with bytes that are displayable as ASCII characters on the right. -DataContentViewerMedia.title=Media -DataContentViewerMedia.toolTip=Displays supported multimedia files (images, videos, audio) DataContentViewerString.goToPageTextField.msgDlg=Please enter a valid page number between 1 and {0} DataContentViewerString.goToPageTextField.err=Invalid page number DataContentViewerString.setDataView.errorText=(offset {0}-{1} could not be read) @@ -97,25 +88,8 @@ DataResultViewerThumbnail.goToPageTextField.msgDlg=Please enter a valid page num DataResultViewerThumbnail.goToPageTextField.err=Invalid page number DataResultViewerThumbnail.genThumbs=Generating Thumbnails... DataResultViewerThumbnail.pageNumbers.curOfTotal={0} of {1} -FXVideoPanel.mediaPane.infoLabel=Playback of deleted videos is not supported, use an external player. -FXVideoPanel.progress.bufferingFile=Buffering {0} -FXVideoPanel.progressLabel.buffering=Buffering... -FXVideoPanel.media.unsupportedFormat=Unsupported Format. GeneralOptionsPanelController.moduleErr=Module Error GeneralOptionsPanelController.moduleErr.msg=A module caused an error listening to GeneralOptionsPanelController updates. See log to determine which module. Some data could be incomplete. -GstVideoPanel.cannotProcFile.err=The media player cannot process this file. -GstVideoPanel.initGst.gstException.msg=Error initializing gstreamer for audio/video viewing and frame extraction capabilities. Video and audio viewing will be disabled. -GstVideoPanel.initGst.otherException.msg=Error initializing gstreamer for audio/video viewing frame extraction capabilities. Video and audio viewing will be disabled. -GstVideoPanel.setupVideo.infoLabel.text=Playback of deleted videos is not supported, use an external player. -GstVideoPanel.exception.problemFile.msg=Cannot capture frames from this file ({0}). -GstVideoPanel.exception.problemPlay.msg=Problem with video file; problem when attempting to play while obtaining duration. -GstVideoPanel.exception.problemPause.msg=Problem with video file; problem when attempting to pause while obtaining duration. -GstVideoPanel.exception.problemPauseCaptFrame.msg=Problem with video file; problem when attempting to pause while capturing a frame. -GstVideoPanel.exception.problemPlayCaptFrame.msg=Problem with video file; problem when attempting to play while capturing a frame. -GstVideoPanel.exception.problemStopCaptFrame.msg=Problem with video file; problem when attempting to stop while capturing a frame. -GstVideoPanel.progress.buffering=Buffering... -GstVideoPanel.progressLabel.bufferingErr=Error buffering file -MediaViewImagePanel.imgFileTooLarge.msg=Could not load image file (too large)\: {0} ProductInformationPanel.verbLoggingEnabled.text=Verbose logging enabled ProductInformationPanel.propertyUnknown.text=unknown ProductInformationPanel.getVMValue.text={0} {1} @@ -124,9 +98,6 @@ DataResultViewerThumbnail.comboBox.smallThumbnails=Small Thumbnails DataResultViewerThumbnail.comboBox.mediumThumbnails=Medium Thumbnails DataResultViewerThumbnail.comboBox.largeThumbnails=Large Thumbnails DataResultViewerThumbnail.switchPage.done.errMsg=Error making thumbnails\: {0} -FXVideoPanel.pauseButton.infoLabel.playbackErr=Unable to play video. -GstVideoPanel.progress.infoLabel.updateErr=Error updating video progress\: {0} -GstVideoPanel.ExtractMedia.progress.buffering=Buffering {0} AboutWindowPanel.actVerboseLogging.text=Activate verbose logging AutopsyOptionsPanel.viewsHideKnownCB.text=Views area AutopsyOptionsPanel.dataSourcesHideKnownCB.text=Data Sources area (the directory hierarchy) @@ -139,9 +110,6 @@ AutopsyOptionsPanel.keepCurrentViewerRB.text=Stay on the same file viewer AutopsyOptionsPanel.jLabelSelectFile.text=When selecting a file: AutopsyOptionsPanel.jLabelHideKnownFiles.text=Hide known files (i.e. those in the NIST NSRL) in the: AutopsyOptionsPanel.jLabelTimeDisplay.text=When displaying times: -FXVideoPanel.progress.bufferingCancelled=media buffering was canceled -FXVideoPanel.progress.bufferingInterrupted=media buffering was interrupted -FXVideoPanel.progress.errorWritingVideoToDisk=Error writing video to disk OptionsCategory_Name_Multi_User_Settings=Multi-User OptionsCategory_Keywords_Multi_User_Options=Multi-User Settings MultiUserSettingsPanel.lbSolrSettings.text=Solr Settings diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle_ja.properties b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle_ja.properties index d3a5d76e4d..6505a09862 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle_ja.properties +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/Bundle_ja.properties @@ -40,9 +40,6 @@ AdvancedConfigurationDialog.cancelButton.text=\u30ad\u30e3\u30f3\u30bb\u30eb DataResultPanel.directoryTablePath.text=\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u30d1\u30b9 DataResultPanel.numberMatchLabel.text=0 DataResultPanel.matchLabel.text=\u7d50\u679c -MediaViewVideoPanel.pauseButton.text=\u25ba -MediaViewVideoPanel.progressLabel.text=00\:00 -MediaViewVideoPanel.infoLabel.text=\u60c5\u5831 DataContentViewerArtifact.waitText=\u30c7\u30fc\u30bf\u3092\u53d6\u8fbc\u307f\u304a\u3088\u3073\u6e96\u5099\u4e2d\u3002\u3057\u3070\u3089\u304f\u304a\u5f85\u3061\u4e0b\u3055\u3044... DataContentViewerArtifact.errorText=\u7d50\u679c\u3092\u53d6\u8fbc\u307f\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f DataContentViewerArtifact.title=\u7d50\u679c @@ -52,8 +49,6 @@ DataContentViewerHex.goToPageTextField.err=\u7121\u52b9\u306a\u30da\u30fc\u30b8\ DataContentViewerHex.setDataView.errorText=\uff08\u30aa\u30d5\u30bb\u30c3\u30c8{0}-{1}\u306f\u8aad\u307f\u53d6\u308c\u307e\u305b\u3093\u3067\u3057\u305f\uff09 DataContentViewerHex.title=HEX DataContentViewerHex.toolTip=\u30d0\u30a4\u30ca\u30ea\u30b3\u30f3\u30c6\u30f3\u30c4\u3092HEX\u30d5\u30a1\u30a4\u30eb\u3068\u3057\u3066\u8868\u793a\u3057\u3001ASCII\u3068\u3057\u3066\u8868\u793a\u3067\u304d\u308b\u30d0\u30a4\u30c8\u306f\u53f3\u5074\u306b\u8868\u793a\u3057\u307e\u3059\u3002 -DataContentViewerMedia.title=\u30e1\u30c7\u30a3\u30a2 -DataContentViewerMedia.toolTip=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u308b\u30de\u30eb\u30c1\u30e1\u30c7\u30a3\u30a2\u30d5\u30a1\u30a4\u30eb\uff08\u30a4\u30e1\u30fc\u30b8\u3001\u30d3\u30c7\u30aa\u3001\u30aa\u30fc\u30c7\u30a3\u30aa\uff09\u3092\u8868\u793a\u3057\u307e\u3059\u3002 DataContentViewerString.goToPageTextField.msgDlg=\uff11\u304b\u3089{0}\u306e\u9593\u306e\u6709\u52b9\u306a\u30da\u30fc\u30b8\u6570\u3092\u5165\u529b\u3057\u3066\u4e0b\u3055\u3044 DataContentViewerString.goToPageTextField.err=\u7121\u52b9\u306a\u30da\u30fc\u30b8\u6570 DataContentViewerString.setDataView.errorText=\uff08\u30aa\u30d5\u30bb\u30c3\u30c8{0}-{1}\u306f\u8aad\u307f\u53d6\u308c\u307e\u305b\u3093\u3067\u3057\u305f\uff09 @@ -70,27 +65,10 @@ DataResultViewerThumbnail.goToPageTextField.msgDlg=\uff11\u304b\u3089{0}\u306e\u DataResultViewerThumbnail.goToPageTextField.err=\u7121\u52b9\u306a\u30da\u30fc\u30b8\u6570 DataResultViewerThumbnail.genThumbs=\u30b5\u30e0\u30cd\u30a4\u30eb\u3092\u4f5c\u6210\u4e2d\u2026 DataResultViewerThumbnail.pageNumbers.curOfTotal={0}\uff0f{1}\u76ee -FXVideoPanel.mediaPane.infoLabel=\u524a\u9664\u3055\u308c\u305f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u5916\u90e8\u30d7\u30ec\u30fc\u30e4\u30fc\u3092\u4f7f\u7528\u3057\u3066\u4e0b\u3055\u3044\u3002 -FXVideoPanel.progress.bufferingFile={0}\u3092\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0 -FXVideoPanel.progressLabel.buffering=\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u4e2d\u2026 -FXVideoPanel.media.unsupportedFormat=\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u306a\u3044\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u3067\u3059\u3002 GeneralOptionsPanelController.moduleErr=\u30e2\u30b8\u30e5\u30fc\u30eb\u30a8\u30e9\u30fc GeneralOptionsPanelController.moduleErr.msg=GeneralOptionsPanelController\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3092\u78ba\u8a8d\u4e2d\u306b\u30e2\u30b8\u30e5\u30fc\u30eb\u304c\u30a8\u30e9\u30fc\u3092\u8d77\u3053\u3057\u307e\u3057\u305f\u3002\u3069\u306e\u30e2\u30b8\u30e5\u30fc\u30eb\u304b\u30ed\u30b0\u3092\u78ba\u8a8d\u3057\u3066\u4e0b\u3055\u3044\u3002\u4e00\u90e8\u306e\u30c7\u30fc\u30bf\u304c\u4e0d\u5b8c\u5168\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002 -GstVideoPanel.cannotProcFile.err=\u30e1\u30c7\u30a4\u30a2\u30d7\u30ec\u30fc\u30e4\u30fc\u3067\u306f\u3053\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u51e6\u7406\u3067\u304d\u307e\u305b\u3093\u3002 -GstVideoPanel.initGst.gstException.msg=\u30aa\u30fc\u30c7\u30a3\u30aa\uff0f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u304a\u3088\u3073\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u306b\u4f7f\u7528\u3059\u308bGStreamer\u306e\u521d\u671f\u5316\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d3\u30c7\u30aa\u304a\u3088\u3073\u30aa\u30fc\u30c7\u30a3\u30aa\u518d\u751f\u304c\u7121\u52b9\u5316\u3055\u308c\u307e\u3059\u3002 -GstVideoPanel.initGst.otherException.msg=\u30aa\u30fc\u30c7\u30a3\u30aa\uff0f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u304a\u3088\u3073\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u306b\u4f7f\u7528\u3059\u308bGStreamer\u306e\u521d\u671f\u5316\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d3\u30c7\u30aa\u304a\u3088\u3073\u30aa\u30fc\u30c7\u30a3\u30aa\u518d\u751f\u304c\u7121\u52b9\u5316\u3055\u308c\u307e\u3059\u3002 -GstVideoPanel.setupVideo.infoLabel.text=\u524a\u9664\u3055\u308c\u305f\u30d3\u30c7\u30aa\u306e\u518d\u751f\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002\u5916\u90e8\u30d7\u30ec\u30fc\u30e4\u30fc\u3092\u4f7f\u7528\u3057\u3066\u4e0b\u3055\u3044\u3002 -GstVideoPanel.exception.problemFile.msg=\u30d5\u30a1\u30a4\u30eb({0})\u304b\u3089\u30d5\u30ec\u30fc\u30e0\u3092\u62bd\u51fa\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 -GstVideoPanel.exception.problemPlay.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u9577\u3055\u3092\u78ba\u8a8d\u4e2d\u306b\u518d\u751f\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 LBL_Description=
\n \u88fd\u54c1\u30d0\u30fc\u30b8\u30e7\u30f3\uff1a {0} ({9})
Sleuth Kit\u30d0\u30fc\u30b8\u30e7\u30f3\uff1a {7}
Netbeans RCP\u30d3\u30eb\u30c9\: {8}
Java\: {1}; {2}
\u30b7\u30b9\u30c6\u30e0\uff1a {3}; {4}; {5}
\u30e6\u30fc\u30b6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u540d {6}
LBL_Copyright=
Autopsy™\u306fSleuth Kit™\u3084\u305d\u306e\u4ed6\u30c4\u30fc\u30eb\u3092\u57fa\u306b\u3057\u305f\u30c7\u30b8\u30bf\u30eb\u30fb\u30d5\u30a9\u30ec\u30f3\u30b8\u30c3\u30af\u30fb\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u3059\u3002

Copyright © 2003-2013. \u8a73\u7d30\u306f\u4e0b\u8a18\u3092\u3054\u89a7\u4e0b\u3055\u3044\u3002 http\://www.sleuthkit.org.
-GstVideoPanel.exception.problemPause.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u9577\u3055\u3092\u78ba\u8a8d\u4e2d\u306b\u4e00\u6642\u505c\u6b62\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 -GstVideoPanel.exception.problemPauseCaptFrame.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u4e2d\u306b\u4e00\u6642\u505c\u6b62\u3092\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 -GstVideoPanel.exception.problemPlayCaptFrame.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u4e2d\u306b\u518d\u751f\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 -GstVideoPanel.exception.problemStopCaptFrame.msg=\u30d3\u30c7\u30aa\u30d5\u30a1\u30a4\u30eb\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002\u30d5\u30ec\u30fc\u30e0\u306e\u62bd\u51fa\u4e2d\u306b\u505c\u6b62\u3057\u3088\u3046\u3068\u3057\u305f\u969b\u306b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002 -GstVideoPanel.progress.buffering=\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u4e2d\u2026 -GstVideoPanel.progressLabel.bufferingErr=\u30d5\u30a1\u30a4\u30eb\u306e\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u30a8\u30e9\u30fc -MediaViewImagePanel.imgFileTooLarge.msg=\u30a4\u30e1\u30fc\u30b8\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093\u3067\u3057\u305f\uff08\u5927\u304d\u3059\u304e\u3067\u3059\uff09\uff1a {0} ProductInformationPanel.verbLoggingEnabled.text=Verbose\u30ed\u30b0\u304c\u6709\u52b9\u3067\u3059 ProductInformationPanel.propertyUnknown.text=\u4e0d\u660e ProductInformationPanel.getVMValue.text={0} {1} @@ -103,9 +81,6 @@ DataResultViewerThumbnail.comboBox.smallThumbnails=\u30b5\u30e0\u30cd\u30a4\u30e DataResultViewerThumbnail.comboBox.mediumThumbnails=\u30b5\u30e0\u30cd\u30a4\u30eb\uff08\u4e2d\uff09 DataResultViewerThumbnail.comboBox.largeThumbnails=\u30b5\u30e0\u30cd\u30a4\u30eb\uff08\u5927\uff09 DataResultViewerThumbnail.switchPage.done.errMsg=\u30b5\u30e0\u30cd\u30a4\u30eb\u4f5c\u6210\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\uff1a {0} -FXVideoPanel.pauseButton.infoLabel.playbackErr=\u30d3\u30c7\u30aa\u3092\u518d\u751f\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 -GstVideoPanel.progress.infoLabel.updateErr=\u30d3\u30c7\u30aa\u30d7\u30ed\u30b0\u30ec\u30b9\u306e\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\uff1a {0} -GstVideoPanel.ExtractMedia.progress.buffering={0}\u3092\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u4e2d AboutWindowPanel.actVerboseLogging.text=Verbose\u30ed\u30b0\u3092\u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30c8 AutopsyOptionsPanel.viewsHideKnownCB.text=\u30d3\u30e5\u30fc\u30a8\u30ea\u30a2 AutopsyOptionsPanel.dataSourcesHideKnownCB.text=\u30c7\u30fc\u30bf\u30bd\u30fc\u30b9\u30a8\u30ea\u30a2\uff08\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u968e\u5c64\uff09 @@ -118,9 +93,6 @@ AutopsyOptionsPanel.keepCurrentViewerRB.text=\u305d\u306e\u307e\u307e\u540c\u305 AutopsyOptionsPanel.jLabelSelectFile.text=\u30d5\u30a1\u30a4\u30eb\u3092\u9078\u629e\u3059\u308b\u5834\u5408\uff1a AutopsyOptionsPanel.jLabelHideKnownFiles.text=\u65e2\u77e5\u30d5\u30a1\u30a4\u30eb\uff08NIST NSRL\u5185\u306e\uff09\u3092\u6b21\u306b\u96a0\u3059\uff1a AutopsyOptionsPanel.jLabelTimeDisplay.text=\u6642\u9593\u3092\u8868\u793a\u3059\u308b\u5834\u5408\uff1a -FXVideoPanel.progress.bufferingCancelled=\u30e1\u30c7\u30a3\u30a2\u306e\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u307e\u3057\u305f -FXVideoPanel.progress.bufferingInterrupted=\u30e1\u30c7\u30a3\u30a2\u306e\u30d0\u30c3\u30d5\u30a1\u30ea\u30f3\u30b0\u304c\u4e2d\u65ad\u3055\u308c\u307e\u3057\u305f -FXVideoPanel.progress.errorWritingVideoToDisk=\u30d3\u30c7\u30aa\u3092\u30c7\u30a3\u30b9\u30af\u3078\u66f8\u304d\u8fbc\u307f\u4e2d\u306b\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f OptionsCategory_Name_Multi_User_Settings=\u8907\u6570\u306e\u30e6\u30fc\u30b6\u30fc OptionsCategory_Keywords_Multi_User_Options=\u8907\u6570\u306e\u30e6\u30fc\u30b6\u30fc\u30aa\u30d7\u30b7\u30e7\u30f3 MultiUserSettingsPanel.lbSolrSettings.text=Solr\u8a2d\u5b9a diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java index 33dd6a2cc0..056d87bfbd 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/BlackboardArtifactNode.java @@ -178,11 +178,12 @@ public class BlackboardArtifactNode extends AbstractContentNode(Bundle.BlackboardArtifactNode_createSheet_artifactMD5_name(), + Bundle.BlackboardArtifactNode_createSheet_artifactMD5_displayName(), + "", + file != null ? file.getMd5Hash() : "")); } } else { String dataSourceStr = ""; diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/ContentTagNode.java b/Core/src/org/sleuthkit/autopsy/datamodel/ContentTagNode.java index 2108e982d7..9ce002efc0 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/ContentTagNode.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/ContentTagNode.java @@ -26,6 +26,7 @@ import javax.swing.Action; import org.openide.nodes.Children; import org.openide.nodes.Sheet; import org.openide.util.NbBundle; +import org.openide.util.NbBundle.Messages; import org.openide.util.lookup.Lookups; import org.sleuthkit.autopsy.actions.DeleteContentTagAction; import org.sleuthkit.autopsy.coreutils.Logger; @@ -56,6 +57,10 @@ class ContentTagNode extends DisplayableItemNode { this.tag = tag; } + @Messages({ + "ContentTagNode.createSheet.artifactMD5.displayName=MD5 Hash", + "ContentTagNode.createSheet.artifactMD5.name=MD5 Hash" + }) @Override protected Sheet createSheet() { Content content = tag.getContent(); @@ -106,7 +111,10 @@ class ContentTagNode extends DisplayableItemNode { NbBundle.getMessage(this.getClass(), "ContentTagNode.createSheet.fileSize.displayName"), "", content.getSize())); - + properties.put(new NodeProperty<>(Bundle.ContentTagNode_createSheet_artifactMD5_name(), + Bundle.ContentTagNode_createSheet_artifactMD5_displayName(), + "", + file != null ? file.getMd5Hash() : "")); return propertySheet; } diff --git a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetsManager.java b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetsManager.java index 8397d77c72..7347d32c8f 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetsManager.java +++ b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetsManager.java @@ -102,29 +102,7 @@ public final class FilesSetsManager extends Observable { public static List getStandardFileIngestFilters() { return Arrays.asList(FILES_DIRS_UNALLOC_INGEST_FILTER, FILES_DIRS_INGEST_FILTER); } - - /** - * Get the filter that should be used as the default value, if no filter is - * specified. - * - * @return FILES_DIRS_UNALLOC_INGEST_FILTER - */ - public static FilesSet getDefaultFilter() { - return FILES_DIRS_UNALLOC_INGEST_FILTER; - } - - /** - * Gets a copy of the current interesting files set definitions. - * - * @return A map of interesting files set names to interesting file sets, - * possibly empty. - */ - Map getInterestingFilesSets() throws FilesSetsManagerException { - synchronized (INTERESTING_FILES_SET_LOCK) { - return InterestingItemsFilesSetSettings.readDefinitionsFile(INTERESTING_FILES_SET_DEFS_NAME, LEGACY_FILES_SET_DEFS_FILE_NAME); - } - } - + /** * Gets a copy of the current ingest file set definitions. * @@ -139,6 +117,43 @@ public final class FilesSetsManager extends Observable { } } + /** + * Get the filter that should be used as the default value, if no filter is + * specified. + * + * @return FILES_DIRS_UNALLOC_INGEST_FILTER + */ + public static FilesSet getDefaultFilter() { + return FILES_DIRS_UNALLOC_INGEST_FILTER; + } + + /** + * Sets the current interesting file sets definitions, replacing any + * previous definitions. + * + * @param filesSets A mapping of file ingest filters names to files sets, + * used to enforce unique files set names. + */ + void setCustomFileIngestFilters(Map filesSets) throws FilesSetsManagerException { + synchronized (FILE_INGEST_FILTER_LOCK) { + FileSetsDefinitions.writeDefinitionsFile(FILE_INGEST_FILTER_DEFS_NAME, filesSets); + } + } + + + /** + * Gets a copy of the current interesting files set definitions. + * + * @return A map of interesting files set names to interesting file sets, + * possibly empty. + */ + public Map getInterestingFilesSets() throws FilesSetsManagerException { + synchronized (INTERESTING_FILES_SET_LOCK) { + return InterestingItemsFilesSetSettings.readDefinitionsFile(INTERESTING_FILES_SET_DEFS_NAME, LEGACY_FILES_SET_DEFS_FILE_NAME); + } + } + + /** * Sets the current interesting file sets definitions, replacing any * previous definitions. @@ -154,18 +169,7 @@ public final class FilesSetsManager extends Observable { } } - /** - * Sets the current interesting file sets definitions, replacing any - * previous definitions. - * - * @param filesSets A mapping of file ingest filters names to files sets, - * used to enforce unique files set names. - */ - void setCustomFileIngestFilters(Map filesSets) throws FilesSetsManagerException { - synchronized (FILE_INGEST_FILTER_LOCK) { - FileSetsDefinitions.writeDefinitionsFile(FILE_INGEST_FILTER_DEFS_NAME, filesSets); - } - } + public static class FilesSetsManagerException extends Exception { diff --git a/Core/test/unit/src/org/sleuthkit/autopsy/ingest/IngestFileFiltersTest.java b/Core/test/unit/src/org/sleuthkit/autopsy/ingest/IngestFileFiltersTest.java deleted file mode 100644 index 29618e30ec..0000000000 --- a/Core/test/unit/src/org/sleuthkit/autopsy/ingest/IngestFileFiltersTest.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Autopsy Forensic Browser - * - * Copyright 2011-2017 Basis Technology Corp. - * Contact: carrier sleuthkit org - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */package org.sleuthkit.autopsy.ingest; - -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -public class IngestFileFiltersTest { - - public IngestFileFiltersTest() { - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - @Test - public void testFilters() { - System.out.println("Test filter"); - } -} diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.form b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.form index cf7db34165..1e1cc73c43 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.form +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.form @@ -73,6 +73,8 @@ + + @@ -102,10 +104,14 @@ - + + + + + @@ -608,5 +614,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java index 0d89c08246..ea5b7b5ee3 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java @@ -73,8 +73,6 @@ import org.sleuthkit.autopsy.ingest.IngestProgressSnapshotDialog; * one such panel per node. */ @Messages({ - "AutoIngestControlPanel.bnClusterMetrics.text=Auto Ingest Metrics", - "AutoIngestControlPanel.bnPause.text=Pause", "AutoIngestControlPanel.bnPause.paused=Paused", "AutoIngestControlPanel.bnPause.running=Running", "AutoIngestControlPanel.bnPause.confirmHeader=Are you sure you want to pause?", @@ -88,38 +86,15 @@ import org.sleuthkit.autopsy.ingest.IngestProgressSnapshotDialog; "AutoIngestControlPanel.pendingTable.toolTipText=The Pending table displays the order upcoming Jobs will be processed with the top of the list first", "AutoIngestControlPanel.runningTable.toolTipText=The Running table displays the currently running Job and information about it", "AutoIngestControlPanel.completedTable.toolTipText=The Completed table shows all Jobs that have been processed already", - "AutoIngestControlPanel.bnCancelJob.text=&Cancel Job", "AutoIngestControlPanel.bnCancelJob.toolTipText=Cancel processing of the current Job and move on to the next Job. This functionality is only available for jobs running on current AIM node.", - "AutoIngestControlPanel.bnDeleteCase.text=&Delete Case", "AutoIngestControlPanel.bnDeleteCase.toolTipText=Delete the selected Case in its entirety", "AutoIngestControlPanel.bnResume.text=Resume", - "AutoIngestControlPanel.lbPending.text=Pending Jobs", - "AutoIngestControlPanel.lbRunning.text=Running Jobs", - "AutoIngestControlPanel.lbCompleted.text=Completed Jobs", - "AutoIngestControlPanel.bnRefresh.text=&Refresh", "AutoIngestControlPanel.bnRefresh.toolTipText=Refresh displayed tables", - "AutoIngestControlPanel.bnCancelModule.text=Cancel &Module", "AutoIngestControlPanel.bnCancelModule.toolTipText=Cancel processing of the current module within the Job and move on to the next module within the Job. This functionality is only available for jobs running on current AIM node.", - "AutoIngestControlPanel.bnExit.text=&Exit", "AutoIngestControlPanel.bnExit.toolTipText=Exit Application", - "AutoIngestControlPanel.bnOptions.text=&Options", "AutoIngestControlPanel.bnOptions.toolTipText=Display options panel. All processing must be paused to open the options panel.", - "AutoIngestControlPanel.bnShowProgress.text=Ingest Progress", "AutoIngestControlPanel.bnShowProgress.toolTipText=Show the progress of the currently running Job. This functionality is only available for jobs running on current AIM node.", - "AutoIngestControlPanel.bnPrioritizeCase.text=Prioritize Case", - "AutoIngestControlPanel.bnPrioritizeCase.toolTipText=Move all images associated with a case to top of Pending queue.", - "AutoIngestControlPanel.bnShowCaseLog.text=Show Case &Log", "AutoIngestControlPanel.bnShowCaseLog.toolTipText=Display case log file for selected case", - "AutoIngestControlPanel.tbStatusMessage.text=", - "AutoIngestControlPanel.lbStatus.text=Status:", - "AutoIngestControlPanel.bnPrioritizeJob.text=Prioritize Job", - "AutoIngestControlPanel.bnPrioritizeJob.toolTipText=Move this folder to the top of the Pending queue.", - "AutoIngestControlPanel.bnPrioritizeJob.actionCommand=", - "AutoIngestControlPanel.lbServicesStatus.text=Services Status:", - "AutoIngestControlPanel.tbServicesStatusMessage.text=", - "AutoIngestControlPanel.bnOpenLogDir.text=Open System Logs Folder", - "AutoIngestControlPanel.bnReprocessJob.text=Reprocess Job", - "AutoIngestControlPanel.bnPrioritizeFolder.label=", "AutoIngestControlPanel.Cancelling=Cancelling...", "AutoIngestControlPanel.AutoIngestStartupWarning.Title=Automated Ingest Warning", "AutoIngestControlPanel.AutoIngestStartupWarning.Message=Failed to establish remote communications with other automated ingest nodes.\nAuto ingest dashboard will only be able to display local ingest job events.\nPlease verify Multi-User settings (Options->Multi-User). See application log for details.", @@ -418,7 +393,14 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { return; } int row = pendingTable.getSelectedRow(); - enablePendingTableButtons((row >= 0) && (row < pendingTable.getRowCount())); + boolean enablePrioritizeButtons = false; + boolean enableDeprioritizeButtons = false; + if ((row >= 0) && (row < pendingTable.getRowCount())) { + enablePrioritizeButtons = true; + enableDeprioritizeButtons = ((Integer) pendingTableModel.getValueAt(row, JobsTableModelColumns.PRIORITY.ordinal()) > 0); + } + enablePrioritizeButtons(enablePrioritizeButtons); + enableDeprioritizeButtons(enableDeprioritizeButtons); }); /* @@ -622,7 +604,8 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { private void initButtons() { bnOptions.setEnabled(true); bnDeleteCase.setEnabled(false); - enablePendingTableButtons(false); + enablePrioritizeButtons(false); + enableDeprioritizeButtons(false); bnShowCaseLog.setEnabled(false); bnReprocessJob.setEnabled(false); bnPause.setText(org.openide.util.NbBundle.getMessage(AutoIngestControlPanel.class, "AutoIngestControlPanel.bnStart.text")); @@ -645,15 +628,26 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { } /** - * Enables or disables buttons related to pending jobs table. + * Enables or disables prioritize buttons related to the pending jobs table. * * @param enable Enable/disable the buttons. */ - private void enablePendingTableButtons(Boolean enable) { + private void enablePrioritizeButtons(Boolean enable) { bnPrioritizeCase.setEnabled(enable); bnPrioritizeJob.setEnabled(enable); } + /** + * Enables or disables deprioritize buttons related to the pending jobs + * table. + * + * @param enable Enable/disable the buttons. + */ + private void enableDeprioritizeButtons(Boolean enable) { + bnDeprioritizeCase.setEnabled(enable); + bnDeprioritizeJob.setEnabled(enable); + } + /** * Starts up the auto ingest manager and adds this panel as an observer, * subscribes to services monitor events and starts a task to populate the @@ -1201,6 +1195,8 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { bnOpenLogDir = new javax.swing.JButton(); bnClusterMetrics = new javax.swing.JButton(); bnReprocessJob = new javax.swing.JButton(); + bnDeprioritizeCase = new javax.swing.JButton(); + bnDeprioritizeJob = new javax.swing.JButton(); pendingTable.setModel(pendingTableModel); pendingTable.setToolTipText(org.openide.util.NbBundle.getMessage(AutoIngestControlPanel.class, "AutoIngestControlPanel.pendingTable.toolTipText")); // NOI18N @@ -1434,6 +1430,29 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { } }); + org.openide.awt.Mnemonics.setLocalizedText(bnDeprioritizeCase, org.openide.util.NbBundle.getMessage(AutoIngestControlPanel.class, "AutoIngestControlPanel.bnDeprioritizeCase.text")); // NOI18N + bnDeprioritizeCase.setToolTipText(org.openide.util.NbBundle.getMessage(AutoIngestControlPanel.class, "AutoIngestControlPanel.bnDeprioritizeCase.toolTipText")); // NOI18N + bnDeprioritizeCase.setMaximumSize(new java.awt.Dimension(162, 23)); + bnDeprioritizeCase.setMinimumSize(new java.awt.Dimension(162, 23)); + bnDeprioritizeCase.setPreferredSize(new java.awt.Dimension(162, 23)); + bnDeprioritizeCase.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + bnDeprioritizeCaseActionPerformed(evt); + } + }); + + org.openide.awt.Mnemonics.setLocalizedText(bnDeprioritizeJob, org.openide.util.NbBundle.getMessage(AutoIngestControlPanel.class, "AutoIngestControlPanel.bnDeprioritizeJob.text")); // NOI18N + bnDeprioritizeJob.setToolTipText(org.openide.util.NbBundle.getMessage(AutoIngestControlPanel.class, "AutoIngestControlPanel.bnDeprioritizeJob.toolTipText")); // NOI18N + bnDeprioritizeJob.setActionCommand(org.openide.util.NbBundle.getMessage(AutoIngestControlPanel.class, "AutoIngestControlPanel.bnDeprioritizeJob.actionCommand")); // NOI18N + bnDeprioritizeJob.setMaximumSize(new java.awt.Dimension(162, 23)); + bnDeprioritizeJob.setMinimumSize(new java.awt.Dimension(162, 23)); + bnDeprioritizeJob.setPreferredSize(new java.awt.Dimension(162, 23)); + bnDeprioritizeJob.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + bnDeprioritizeJobActionPerformed(evt); + } + }); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( @@ -1486,7 +1505,9 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(bnPrioritizeCase, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(bnPrioritizeJob, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) + .addComponent(bnPrioritizeJob, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(bnDeprioritizeCase, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(bnDeprioritizeJob, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) ); @@ -1511,10 +1532,14 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(pendingScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 215, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() - .addGap(82, 82, 82) + .addGap(48, 48, 48) .addComponent(bnPrioritizeCase, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(bnPrioritizeJob, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addComponent(bnDeprioritizeCase, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(30, 30, 30) + .addComponent(bnPrioritizeJob, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(bnDeprioritizeJob, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(lbRunning) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -1747,7 +1772,7 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { * * @param evt The button click event. */ - @Messages({"AutoIngestControlPanel.casePrioritization.errorMessage=An error occurred when prioritizing the case. Some or all jobs may not have been prioritized."}) + @Messages({"AutoIngestControlPanel.errorMessage.casePrioritization=An error occurred when prioritizing the case. Some or all jobs may not have been prioritized."}) private void bnPrioritizeCaseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnPrioritizeCaseActionPerformed if (pendingTable.getModel().getRowCount() > 0 && pendingTable.getSelectedRow() >= 0) { this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); @@ -1757,11 +1782,12 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { manager.prioritizeCase(caseName); } catch (AutoIngestManager.AutoIngestManagerException ex) { SYS_LOGGER.log(Level.SEVERE, "Error prioritizing a case", ex); - MessageNotifyUtil.Message.error(Bundle.AutoIngestControlPanel_casePrioritization_errorMessage()); + MessageNotifyUtil.Message.error(Bundle.AutoIngestControlPanel_errorMessage_casePrioritization()); } refreshTables(); pendingTable.clearSelection(); - enablePendingTableButtons(false); + enablePrioritizeButtons(false); + enableDeprioritizeButtons(false); AutoIngestControlPanel.this.setCursor(Cursor.getDefaultCursor()); } }//GEN-LAST:event_bnPrioritizeCaseActionPerformed @@ -1807,7 +1833,7 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { } }//GEN-LAST:event_bnShowCaseLogActionPerformed - @Messages({"AutoIngestControlPanel.jobPrioritization.errorMessage=An error occurred when prioritizing the job."}) + @Messages({"AutoIngestControlPanel.errorMessage.jobPrioritization=An error occurred when prioritizing the job."}) private void bnPrioritizeJobActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnPrioritizeJobActionPerformed if (pendingTable.getModel().getRowCount() > 0 && pendingTable.getSelectedRow() >= 0) { this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); @@ -1815,12 +1841,13 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { try { manager.prioritizeJob(manifestFilePath); } catch (AutoIngestManager.AutoIngestManagerException ex) { - SYS_LOGGER.log(Level.SEVERE, "Error prioritizing a case", ex); - MessageNotifyUtil.Message.error(Bundle.AutoIngestControlPanel_jobPrioritization_errorMessage()); + SYS_LOGGER.log(Level.SEVERE, "Error prioritizing a job", ex); + MessageNotifyUtil.Message.error(Bundle.AutoIngestControlPanel_errorMessage_jobPrioritization()); } refreshTables(); pendingTable.clearSelection(); - enablePendingTableButtons(false); + enablePrioritizeButtons(false); + enableDeprioritizeButtons(false); AutoIngestControlPanel.this.setCursor(Cursor.getDefaultCursor()); } }//GEN-LAST:event_bnPrioritizeJobActionPerformed @@ -1852,11 +1879,52 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { new AutoIngestMetricsDialog(this.getTopLevelAncestor()); }//GEN-LAST:event_bnClusterMetricsActionPerformed + @Messages({"AutoIngestControlPanel.errorMessage.caseDeprioritization=An error occurred when deprioritizing the case. Some or all jobs may not have been deprioritized."}) + private void bnDeprioritizeCaseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnDeprioritizeCaseActionPerformed + if (pendingTable.getModel().getRowCount() > 0 && pendingTable.getSelectedRow() >= 0) { + this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + + String caseName = (pendingTable.getModel().getValueAt(pendingTable.convertRowIndexToModel(pendingTable.getSelectedRow()), JobsTableModelColumns.CASE.ordinal())).toString(); + try { + manager.deprioritizeCase(caseName); + } catch (AutoIngestManager.AutoIngestManagerException ex) { + SYS_LOGGER.log(Level.SEVERE, "Error deprioritizing a case", ex); + MessageNotifyUtil.Message.error(Bundle.AutoIngestControlPanel_errorMessage_caseDeprioritization()); + } + refreshTables(); + pendingTable.clearSelection(); + enablePrioritizeButtons(false); + enableDeprioritizeButtons(false); + AutoIngestControlPanel.this.setCursor(Cursor.getDefaultCursor()); + } + }//GEN-LAST:event_bnDeprioritizeCaseActionPerformed + + @Messages({"AutoIngestControlPanel.errorMessage.jobDeprioritization=An error occurred when deprioritizing the job."}) + private void bnDeprioritizeJobActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnDeprioritizeJobActionPerformed + if (pendingTable.getModel().getRowCount() > 0 && pendingTable.getSelectedRow() >= 0) { + this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + Path manifestFilePath = (Path) (pendingTable.getModel().getValueAt(pendingTable.convertRowIndexToModel(pendingTable.getSelectedRow()), JobsTableModelColumns.MANIFEST_FILE_PATH.ordinal())); + try { + manager.deprioritizeJob(manifestFilePath); + } catch (AutoIngestManager.AutoIngestManagerException ex) { + SYS_LOGGER.log(Level.SEVERE, "Error deprioritizing a job", ex); + MessageNotifyUtil.Message.error(Bundle.AutoIngestControlPanel_errorMessage_jobDeprioritization()); + } + refreshTables(); + pendingTable.clearSelection(); + enablePrioritizeButtons(false); + enableDeprioritizeButtons(false); + AutoIngestControlPanel.this.setCursor(Cursor.getDefaultCursor()); + } + }//GEN-LAST:event_bnDeprioritizeJobActionPerformed + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton bnCancelJob; private javax.swing.JButton bnCancelModule; private javax.swing.JButton bnClusterMetrics; private javax.swing.JButton bnDeleteCase; + private javax.swing.JButton bnDeprioritizeCase; + private javax.swing.JButton bnDeprioritizeJob; private javax.swing.JButton bnExit; private javax.swing.JButton bnOpenLogDir; private javax.swing.JButton bnOptions; diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.form b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.form index 45e2a2ef43..9d2a343f56 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.form +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.form @@ -35,11 +35,15 @@ - + + + - + + + @@ -84,6 +88,8 @@ + + @@ -265,5 +271,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java index 693bc4ad3d..9324f782a3 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboard.java @@ -247,9 +247,16 @@ final class AutoIngestDashboard extends JPanel implements Observer { } int row = pendingTable.getSelectedRow(); - boolean enablePrioritizeButtons = (row >= 0 && row < pendingTable.getRowCount()); + boolean enablePrioritizeButtons = false; + boolean enableDeprioritizeButtons = false; + if (row >= 0 && row < pendingTable.getRowCount()) { + enablePrioritizeButtons = true; + enableDeprioritizeButtons = (Integer) pendingTableModel.getValueAt(row, JobsTableModelColumns.PRIORITY.ordinal()) > 0; + } this.prioritizeJobButton.setEnabled(enablePrioritizeButtons); this.prioritizeCaseButton.setEnabled(enablePrioritizeButtons); + this.deprioritizeJobButton.setEnabled(enableDeprioritizeButtons); + this.deprioritizeCaseButton.setEnabled(enableDeprioritizeButtons); }); } @@ -655,6 +662,8 @@ final class AutoIngestDashboard extends JPanel implements Observer { prioritizeJobButton = new javax.swing.JButton(); prioritizeCaseButton = new javax.swing.JButton(); clusterMetricsButton = new javax.swing.JButton(); + deprioritizeJobButton = new javax.swing.JButton(); + deprioritizeCaseButton = new javax.swing.JButton(); org.openide.awt.Mnemonics.setLocalizedText(jButton1, org.openide.util.NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.jButton1.text")); // NOI18N @@ -759,6 +768,24 @@ final class AutoIngestDashboard extends JPanel implements Observer { } }); + org.openide.awt.Mnemonics.setLocalizedText(deprioritizeJobButton, org.openide.util.NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.deprioritizeJobButton.text")); // NOI18N + deprioritizeJobButton.setToolTipText(org.openide.util.NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.deprioritizeJobButton.toolTipText")); // NOI18N + deprioritizeJobButton.setEnabled(false); + deprioritizeJobButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + deprioritizeJobButtonActionPerformed(evt); + } + }); + + org.openide.awt.Mnemonics.setLocalizedText(deprioritizeCaseButton, org.openide.util.NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.deprioritizeCaseButton.text")); // NOI18N + deprioritizeCaseButton.setToolTipText(org.openide.util.NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.deprioritizeCaseButton.toolTipText")); // NOI18N + deprioritizeCaseButton.setEnabled(false); + deprioritizeCaseButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + deprioritizeCaseButtonActionPerformed(evt); + } + }); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup( @@ -773,11 +800,15 @@ final class AutoIngestDashboard extends JPanel implements Observer { .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addComponent(refreshButton, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addGap(18, 18, 18) .addComponent(prioritizeJobButton, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(deprioritizeJobButton, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) .addComponent(prioritizeCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(deprioritizeCaseButton, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGap(18, 18, 18) .addComponent(clusterMetricsButton)) .addComponent(lbPending, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lbCompleted, javax.swing.GroupLayout.Alignment.LEADING) @@ -816,7 +847,9 @@ final class AutoIngestDashboard extends JPanel implements Observer { .addComponent(refreshButton) .addComponent(prioritizeJobButton) .addComponent(prioritizeCaseButton) - .addComponent(clusterMetricsButton)) + .addComponent(clusterMetricsButton) + .addComponent(deprioritizeJobButton) + .addComponent(deprioritizeCaseButton)) .addContainerGap()) ); }// //GEN-END:initComponents @@ -835,9 +868,7 @@ final class AutoIngestDashboard extends JPanel implements Observer { setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); }//GEN-LAST:event_refreshButtonActionPerformed - @Messages({ - "AutoIngestDashboard.PrioritizeJobError=Failed to prioritize job \"%s\"." - }) + @Messages({"AutoIngestDashboard.errorMessage.jobPrioritization=Failed to prioritize job \"%s\"."}) private void prioritizeJobButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_prioritizeJobButtonActionPerformed if (pendingTableModel.getRowCount() > 0 && pendingTable.getSelectedRow() >= 0) { setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); @@ -847,7 +878,7 @@ final class AutoIngestDashboard extends JPanel implements Observer { jobsSnapshot = autoIngestMonitor.prioritizeJob(job); refreshTables(jobsSnapshot); } catch (AutoIngestMonitor.AutoIngestMonitorException ex) { - String errorMessage = String.format(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.PrioritizeJobError"), job.getManifest().getFilePath()); + String errorMessage = String.format(Bundle.AutoIngestDashboard_errorMessage_jobPrioritization(), job.getManifest().getFilePath()); LOGGER.log(Level.SEVERE, errorMessage, ex); MessageNotifyUtil.Message.error(errorMessage); } @@ -855,9 +886,7 @@ final class AutoIngestDashboard extends JPanel implements Observer { } }//GEN-LAST:event_prioritizeJobButtonActionPerformed - @Messages({ - "AutoIngestDashboard.PrioritizeCaseError=Failed to prioritize job \"%s\"." - }) + @Messages({"AutoIngestDashboard.errorMessage.casePrioritization=Failed to prioritize case \"%s\"."}) private void prioritizeCaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_prioritizeCaseButtonActionPerformed if (pendingTableModel.getRowCount() > 0 && pendingTable.getSelectedRow() >= 0) { setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); @@ -867,7 +896,7 @@ final class AutoIngestDashboard extends JPanel implements Observer { jobsSnapshot = autoIngestMonitor.prioritizeCase(caseName); refreshTables(jobsSnapshot); } catch (AutoIngestMonitor.AutoIngestMonitorException ex) { - String errorMessage = String.format(NbBundle.getMessage(AutoIngestDashboard.class, "AutoIngestDashboard.PrioritizeCaseError"), caseName); + String errorMessage = String.format(Bundle.AutoIngestDashboard_errorMessage_casePrioritization(), caseName); LOGGER.log(Level.SEVERE, errorMessage, ex); MessageNotifyUtil.Message.error(errorMessage); } @@ -879,10 +908,48 @@ final class AutoIngestDashboard extends JPanel implements Observer { new AutoIngestMetricsDialog(this.getTopLevelAncestor()); }//GEN-LAST:event_clusterMetricsButtonActionPerformed + @Messages({"AutoIngestDashboard.errorMessage.jobDeprioritization=Failed to deprioritize job \"%s\"."}) + private void deprioritizeJobButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deprioritizeJobButtonActionPerformed + if (pendingTableModel.getRowCount() > 0 && pendingTable.getSelectedRow() >= 0) { + setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + AutoIngestJob job = (AutoIngestJob) (pendingTableModel.getValueAt(pendingTable.getSelectedRow(), JobsTableModelColumns.JOB.ordinal())); + JobsSnapshot jobsSnapshot; + try { + jobsSnapshot = autoIngestMonitor.deprioritizeJob(job); + refreshTables(jobsSnapshot); + } catch (AutoIngestMonitor.AutoIngestMonitorException ex) { + String errorMessage = String.format(Bundle.AutoIngestDashboard_errorMessage_jobDeprioritization(), job.getManifest().getFilePath()); + LOGGER.log(Level.SEVERE, errorMessage, ex); + MessageNotifyUtil.Message.error(errorMessage); + } + setCursor(Cursor.getDefaultCursor()); + } + }//GEN-LAST:event_deprioritizeJobButtonActionPerformed + + @Messages({"AutoIngestDashboard.errorMessage.caseDeprioritization=Failed to deprioritize case \"%s\"."}) + private void deprioritizeCaseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deprioritizeCaseButtonActionPerformed + if (pendingTableModel.getRowCount() > 0 && pendingTable.getSelectedRow() >= 0) { + setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); + String caseName = (pendingTableModel.getValueAt(pendingTable.getSelectedRow(), JobsTableModelColumns.CASE.ordinal())).toString(); + JobsSnapshot jobsSnapshot; + try { + jobsSnapshot = autoIngestMonitor.deprioritizeCase(caseName); + refreshTables(jobsSnapshot); + } catch (AutoIngestMonitor.AutoIngestMonitorException ex) { + String errorMessage = String.format(Bundle.AutoIngestDashboard_errorMessage_caseDeprioritization(), caseName); + LOGGER.log(Level.SEVERE, errorMessage, ex); + MessageNotifyUtil.Message.error(errorMessage); + } + setCursor(Cursor.getDefaultCursor()); + } + }//GEN-LAST:event_deprioritizeCaseButtonActionPerformed + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton clusterMetricsButton; private javax.swing.JScrollPane completedScrollPane; private javax.swing.JTable completedTable; + private javax.swing.JButton deprioritizeCaseButton; + private javax.swing.JButton deprioritizeJobButton; private javax.swing.JButton jButton1; private javax.swing.JLabel lbCompleted; private javax.swing.JLabel lbPending; diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java index 5260a9cd43..c1c766d139 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestManager.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2017 Basis Technology Corp. + * Copyright 2011-2018 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -132,6 +132,7 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen private static final long JOB_STATUS_EVENT_INTERVAL_SECONDS = 10; private static final String JOB_STATUS_PUBLISHING_THREAD_NAME = "AIM-job-status-event-publisher-%d"; private static final long MAX_MISSED_JOB_STATUS_UPDATES = 10; + private static final int DEFAULT_PRIORITY = 0; private static final java.util.logging.Logger SYS_LOGGER = AutoIngestSystemLogger.getLogger(); private static AutoIngestManager instance; private final AutopsyEventPublisher eventPublisher; @@ -530,7 +531,49 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen } /** + * Removes the priority (set to zero) of all pending ingest jobs for a + * specified case. + * + * @param caseName The name of the case to be deprioritized. + * + * @throws AutoIngestManagerException If there is an error removing the + * priority of the jobs for the case. */ + void deprioritizeCase(final String caseName) throws AutoIngestManagerException { + if (state != State.RUNNING) { + return; + } + + List jobsToDeprioritize = new ArrayList<>(); + synchronized (jobsLock) { + for (AutoIngestJob job : pendingJobs) { + if (job.getManifest().getCaseName().equals(caseName)) { + jobsToDeprioritize.add(job); + } + } + if (!jobsToDeprioritize.isEmpty()) { + for (AutoIngestJob job : jobsToDeprioritize) { + int oldPriority = job.getPriority(); + job.setPriority(DEFAULT_PRIORITY); + try { + this.updateCoordinationServiceManifestNode(job); + } catch (CoordinationServiceException | InterruptedException ex) { + job.setPriority(oldPriority); + throw new AutoIngestManagerException("Error updating case priority", ex); + } + } + } + + Collections.sort(pendingJobs, new AutoIngestJob.PriorityComparator()); + } + + if (!jobsToDeprioritize.isEmpty()) { + new Thread(() -> { + eventPublisher.publishRemotely(new AutoIngestCasePrioritizedEvent(LOCAL_HOST_NAME, caseName)); + }).start(); + } + } + /** * Bumps the priority of all pending ingest jobs for a specified case. * @@ -545,7 +588,7 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen return; } - List prioritizedJobs = new ArrayList<>(); + List jobsToPrioritize = new ArrayList<>(); int maxPriority = 0; synchronized (jobsLock) { for (AutoIngestJob job : pendingJobs) { @@ -553,12 +596,12 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen maxPriority = job.getPriority(); } if (job.getManifest().getCaseName().equals(caseName)) { - prioritizedJobs.add(job); + jobsToPrioritize.add(job); } } - if (!prioritizedJobs.isEmpty()) { + if (!jobsToPrioritize.isEmpty()) { ++maxPriority; - for (AutoIngestJob job : prioritizedJobs) { + for (AutoIngestJob job : jobsToPrioritize) { int oldPriority = job.getPriority(); job.setPriority(maxPriority); try { @@ -573,7 +616,58 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen Collections.sort(pendingJobs, new AutoIngestJob.PriorityComparator()); } - if (!prioritizedJobs.isEmpty()) { + if (!jobsToPrioritize.isEmpty()) { + new Thread(() -> { + eventPublisher.publishRemotely(new AutoIngestCasePrioritizedEvent(LOCAL_HOST_NAME, caseName)); + }).start(); + } + } + + /** + * Removes the priority (set to zero) of an auto ingest job. + * + * @param manifestPath The manifest file path for the job to be + * deprioritized. + * + * @throws AutoIngestManagerException If there is an error removing the + * priority of the job. + */ + void deprioritizeJob(Path manifestPath) throws AutoIngestManagerException { + if (state != State.RUNNING) { + return; + } + + AutoIngestJob jobToDeprioritize = null; + synchronized (jobsLock) { + /* + * Find the job in the pending jobs list. + */ + for (AutoIngestJob job : pendingJobs) { + if (job.getManifest().getFilePath().equals(manifestPath)) { + jobToDeprioritize = job; + } + } + + /* + * Remove the priority and update the coordination service manifest + * node data for the job. + */ + if (null != jobToDeprioritize) { + int oldPriority = jobToDeprioritize.getPriority(); + jobToDeprioritize.setPriority(DEFAULT_PRIORITY); + try { + this.updateCoordinationServiceManifestNode(jobToDeprioritize); + } catch (CoordinationServiceException | InterruptedException ex) { + jobToDeprioritize.setPriority(oldPriority); + throw new AutoIngestManagerException("Error updating job priority", ex); + } + } + + Collections.sort(pendingJobs, new AutoIngestJob.PriorityComparator()); + } + + if (null != jobToDeprioritize) { + final String caseName = jobToDeprioritize.getManifest().getCaseName(); new Thread(() -> { eventPublisher.publishRemotely(new AutoIngestCasePrioritizedEvent(LOCAL_HOST_NAME, caseName)); }).start(); @@ -594,7 +688,7 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen } int maxPriority = 0; - AutoIngestJob prioritizedJob = null; + AutoIngestJob jobToPrioritize = null; synchronized (jobsLock) { /* * Find the job in the pending jobs list and record the highest @@ -605,7 +699,7 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen maxPriority = job.getPriority(); } if (job.getManifest().getFilePath().equals(manifestPath)) { - prioritizedJob = job; + jobToPrioritize = job; } } @@ -613,14 +707,14 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen * Bump the priority by one and update the coordination service * manifest node data for the job. */ - if (null != prioritizedJob) { + if (null != jobToPrioritize) { ++maxPriority; - int oldPriority = prioritizedJob.getPriority(); - prioritizedJob.setPriority(maxPriority); + int oldPriority = jobToPrioritize.getPriority(); + jobToPrioritize.setPriority(maxPriority); try { - this.updateCoordinationServiceManifestNode(prioritizedJob); + this.updateCoordinationServiceManifestNode(jobToPrioritize); } catch (CoordinationServiceException | InterruptedException ex) { - prioritizedJob.setPriority(oldPriority); + jobToPrioritize.setPriority(oldPriority); throw new AutoIngestManagerException("Error updating job priority", ex); } } @@ -628,8 +722,8 @@ final class AutoIngestManager extends Observable implements PropertyChangeListen Collections.sort(pendingJobs, new AutoIngestJob.PriorityComparator()); } - if (null != prioritizedJob) { - final String caseName = prioritizedJob.getManifest().getCaseName(); + if (null != jobToPrioritize) { + final String caseName = jobToPrioritize.getManifest().getCaseName(); new Thread(() -> { eventPublisher.publishRemotely(new AutoIngestCasePrioritizedEvent(LOCAL_HOST_NAME, caseName)); }).start(); diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java index e46a5e43c0..9209fa1147 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestMonitor.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2017 Basis Technology Corp. + * Copyright 2011-2018 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -46,6 +46,7 @@ import org.sleuthkit.autopsy.experimental.autoingest.AutoIngestJob.ProcessingSta final class AutoIngestMonitor extends Observable implements PropertyChangeListener { private static final Logger LOGGER = Logger.getLogger(AutoIngestMonitor.class.getName()); + private static final int DEFAULT_PRIORITY = 0; private static final int NUM_COORD_SVC_QUERY_THREADS = 1; private static final String COORD_SVC_QUERY_THREAD_NAME = "AIM-coord-svc-query-thread-%d"; //NON-NLS private static final int CORRD_SVC_QUERY_INERVAL_MINS = 5; @@ -271,15 +272,59 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen LOGGER.log(Level.SEVERE, String.format("Failed to create a job for '%s'", node), ex); } } - + return newJobsSnapshot; - + } catch (CoordinationServiceException ex) { LOGGER.log(Level.SEVERE, "Failed to get node list from coordination service", ex); return new JobsSnapshot(); } } + /** + * Removes the priority (set to zero) of all pending ingest jobs for a + * specified case. + * + * @param caseName The name of the case to be deprioritized. + * + * @throws AutoIngestMonitorException If there is an error removing the + * priority of the jobs for the case. + * + * @return The latest jobs snapshot. + */ + JobsSnapshot deprioritizeCase(final String caseName) throws AutoIngestMonitorException { + List jobsToDeprioritize = new ArrayList<>(); + + synchronized (jobsLock) { + for (AutoIngestJob pendingJob : jobsSnapshot.getPendingJobs()) { + if (pendingJob.getManifest().getCaseName().equals(caseName)) { + jobsToDeprioritize.add(pendingJob); + } + } + if (!jobsToDeprioritize.isEmpty()) { + for (AutoIngestJob job : jobsToDeprioritize) { + String manifestNodePath = job.getManifest().getFilePath().toString(); + try { + AutoIngestJobNodeData nodeData = new AutoIngestJobNodeData(coordinationService.getNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath)); + nodeData.setPriority(DEFAULT_PRIORITY); + coordinationService.setNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath, nodeData.toArray()); + } catch (AutoIngestJobNodeData.InvalidDataException | CoordinationServiceException | InterruptedException ex) { + throw new AutoIngestMonitorException("Error removing priority for job " + job.toString(), ex); + } + job.setPriority(DEFAULT_PRIORITY); + } + + /* + * Publish a deprioritization event. + */ + new Thread(() -> { + eventPublisher.publishRemotely(new AutoIngestCasePrioritizedEvent(LOCAL_HOST_NAME, caseName)); + }).start(); + } + return jobsSnapshot; + } + } + /** * Bumps the priority of all pending ingest jobs for a specified case. * @@ -287,11 +332,11 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen * * @throws AutoIngestMonitorException If there is an error bumping the * priority of the jobs for the case. - * + * * @return The latest jobs snapshot. */ JobsSnapshot prioritizeCase(final String caseName) throws AutoIngestMonitorException { - List prioritizedJobs = new ArrayList<>(); + List jobsToPrioritize = new ArrayList<>(); int highestPriority = 0; synchronized (jobsLock) { for (AutoIngestJob pendingJob : jobsSnapshot.getPendingJobs()) { @@ -299,12 +344,12 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen highestPriority = pendingJob.getPriority(); } if (pendingJob.getManifest().getCaseName().equals(caseName)) { - prioritizedJobs.add(pendingJob); + jobsToPrioritize.add(pendingJob); } } - if (!prioritizedJobs.isEmpty()) { + if (!jobsToPrioritize.isEmpty()) { ++highestPriority; - for (AutoIngestJob job : prioritizedJobs) { + for (AutoIngestJob job : jobsToPrioritize) { String manifestNodePath = job.getManifest().getFilePath().toString(); try { AutoIngestJobNodeData nodeData = new AutoIngestJobNodeData(coordinationService.getNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath)); @@ -327,20 +372,71 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen } } + /** + * Removes the priority (set to zero) of an auto ingest job. + * + * @param job The job to be deprioritized. + * + * @throws AutoIngestMonitorException If there is an error removing the + * priority of the job. + * + * @return The latest jobs snapshot. + */ + JobsSnapshot deprioritizeJob(AutoIngestJob job) throws AutoIngestMonitorException { + synchronized (jobsLock) { + AutoIngestJob jobToDeprioritize = null; + /* + * Make sure the job is still in the pending jobs queue. + */ + for (AutoIngestJob pendingJob : jobsSnapshot.getPendingJobs()) { + if (pendingJob.equals(job)) { + jobToDeprioritize = job; + break; + } + } + + /* + * If the job was still in the pending jobs queue, bump its + * priority. + */ + if (null != jobToDeprioritize) { + String manifestNodePath = job.getManifest().getFilePath().toString(); + try { + AutoIngestJobNodeData nodeData = new AutoIngestJobNodeData(coordinationService.getNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath)); + nodeData.setPriority(DEFAULT_PRIORITY); + coordinationService.setNodeData(CoordinationService.CategoryNode.MANIFESTS, manifestNodePath, nodeData.toArray()); + } catch (AutoIngestJobNodeData.InvalidDataException | CoordinationServiceException | InterruptedException ex) { + throw new AutoIngestMonitorException("Error removing priority for job " + job.toString(), ex); + } + jobToDeprioritize.setPriority(DEFAULT_PRIORITY); + + /* + * Publish a deprioritization event. + */ + final String caseName = job.getManifest().getCaseName(); + new Thread(() -> { + eventPublisher.publishRemotely(new AutoIngestCasePrioritizedEvent(LOCAL_HOST_NAME, caseName)); + }).start(); + + } + return jobsSnapshot; + } + } + /** * Bumps the priority of an auto ingest job. * * @param job The job to be prioritized. - * + * * @throws AutoIngestMonitorException If there is an error bumping the * priority of the job. - * + * * @return The latest jobs snapshot. */ JobsSnapshot prioritizeJob(AutoIngestJob job) throws AutoIngestMonitorException { synchronized (jobsLock) { int highestPriority = 0; - AutoIngestJob prioritizedJob = null; + AutoIngestJob jobToPrioritize = null; /* * Get the highest known priority and make sure the job is still in * the pending jobs queue. @@ -350,7 +446,7 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen highestPriority = pendingJob.getPriority(); } if (pendingJob.equals(job)) { - prioritizedJob = job; + jobToPrioritize = job; } } @@ -358,7 +454,7 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen * If the job was still in the pending jobs queue, bump its * priority. */ - if (null != prioritizedJob) { + if (null != jobToPrioritize) { ++highestPriority; String manifestNodePath = job.getManifest().getFilePath().toString(); try { @@ -368,7 +464,7 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen } catch (AutoIngestJobNodeData.InvalidDataException | CoordinationServiceException | InterruptedException ex) { throw new AutoIngestMonitorException("Error bumping priority for job " + job.toString(), ex); } - prioritizedJob.setPriority(highestPriority); + jobToPrioritize.setPriority(highestPriority); /* * Publish a prioritization event. @@ -525,7 +621,7 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen } } - + /** * Exception type thrown when there is an error completing an auto ingest * monitor operation. @@ -556,4 +652,4 @@ final class AutoIngestMonitor extends Observable implements PropertyChangeListen } } -} \ No newline at end of file +} diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties index 656ccafb3d..633d069cc8 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/Bundle.properties @@ -227,7 +227,7 @@ AutoIngestDashboard.prioritizeJobButton.text=Prioritize &Job AutoIngestDashboard.prioritizeCaseButton.toolTipText=Move all images associated with a case to top of Pending queue. AutoIngestDashboard.prioritizeCaseButton.text=Prioritize &Case AutoIngestMetricsDialog.reportTextArea.text= -AutoIngestDashboard.clusterMetricsButton.text=Auto Ingest Metrics +AutoIngestDashboard.clusterMetricsButton.text=Auto Ingest &Metrics AutoIngestMetricsDialog.metricsButton.text=Generate Metrics Report AutoIngestMetricsDialog.closeButton.text=Close AutoIngestMetricsDialog.datePicker.toolTipText=Choose a date @@ -236,3 +236,36 @@ ArchiveFilePanel.browseButton.text=Browse ArchiveFilePanel.pathTextField.text= ArchiveFilePanel.errorLabel.text=Error Label AutoIngestMetricsDialog.startingDataLabel.text=Starting Date: +AutoIngestDashboard.deprioritizeJobButton.toolTipText=Move the selected job to the top of the Pending queue. +AutoIngestDashboard.deprioritizeJobButton.text=Deprioritize J&ob +AutoIngestDashboard.deprioritizeCaseButton.text=Deprioritize C&ase +AutoIngestDashboard.deprioritizeCaseButton.toolTipText=Move all images associated with a case to top of Pending queue. +AutoIngestControlPanel.bnDeprioritizeCase.text=Deprioritize Case +AutoIngestControlPanel.bnDeprioritizeJob.text=Deprioritize Job +AutoIngestControlPanel.bnPrioritizeCase.text=Prioritize Case +AutoIngestControlPanel.bnPrioritizeJob.text=Prioritize Job +AutoIngestControlPanel.bnShowProgress.text=Ingest Progress +AutoIngestControlPanel.bnCancelJob.text=&Cancel Job +AutoIngestControlPanel.bnCancelModule.text=Cancel &Module +AutoIngestControlPanel.bnReprocessJob.text=Reprocess Job +AutoIngestControlPanel.bnDeleteCase.text=&Delete Case +AutoIngestControlPanel.bnShowCaseLog.text=Show Case &Log +AutoIngestControlPanel.bnPause.text=Pause +AutoIngestControlPanel.bnRefresh.text=&Refresh +AutoIngestControlPanel.bnOptions.text=&Options +AutoIngestControlPanel.bnOpenLogDir.text=Open System Logs Folder +AutoIngestControlPanel.bnClusterMetrics.text=Auto Ingest Metrics +AutoIngestControlPanel.bnExit.text=&Exit +AutoIngestControlPanel.lbStatus.text=Status: +AutoIngestControlPanel.lbServicesStatus.text=Services Status: +AutoIngestControlPanel.lbPending.text=Pending Jobs +AutoIngestControlPanel.lbRunning.text=Running Jobs +AutoIngestControlPanel.lbCompleted.text=Completed Jobs +AutoIngestControlPanel.tbStatusMessage.text= +AutoIngestControlPanel.tbServicesStatusMessage.text= +AutoIngestControlPanel.bnDeprioritizeJob.toolTipText= +AutoIngestControlPanel.bnDeprioritizeCase.toolTipText= +AutoIngestControlPanel.bnPrioritizeJob.toolTipText=Move this folder to the top of the Pending queue. +AutoIngestControlPanel.bnPrioritizeCase.toolTipText=Move all images associated with a case to top of Pending queue. +AutoIngestControlPanel.bnPrioritizeJob.actionCommand=Prioritize Job +AutoIngestControlPanel.bnDeprioritizeJob.actionCommand=Deprioritize Job diff --git a/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties b/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties index 8da9daefe4..b734326e07 100644 --- a/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties +++ b/branding/core/core.jar/org/netbeans/core/startup/Bundle.properties @@ -1,5 +1,5 @@ #Updated by build script -#Tue, 23 Jan 2018 11:28:07 -0500 +#Wed, 28 Feb 2018 09:59:56 -0500 LBL_splash_window_title=Starting Autopsy SPLASH_HEIGHT=314 SPLASH_WIDTH=538 @@ -8,4 +8,4 @@ SplashRunningTextBounds=0,289,538,18 SplashRunningTextColor=0x0 SplashRunningTextFontSize=19 -currentVersion=Autopsy 4.5.0 +currentVersion=Autopsy 4.6.0 diff --git a/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties b/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties index 5daf2c9d7e..3cf76dea10 100644 --- a/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties +++ b/branding/modules/org-netbeans-core-windows.jar/org/netbeans/core/windows/view/ui/Bundle.properties @@ -1,4 +1,4 @@ #Updated by build script -#Tue, 23 Jan 2018 11:28:07 -0500 -CTL_MainWindow_Title=Autopsy 4.5.0 -CTL_MainWindow_Title_No_Project=Autopsy 4.5.0 +#Wed, 28 Feb 2018 09:59:56 -0500 +CTL_MainWindow_Title=Autopsy 4.6.0 +CTL_MainWindow_Title_No_Project=Autopsy 4.6.0 diff --git a/test/script/regression.py b/test/script/regression.py index 3e9ee2e585..df8173da88 100644 --- a/test/script/regression.py +++ b/test/script/regression.py @@ -82,6 +82,8 @@ AUTOPSY_TEST_CASE = "AutopsyTestCase" Day = 0 +# HTML file name for links of output directories +OUTPUT_DIR_LINK_FILE="output_dir_link.html" def usage(): print ("-f PATH single file") @@ -106,6 +108,10 @@ def main(): if not parse_result: Errors.print_error("The arguments were given wrong") exit(1) + # Remove the output_link_file + if file_exists(OUTPUT_DIR_LINK_FILE): + os.remove(OUTPUT_DIR_LINK_FILE) + test_config = TestConfiguration(args) case_type = test_config.userCaseType.lower() if case_type.startswith('multi'): @@ -874,6 +880,24 @@ class TestConfiguration(object): self.output_dir = make_path(self.output_parent_dir, time.strftime("%Y.%m.%d-%H.%M.%S")) os.makedirs(self.output_dir) + + #write the output_dir to a html file + + linkFile = open(OUTPUT_DIR_LINK_FILE, "a") + index = self.output_dir.find("\\") + linkStr = "Multi test output" + else: + linkStr = linkStr + "\">Single test output" + linkFile.write(linkStr + "\n") + linkFile.close() + self.csv = make_path(self.output_dir, "CSV.txt") self.html_log = make_path(self.output_dir, "AutopsyTestCase.html") log_name = '' @@ -1097,7 +1121,7 @@ class TestResultsDiffer(object): print("This run took " + diff + "% longer to run than the last run.") return False - + class Reports(object): def generate_reports(test_data): """Generate the reports for a single test diff --git a/test/script/tskdbdiff.py b/test/script/tskdbdiff.py index 2cfcc58042..66d8340078 100644 --- a/test/script/tskdbdiff.py +++ b/test/script/tskdbdiff.py @@ -319,9 +319,9 @@ class TskDbDiff(object): id_fs_info_table = build_id_fs_info_table(conn.cursor(), isMultiUser) id_objects_table = build_id_objects_table(conn.cursor(), isMultiUser) id_artifact_types_table = build_id_artifact_types_table(conn.cursor(), isMultiUser) - id_obj_path_table = build_id_obj_path_table(id_files_table, id_objects_table, id_artifact_types_table) + id_reports_table = build_id_reports_table(conn.cursor(), isMultiUser) + id_obj_path_table = build_id_obj_path_table(id_files_table, id_objects_table, id_artifact_types_table, id_reports_table) - #line = normalize_db_entry(line, id_obj_path_table, id_vs_parts_table, id_vs_info_table, id_fs_info_table, id_objects_table) if isMultiUser: # Use PostgreSQL os.environ['PGPASSWORD']=pgSettings.password pgDump = ["pg_dump", "--inserts", "-U", pgSettings.username, "-h", pgSettings.pgHost, "-p", pgSettings.pgPort, "-d", db_file, "-E", "utf-8", "-T", "blackboard_artifacts", "-T", "blackboard_attributes", "-f", "postgreSQLDump.sql"] @@ -340,7 +340,7 @@ class TskDbDiff(object): continue else: dump_line += line - dump_line = normalize_db_entry(dump_line, id_obj_path_table, id_vs_parts_table, id_vs_info_table, id_fs_info_table, id_objects_table) + dump_line = normalize_db_entry(dump_line, id_obj_path_table, id_vs_parts_table, id_vs_info_table, id_fs_info_table, id_objects_table, id_reports_table) db_log.write('%s\n' % dump_line) dump_line = '' postgreSQL_db.close() @@ -352,7 +352,7 @@ class TskDbDiff(object): # Write to the database dump with codecs.open(dump_file, "wb", "utf_8") as db_log: for line in conn.iterdump(): - line = normalize_db_entry(line, id_obj_path_table, id_vs_parts_table, id_vs_info_table, id_fs_info_table, id_objects_table) + line = normalize_db_entry(line, id_obj_path_table, id_vs_parts_table, id_vs_info_table, id_fs_info_table, id_objects_table, id_reports_table) db_log.write('%s\n' % line) # Now sort the file srtcmdlst = ["sort", dump_file, "-o", dump_file] @@ -404,7 +404,7 @@ class PGSettings(object): return self.password -def normalize_db_entry(line, files_table, vs_parts_table, vs_info_table, fs_info_table, objects_table): +def normalize_db_entry(line, files_table, vs_parts_table, vs_info_table, fs_info_table, objects_table, reports_table): """ Make testing more consistent and reasonable by doctoring certain db entries. Args: @@ -464,8 +464,10 @@ def normalize_db_entry(line, files_table, vs_parts_table, vs_info_table, fs_info #if obj_id or parent_id is invalid literal, we simple return the values as it is try: obj_id = int(obj_id) - parent_id = int(parent_id) + if parent_id != 'NULL': + parent_id = int(parent_id) except Exception as e: + print(obj_id, parent_id) return line if obj_id in files_table.keys(): @@ -476,7 +478,20 @@ def normalize_db_entry(line, files_table, vs_parts_table, vs_info_table, fs_info path = vs_info_table[obj_id] elif obj_id in fs_info_table.keys(): path = fs_info_table[obj_id] + elif obj_id in reports_table.keys(): + path = reports_table[obj_id] + # remove host name (for multi-user) and dates/times from path for reports + if path is not None: + if 'ModuleOutput' in path: + # skip past the host name (if any) + path = path[path.find('ModuleOutput'):] + if 'BulkExtractor' in path or 'Smirk' in path: + # chop off the last folder (which contains a date/time) + path = path[:path.rfind('\\')] + if '\\Reports\\AutopsyTestCase HTML Report' in path: + path = 'Reports\\AutopsyTestCase HTML Report' + if parent_id in files_table.keys(): parent_path = files_table[parent_id] elif parent_id in vs_parts_table.keys(): @@ -485,7 +500,14 @@ def normalize_db_entry(line, files_table, vs_parts_table, vs_info_table, fs_info parent_path = vs_info_table[parent_id] elif parent_id in fs_info_table.keys(): parent_path = fs_info_table[parent_id] + elif parent_id == 'NULL': + parent_path = "NULL" + # Remove host name (for multi-user) from parent_path + if parent_path is not None: + if 'ModuleOutput' in parent_path: + # skip past the host name (if any) + parent_path = parent_path[parent_path.find('ModuleOutput'):] if path and parent_path: return newLine + path + ', ' + parent_path + ', ' + ', '.join(fields_list[2:]) + ');' @@ -590,20 +612,35 @@ def build_id_artifact_types_table(db_cursor, isPostgreSQL): mapping = dict([(row[0], row[1]) for row in sql_select_execute(db_cursor, isPostgreSQL, "SELECT blackboard_artifacts.artifact_obj_id, blackboard_artifact_types.type_name FROM blackboard_artifacts INNER JOIN blackboard_artifact_types ON blackboard_artifact_types.artifact_type_id = blackboard_artifacts.artifact_type_id ")]) return mapping +def build_id_reports_table(db_cursor, isPostgreSQL): + """Build the map of report object ids to report path. -def build_id_obj_path_table(files_table, objects_table, artifacts_table): + Args: + db_cursor: the database cursor + """ + # for each row in the reports table in the db, create an obj_id -> path map + mapping = dict([(row[0], row[1]) for row in sql_select_execute(db_cursor, isPostgreSQL, "SELECT obj_id, path FROM reports")]) + return mapping + + +def build_id_obj_path_table(files_table, objects_table, artifacts_table, reports_table): """Build the map of object ids to artifact ids. Args: files_table: obj_id, path objects_table: obj_id, par_obj_id, type artifacts_table: obj_id, artifact_type_name + reports_table: obj_id, path """ - # make a copy of files_table and updated it with new data from artifats_table + # make a copy of files_table and update it with new data from artifacts_table and reports_table mapping = files_table.copy() for k, v in objects_table.items(): - if k not in mapping.keys(): # If the mapping table doesn't have data for obj_id(k), we use it's par_obj_id's path+name plus it's artifact_type name as path - if k in artifacts_table.keys(): + if k not in mapping.keys(): # If the mapping table doesn't have data for obj_id(k) i.e. the object is not a file... + if k in reports_table.keys(): # For a report we use the report path + par_obj_id = v[0] + if par_obj_id is not None: + mapping[k] = reports_table[k] + elif k in artifacts_table.keys(): # For an artifact we use it's par_obj_id's path+name plus it's artifact_type name par_obj_id = v[0] path = mapping[par_obj_id] mapping[k] = path + "/" + artifacts_table[k] @@ -641,7 +678,7 @@ def main(): output_db = sys.argv.pop(0) gold_db = sys.argv.pop(0) except: - print("usage: tskdbdiff [OUPUT DB PATH] [GOLD DB PATH]") + print("usage: tskdbdiff [OUTPUT DB PATH] [GOLD DB PATH]") sys.exit(1) db_diff = TskDbDiff(output_db, gold_db, output_dir=".")