summaryrefslogtreecommitdiffstats
path: root/Src/PyCatcher/src/pyCatcherController.py
diff options
context:
space:
mode:
Diffstat (limited to 'Src/PyCatcher/src/pyCatcherController.py')
-rw-r--r--Src/PyCatcher/src/pyCatcherController.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/Src/PyCatcher/src/pyCatcherController.py b/Src/PyCatcher/src/pyCatcherController.py
index 1de5f6e..114ea8a 100644
--- a/Src/PyCatcher/src/pyCatcherController.py
+++ b/Src/PyCatcher/src/pyCatcherController.py
@@ -6,7 +6,7 @@ from pyCatcherView import PyCatcherGUI
from filters import ARFCNFilter,ProviderFilter, BandFilter900
from evaluators import EvaluatorSelect, BayesEvaluator, ConservativeEvaluator, WeightedEvaluator
from rules import ProviderRule, ARFCNMappingRule, CountryMappingRule, LACMappingRule, UniqueCellIDRule, \
- LACMedianRule, NeighbourhoodStructureRule, PureNeighbourhoodRule, FullyDiscoveredNeighbourhoodsRule
+ LACMedianRule, NeighbourhoodStructureRule, PureNeighbourhoodRule, FullyDiscoveredNeighbourhoodsRule, RuleResult
import pickle
class PyCatcherController:
@@ -124,4 +124,18 @@ class PyCatcherController:
def trigger_redraw(self):
dotcode = self._base_station_list.get_dot_code(self.band_filter, self._filters)
if dotcode != 'digraph bsnetwork { }':
- self._gui.load_dot(dotcode) \ No newline at end of file
+ self._gui.load_dot(dotcode)
+ result = RuleResult.IGNORE
+ at_least_warning = False
+ for item in self._base_station_list._get_filtered_list(self.band_filter, self._filters):
+ if item.evaluation == 'Ignore':
+ pass
+ if item.evaluation == 'Ok' and not at_least_warning:
+ result = RuleResult.OK
+ elif item.evaluation == 'Warning':
+ result = RuleResult.WARNING
+ at_least_warning = True
+ elif item.evaluation == 'Critical':
+ result = RuleResult.CRITICAL
+ break
+ self._gui.set_image(result) \ No newline at end of file