mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 00:46:16 +00:00
displays no data in metadata viewer for istat on no data
This commit is contained in:
parent
f4efd5f9b2
commit
a7bb080a31
@ -324,6 +324,7 @@ public class Metadata extends javax.swing.JPanel implements DataContentViewer {
|
|||||||
this.node = node;
|
this.node = node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Messages("MetadataWorker.doInBackground.noDataMsg=No Data")
|
||||||
@Override
|
@Override
|
||||||
protected String doInBackground() throws Exception {
|
protected String doInBackground() throws Exception {
|
||||||
AbstractFile file = node.getLookup().lookup(AbstractFile.class);
|
AbstractFile file = node.getLookup().lookup(AbstractFile.class);
|
||||||
@ -397,7 +398,6 @@ public class Metadata extends javax.swing.JPanel implements DataContentViewer {
|
|||||||
FsContent fsFile = (FsContent) file;
|
FsContent fsFile = (FsContent) file;
|
||||||
|
|
||||||
addHeader(sb, NbBundle.getMessage(this.getClass(), "Metadata.nodeText.text"), true);
|
addHeader(sb, NbBundle.getMessage(this.getClass(), "Metadata.nodeText.text"), true);
|
||||||
startTable(sb);
|
|
||||||
|
|
||||||
List<String> istatStrings = Collections.emptyList();
|
List<String> istatStrings = Collections.emptyList();
|
||||||
try {
|
try {
|
||||||
@ -406,20 +406,29 @@ public class Metadata extends javax.swing.JPanel implements DataContentViewer {
|
|||||||
istatStrings = Arrays.asList(NbBundle.getMessage(this.getClass(), "Metadata.nodeText.exceptionNotice.text") + ex.getLocalizedMessage());
|
istatStrings = Arrays.asList(NbBundle.getMessage(this.getClass(), "Metadata.nodeText.exceptionNotice.text") + ex.getLocalizedMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
for (String str : istatStrings) {
|
if (istatStrings.isEmpty() || (istatStrings.size() == 1 && StringUtils.isEmpty(istatStrings.get(0)))) {
|
||||||
addMonospacedRow(sb, str);
|
sb.append(MessageFormat.format("<div class=\"{0}\"><p class=\"{1}\">{2}</p><div>",
|
||||||
|
ContentViewerHtmlStyles.getIndentedClassName(),
|
||||||
|
ContentViewerHtmlStyles.getTextClassName(),
|
||||||
|
Bundle.MetadataWorker_doInBackground_noDataMsg()));
|
||||||
|
} else {
|
||||||
|
startTable(sb);
|
||||||
|
|
||||||
/*
|
for (String str : istatStrings) {
|
||||||
|
addMonospacedRow(sb, str);
|
||||||
|
|
||||||
|
/*
|
||||||
* Very long results can cause the UI to hang before
|
* Very long results can cause the UI to hang before
|
||||||
* displaying, so truncate the results if necessary.
|
* displaying, so truncate the results if necessary.
|
||||||
*/
|
*/
|
||||||
if (sb.length() > 50000) {
|
if (sb.length() > 50000) {
|
||||||
addMonospacedRow(sb, NbBundle.getMessage(this.getClass(), "Metadata.nodeText.truncated"));
|
addMonospacedRow(sb, NbBundle.getMessage(this.getClass(), "Metadata.nodeText.truncated"));
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
endTable(sb);
|
endTable(sb);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -461,11 +470,10 @@ public class Metadata extends javax.swing.JPanel implements DataContentViewer {
|
|||||||
// Add all the data source paths to the "Local Path" value cell.
|
// Add all the data source paths to the "Local Path" value cell.
|
||||||
String[] imagePaths = image.getPaths();
|
String[] imagePaths = image.getPaths();
|
||||||
|
|
||||||
|
|
||||||
if (imagePaths.length > 0) {
|
if (imagePaths.length > 0) {
|
||||||
addRowWithMultipleValues(sb,
|
addRowWithMultipleValues(sb,
|
||||||
NbBundle.getMessage(this.getClass(), "Metadata.tableRowTitle.localPath"),
|
NbBundle.getMessage(this.getClass(), "Metadata.tableRowTitle.localPath"),
|
||||||
imagePaths);
|
imagePaths);
|
||||||
} else {
|
} else {
|
||||||
addRow(sb, NbBundle.getMessage(this.getClass(), "Metadata.tableRowTitle.localPath"),
|
addRow(sb, NbBundle.getMessage(this.getClass(), "Metadata.tableRowTitle.localPath"),
|
||||||
NbBundle.getMessage(this.getClass(), "Metadata.nodeText.none"));
|
NbBundle.getMessage(this.getClass(), "Metadata.nodeText.none"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user