forked from 0x2620/pandora
in statistics dialog, use live data, not non-existing json file
This commit is contained in:
parent
f4926e595d
commit
24b99503ec
1 changed files with 3 additions and 5 deletions
|
@ -89,14 +89,14 @@ pandora.ui.statisticsDialog = function() {
|
||||||
|
|
||||||
$tabPanel;
|
$tabPanel;
|
||||||
|
|
||||||
Ox.getJSON('/static/json/deleteme.json', function(result) {
|
//Ox.getJSON('/static/json/deleteme.json', function(result) {
|
||||||
/*
|
///*
|
||||||
pandora.api.findUsers({
|
pandora.api.findUsers({
|
||||||
keys: ['browser', 'email', 'firstseen', 'lastseen', 'level', 'location', 'system'],
|
keys: ['browser', 'email', 'firstseen', 'lastseen', 'level', 'location', 'system'],
|
||||||
range: [0, 1000000],
|
range: [0, 1000000],
|
||||||
sort: [{key: 'username', operator: '+'}]
|
sort: [{key: 'username', operator: '+'}]
|
||||||
}, function(result) {
|
}, function(result) {
|
||||||
*/
|
//*/
|
||||||
|
|
||||||
var data = {},
|
var data = {},
|
||||||
flagCountry = {},
|
flagCountry = {},
|
||||||
|
@ -134,9 +134,7 @@ pandora.ui.statisticsDialog = function() {
|
||||||
data[mode].day[day] = (data[mode].day[day] || 0) + 1;
|
data[mode].day[day] = (data[mode].day[day] || 0) + 1;
|
||||||
data[mode].hour[hour] = (data[mode].hour[hour] || 0) + 1;
|
data[mode].hour[hour] = (data[mode].hour[hour] || 0) + 1;
|
||||||
});
|
});
|
||||||
Ox.print("IL:::", item.location)
|
|
||||||
if (!item.location) {
|
if (!item.location) {
|
||||||
Ox.print("??:::", item.email, item.email.split('.').pop().replace(/(edu|gov|mil)/i, 'us'))
|
|
||||||
item.location = (Ox.getCountryByCode(
|
item.location = (Ox.getCountryByCode(
|
||||||
item.email.split('.').pop().replace(/(edu|gov|mil)/i, 'us')
|
item.email.split('.').pop().replace(/(edu|gov|mil)/i, 'us')
|
||||||
) || {}).name || '';
|
) || {}).name || '';
|
||||||
|
|
Loading…
Reference in a new issue