mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-13 00:16:16 +00:00
Hash DB ingest config: fix setting syncing in widgets, simplify NSRL widget
This commit is contained in:
parent
fba30dde20
commit
3ad3e64952
@ -8,7 +8,6 @@ HashDbSimplePanel.notableValLabel.text=-
|
|||||||
HashDbMgmtPanel.addNotableButton.text=Add Known Bad Database
|
HashDbMgmtPanel.addNotableButton.text=Add Known Bad Database
|
||||||
HashDbMgmtPanel.removeNotableButton.text=Remove Selected
|
HashDbMgmtPanel.removeNotableButton.text=Remove Selected
|
||||||
HashDbSimplePanel.jLabel1.text=Select known bad databases to use during ingest:
|
HashDbSimplePanel.jLabel1.text=Select known bad databases to use during ingest:
|
||||||
HashDbSimplePanel.jLabel2.text=NSRL Database:
|
|
||||||
HashDbMgmtPanel.nsrlNameLabel.text=Not Configured
|
HashDbMgmtPanel.nsrlNameLabel.text=Not Configured
|
||||||
HashDbMgmtPanel.setNSRLButton.text=Change
|
HashDbMgmtPanel.setNSRLButton.text=Change
|
||||||
HashDbMgmtPanel.jLabel1.text=Known Bad Database(s):
|
HashDbMgmtPanel.jLabel1.text=Known Bad Database(s):
|
||||||
@ -55,3 +54,5 @@ HashDbSearchPanel.errorField.text=Error: Not all files have been hashed.
|
|||||||
HashDbSearchPanel.saveBox.text=Remember Hashes
|
HashDbSearchPanel.saveBox.text=Remember Hashes
|
||||||
HashDbSearchPanel.cancelButton.text=Cancel
|
HashDbSearchPanel.cancelButton.text=Cancel
|
||||||
HashDbSimplePanel.calcHashesButton.text=Calculate hashes even if no hash database is selected
|
HashDbSimplePanel.calcHashesButton.text=Calculate hashes even if no hash database is selected
|
||||||
|
HashDbSimplePanel.nsrlDbLabel.text=NSRL Database:
|
||||||
|
HashDbSimplePanel.nsrlDbLabelVal.text=-
|
||||||
|
@ -17,13 +17,18 @@
|
|||||||
<DimensionLayout dim="0">
|
<DimensionLayout dim="0">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="jScrollPane1" alignment="1" pref="0" max="32767" attributes="1"/>
|
<Component id="jScrollPane1" alignment="1" pref="0" max="32767" attributes="1"/>
|
||||||
<Component id="jScrollPane2" alignment="0" pref="0" max="32767" attributes="0"/>
|
|
||||||
<Group type="102" attributes="0">
|
<Group type="102" attributes="0">
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
|
|
||||||
<Component id="calcHashesButton" alignment="0" min="-2" max="-2" attributes="0"/>
|
<Component id="calcHashesButton" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
|
<Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0">
|
||||||
|
<Group type="102" alignment="0" attributes="0">
|
||||||
|
<Component id="nsrlDbLabel" min="-2" max="-2" attributes="0"/>
|
||||||
|
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||||
|
<Component id="nsrlDbLabelVal" max="32767" attributes="0"/>
|
||||||
|
</Group>
|
||||||
|
<Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
<EmptySpace max="32767" attributes="0"/>
|
<EmptySpace max="32767" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
@ -32,14 +37,15 @@
|
|||||||
<DimensionLayout dim="1">
|
<DimensionLayout dim="1">
|
||||||
<Group type="103" groupAlignment="0" attributes="0">
|
<Group type="103" groupAlignment="0" attributes="0">
|
||||||
<Group type="102" alignment="0" attributes="0">
|
<Group type="102" alignment="0" attributes="0">
|
||||||
<Component id="jLabel2" min="-2" max="-2" attributes="0"/>
|
<Group type="103" groupAlignment="3" attributes="0">
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<Component id="nsrlDbLabel" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
<Component id="jScrollPane2" min="-2" pref="20" max="-2" attributes="0"/>
|
<Component id="nsrlDbLabelVal" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||||
|
</Group>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
<Component id="jLabel1" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="jScrollPane1" min="-2" pref="19" max="-2" attributes="0"/>
|
<Component id="jScrollPane1" min="-2" pref="68" max="-2" attributes="0"/>
|
||||||
<EmptySpace pref="25" max="32767" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
<Component id="calcHashesButton" min="-2" max="-2" attributes="0"/>
|
<Component id="calcHashesButton" min="-2" max="-2" attributes="0"/>
|
||||||
<EmptySpace max="-2" attributes="0"/>
|
<EmptySpace max="-2" attributes="0"/>
|
||||||
</Group>
|
</Group>
|
||||||
@ -79,38 +85,13 @@
|
|||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JLabel" name="jLabel2">
|
<Component class="javax.swing.JLabel" name="nsrlDbLabel">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
<ResourceString bundle="org/sleuthkit/autopsy/hashdatabase/Bundle.properties" key="HashDbSimplePanel.jLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
<ResourceString bundle="org/sleuthkit/autopsy/hashdatabase/Bundle.properties" key="HashDbSimplePanel.nsrlDbLabel.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
<Container class="javax.swing.JScrollPane" name="jScrollPane2">
|
|
||||||
<Properties>
|
|
||||||
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
|
|
||||||
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
|
|
||||||
<EmptyBorder/>
|
|
||||||
</Border>
|
|
||||||
</Property>
|
|
||||||
</Properties>
|
|
||||||
<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="jTable1">
|
|
||||||
<Properties>
|
|
||||||
<Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor">
|
|
||||||
<Color blue="f0" green="f0" red="f0" type="rgb"/>
|
|
||||||
</Property>
|
|
||||||
<Property name="showHorizontalLines" type="boolean" value="false"/>
|
|
||||||
<Property name="showVerticalLines" type="boolean" value="false"/>
|
|
||||||
</Properties>
|
|
||||||
</Component>
|
|
||||||
</SubComponents>
|
|
||||||
</Container>
|
|
||||||
<Component class="javax.swing.JCheckBox" name="calcHashesButton">
|
<Component class="javax.swing.JCheckBox" name="calcHashesButton">
|
||||||
<Properties>
|
<Properties>
|
||||||
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
@ -118,5 +99,12 @@
|
|||||||
</Property>
|
</Property>
|
||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
|
<Component class="javax.swing.JLabel" name="nsrlDbLabelVal">
|
||||||
|
<Properties>
|
||||||
|
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
|
||||||
|
<ResourceString bundle="org/sleuthkit/autopsy/hashdatabase/Bundle.properties" key="HashDbSimplePanel.nsrlDbLabelVal.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||||
|
</Property>
|
||||||
|
</Properties>
|
||||||
|
</Component>
|
||||||
</SubComponents>
|
</SubComponents>
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -26,6 +26,7 @@ package org.sleuthkit.autopsy.hashdatabase;
|
|||||||
|
|
||||||
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionEvent;
|
||||||
import java.awt.event.ActionListener;
|
import java.awt.event.ActionListener;
|
||||||
|
import java.util.List;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import javax.swing.JOptionPane;
|
import javax.swing.JOptionPane;
|
||||||
import javax.swing.table.AbstractTableModel;
|
import javax.swing.table.AbstractTableModel;
|
||||||
@ -39,14 +40,12 @@ public class HashDbSimplePanel extends javax.swing.JPanel {
|
|||||||
|
|
||||||
private static final Logger logger = Logger.getLogger(HashDbSimplePanel.class.getName());
|
private static final Logger logger = Logger.getLogger(HashDbSimplePanel.class.getName());
|
||||||
private HashTableModel knownBadTableModel;
|
private HashTableModel knownBadTableModel;
|
||||||
private NSRLTableModel nsrlTableModel;
|
|
||||||
private HashDb nsrl;
|
private HashDb nsrl;
|
||||||
private static boolean ingestRunning = false;
|
private static boolean ingestRunning = false;
|
||||||
|
|
||||||
/** Creates new form HashDbSimplePanel */
|
/** Creates new form HashDbSimplePanel */
|
||||||
public HashDbSimplePanel() {
|
public HashDbSimplePanel() {
|
||||||
knownBadTableModel = new HashTableModel();
|
knownBadTableModel = new HashTableModel();
|
||||||
nsrlTableModel = new NSRLTableModel();
|
|
||||||
initComponents();
|
initComponents();
|
||||||
customizeComponents();
|
customizeComponents();
|
||||||
}
|
}
|
||||||
@ -55,9 +54,24 @@ public class HashDbSimplePanel extends javax.swing.JPanel {
|
|||||||
ingestRunning = running;
|
ingestRunning = running;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void customizeComponents() {
|
private void reloadCalc() {
|
||||||
final HashDbXML xmlHandle = HashDbXML.getCurrent();
|
final HashDbXML xmlHandle = HashDbXML.getCurrent();
|
||||||
if(xmlHandle.getNSRLSet()==null && xmlHandle.getKnownBadSets().isEmpty()) {
|
|
||||||
|
final boolean nsrlUsed = xmlHandle.getNSRLSet()!=null && xmlHandle.getNSRLSet().getUseForIngest()== true;
|
||||||
|
final List<HashDb> knowns = xmlHandle.getKnownBadSets();
|
||||||
|
final boolean knownExists = !knowns.isEmpty();
|
||||||
|
boolean knownUsed = false;
|
||||||
|
if (knownExists) {
|
||||||
|
for (HashDb known : knowns) {
|
||||||
|
if (known.getUseForIngest() == true) {
|
||||||
|
knownUsed = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(! nsrlUsed
|
||||||
|
&& ! knownUsed ) {
|
||||||
calcHashesButton.setEnabled(true);
|
calcHashesButton.setEnabled(true);
|
||||||
calcHashesButton.setSelected(true);
|
calcHashesButton.setSelected(true);
|
||||||
xmlHandle.setCalculate(true);
|
xmlHandle.setCalculate(true);
|
||||||
@ -66,6 +80,10 @@ public class HashDbSimplePanel extends javax.swing.JPanel {
|
|||||||
calcHashesButton.setSelected(false);
|
calcHashesButton.setSelected(false);
|
||||||
xmlHandle.setCalculate(false);
|
xmlHandle.setCalculate(false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void customizeComponents() {
|
||||||
|
final HashDbXML xmlHandle = HashDbXML.getCurrent();
|
||||||
calcHashesButton.addActionListener( new ActionListener() {
|
calcHashesButton.addActionListener( new ActionListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -80,26 +98,18 @@ public class HashDbSimplePanel extends javax.swing.JPanel {
|
|||||||
});
|
});
|
||||||
|
|
||||||
notableHashTable.setModel(knownBadTableModel);
|
notableHashTable.setModel(knownBadTableModel);
|
||||||
jTable1.setModel(nsrlTableModel);
|
|
||||||
|
|
||||||
notableHashTable.setTableHeader(null);
|
notableHashTable.setTableHeader(null);
|
||||||
jTable1.setTableHeader(null);
|
|
||||||
notableHashTable.setRowSelectionAllowed(false);
|
notableHashTable.setRowSelectionAllowed(false);
|
||||||
jTable1.setRowSelectionAllowed(false);
|
|
||||||
//customize column witdhs
|
//customize column witdhs
|
||||||
final int width1 = jScrollPane1.getPreferredSize().width;
|
final int width1 = jScrollPane1.getPreferredSize().width;
|
||||||
final int width2 = jScrollPane2.getPreferredSize().width;
|
|
||||||
TableColumn column1 = null;
|
TableColumn column1 = null;
|
||||||
TableColumn column2 = null;
|
|
||||||
for (int i = 0; i < notableHashTable.getColumnCount(); i++) {
|
for (int i = 0; i < notableHashTable.getColumnCount(); i++) {
|
||||||
column1 = notableHashTable.getColumnModel().getColumn(i);
|
column1 = notableHashTable.getColumnModel().getColumn(i);
|
||||||
column2 = jTable1.getColumnModel().getColumn(i);
|
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
column1.setPreferredWidth(((int) (width1 * 0.15)));
|
column1.setPreferredWidth(((int) (width1 * 0.15)));
|
||||||
column2.setPreferredWidth(((int) (width2 * 0.15)));
|
|
||||||
} else {
|
} else {
|
||||||
column1.setPreferredWidth(((int) (width1 * 0.84)));
|
column1.setPreferredWidth(((int) (width1 * 0.84)));
|
||||||
column2.setPreferredWidth(((int) (width2 * 0.84)));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,10 +128,9 @@ public class HashDbSimplePanel extends javax.swing.JPanel {
|
|||||||
jScrollPane1 = new javax.swing.JScrollPane();
|
jScrollPane1 = new javax.swing.JScrollPane();
|
||||||
notableHashTable = new javax.swing.JTable();
|
notableHashTable = new javax.swing.JTable();
|
||||||
jLabel1 = new javax.swing.JLabel();
|
jLabel1 = new javax.swing.JLabel();
|
||||||
jLabel2 = new javax.swing.JLabel();
|
nsrlDbLabel = new javax.swing.JLabel();
|
||||||
jScrollPane2 = new javax.swing.JScrollPane();
|
|
||||||
jTable1 = new javax.swing.JTable();
|
|
||||||
calcHashesButton = new javax.swing.JCheckBox();
|
calcHashesButton = new javax.swing.JCheckBox();
|
||||||
|
nsrlDbLabelVal = new javax.swing.JLabel();
|
||||||
|
|
||||||
jScrollPane1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
|
jScrollPane1.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
|
||||||
|
|
||||||
@ -132,42 +141,40 @@ public class HashDbSimplePanel extends javax.swing.JPanel {
|
|||||||
|
|
||||||
jLabel1.setText(org.openide.util.NbBundle.getMessage(HashDbSimplePanel.class, "HashDbSimplePanel.jLabel1.text")); // NOI18N
|
jLabel1.setText(org.openide.util.NbBundle.getMessage(HashDbSimplePanel.class, "HashDbSimplePanel.jLabel1.text")); // NOI18N
|
||||||
|
|
||||||
jLabel2.setText(org.openide.util.NbBundle.getMessage(HashDbSimplePanel.class, "HashDbSimplePanel.jLabel2.text")); // NOI18N
|
nsrlDbLabel.setText(org.openide.util.NbBundle.getMessage(HashDbSimplePanel.class, "HashDbSimplePanel.nsrlDbLabel.text")); // NOI18N
|
||||||
|
|
||||||
jScrollPane2.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
|
|
||||||
|
|
||||||
jTable1.setBackground(new java.awt.Color(240, 240, 240));
|
|
||||||
jTable1.setShowHorizontalLines(false);
|
|
||||||
jTable1.setShowVerticalLines(false);
|
|
||||||
jScrollPane2.setViewportView(jTable1);
|
|
||||||
|
|
||||||
calcHashesButton.setText(org.openide.util.NbBundle.getMessage(HashDbSimplePanel.class, "HashDbSimplePanel.calcHashesButton.text")); // NOI18N
|
calcHashesButton.setText(org.openide.util.NbBundle.getMessage(HashDbSimplePanel.class, "HashDbSimplePanel.calcHashesButton.text")); // NOI18N
|
||||||
|
|
||||||
|
nsrlDbLabelVal.setText(org.openide.util.NbBundle.getMessage(HashDbSimplePanel.class, "HashDbSimplePanel.nsrlDbLabelVal.text")); // NOI18N
|
||||||
|
|
||||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||||
this.setLayout(layout);
|
this.setLayout(layout);
|
||||||
layout.setHorizontalGroup(
|
layout.setHorizontalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
|
.addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
|
||||||
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
|
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addContainerGap()
|
.addContainerGap()
|
||||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addComponent(jLabel2)
|
.addComponent(calcHashesButton)
|
||||||
.addComponent(jLabel1)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
|
||||||
.addComponent(calcHashesButton))
|
.addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
|
||||||
|
.addComponent(nsrlDbLabel)
|
||||||
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||||
|
.addComponent(nsrlDbLabelVal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||||
|
.addComponent(jLabel1, javax.swing.GroupLayout.Alignment.LEADING)))
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
layout.setVerticalGroup(
|
layout.setVerticalGroup(
|
||||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||||
.addGroup(layout.createSequentialGroup()
|
.addGroup(layout.createSequentialGroup()
|
||||||
.addComponent(jLabel2)
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addComponent(nsrlDbLabel)
|
||||||
.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(nsrlDbLabelVal))
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(jLabel1)
|
.addComponent(jLabel1)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
|
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 25, Short.MAX_VALUE)
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
||||||
.addComponent(calcHashesButton)
|
.addComponent(calcHashesButton)
|
||||||
.addContainerGap())
|
.addContainerGap())
|
||||||
);
|
);
|
||||||
@ -176,48 +183,28 @@ public class HashDbSimplePanel extends javax.swing.JPanel {
|
|||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
private javax.swing.JCheckBox calcHashesButton;
|
private javax.swing.JCheckBox calcHashesButton;
|
||||||
private javax.swing.JLabel jLabel1;
|
private javax.swing.JLabel jLabel1;
|
||||||
private javax.swing.JLabel jLabel2;
|
|
||||||
private javax.swing.JScrollPane jScrollPane1;
|
private javax.swing.JScrollPane jScrollPane1;
|
||||||
private javax.swing.JScrollPane jScrollPane2;
|
|
||||||
private javax.swing.JTable jTable1;
|
|
||||||
private javax.swing.JTable notableHashTable;
|
private javax.swing.JTable notableHashTable;
|
||||||
|
private javax.swing.JLabel nsrlDbLabel;
|
||||||
|
private javax.swing.JLabel nsrlDbLabelVal;
|
||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
|
|
||||||
private void reloadSets() {
|
private void reloadSets() {
|
||||||
nsrl = HashDbXML.getCurrent().getNSRLSet();
|
nsrl = HashDbXML.getCurrent().getNSRLSet();
|
||||||
nsrlTableModel.resync();
|
|
||||||
|
if (nsrl == null || nsrl.getUseForIngest() == false) {
|
||||||
|
nsrlDbLabelVal.setText("Not Configured");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
nsrlDbLabelVal.setText("Configured");
|
||||||
|
}
|
||||||
|
|
||||||
|
reloadCalc();
|
||||||
|
|
||||||
knownBadTableModel.resync();
|
knownBadTableModel.resync();
|
||||||
}
|
}
|
||||||
|
|
||||||
private class NSRLTableModel extends AbstractTableModel {
|
|
||||||
|
|
||||||
private void resync() {
|
|
||||||
fireTableDataChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getRowCount() {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getColumnCount() {
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Object getValueAt(int rowIndex, int columnIndex) {
|
|
||||||
if (columnIndex == 0) {
|
|
||||||
return "";
|
|
||||||
} else {
|
|
||||||
if(nsrl == null) {
|
|
||||||
return "Not Configured";
|
|
||||||
} else {
|
|
||||||
return nsrl.getName();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class HashTableModel extends AbstractTableModel {
|
private class HashTableModel extends AbstractTableModel {
|
||||||
|
|
||||||
@ -270,6 +257,7 @@ public class HashDbSimplePanel extends javax.swing.JPanel {
|
|||||||
} else {
|
} else {
|
||||||
JOptionPane.showMessageDialog(HashDbSimplePanel.this, "Databases must be indexed before they can be used for ingest");
|
JOptionPane.showMessageDialog(HashDbSimplePanel.this, "Databases must be indexed before they can be used for ingest");
|
||||||
}
|
}
|
||||||
|
reloadSets();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user