diff options
author | Stefan Giehl <stefan@matomo.org> | 2019-03-14 22:26:26 +0300 |
---|---|---|
committer | diosmosis <diosmosis@users.noreply.github.com> | 2019-03-14 22:26:26 +0300 |
commit | 8f77ece35b3058251c4450b6d15f3d73df8bd825 (patch) | |
tree | 724ec91b1eda1da0fe87ec46e4f644dbaba071cf /plugins/UserCountryMap/javascripts | |
parent | 285f28470d5e8eacf0b6238c03be47f6673e4e24 (diff) |
Show device type and model in realtime map tooltip (#14204)
* Realtime map improvements
* updates ui file
Diffstat (limited to 'plugins/UserCountryMap/javascripts')
-rw-r--r-- | plugins/UserCountryMap/javascripts/realtime-map.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/UserCountryMap/javascripts/realtime-map.js b/plugins/UserCountryMap/javascripts/realtime-map.js index 37431da68b..6bd2dfe0f6 100644 --- a/plugins/UserCountryMap/javascripts/realtime-map.js +++ b/plugins/UserCountryMap/javascripts/realtime-map.js @@ -141,7 +141,7 @@ filter_limit: maxVisits, showColumns: ['latitude', 'longitude', 'actions', 'lastActionTimestamp', 'visitLocalTime', 'city', 'country', 'countryCode', 'referrerType', 'referrerName', - 'referrerTypeName', 'browserIcon', 'operatingSystemIcon', + 'referrerTypeName', 'browserIcon', 'operatingSystemIcon', 'deviceType', 'deviceModel', 'countryFlag', 'idVisit', 'actionDetails', 'continentCode', 'actions', 'searches', 'goalConversions', 'visitorId', 'userId'].join(','), minTimestamp: firstRun ? 0 : lastTimestamp @@ -212,18 +212,20 @@ var ds = new Date().getTime() / 1000 - r.lastActionTimestamp, ad = r.actionDetails, ico = function (src) { return '<img height="16px" src="' + src + '" alt="" class="icon" /> '; }; - return '<h3>' + (r.city ? r.city + ' / ' : '') + r.country + '</h3>' + + return '<h3>' + (r.city ? $('<span>').text(r.city).html() + ' / ' : '') + $('<span>').text(r.country).html() + '</h3>' + // icons ico(r.countryFlag) + ico(r.browserIcon) + ico(r.operatingSystemIcon) + '<br/>' + + // device type, model, brand + r.deviceType + ' (' + r.deviceModel + ')<br/>' + // User ID - (r.userId ? _pk_translate('General_UserId') + ': ' + r.userId + '<br/>' : '') + + (r.userId ? _pk_translate('General_UserId') + ': ' + $('<span>').text(r.userId).html() + '<br/>' : '') + // last action - (ad && ad.length && ad[ad.length - 1].pageTitle ? '' + ad[ad.length - 1].pageTitle + '<br/>' : '') + + (ad && ad.length && ad[ad.length - 1].pageTitle ? '' + $('<span>').text(ad[ad.length - 1].pageTitle).html() + '<br/>' : '') + // time of visit '<div class="rel-time" data-actiontime="' + r.lastActionTimestamp + '">' + relativeTime(ds) + '</div>' + // either from or direct (r.referrerType == "direct" ? r.referrerTypeName : - _.from + ': ' + r.referrerName) + '<br />' + + _.from + ': ' + $('<span>').text(r.referrerName).html()) + '<br />' + // local time '<small>' + _.local_time + ': ' + r.visitLocalTime + '</small><br />' + // goals, if available |