mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 11:07:43 +00:00
Merge pull request #2632 from rcordovano/develop
Small fixes for Case and ProgressPanel
This commit is contained in:
commit
f993bb5ebc
@ -568,7 +568,8 @@ public class Case {
|
||||
*
|
||||
* IMPORTANT: This method should not be called in the event dispatch thread
|
||||
* (EDT).
|
||||
* @throws CaseActionException
|
||||
*
|
||||
* @throws CaseActionException
|
||||
*/
|
||||
@Messages({
|
||||
"# {0} - exception message", "Case.closeException.couldNotCloseCase=Error closing case: {0}",
|
||||
@ -637,6 +638,7 @@ public class Case {
|
||||
"# {0} - exception message", "Case.deleteException.couldNotDeleteCase=Could not delete case: {0}",
|
||||
"Case.progressIndicatorTitle.deletingCase=Deleting Case",
|
||||
"Case.exceptionMessage.cannotDeleteCurrentCase=Cannot delete current case, it must be closed first",
|
||||
"Case.progressMessage.checkingForOtherUser=Checking to see if another user has the case open...",
|
||||
"Case.progressMessage.deletingTextIndex=Deleting text index...",
|
||||
"Case.progressMessage.deletingCaseDatabase=Deleting case database...",
|
||||
"Case.exceptionMessage.cancelled=Cancelled by user"
|
||||
@ -672,7 +674,7 @@ public class Case {
|
||||
* First, acquire an exclusive case directory lock. The case
|
||||
* cannot be deleted if another node has it open.
|
||||
*/
|
||||
progressIndicator.start(Bundle.Case_progressMessage_acquiringLocks());
|
||||
progressIndicator.start(Bundle.Case_progressMessage_checkingForOtherUser());
|
||||
try (CoordinationService.Lock dirLock = CoordinationService.getInstance().tryGetExclusiveLock(CategoryNode.CASES, metadata.getCaseDirectory())) {
|
||||
assert (null != dirLock);
|
||||
|
||||
@ -1604,7 +1606,7 @@ public class Case {
|
||||
"Case.progressIndicatorTitle.creatingCase=Creating Case",
|
||||
"Case.progressIndicatorCancelButton.label=Cancel",
|
||||
"Case.progressMessage.preparing=Preparing...",
|
||||
"Case.progressMessage.acquiringLocks=<html>Preparing to open case resources.<br>This may take time if another user is upgrading the case.</html>"
|
||||
"Case.progressMessage.openingCaseResources=<html>Preparing to open case resources.<br>This may take time if another user is upgrading the case.</html>"
|
||||
})
|
||||
private void open(String caseDir, String caseDisplayName, String caseNumber, String examiner, CaseType caseType) throws CaseActionException {
|
||||
/*
|
||||
@ -1652,7 +1654,7 @@ public class Case {
|
||||
* First, acquire an exclusive case name lock to prevent two
|
||||
* nodes from creating the same case at the same time.
|
||||
*/
|
||||
progressIndicator.start(Bundle.Case_progressMessage_acquiringLocks());
|
||||
progressIndicator.start(Bundle.Case_progressMessage_openingCaseResources());
|
||||
try (CoordinationService.Lock nameLock = Case.acquireExclusiveCaseNameLock(caseName)) {
|
||||
assert (null != nameLock);
|
||||
/*
|
||||
@ -1872,7 +1874,7 @@ public class Case {
|
||||
* as long as this node has this case open, in order to prevent
|
||||
* deletion of the case by another node.
|
||||
*/
|
||||
progressIndicator.start(Bundle.Case_progressMessage_acquiringLocks());
|
||||
progressIndicator.start(Bundle.Case_progressMessage_openingCaseResources());
|
||||
acquireSharedCaseDirLock(caseMetadata.getCaseDirectory());
|
||||
/*
|
||||
* Next, acquire an exclusive case resources lock to ensure only
|
||||
@ -2131,6 +2133,7 @@ public class Case {
|
||||
* @param progressIndicator A progress indicator.
|
||||
*/
|
||||
@Messages({
|
||||
"Case.progressMessage.closingCaseResources=<html>Preparing to close case resources.<br>This may take time if another user is upgrading the case.</html>",
|
||||
"Case.progressMessage.notifyingCaseEventSubscribers=Notifying case event subscribers...",
|
||||
"Case.progressMessage.clearingTempDirectory=Clearing case temp directory...",
|
||||
"Case.progressMessage.closingCaseLevelServices=Closing case-level services...",
|
||||
@ -2139,7 +2142,6 @@ public class Case {
|
||||
"Case.progressMessage.closingCaseDatabase=Closing case database...",
|
||||
"Case.progressMessage.tearingDownTskErrorReporting=Tearing down SleuthKit error reporting..."
|
||||
})
|
||||
|
||||
private void close() throws CaseActionException {
|
||||
/*
|
||||
* Set up either a GUI progress indicator or a logging progress
|
||||
@ -2172,7 +2174,7 @@ public class Case {
|
||||
* node at a time can create/open/upgrade/close the case
|
||||
* resources.
|
||||
*/
|
||||
progressIndicator.start(Bundle.Case_progressMessage_acquiringLocks());
|
||||
progressIndicator.start(Bundle.Case_progressMessage_closingCaseResources());
|
||||
try (CoordinationService.Lock resourcesLock = acquireExclusiveCaseResourcesLock(caseMetadata.getCaseName())) {
|
||||
assert (null != resourcesLock);
|
||||
close(progressIndicator);
|
||||
|
@ -28,6 +28,7 @@ class ProgressPanel extends javax.swing.JPanel {
|
||||
ProgressPanel() {
|
||||
initComponents();
|
||||
this.progressBar.setMinimum(0);
|
||||
this.progressBar.setIndeterminate(true);
|
||||
}
|
||||
|
||||
void setMessage(String message) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user