Public Member Functions | |
| def | __init__ |
| def | __getitem__ |
Public Attributes | |
| netEnt | |
| since | |
| idleTime | |
| colDefinition | |
This class is just a helper used used to facilitate sorting.
Definition at line 33 of file peerGridDisplay.py.
| def objects.gui.peerGridDisplay.entityColumnSorter.__getitem__ | ( | self, | ||
| key | ||||
| ) |
Definition at line 58 of file peerGridDisplay.py.
00058 : 00059 00060 attr, type = self.colDefinition[key] 00061 00062 if type == "S": 00063 return str(attr) 00064 elif type == "F": 00065 return float(attr) 00066 elif type == "U": 00067 return unicode(attr) 00068 else: 00069 return int(attr) 00070 00071 def create(parent):
| def objects.gui.peerGridDisplay.entityColumnSorter.__init__ | ( | self, | ||
| netEnt | ||||
| ) |
Definition at line 34 of file peerGridDisplay.py.
00034 : 00035 self.netEnt = netEnt 00036 00037 self.since = timeUtil.formatDateTime(netEnt.since) 00038 self.idleTime = timeUtil.formatTimeDiff(time.time() - self.netEnt.lastUpdateTS) 00039 00040 self.colDefinition = dict() 00041 self.colDefinition[0] = [self.netEnt.foreignIPAddress, "S"] 00042 self.colDefinition[1] = [self.netEnt.foreignPort, "D"] 00043 self.colDefinition[2] = [self.netEnt.selfPort, "D"] 00044 self.colDefinition[3] = [self.netEnt.processName, "S"] 00045 self.colDefinition[4] = [self.netEnt.Pid, "S"] 00046 self.colDefinition[5] = [self.since, "S"] # Since 00047 self.colDefinition[6] = [float(self.netEnt.totalBytes) / float(1000), "F"] 00048 self.colDefinition[7] = [self.netEnt.foreignCity, "U"] 00049 self.colDefinition[8] = [self.netEnt.foreignStateProv, "S"] 00050 self.colDefinition[9] = [self.netEnt.foreignCountry, "S"] 00051 self.colDefinition[10] = [self.netEnt.foreignOrganization, "S"] 00052 self.colDefinition[11] = [self.netEnt.foreignISP, "S"] 00053 self.colDefinition[12] = [self.netEnt.foreignLongitude, "F"] 00054 self.colDefinition[13] = [self.netEnt.foreignLatitude, "F"] 00055 self.colDefinition[14] = [self.idleTime, "S"] 00056 00057 def __getitem__(self, key):
Definition at line 40 of file peerGridDisplay.py.
Definition at line 38 of file peerGridDisplay.py.
Definition at line 35 of file peerGridDisplay.py.
Definition at line 37 of file peerGridDisplay.py.
1.5.8