5187 clean up third panel a bit

This commit is contained in:
William Schaefer 2019-06-21 15:16:44 -04:00
parent c5b5107da5
commit 9806356725
4 changed files with 65 additions and 63 deletions

View File

@ -121,7 +121,6 @@ ConfigVisualPanel1.configureFolderRadioButton.text_1=Configure in a folder:
ConfigVisualPanel1.descriptionTextArea.text=Select a location you will configure for use by the Logical Imager. A config file will be created if one does not already exist, and a copy of the Logical Imager executable will copied to this location. This will also be the location where the Logical Imager executable creates folders containing output. ConfigVisualPanel1.descriptionTextArea.text=Select a location you will configure for use by the Logical Imager. A config file will be created if one does not already exist, and a copy of the Logical Imager executable will copied to this location. This will also be the location where the Logical Imager executable creates folders containing output.
ConfigVisualPanel1.refreshButton.text=Refresh ConfigVisualPanel1.refreshButton.text=Refresh
ConfigVisualPanel3.saveButton.text=Save ConfigVisualPanel3.saveButton.text=Save
ConfigVisualPanel3.descriptionTextArea.text=Save your configuration and the Logical imager executalbe to the location specified. ConfigVisualPanel3.configLabel.text=Logical Imager config file save status:
ConfigVisualPanel3.configLabel.text=Logical Imager config file: ConfigVisualPanel3.executableLabel.text=Logical Imager executable save status:
ConfigVisualPanel3.executableLabel.text=Logical Imager executable:
ConfigVisualPanel3.executableStatusLabel.text= ConfigVisualPanel3.executableStatusLabel.text=

View File

@ -40,10 +40,13 @@ ConfigVisualPanel2.editRuleSet=Edit rule
ConfigVisualPanel2.ok=OK ConfigVisualPanel2.ok=OK
ConfigVisualPanel2.rulesTable.columnModel.title0=Rule Name ConfigVisualPanel2.rulesTable.columnModel.title0=Rule Name
ConfigVisualPanel2.rulesTable.columnModel.title1=Description ConfigVisualPanel2.rulesTable.columnModel.title1=Description
ConfigVisualPanel3.copyStatus.error=Unable to save file. ConfigVisualPanel3.copyStatus.error=Unable to save file
ConfigVisualPanel3.copyStatus.notSaved=File has not been saved. ConfigVisualPanel3.copyStatus.notSaved=File has not been saved
ConfigVisualPanel3.copyStatus.saved=Saved ConfigVisualPanel3.copyStatus.saved=Saved
ConfigVisualPanel3.copyStatus.savingInProgress=Saving file, please wait. ConfigVisualPanel3.copyStatus.savingInProgress=Saving file, please wait
# {0} - configurationFile
# {1} - configurationLocation
ConfigVisualPanel3.description.text=Press Save to write your configuration file {0} and the Logical imager executable to {1}.
# {0} - configFilename # {0} - configFilename
ConfigVisualPanel3.failedToSaveConfigMsg=Failed to save configuration file: {0} ConfigVisualPanel3.failedToSaveConfigMsg=Failed to save configuration file: {0}
ConfigVisualPanel3.failedToSaveExeMsg=Failed to save tsk_logical_imager.exe file ConfigVisualPanel3.failedToSaveExeMsg=Failed to save tsk_logical_imager.exe file
@ -182,9 +185,8 @@ ConfigVisualPanel1.configureFolderRadioButton.text_1=Configure in a folder:
ConfigVisualPanel1.descriptionTextArea.text=Select a location you will configure for use by the Logical Imager. A config file will be created if one does not already exist, and a copy of the Logical Imager executable will copied to this location. This will also be the location where the Logical Imager executable creates folders containing output. ConfigVisualPanel1.descriptionTextArea.text=Select a location you will configure for use by the Logical Imager. A config file will be created if one does not already exist, and a copy of the Logical Imager executable will copied to this location. This will also be the location where the Logical Imager executable creates folders containing output.
ConfigVisualPanel1.refreshButton.text=Refresh ConfigVisualPanel1.refreshButton.text=Refresh
ConfigVisualPanel3.saveButton.text=Save ConfigVisualPanel3.saveButton.text=Save
ConfigVisualPanel3.descriptionTextArea.text=Save your configuration and the Logical imager executalbe to the location specified. ConfigVisualPanel3.configLabel.text=Logical Imager config file save status:
ConfigVisualPanel3.configLabel.text=Logical Imager config file: ConfigVisualPanel3.executableLabel.text=Logical Imager executable save status:
ConfigVisualPanel3.executableLabel.text=Logical Imager executable:
ConfigVisualPanel3.executableStatusLabel.text= ConfigVisualPanel3.executableStatusLabel.text=
NewRuleSetPanel.attributeRule.description=Search for files based on one or more attributes or metadata fields. NewRuleSetPanel.attributeRule.description=Search for files based on one or more attributes or metadata fields.
NewRuleSetPanel.attributeRule.name=Attribute NewRuleSetPanel.attributeRule.name=Attribute

View File

