eric7/WebBrowser/VirusTotal/VirusTotalDomainReportDialog.py

branch
eric7
changeset 8561
641304b46f08
parent 8318
962bce857696
child 8563
3c6547443fb2
--- a/eric7/WebBrowser/VirusTotal/VirusTotalDomainReportDialog.py	Sun Aug 29 20:21:41 2021 +0200
+++ b/eric7/WebBrowser/VirusTotal/VirusTotalDomainReportDialog.py	Mon Aug 30 20:02:39 2021 +0200
@@ -20,7 +20,7 @@
     Class implementing a dialog to show the VirusTotal domain report.
     """
     def __init__(self, domain, resolutions, urls, subdomains,
-                 bdCategory, tmCategory, wtsCategory, whois, parent=None):
+                 categories, whois, parent=None):
         """
         Constructor
         
@@ -32,12 +32,9 @@
         @type list of dict
         @param subdomains list of subdomains
         @type list of str
-        @param bdCategory BitDefender categorization
-        @type str
-        @param tmCategory TrendMicro categorization
-        @type str
-        @param wtsCategory Websense ThreatSeeker categorization
-        @type str
+        @param categories dictionary with various categorizations with keys
+            'bitdefender', 'sophos', 'valkyrie', 'alpha', 'forcepoint'
+        @type dict
         @param whois whois information
         @type str
         @param parent reference to the parent widget
@@ -62,8 +59,6 @@
         self.resolutionsList.resizeColumnToContents(1)
         self.resolutionsList.sortByColumn(0, Qt.SortOrder.AscendingOrder)
         
-        if not urls:
-            self.detectedUrlsGroup.setVisible(False)
         for url in urls:
             QTreeWidgetItem(
                 self.urlsList,
@@ -77,15 +72,15 @@
         self.urlsList.resizeColumnToContents(2)
         self.urlsList.sortByColumn(0, Qt.SortOrder.AscendingOrder)
         
-        if not subdomains:
-            self.subdomainsGroup.setVisible(False)
-        else:
+        if subdomains:
             self.subdomainsList.addItems(subdomains)
             self.subdomainsList.sortItems()
         
-        self.bdLabel.setText(bdCategory)
-        self.tmLabel.setText(tmCategory)
-        self.wtsLabel.setText(wtsCategory)
+        self.bdLabel.setText(categories["bitdefender"])
+        self.soLabel.setText(categories["sophos"])
+        self.vvLabel.setText(categories["valkyrie"])
+        self.amLabel.setText(categories["alpha"])
+        self.ftsLabel.setText(categories["forcepoint"])
         
         self.__whois = whois
         self.__whoisDomain = domain

eric ide

mercurial