Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/UserCountryMap/javascripts/realtime-map.js3
-rw-r--r--plugins/UserCountryMap/lang/en.json4
-rw-r--r--plugins/UserCountryMap/templates/realtimeMap.twig8
3 files changed, 13 insertions, 2 deletions
diff --git a/plugins/UserCountryMap/javascripts/realtime-map.js b/plugins/UserCountryMap/javascripts/realtime-map.js
index 09396e9bba..5e616acd47 100644
--- a/plugins/UserCountryMap/javascripts/realtime-map.js
+++ b/plugins/UserCountryMap/javascripts/realtime-map.js
@@ -409,6 +409,9 @@
report = $.grep(report, function (r) {
return r.latitude !== null;
});
+
+ // show warning if no visits w/ latitude
+ $('#realTimeMapNoVisitsInfo').toggle(!report.length);
}
// check wether we got any geolocated visits left
diff --git a/plugins/UserCountryMap/lang/en.json b/plugins/UserCountryMap/lang/en.json
index 90f10244d7..a4e98e6331 100644
--- a/plugins/UserCountryMap/lang/en.json
+++ b/plugins/UserCountryMap/lang/en.json
@@ -20,6 +20,8 @@
"VisitorMap": "Visitor Map",
"WorldWide": "World-Wide",
"WithUnknownRegion": "%s with unknown region",
- "WithUnknownCity": "%s with unknown city"
+ "WithUnknownCity": "%s with unknown city",
+ "NoVisitsInfo": "There are no visits displayed currently, because no visit for this period has the correct geolocation information (latitude & longitude).",
+ "NoVisitsInfo2": "To resolve this issue, make sure you are using a GeoIP geolocation provider with a GeoIP city database. If this does not resolve your issue, then it is possible (though unlikely) that your visits have IP addresses that just cannot be geolocated."
}
} \ No newline at end of file
diff --git a/plugins/UserCountryMap/templates/realtimeMap.twig b/plugins/UserCountryMap/templates/realtimeMap.twig
index 84de8d95e4..4d9c13241b 100644
--- a/plugins/UserCountryMap/templates/realtimeMap.twig
+++ b/plugins/UserCountryMap/templates/realtimeMap.twig
@@ -25,6 +25,12 @@
</span>
</div>
-</div>
+ {% if userIsSuperUser %}
+ <div style="display:none;margin-top:20px;margin-bottom:0;" id="realTimeMapNoVisitsInfo" class="alert alert-info">
+ <p>{{ 'UserCountryMap_NoVisitsInfo'|translate }}</p>
+ <p>{{ 'UserCountryMap_NoVisitsInfo2'|translate }}</p>
+ </div>
+ {% endif %}
+ </div>
</div>
<script type="text/javascript">UserCountryMap.RealtimeMap.initElements();</script> \ No newline at end of file