@ -17,29 +17,27 @@
<DimensionLayout dim="0"> <DimensionLayout dim="0">
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="0" attributes="0">
<Group type="102" attributes="0"> <Group type="102" attributes="0">
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="32767" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0"> <Group type="103" groupAlignment="1" max="-2" attributes="0">
<Component id="descriptionScrollPane" alignment="0" pref="380" max="32767" attributes="0"/> <Component id="configLabel" max="32767" attributes="0"/>
<Group type="102" attributes="0"> <Component id="executableLabel" min="-2" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" attributes="0">
<Component id="saveButton" alignment="0" min="-2" pref="79" max="-2" attributes="0"/>
<Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="executableLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace type="unrelated" max="-2" attributes="0"/>
<Component id="executableStatusLabel" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<Component id="configLabel" min="-2" max="-2" attributes="0"/>
<EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="configStatusLabel" min="-2" pref="160" max="-2" attributes="0"/>
</Group>
</Group>
</Group>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>
</Group> </Group>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="1" attributes="0">
<Component id="configStatusLabel" min="-2" pref="237" max="-2" attributes="0"/>
<Component id="executableStatusLabel" min="-2" pref="238" max="-2" attributes="0"/>
</Group>
<EmptySpace min="0" pref="10" max="32767" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/>
<Component id="descriptionScrollPane" max="32767" attributes="0"/>
<EmptySpace max="-2" attributes="0"/>
</Group>
<Group type="102" alignment="0" attributes="0">
<EmptySpace max="32767" attributes="0"/>
<Component id="saveButton" min="-2" pref="101" max="-2" attributes="0"/>
<EmptySpace max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
@ -48,19 +46,19 @@
<Group type="102" alignment="0" attributes="0"> <Group type="102" alignment="0" attributes="0">
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Component id="descriptionScrollPane" min="-2" max="-2" attributes="0"/> <Component id="descriptionScrollPane" min="-2" max="-2" attributes="0"/>
<EmptySpace min="-2" pref="57" max="-2" attributes="0"/> <EmptySpace type="separate" max="-2" attributes="0"/>
<Component id="saveButton" min="-2" max="-2" attributes="0"/> <Component id="saveButton" min="-2" max="-2" attributes="0"/>
<EmptySpace pref="64" max="32767" attributes="0"/> <EmptySpace type="separate" max="-2" attributes="0"/>
<Group type="103" groupAlignment="0" max="-2" attributes="0"> <Group type="103" groupAlignment="0" max="-2" attributes="0">
<Component id="configLabel" max="32767" attributes="0"/> <Component id="configLabel" max="32767" attributes="0"/>
<Component id="configStatusLabel" max="32767" attributes="0"/> <Component id="configStatusLabel" min="-2" pref="14" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace max="-2" attributes="0"/> <EmptySpace max="-2" attributes="0"/>
<Group type="103" groupAlignment="3" attributes="0"> <Group type="103" groupAlignment="3" attributes="0">
<Component id="executableLabel" alignment="3" min="-2" max="-2" attributes="0"/> <Component id="executableLabel" alignment="3" min="-2" max="-2" attributes="0"/>
<Component id="executableStatusLabel" alignment="3" min="-2" pref="14" max="-2" attributes="0"/> <Component id="executableStatusLabel" alignment="3" min="-2" pref="14" max="-2" attributes="0"/>
</Group> </Group>
<EmptySpace min="-2" pref="35" max="-2" attributes="0"/> <EmptySpace pref="120" max="32767" attributes="0"/>
</Group> </Group>
</Group> </Group>
</DimensionLayout> </DimensionLayout>
@ -95,9 +93,6 @@
</Property> </Property>
<Property name="lineWrap" type="boolean" value="true"/> <Property name="lineWrap" type="boolean" value="true"/>
<Property name="rows" type="int" value="5"/> <Property name="rows" type="int" value="5"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="org/sleuthkit/autopsy/logicalimager/configuration/Bundle.properties" key="ConfigVisualPanel3.descriptionTextArea.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)"/>
</Property>
<Property name="wrapStyleWord" type="boolean" value="true"/> <Property name="wrapStyleWord" type="boolean" value="true"/>
<Property name="enabled" type="boolean" value="false"/> <Property name="enabled" type="boolean" value="false"/>
</Properties> </Properties>

View File

