mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
Pointing to correct bundle file
This commit is contained in:
parent
39e9c7fd03
commit
2278e71f37
@ -463,3 +463,4 @@
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
||||
|
@ -1,465 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.6" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="lbPending" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="pendingScrollPane" min="-2" pref="920" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="bnPrioritizeCase" min="-2" pref="117" max="-2" attributes="0"/>
|
||||
<Component id="bnPrioritizeFolder" min="-2" pref="117" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="50" max="-2" attributes="0"/>
|
||||
<Component id="bnPause" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="50" max="-2" attributes="0"/>
|
||||
<Component id="bnRefresh" linkSize="1" min="-2" pref="100" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="50" max="-2" attributes="0"/>
|
||||
<Component id="bnOptions" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="50" max="-2" attributes="0"/>
|
||||
<Component id="bnOpenLogDir" linkSize="1" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="50" max="-2" attributes="0"/>
|
||||
<Component id="bnExit" linkSize="1" min="-2" pref="94" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="runningScrollPane" min="-2" pref="920" max="-2" attributes="0"/>
|
||||
<Component id="completedScrollPane" min="-2" pref="920" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="bnCancelJob" linkSize="1" pref="117" max="32767" attributes="0"/>
|
||||
<Component id="bnShowProgress" linkSize="1" pref="116" max="32767" attributes="0"/>
|
||||
<Component id="bnCancelModule" linkSize="1" alignment="0" pref="117" max="32767" attributes="0"/>
|
||||
<Component id="bnDeleteCase" linkSize="1" alignment="0" pref="117" max="32767" attributes="0"/>
|
||||
<Component id="bnShowCaseLog" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="lbStatus" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="tbStatusMessage" min="-2" pref="861" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="lbCompleted" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lbRunning" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="lbServicesStatus" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="tbServicesStatusMessage" min="-2" pref="861" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="lbStatus" alignment="3" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="tbStatusMessage" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="lbServicesStatus" alignment="3" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Component id="tbServicesStatusMessage" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lbPending" min="-2" pref="23" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pendingScrollPane" min="-2" pref="215" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="82" max="-2" attributes="0"/>
|
||||
<Component id="bnPrioritizeCase" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="bnPrioritizeFolder" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lbRunning" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace min="-2" pref="34" max="-2" attributes="0"/>
|
||||
<Component id="bnShowProgress" linkSize="2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="bnCancelJob" linkSize="2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="bnCancelModule" linkSize="2" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="runningScrollPane" min="-2" pref="133" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="102" max="-2" attributes="0"/>
|
||||
<Component id="bnDeleteCase" linkSize="2" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="bnShowCaseLog" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="lbCompleted" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="completedScrollPane" min="-2" pref="179" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
|
||||
<Component id="bnExit" linkSize="2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="bnOpenLogDir" linkSize="2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="bnPause" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="bnRefresh" linkSize="2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="bnOptions" linkSize="2" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Container class="javax.swing.JScrollPane" name="pendingScrollPane">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTable" name="pendingTable">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="pendingTableModel" type="code"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.pendingTable.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="autoResizeMode" type="int" value="4"/>
|
||||
<Property name="rowHeight" type="int" value="20" postCode="pendingTable.setSelectionModel(new DefaultListSelectionModel() {
 private static final long serialVersionUID = 1L;
 @Override
 public void setSelectionInterval(int index0, int index1) {
 if (index0 == pendingTable.getSelectedRow()) {
 pendingTable.clearSelection();
 } else {
 super.setSelectionInterval(index0, index1);
 }
 }
});"/>
|
||||
<Property name="selectionModel" type="javax.swing.ListSelectionModel" editor="org.netbeans.modules.form.editors2.JTableSelectionModelEditor">
|
||||
<JTableSelectionModel selectionMode="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JScrollPane" name="runningScrollPane">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTable" name="runningTable">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="runningTableModel" type="code"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.runningTable.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="autoResizeMode" type="int" value="4"/>
|
||||
<Property name="rowHeight" type="int" value="20" postCode="runningTable.setSelectionModel(new DefaultListSelectionModel() {
 private static final long serialVersionUID = 1L;
 @Override
 public void setSelectionInterval(int index0, int index1) {
 if (index0 == runningTable.getSelectedRow()) {
 runningTable.clearSelection();
 } else {
 super.setSelectionInterval(index0, index1);
 }
 }
});"/>
|
||||
<Property name="selectionModel" type="javax.swing.ListSelectionModel" editor="org.netbeans.modules.form.editors2.JTableSelectionModelEditor">
|
||||
<JTableSelectionModel selectionMode="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JScrollPane" name="completedScrollPane">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JTable" name="completedTable">
|
||||
<Properties>
|
||||
<Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
|
||||
<Connection code="completedTableModel" type="code"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.completedTable.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="autoResizeMode" type="int" value="4"/>
|
||||
<Property name="rowHeight" type="int" value="20" postCode="completedTable.setSelectionModel(new DefaultListSelectionModel() {
 private static final long serialVersionUID = 1L;
 @Override
 public void setSelectionInterval(int index0, int index1) {
 if (index0 == completedTable.getSelectedRow()) {
 completedTable.clearSelection();
 } else {
 super.setSelectionInterval(index0, index1);
 }
 }
});"/>
|
||||
<Property name="selectionModel" type="javax.swing.ListSelectionModel" editor="org.netbeans.modules.form.editors2.JTableSelectionModelEditor">
|
||||
<JTableSelectionModel selectionMode="0"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Component class="javax.swing.JButton" name="bnCancelJob">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnCancelJob.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnCancelJob.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnCancelJobActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnDeleteCase">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnDeleteCase.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnDeleteCase.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnDeleteCaseActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbPending">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.lbPending.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbRunning">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.lbRunning.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbCompleted">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.lbCompleted.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnRefresh">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnRefresh.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnRefresh.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnRefreshActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnCancelModule">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnCancelModule.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnCancelModule.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnCancelModuleActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnExit">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnExit.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnExit.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnExitActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnOptions">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnOptions.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnOptions.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="enabled" type="boolean" value="false"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnOptionsActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnShowProgress">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnShowProgress.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnShowProgress.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnShowProgressActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnPause">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnPause.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnPause.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnPauseActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnPrioritizeCase">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnPrioritizeCase.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnPrioritizeCase.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnPrioritizeCaseActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnShowCaseLog">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnShowCaseLog.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnShowCaseLog.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnShowCaseLogActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbStatusMessage">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="12" style="1"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.tbStatusMessage.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbStatus">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.lbStatus.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnPrioritizeFolder">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnPrioritizeFolder.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="toolTipText" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.bnPrioritizeFolder.toolTipText" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnPrioritizeFolderActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lbServicesStatus">
|
||||
<Properties>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="14" style="0"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.lbServicesStatus.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="tbServicesStatusMessage">
|
||||
<Properties>
|
||||
<Property name="editable" type="boolean" value="false"/>
|
||||
<Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
|
||||
<Font name="Tahoma" size="12" style="1"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/autoingest/Bundle.properties" key="AutoIngestDashboard.tbServicesStatusMessage.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
||||
<Border info="null"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="bnOpenLogDir">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||
<ResourceString bundle="viking/autoingest/Bundle.properties" key="AutoIngestDashboard.bnOpenLogDir.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="bnOpenLogDirActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
@ -1,254 +0,0 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2015 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> 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.autoingest;
|
||||
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import javax.swing.SwingUtilities;
|
||||
import org.openide.filesystems.FileObject;
|
||||
import org.openide.filesystems.FileUtil;
|
||||
import org.openide.util.actions.CallableSystemAction;
|
||||
import org.sleuthkit.autopsy.casemodule.AddImageAction;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
import org.sleuthkit.autopsy.casemodule.CaseActionException;
|
||||
import org.sleuthkit.autopsy.casemodule.CaseNewAction;
|
||||
import org.sleuthkit.autopsy.core.UserPreferences;
|
||||
import org.sleuthkit.autopsy.coordinationservice.CoordinationService;
|
||||
import org.sleuthkit.autopsy.coordinationservice.CoordinationService.CoordinationServiceException;
|
||||
|
||||
|
||||
/**
|
||||
* Handles opening, locking, and unlocking cases in review mode. Instances of
|
||||
* this class are tightly coupled to the Autopsy "current case" concept and the
|
||||
* Autopsy UI, and cases must be opened by code executing in the event
|
||||
* dispatch thread (EDT). Because of the tight coupling to the UI, exception
|
||||
* messages are deliberately user-friendly.
|
||||
*/
|
||||
final class ReviewModeCaseManager implements PropertyChangeListener {
|
||||
|
||||
/*
|
||||
* Provides uniform exceptions with user-friendly error messages.
|
||||
*/
|
||||
final class ReviewModeCaseManagerException extends Exception {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private ReviewModeCaseManagerException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
private ReviewModeCaseManagerException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static final String ROOT_NAMESPACE = "autopsy"; //ELTODO - remove this after AIM is moved into Autopsy. It belongs there.
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ReviewModeCaseManager.class.getName());
|
||||
private static ReviewModeCaseManager instance;
|
||||
private CoordinationService.Lock currentCaseLock;
|
||||
|
||||
/**
|
||||
* Gets the review mode case manager.
|
||||
*
|
||||
* @return The review mode case manager singleton.
|
||||
*/
|
||||
synchronized static ReviewModeCaseManager getInstance() {
|
||||
if (instance == null) {
|
||||
/*
|
||||
* Two stage construction is used here to avoid allowing "this"
|
||||
* reference to escape from the constructor via registering as an
|
||||
* PropertyChangeListener. This is to ensure that a partially
|
||||
* constructed manager is not published to other threads.
|
||||
*/
|
||||
instance = new ReviewModeCaseManager();
|
||||
Case.addPropertyChangeListener(instance);
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a review mode case manager to handles opening, locking, and
|
||||
* unlocking cases in review mode. Instances of this class are tightly
|
||||
* coupled to the Autopsy "current case" concept and the Autopsy UI,
|
||||
* and cases must be opened by code executing in the event dispatch thread
|
||||
* (EDT). Because of the tight coupling to the UI, exception messages are
|
||||
* deliberately user-friendly.
|
||||
*
|
||||
*/
|
||||
private ReviewModeCaseManager() {
|
||||
/*
|
||||
* Disable the new case action because review mode is only for looking
|
||||
* at cases created by automated ingest.
|
||||
*/
|
||||
CallableSystemAction.get(CaseNewAction.class).setEnabled(false);
|
||||
|
||||
/*
|
||||
* Permanently delete the "Open Recent Cases" item in the "File" menu.
|
||||
* This is quite drastic, as it also affects Autopsy standalone mode on
|
||||
* this machine, but review mode is only for looking at cases created by
|
||||
* automated ingest.
|
||||
*/
|
||||
FileObject root = FileUtil.getConfigRoot();
|
||||
FileObject openRecentCasesMenu = root.getFileObject("Menu/Case/OpenRecentCase");
|
||||
if (openRecentCasesMenu != null) {
|
||||
try {
|
||||
openRecentCasesMenu.delete();
|
||||
} catch (IOException ex) {
|
||||
ReviewModeCaseManager.logger.log(Level.WARNING, "Unable to remove Open Recent Cases file menu item", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Gets a list of the cases in the top level case folder used by automated
|
||||
* ingest.
|
||||
*/
|
||||
List<AutoIngestCase> getCases() {
|
||||
List<AutoIngestCase> cases = new ArrayList<>();
|
||||
List<Path> caseFolders = PathUtils.findCaseFolders(Paths.get(UserPreferences.getAutoModeResultsFolder()));
|
||||
for (Path caseFolderPath : caseFolders) {
|
||||
try {
|
||||
/*
|
||||
* Skip case folders that have been logically deleted, i.e.,
|
||||
* case folders where DELETED state file were written because
|
||||
* physical deletion of the case folder failed.
|
||||
*/
|
||||
if (!StateFile.exists(caseFolderPath, StateFile.Type.DELETED)) {
|
||||
cases.add(new AutoIngestCase(caseFolderPath));
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.SEVERE, String.format("Error checking for LOCKED state file in %s", caseFolderPath), ex);
|
||||
}
|
||||
}
|
||||
return cases;
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to open a case as the current case. Assumes it is called by code
|
||||
* executing in the event dispatch thread (EDT).
|
||||
*
|
||||
* @param caseMetadataFilePath Path to the case metadata file.
|
||||
*
|
||||
* @throws ReviewModeCaseManagerException
|
||||
*/
|
||||
/*
|
||||
* TODO (RC): With a little work, the lock acquisition/release could be done by
|
||||
* a thread in a single thread executor, removing the "do it in the EDT"
|
||||
* requirement
|
||||
*/
|
||||
synchronized void openCaseInEDT(Path caseMetadataFilePath) throws ReviewModeCaseManagerException {
|
||||
Path caseFolderPath = caseMetadataFilePath.getParent();
|
||||
try {
|
||||
/*
|
||||
* Acquire a lock on the case folder. If the lock cannot be
|
||||
* acquired, the case cannot be opened.
|
||||
*/
|
||||
//ELTODO currentCaseLock = CoordinationService.getInstance(AutoIngestManager.ROOT_NAMESPACE).tryGetSharedLock(CoordinationService.CategoryNode.CASES, caseFolderPath.toString());
|
||||
currentCaseLock = CoordinationService.getInstance(ROOT_NAMESPACE).tryGetSharedLock(CoordinationService.CategoryNode.CASES, caseFolderPath.toString());
|
||||
if (null == currentCaseLock) {
|
||||
throw new ReviewModeCaseManagerException("Could not get shared access to multi-user case folder");
|
||||
}
|
||||
|
||||
/*
|
||||
* Open the case.
|
||||
*/
|
||||
Case.open(caseMetadataFilePath.toString());
|
||||
|
||||
/**
|
||||
* Disable the add data source action in review mode. This has to be
|
||||
* done here because Case.open() calls Case.doCaseChange() and the
|
||||
* latter method enables the action. Since Case.doCaseChange() enables
|
||||
* the menus on EDT by calling SwingUtilities.invokeLater(), we have
|
||||
* to do the same thing here to maintain the order of execution.
|
||||
*/
|
||||
SwingUtilities.invokeLater(() -> {
|
||||
CallableSystemAction.get(AddImageAction.class).setEnabled(false);
|
||||
});
|
||||
|
||||
} catch (CoordinationServiceException | ReviewModeCaseManagerException | CaseActionException ex) {
|
||||
/*
|
||||
* Release the coordination service lock on the case folder.
|
||||
*/
|
||||
try {
|
||||
if (currentCaseLock != null) {
|
||||
currentCaseLock.release();
|
||||
currentCaseLock = null;
|
||||
}
|
||||
} catch (CoordinationService.CoordinationServiceException exx) {
|
||||
logger.log(Level.SEVERE, String.format("Error deleting legacy LOCKED state file for case at %s", caseFolderPath), exx);
|
||||
}
|
||||
|
||||
if (ex instanceof CoordinationServiceException) {
|
||||
throw new ReviewModeCaseManagerException("Could not get access to the case folder from the coordination service, contact administrator", ex);
|
||||
} else if (ex instanceof IOException) {
|
||||
throw new ReviewModeCaseManagerException("Could not write to the case folder, contact adminstrator", ex);
|
||||
} else if (ex instanceof CaseActionException) {
|
||||
/*
|
||||
* CaseActionExceptions have user friendly error messages.
|
||||
*/
|
||||
throw new ReviewModeCaseManagerException(String.format("Could not open the case (%s), contract administrator", ex.getMessage()), ex);
|
||||
} else if (ex instanceof ReviewModeCaseManagerException) {
|
||||
throw (ReviewModeCaseManagerException) ex;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
if (evt.getPropertyName().equals(Case.Events.CURRENT_CASE.toString())
|
||||
&& null != evt.getOldValue()
|
||||
&& null == evt.getNewValue()) {
|
||||
/*
|
||||
* When a case is closed, release the coordination service lock on
|
||||
* the case folder. This must be done in the EDT because it was
|
||||
* acquired in the EDT via openCase().
|
||||
*/
|
||||
if (null != currentCaseLock) {
|
||||
try {
|
||||
SwingUtilities.invokeAndWait(() -> {
|
||||
try {
|
||||
currentCaseLock.release();
|
||||
currentCaseLock = null;
|
||||
} catch (CoordinationService.CoordinationServiceException ex) {
|
||||
logger.log(Level.SEVERE, String.format("Failed to release the coordination service lock with path %s", currentCaseLock.getNodePath()), ex);
|
||||
currentCaseLock = null;
|
||||
}
|
||||
});
|
||||
} catch (InterruptedException | InvocationTargetException ex) {
|
||||
logger.log(Level.SEVERE, String.format("Failed to release the coordination service lock with path %s", currentCaseLock.getNodePath()), ex);
|
||||
currentCaseLock = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1,645 +0,0 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2015 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> 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.autoingest;
|
||||
|
||||
import java.awt.Desktop;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.List;
|
||||
import javax.swing.JPanel;
|
||||
import java.awt.EventQueue;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Date;
|
||||
import java.util.concurrent.ScheduledThreadPoolExecutor;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Level;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.event.ListSelectionEvent;
|
||||
import javax.swing.table.DefaultTableModel;
|
||||
import javax.swing.table.TableColumn;
|
||||
import org.sleuthkit.autopsy.casemodule.StartupWindowProvider;
|
||||
import java.awt.Cursor;
|
||||
import java.io.IOException;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.casemodule.CaseMetadata;
|
||||
import org.sleuthkit.autopsy.autoingest.ReviewModeCaseManager.ReviewModeCaseManagerException;
|
||||
import org.sleuthkit.autopsy.configuration.OptionsDialog;
|
||||
|
||||
/**
|
||||
* A panel that allows a user to open cases created by automated ingest.
|
||||
*/
|
||||
public final class ReviewModeCasePanel extends JPanel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final Logger logger = Logger.getLogger(ReviewModeCasePanel.class.getName());
|
||||
private static final AutoIngestCase.ReverseDateLastAccessedComparator reverseDateModifiedComparator = new AutoIngestCase.ReverseDateLastAccessedComparator();
|
||||
private static final int CASE_COL_MIN_WIDTH = 30;
|
||||
private static final int CASE_COL_MAX_WIDTH = 2000;
|
||||
private static final int CASE_COL_PREFERRED_WIDTH = 300;
|
||||
private static final int TIME_COL_MIN_WIDTH = 40;
|
||||
private static final int TIME_COL_MAX_WIDTH = 250;
|
||||
private static final int TIME_COL_PREFERRED_WIDTH = 160;
|
||||
private static final int STATUS_COL_MIN_WIDTH = 55;
|
||||
private static final int STATUS_COL_MAX_WIDTH = 250;
|
||||
private static final int STATUS_COL_PREFERRED_WIDTH = 60;
|
||||
private static final int MILLISECONDS_TO_WAIT_BEFORE_STARTING = 500;
|
||||
private static final int MILLISECONDS_TO_WAIT_BETWEEN_UPDATES = 30000;
|
||||
private ScheduledThreadPoolExecutor casesTableRefreshExecutor;
|
||||
|
||||
/*
|
||||
* The JTable table model for the cases table presented by this view is
|
||||
* defined by the following string, enum, and array.
|
||||
*
|
||||
* TODO (RC): Consider unifying this stuff in an enum as in
|
||||
* AutoIngestDashboard to make it less error prone.
|
||||
*/
|
||||
private static final String CASE_HEADER = org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.CaseHeaderText");
|
||||
private static final String CREATEDTIME_HEADER = org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.CreatedTimeHeaderText");
|
||||
private static final String COMPLETEDTIME_HEADER = org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.LastAccessedTimeHeaderText");
|
||||
private static final String STATUS_ICON_HEADER = org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.StatusIconHeaderText");
|
||||
private static final String OUTPUT_FOLDER_HEADER = org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.OutputFolderHeaderText");
|
||||
|
||||
enum COLUMN_HEADERS {
|
||||
|
||||
CASE,
|
||||
CREATEDTIME,
|
||||
COMPLETEDTIME,
|
||||
STATUS_ICON,
|
||||
OUTPUTFOLDER
|
||||
}
|
||||
private final String[] columnNames = {CASE_HEADER, CREATEDTIME_HEADER, COMPLETEDTIME_HEADER, STATUS_ICON_HEADER, OUTPUT_FOLDER_HEADER};
|
||||
private DefaultTableModel caseTableModel;
|
||||
private Path currentlySelectedCase = null;
|
||||
|
||||
/**
|
||||
* Constructs a panel that allows a user to open cases created by automated
|
||||
* ingest.
|
||||
*/
|
||||
public ReviewModeCasePanel(JDialog parent) {
|
||||
caseTableModel = new DefaultTableModel(columnNames, 0) {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public boolean isCellEditable(int row, int column) {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
initComponents();
|
||||
|
||||
/*
|
||||
* Configure the columns of the cases table.
|
||||
*/
|
||||
TableColumn theColumn;
|
||||
theColumn = casesTable.getColumn(CASE_HEADER);
|
||||
theColumn.setCellRenderer(new GrayableCellRenderer());
|
||||
theColumn.setMinWidth(CASE_COL_MIN_WIDTH);
|
||||
theColumn.setMaxWidth(CASE_COL_MAX_WIDTH);
|
||||
theColumn.setPreferredWidth(CASE_COL_PREFERRED_WIDTH);
|
||||
theColumn.setWidth(CASE_COL_PREFERRED_WIDTH);
|
||||
|
||||
theColumn = casesTable.getColumn(CREATEDTIME_HEADER);
|
||||
theColumn.setCellRenderer(new LongDateCellRenderer());
|
||||
theColumn.setMinWidth(TIME_COL_MIN_WIDTH);
|
||||
theColumn.setMaxWidth(TIME_COL_MAX_WIDTH);
|
||||
theColumn.setPreferredWidth(TIME_COL_PREFERRED_WIDTH);
|
||||
theColumn.setWidth(TIME_COL_PREFERRED_WIDTH);
|
||||
|
||||
theColumn = casesTable.getColumn(COMPLETEDTIME_HEADER);
|
||||
theColumn.setCellRenderer(new LongDateCellRenderer());
|
||||
theColumn.setMinWidth(TIME_COL_MIN_WIDTH);
|
||||
theColumn.setMaxWidth(TIME_COL_MAX_WIDTH);
|
||||
theColumn.setPreferredWidth(TIME_COL_PREFERRED_WIDTH);
|
||||
theColumn.setWidth(TIME_COL_PREFERRED_WIDTH);
|
||||
|
||||
theColumn = casesTable.getColumn(STATUS_ICON_HEADER);
|
||||
theColumn.setCellRenderer(new CaseStatusIconCellRenderer());
|
||||
theColumn.setMinWidth(STATUS_COL_MIN_WIDTH);
|
||||
theColumn.setMaxWidth(STATUS_COL_MAX_WIDTH);
|
||||
theColumn.setPreferredWidth(STATUS_COL_PREFERRED_WIDTH);
|
||||
theColumn.setWidth(STATUS_COL_PREFERRED_WIDTH);
|
||||
|
||||
casesTable.removeColumn(casesTable.getColumn(OUTPUT_FOLDER_HEADER));
|
||||
|
||||
/*
|
||||
* Listen for row selection changes and set button state for the current
|
||||
* selection.
|
||||
*/
|
||||
casesTable.getSelectionModel().addListSelectionListener((ListSelectionEvent e) -> {
|
||||
//Ignore extra messages.
|
||||
if (e.getValueIsAdjusting()) {
|
||||
return;
|
||||
}
|
||||
setButtons();
|
||||
});
|
||||
|
||||
/*
|
||||
* Add a window state listener that starts and stops refreshing of the
|
||||
* cases table.
|
||||
*/
|
||||
if (parent != null) {
|
||||
parent.addWindowListener(new WindowAdapter() {
|
||||
@Override
|
||||
public void windowClosing(WindowEvent e) {
|
||||
stopCasesTableRefreshes();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void windowActivated(WindowEvent e) {
|
||||
startCasesTableRefreshes();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void windowClosed(WindowEvent e) {
|
||||
stopCasesTableRefreshes();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Start doing periodic refreshes of the cases table.
|
||||
*/
|
||||
private void startCasesTableRefreshes() {
|
||||
if (null == casesTableRefreshExecutor) {
|
||||
casesTableRefreshExecutor = new ScheduledThreadPoolExecutor(1);
|
||||
this.casesTableRefreshExecutor.scheduleAtFixedRate(() -> {
|
||||
refreshCasesTable();
|
||||
}, MILLISECONDS_TO_WAIT_BEFORE_STARTING, MILLISECONDS_TO_WAIT_BETWEEN_UPDATES, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Stop doing periodic refreshes of the cases table.
|
||||
*/
|
||||
private void stopCasesTableRefreshes() {
|
||||
if (null != casesTableRefreshExecutor) {
|
||||
casesTableRefreshExecutor.shutdown();
|
||||
}
|
||||
this.casesTableRefreshExecutor = null;
|
||||
}
|
||||
|
||||
/*
|
||||
* Updates the view presented by the panel.
|
||||
*/
|
||||
public void updateView() {
|
||||
Thread thread = new Thread(() -> {
|
||||
refreshCasesTable();
|
||||
});
|
||||
thread.start();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the list of cases known to the review mode cases manager and
|
||||
* refreshes the cases table.
|
||||
*/
|
||||
private void refreshCasesTable() {
|
||||
try {
|
||||
currentlySelectedCase = getSelectedCase();
|
||||
List<AutoIngestCase> theModel = ReviewModeCaseManager.getInstance().getCases();
|
||||
EventQueue.invokeLater(new CaseTableRefreshTask(theModel));
|
||||
} catch (Exception ex) {
|
||||
logger.log(Level.SEVERE, "Unexpected exception in refreshCasesTable", ex); //NON-NLS
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the current selection in the cases table.
|
||||
*
|
||||
* @return A path representing the current selected case, null if there is
|
||||
* no selection.
|
||||
*/
|
||||
private Path getSelectedCase() {
|
||||
try {
|
||||
int selectedRow = casesTable.getSelectedRow();
|
||||
if (selectedRow >= 0 && selectedRow < casesTable.getRowCount()) {
|
||||
return Paths.get(caseTableModel.getValueAt(selectedRow, COLUMN_HEADERS.CASE.ordinal()).toString());
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
return null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the current selection in the cases table.
|
||||
*
|
||||
* @param path The case folder path of the case to select.
|
||||
*/
|
||||
private void setSelectedCase(Path path) {
|
||||
if (path != null) {
|
||||
try {
|
||||
for (int row = 0; row < casesTable.getRowCount(); ++row) {
|
||||
Path temp = Paths.get(caseTableModel.getValueAt(row, COLUMN_HEADERS.CASE.ordinal()).toString());
|
||||
if (temp.compareTo(path) == 0) { // found it
|
||||
casesTable.setRowSelectionInterval(row, row);
|
||||
return;
|
||||
}
|
||||
}
|
||||
} catch (Exception ignored) {
|
||||
casesTable.clearSelection();
|
||||
}
|
||||
}
|
||||
casesTable.clearSelection();
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables/disables the Open and Show Log buttons based on the case selected
|
||||
* in the cases table.
|
||||
*/
|
||||
private void setButtons() {
|
||||
boolean enabled = casesTable.getSelectedRow() >= 0 && casesTable.getSelectedRow() < casesTable.getRowCount();
|
||||
bnOpen.setEnabled(enabled);
|
||||
bnShowLog.setEnabled(enabled);
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens a case.
|
||||
*
|
||||
* @param caseMetadataFilePath The path to the case metadata file.
|
||||
*/
|
||||
private void openCase(Path caseMetadataFilePath) {
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||
try {
|
||||
ReviewModeCaseManager.getInstance().openCaseInEDT(caseMetadataFilePath);
|
||||
stopCasesTableRefreshes();
|
||||
StartupWindowProvider.getInstance().close();
|
||||
} catch (ReviewModeCaseManagerException ex) {
|
||||
logger.log(Level.SEVERE, String.format("Error while opening case with case metadata file path %s", caseMetadataFilePath), ex);
|
||||
/*
|
||||
* ReviewModeCaseManagerExceptions have user-friendly error
|
||||
* messages.
|
||||
*/
|
||||
JOptionPane.showMessageDialog(WindowManager.getDefault().getMainWindow(),
|
||||
ex.getMessage(),
|
||||
org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.cannotOpenCase"),
|
||||
JOptionPane.ERROR_MESSAGE);
|
||||
|
||||
} finally {
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* A task that refreshes the cases table using a list of auto ingest cases.
|
||||
*/
|
||||
private class CaseTableRefreshTask implements Runnable {
|
||||
|
||||
private final List<AutoIngestCase> cases;
|
||||
|
||||
CaseTableRefreshTask(List<AutoIngestCase> cases) {
|
||||
setButtons();
|
||||
this.cases = cases;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@Override
|
||||
public void run() {
|
||||
cases.sort(reverseDateModifiedComparator);
|
||||
caseTableModel.setRowCount(0);
|
||||
long now = new Date().getTime();
|
||||
for (AutoIngestCase autoIngestCase : cases) {
|
||||
if (passesTimeFilter(now, autoIngestCase.getLastAccessedDate().getTime())) {
|
||||
caseTableModel.addRow(new Object[]{
|
||||
autoIngestCase.getCaseName(),
|
||||
autoIngestCase.getCreationDate(),
|
||||
autoIngestCase.getLastAccessedDate(),
|
||||
autoIngestCase.getStatus(),
|
||||
autoIngestCase.getCaseFolderPath().toString()});
|
||||
}
|
||||
}
|
||||
setSelectedCase(currentlySelectedCase);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether or not a time satisfies a time filter defined by
|
||||
* this panel's time filter radio buttons.
|
||||
*
|
||||
* @param currentTime The current date and time in milliseconds from the
|
||||
* Unix epoch.
|
||||
* @param inputTime The date and time to be tested as milliseconds
|
||||
* from the Unix epoch.
|
||||
*/
|
||||
private boolean passesTimeFilter(long currentTime, long inputTime) {
|
||||
long numberOfUnits = 10;
|
||||
long multiplier = 1;
|
||||
if (rbAllCases.isSelected()) {
|
||||
return true;
|
||||
} else {
|
||||
if (rbMonths.isSelected()) {
|
||||
multiplier = 31;
|
||||
} else {
|
||||
if (rbWeeks.isSelected()) {
|
||||
multiplier = 7;
|
||||
} else {
|
||||
if (rbDays.isSelected()) {
|
||||
multiplier = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ((currentTime - inputTime) / (1000 * 60 * 60 * 24)) < (numberOfUnits * multiplier);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
rbGroupHistoryLength = new javax.swing.ButtonGroup();
|
||||
bnOpen = new javax.swing.JButton();
|
||||
scrollPaneTable = new javax.swing.JScrollPane();
|
||||
casesTable = new javax.swing.JTable();
|
||||
bnRefresh = new javax.swing.JButton();
|
||||
panelFilter = new javax.swing.JPanel();
|
||||
rbAllCases = new javax.swing.JRadioButton();
|
||||
rbMonths = new javax.swing.JRadioButton();
|
||||
rbWeeks = new javax.swing.JRadioButton();
|
||||
rbDays = new javax.swing.JRadioButton();
|
||||
rbGroupLabel = new javax.swing.JLabel();
|
||||
bnShowLog = new javax.swing.JButton();
|
||||
bnOptions = new javax.swing.JButton();
|
||||
|
||||
setName("Completed Cases"); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(bnOpen, org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.bnOpen.text")); // NOI18N
|
||||
bnOpen.setEnabled(false);
|
||||
bnOpen.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
bnOpenActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
casesTable.setAutoCreateRowSorter(true);
|
||||
casesTable.setModel(caseTableModel);
|
||||
casesTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_ALL_COLUMNS);
|
||||
casesTable.setRowHeight(20);
|
||||
casesTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
|
||||
casesTable.addMouseListener(new java.awt.event.MouseAdapter() {
|
||||
public void mouseClicked(java.awt.event.MouseEvent evt) {
|
||||
casesTableMouseClicked(evt);
|
||||
}
|
||||
});
|
||||
scrollPaneTable.setViewportView(casesTable);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(bnRefresh, org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.bnRefresh.text")); // NOI18N
|
||||
bnRefresh.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
bnRefreshActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
rbGroupHistoryLength.add(rbAllCases);
|
||||
rbAllCases.setSelected(true);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(rbAllCases, org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.rbAllCases.text")); // NOI18N
|
||||
rbAllCases.addItemListener(new java.awt.event.ItemListener() {
|
||||
public void itemStateChanged(java.awt.event.ItemEvent evt) {
|
||||
rbAllCasesItemStateChanged(evt);
|
||||
}
|
||||
});
|
||||
|
||||
rbGroupHistoryLength.add(rbMonths);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(rbMonths, org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.rbMonths.text")); // NOI18N
|
||||
rbMonths.addItemListener(new java.awt.event.ItemListener() {
|
||||
public void itemStateChanged(java.awt.event.ItemEvent evt) {
|
||||
rbMonthsItemStateChanged(evt);
|
||||
}
|
||||
});
|
||||
|
||||
rbGroupHistoryLength.add(rbWeeks);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(rbWeeks, org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.rbWeeks.text")); // NOI18N
|
||||
rbWeeks.addItemListener(new java.awt.event.ItemListener() {
|
||||
public void itemStateChanged(java.awt.event.ItemEvent evt) {
|
||||
rbWeeksItemStateChanged(evt);
|
||||
}
|
||||
});
|
||||
|
||||
rbGroupHistoryLength.add(rbDays);
|
||||
org.openide.awt.Mnemonics.setLocalizedText(rbDays, org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.rbDays.text")); // NOI18N
|
||||
rbDays.setName(""); // NOI18N
|
||||
rbDays.addItemListener(new java.awt.event.ItemListener() {
|
||||
public void itemStateChanged(java.awt.event.ItemEvent evt) {
|
||||
rbDaysItemStateChanged(evt);
|
||||
}
|
||||
});
|
||||
|
||||
rbGroupLabel.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
|
||||
org.openide.awt.Mnemonics.setLocalizedText(rbGroupLabel, org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.rbGroupLabel.text")); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout panelFilterLayout = new javax.swing.GroupLayout(panelFilter);
|
||||
panelFilter.setLayout(panelFilterLayout);
|
||||
panelFilterLayout.setHorizontalGroup(
|
||||
panelFilterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(panelFilterLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(panelFilterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(rbGroupLabel)
|
||||
.addComponent(rbAllCases)
|
||||
.addComponent(rbMonths)
|
||||
.addComponent(rbWeeks)
|
||||
.addComponent(rbDays))
|
||||
.addContainerGap(34, Short.MAX_VALUE))
|
||||
);
|
||||
panelFilterLayout.setVerticalGroup(
|
||||
panelFilterLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelFilterLayout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addComponent(rbGroupLabel)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(rbDays)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(rbWeeks)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(rbMonths)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||
.addComponent(rbAllCases)
|
||||
.addContainerGap())
|
||||
);
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(bnShowLog, org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.bnShowLog.text")); // NOI18N
|
||||
bnShowLog.setToolTipText(org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.bnShowLog.toolTipText")); // NOI18N
|
||||
bnShowLog.setEnabled(false);
|
||||
bnShowLog.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
bnShowLogActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(bnOptions, org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "ReviewModeCasePanel.bnOptions.text")); // NOI18N
|
||||
bnOptions.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
bnOptionsActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addContainerGap()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(13, 13, 13)
|
||||
.addComponent(bnOpen, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(bnRefresh)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(bnShowLog)
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(bnOptions)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addComponent(panelFilter, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addGap(20, 20, 20))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(scrollPaneTable, javax.swing.GroupLayout.DEFAULT_SIZE, 1007, Short.MAX_VALUE)
|
||||
.addContainerGap())))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(43, 43, 43)
|
||||
.addComponent(scrollPaneTable, javax.swing.GroupLayout.PREFERRED_SIZE, 450, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(panelFilter, javax.swing.GroupLayout.PREFERRED_SIZE, 130, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addContainerGap())
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(bnOpen)
|
||||
.addComponent(bnRefresh)
|
||||
.addComponent(bnShowLog)
|
||||
.addComponent(bnOptions))
|
||||
.addGap(36, 36, 36))))
|
||||
);
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
/**
|
||||
* Open button action
|
||||
*
|
||||
* @param evt -- The event that caused this to be called
|
||||
*/
|
||||
private void bnOpenActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnOpenActionPerformed
|
||||
Path caseMetadataFilePath = Paths.get((String) caseTableModel.getValueAt(casesTable.getSelectedRow(),
|
||||
COLUMN_HEADERS.OUTPUTFOLDER.ordinal()),
|
||||
caseTableModel.getValueAt(casesTable.getSelectedRow(), COLUMN_HEADERS.CASE.ordinal()) + CaseMetadata.getFileExtension());
|
||||
openCase(caseMetadataFilePath);
|
||||
}//GEN-LAST:event_bnOpenActionPerformed
|
||||
|
||||
/**
|
||||
* Refresh button action
|
||||
*
|
||||
* @param evt -- The event that caused this to be called
|
||||
*/
|
||||
private void bnRefreshActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_bnRefreshActionPerformed
|
||||
{//GEN-HEADEREND:event_bnRefreshActionPerformed
|
||||
updateView();
|
||||
}//GEN-LAST:event_bnRefreshActionPerformed
|
||||
|
||||
private void rbDaysItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_rbDaysItemStateChanged
|
||||
if (rbDays.isSelected()) {
|
||||
updateView();
|
||||
}
|
||||
}//GEN-LAST:event_rbDaysItemStateChanged
|
||||
|
||||
private void rbAllCasesItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_rbAllCasesItemStateChanged
|
||||
if (rbAllCases.isSelected()) {
|
||||
updateView();
|
||||
}
|
||||
}//GEN-LAST:event_rbAllCasesItemStateChanged
|
||||
|
||||
private void rbMonthsItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_rbMonthsItemStateChanged
|
||||
if (rbMonths.isSelected()) {
|
||||
updateView();
|
||||
}
|
||||
}//GEN-LAST:event_rbMonthsItemStateChanged
|
||||
|
||||
private void rbWeeksItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_rbWeeksItemStateChanged
|
||||
if (rbWeeks.isSelected()) {
|
||||
updateView();
|
||||
}
|
||||
}//GEN-LAST:event_rbWeeksItemStateChanged
|
||||
|
||||
private void bnShowLogActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnShowLogActionPerformed
|
||||
int selectedRow = casesTable.getSelectedRow();
|
||||
int rowCount = casesTable.getRowCount();
|
||||
if (selectedRow >= 0 && selectedRow < rowCount) {
|
||||
String thePath = (String) caseTableModel.getValueAt(selectedRow, COLUMN_HEADERS.OUTPUTFOLDER.ordinal());
|
||||
Path pathToLog = AutoIngestJobLogger.getLogPath(Paths.get(thePath));
|
||||
try {
|
||||
if (pathToLog.toFile().exists()) {
|
||||
Desktop.getDesktop().edit(pathToLog.toFile());
|
||||
} else {
|
||||
JOptionPane.showMessageDialog(this, org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "DisplayLogDialog.cannotFindLog"),
|
||||
org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "DisplayLogDialog.unableToShowLogFile"), JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
logger.log(Level.SEVERE, String.format("Error attempting to open case auto ingest log file %s", pathToLog), ex);
|
||||
JOptionPane.showMessageDialog(this,
|
||||
org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "DisplayLogDialog.cannotOpenLog"),
|
||||
org.openide.util.NbBundle.getMessage(ReviewModeCasePanel.class, "DisplayLogDialog.unableToShowLogFile"),
|
||||
JOptionPane.PLAIN_MESSAGE);
|
||||
}
|
||||
}
|
||||
}//GEN-LAST:event_bnShowLogActionPerformed
|
||||
|
||||
private void bnOptionsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnOptionsActionPerformed
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||
OptionsDialog dialog = new OptionsDialog(this.getTopLevelAncestor(), true);
|
||||
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
|
||||
}//GEN-LAST:event_bnOptionsActionPerformed
|
||||
|
||||
private void casesTableMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_casesTableMouseClicked
|
||||
if (evt.getClickCount() == 2) {
|
||||
Path caseMetadataFilePath = Paths.get((String) caseTableModel.getValueAt(casesTable.getSelectedRow(),
|
||||
COLUMN_HEADERS.OUTPUTFOLDER.ordinal()),
|
||||
caseTableModel.getValueAt(casesTable.getSelectedRow(), COLUMN_HEADERS.CASE.ordinal()) + CaseMetadata.getFileExtension());
|
||||
openCase(caseMetadataFilePath);
|
||||
}
|
||||
}//GEN-LAST:event_casesTableMouseClicked
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton bnOpen;
|
||||
private javax.swing.JButton bnOptions;
|
||||
private javax.swing.JButton bnRefresh;
|
||||
private javax.swing.JButton bnShowLog;
|
||||
private javax.swing.JTable casesTable;
|
||||
private javax.swing.JPanel panelFilter;
|
||||
private javax.swing.JRadioButton rbAllCases;
|
||||
private javax.swing.JRadioButton rbDays;
|
||||
private javax.swing.ButtonGroup rbGroupHistoryLength;
|
||||
private javax.swing.JLabel rbGroupLabel;
|
||||
private javax.swing.JRadioButton rbMonths;
|
||||
private javax.swing.JRadioButton rbWeeks;
|
||||
private javax.swing.JScrollPane scrollPaneTable;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user