handle webkit and robots

This commit is contained in:
rolux 2012-03-27 10:24:16 +00:00
parent 05ec3755eb
commit 0e31c7cb97
3 changed files with 6 additions and 5 deletions

View file

@ -56,7 +56,7 @@ class SessionData(models.Model):
self.browser = None
if not self.system:
self.system = None
if ua.get('robot'):
if ua['robot']['name']:
self.level = -1
if self.ip:
try:
@ -132,7 +132,7 @@ class SessionData(models.Model):
'ip': self.ip,
'id': self.get_id(),
'lastseen': self.lastseen,
'level': ua.get('robot') and 'robot' or 'guest',
'level': 'robot' if ua['robot']['name'] else 'guest',
'location': self.location,
'newsletter': False,
'notes': '',

View file

@ -17,10 +17,11 @@ pandora.ui.statisticsDialog = function() {
browser: {
'Chrome Frame': [255, 255, 0],
'Chrome': [0, 255, 0],
'Firefox': [255, 128, 8],
'Firefox': [255, 128, 0],
'Internet Explorer': [0, 0, 255],
'Opera': [255, 0, 0],
'Safari': [0, 255, 255]
'Safari': [0, 255, 255],
'WebKit': [0, 255, 128]
}
},
dialogHeight = Math.round((window.innerHeight - 48) * 0.9),

View file

@ -6,7 +6,7 @@ pandora.ui.usersDialog = function() {
var browsers = [
'Chrome', 'Chrome Frame', 'Firefox',
'Internet Explorer', 'Opera', 'Safari'
'Internet Explorer', 'Opera', 'Safari', 'WebKit'
],
dialogHeight = Math.round((window.innerHeight - 48) * 0.9),
dialogWidth = Math.round(window.innerWidth * 0.9),