@ -33,6 +33,7 @@ import java.util.List;
import java.util.logging.Level; import java.util.logging.Level;
import javax.swing.JOptionPane; import javax.swing.JOptionPane;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.openide.util.NbBundle; import org.openide.util.NbBundle;
import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.coreutils.Logger;
@ -48,10 +49,10 @@ public class ConfigVisualPanel3 extends javax.swing.JPanel {
/** /**
* Creates new form ConfigVisualPanel3 * Creates new form ConfigVisualPanel3
*/ */
@NbBundle.Messages({"ConfigVisualPanel3.copyStatus.notSaved=File has not been saved.", @NbBundle.Messages({"ConfigVisualPanel3.copyStatus.notSaved=File has not been saved",
"ConfigVisualPanel3.copyStatus.savingInProgress=Saving file, please wait.", "ConfigVisualPanel3.copyStatus.savingInProgress=Saving file, please wait",
"ConfigVisualPanel3.copyStatus.saved=Saved", "ConfigVisualPanel3.copyStatus.saved=Saved",
"ConfigVisualPanel3.copyStatus.error=Unable to save file."}) "ConfigVisualPanel3.copyStatus.error=Unable to save file"})
public ConfigVisualPanel3() { public ConfigVisualPanel3() {
initComponents(); initComponents();
configStatusLabel.setText(Bundle.ConfigVisualPanel3_copyStatus_notSaved()); configStatusLabel.setText(Bundle.ConfigVisualPanel3_copyStatus_notSaved());
@ -71,9 +72,9 @@ public class ConfigVisualPanel3 extends javax.swing.JPanel {
void saveConfigFile() { void saveConfigFile() {
boolean saveSuccess = true; boolean saveSuccess = true;
executableStatusLabel.setForeground(Color.BLACK); executableStatusLabel.setForeground(Color.BLACK);
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
configStatusLabel.setText(Bundle.ConfigVisualPanel3_copyStatus_savingInProgress()); configStatusLabel.setText(Bundle.ConfigVisualPanel3_copyStatus_savingInProgress());
executableStatusLabel.setText(Bundle.ConfigVisualPanel3_copyStatus_savingInProgress()); executableStatusLabel.setText(Bundle.ConfigVisualPanel3_copyStatus_savingInProgress());
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
GsonBuilder gsonBuilder = new GsonBuilder() GsonBuilder gsonBuilder = new GsonBuilder()
.setPrettyPrinting() .setPrettyPrinting()
.excludeFieldsWithoutExposeAnnotation() .excludeFieldsWithoutExposeAnnotation()
@ -158,7 +159,6 @@ public class ConfigVisualPanel3 extends javax.swing.JPanel {
descriptionTextArea.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N descriptionTextArea.setFont(new java.awt.Font("Tahoma", 0, 11)); // NOI18N
descriptionTextArea.setLineWrap(true); descriptionTextArea.setLineWrap(true);
descriptionTextArea.setRows(5); descriptionTextArea.setRows(5);
descriptionTextArea.setText(org.openide.util.NbBundle.getMessage(ConfigVisualPanel3.class, "ConfigVisualPanel3.descriptionTextArea.text")); // NOI18N
descriptionTextArea.setWrapStyleWord(true); descriptionTextArea.setWrapStyleWord(true);
descriptionTextArea.setEnabled(false); descriptionTextArea.setEnabled(false);
descriptionScrollPane.setViewportView(descriptionTextArea); descriptionScrollPane.setViewportView(descriptionTextArea);
@ -173,41 +173,41 @@ public class ConfigVisualPanel3 extends javax.swing.JPanel {
this.setLayout(layout); this.setLayout(layout);
layout.setHorizontalGroup( layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(configLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(executableLabel))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(configStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 237, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(executableStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 238, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(0, 10, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addContainerGap() .addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(descriptionScrollPane)
.addComponent(descriptionScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(saveButton, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
.addComponent(executableLabel)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(executableStatusLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
.addComponent(configLabel)
.addGap(18, 18, 18)
.addComponent(configStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 160, javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap()) .addContainerGap())
.addGroup(layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(saveButton, javax.swing.GroupLayout.PREFERRED_SIZE, 101, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
); );
layout.setVerticalGroup( layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup() .addGroup(layout.createSequentialGroup()
.addContainerGap() .addContainerGap()
.addComponent(descriptionScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(descriptionScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(57, 57, 57) .addGap(18, 18, 18)
.addComponent(saveButton) .addComponent(saveButton)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 64, Short.MAX_VALUE) .addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(configLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(configLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(configStatusLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(configStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(executableLabel) .addComponent(executableLabel)
.addComponent(executableStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(executableStatusLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(35, 35, 35)) .addContainerGap(120, Short.MAX_VALUE))
); );
}// </editor-fold>//GEN-END:initComponents }// </editor-fold>//GEN-END:initComponents
@ -226,8 +226,14 @@ public class ConfigVisualPanel3 extends javax.swing.JPanel {
private javax.swing.JButton saveButton; private javax.swing.JButton saveButton;
// End of variables declaration//GEN-END:variables // End of variables declaration//GEN-END:variables
void setConfigInfoForSaving(String configFilename, LogicalImagerConfig config) { @NbBundle.Messages({
this.configFilename = configFilename; "# {0} - configurationFile",
"# {1} - configurationLocation",
"ConfigVisualPanel3.description.text=Press Save to write your configuration file {0} and the Logical imager executable to {1}."
})
void setConfigInfoForSaving(String configFile, LogicalImagerConfig config) {
this.configFilename = configFile;
this.config = config; this.config = config;
descriptionTextArea.setText(Bundle.ConfigVisualPanel3_description_text(FilenameUtils.getName(configFilename), FilenameUtils.getPath(configFilename)));
} }
} }