mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
bugfix: if display != ALL and scanning finds no alive hosts, statistics dialog is still shown properly
git-svn-id: https://ipscan.svn.sourceforge.net/svnroot/ipscan/trunk@392 375186e5-ef17-0410-b0b6-91563547dcda
This commit is contained in:
parent
a836c1a2fe
commit
f597e582f0
@ -72,6 +72,13 @@ public class ScanningResultList implements Iterable<ScanningResult> {
|
||||
return !resultList.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if scanning info is available and can be used
|
||||
*/
|
||||
public boolean isInfoAvailable() {
|
||||
return info != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return feeder configuration information that was used for the last scan
|
||||
*/
|
||||
|
||||
@ -41,7 +41,7 @@ public class StatisticsDialog extends AbstractModalDialog {
|
||||
|
||||
@Override
|
||||
public void open() {
|
||||
if (scanningResults.areResultsAvailable()) {
|
||||
if (scanningResults.isInfoAvailable()) {
|
||||
createShell();
|
||||
super.open();
|
||||
}
|
||||
@ -104,8 +104,7 @@ public class StatisticsDialog extends AbstractModalDialog {
|
||||
.append(scanningResults.getFeederInfo()).append(ln).append(ln);
|
||||
|
||||
text.append(Labels.getLabel("text.scan.hosts.total")).append(scanInfo.getHostCount()).append(ln);
|
||||
if (scanInfo.getAliveCount() > 0)
|
||||
text.append(Labels.getLabel("text.scan.hosts.alive")).append(scanInfo.getAliveCount()).append(ln);
|
||||
text.append(Labels.getLabel("text.scan.hosts.alive")).append(scanInfo.getAliveCount()).append(ln);
|
||||
if (scanInfo.getWithPortsCount() > 0)
|
||||
text.append(Labels.getLabel("text.scan.hosts.ports")).append(scanInfo.getWithPortsCount()).append(ln);
|
||||
return text.toString();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user