handle webkit and robots
This commit is contained in:
parent
05ec3755eb
commit
0e31c7cb97
3 changed files with 6 additions and 5 deletions
|
@ -56,7 +56,7 @@ class SessionData(models.Model):
|
||||||
self.browser = None
|
self.browser = None
|
||||||
if not self.system:
|
if not self.system:
|
||||||
self.system = None
|
self.system = None
|
||||||
if ua.get('robot'):
|
if ua['robot']['name']:
|
||||||
self.level = -1
|
self.level = -1
|
||||||
if self.ip:
|
if self.ip:
|
||||||
try:
|
try:
|
||||||
|
@ -132,7 +132,7 @@ class SessionData(models.Model):
|
||||||
'ip': self.ip,
|
'ip': self.ip,
|
||||||
'id': self.get_id(),
|
'id': self.get_id(),
|
||||||
'lastseen': self.lastseen,
|
'lastseen': self.lastseen,
|
||||||
'level': ua.get('robot') and 'robot' or 'guest',
|
'level': 'robot' if ua['robot']['name'] else 'guest',
|
||||||
'location': self.location,
|
'location': self.location,
|
||||||
'newsletter': False,
|
'newsletter': False,
|
||||||
'notes': '',
|
'notes': '',
|
||||||
|
|
|
@ -17,10 +17,11 @@ pandora.ui.statisticsDialog = function() {
|
||||||
browser: {
|
browser: {
|
||||||
'Chrome Frame': [255, 255, 0],
|
'Chrome Frame': [255, 255, 0],
|
||||||
'Chrome': [0, 255, 0],
|
'Chrome': [0, 255, 0],
|
||||||
'Firefox': [255, 128, 8],
|
'Firefox': [255, 128, 0],
|
||||||
'Internet Explorer': [0, 0, 255],
|
'Internet Explorer': [0, 0, 255],
|
||||||
'Opera': [255, 0, 0],
|
'Opera': [255, 0, 0],
|
||||||
'Safari': [0, 255, 255]
|
'Safari': [0, 255, 255],
|
||||||
|
'WebKit': [0, 255, 128]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
dialogHeight = Math.round((window.innerHeight - 48) * 0.9),
|
dialogHeight = Math.round((window.innerHeight - 48) * 0.9),
|
||||||
|
|
|
@ -6,7 +6,7 @@ pandora.ui.usersDialog = function() {
|
||||||
|
|
||||||
var browsers = [
|
var browsers = [
|
||||||
'Chrome', 'Chrome Frame', 'Firefox',
|
'Chrome', 'Chrome Frame', 'Firefox',
|
||||||
'Internet Explorer', 'Opera', 'Safari'
|
'Internet Explorer', 'Opera', 'Safari', 'WebKit'
|
||||||
],
|
],
|
||||||
dialogHeight = Math.round((window.innerHeight - 48) * 0.9),
|
dialogHeight = Math.round((window.innerHeight - 48) * 0.9),
|
||||||
dialogWidth = Math.round(window.innerWidth * 0.9),
|
dialogWidth = Math.round(window.innerWidth * 0.9),
|
||||||
|
|
Loading…
Reference in a new issue