diff --git a/Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/json/graphs/GraphJSONCreator.java b/Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/json/graphs/GraphJSONCreator.java
index 10996cac0..f535cd0c7 100644
--- a/Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/json/graphs/GraphJSONCreator.java
+++ b/Plan/common/src/main/java/com/djrapitops/plan/delivery/rendering/json/graphs/GraphJSONCreator.java
@@ -33,6 +33,7 @@ import com.djrapitops.plan.gathering.domain.Ping;
import com.djrapitops.plan.gathering.domain.Session;
import com.djrapitops.plan.gathering.domain.WorldTimes;
import com.djrapitops.plan.settings.config.PlanConfig;
+import com.djrapitops.plan.settings.config.paths.DataGatheringSettings;
import com.djrapitops.plan.settings.config.paths.DisplaySettings;
import com.djrapitops.plan.settings.config.paths.TimeSettings;
import com.djrapitops.plan.settings.theme.Theme;
@@ -346,6 +347,7 @@ public class GraphJSONCreator {
WorldMap worldMap = graphs.special().worldMap(geolocationCounts);
return Maps.builder(String.class, Object.class)
+ .put("geolocations_enabled", config.get(DataGatheringSettings.GEOLOCATIONS) && config.get(DataGatheringSettings.ACCEPT_GEOLITE2_EULA))
.put("geolocation_series", worldMap.getEntries())
.put("geolocation_bar_series", geolocationBarGraph.getBars())
.put("colors", Maps.builder(String.class, String.class)
diff --git a/Plan/common/src/main/java/com/djrapitops/plan/settings/locale/lang/HtmlLang.java b/Plan/common/src/main/java/com/djrapitops/plan/settings/locale/lang/HtmlLang.java
index 7e4503d63..56bc6ff4b 100644
--- a/Plan/common/src/main/java/com/djrapitops/plan/settings/locale/lang/HtmlLang.java
+++ b/Plan/common/src/main/java/com/djrapitops/plan/settings/locale/lang/HtmlLang.java
@@ -259,6 +259,10 @@ public enum HtmlLang implements Lang {
QUERY("Query<"),
QUERY_MAKE_ANOTHER("Make another query"),
QUERY_MAKE("Make a query"),
+
+ WARNING_NO_GAME_SERVERS("Some data requires Plan to be installed on game servers."),
+ WARNING_NO_GEOLOCATIONS("Geolocation gathering needs to be enabled in the config (Accept GeoLite2 EULA)."),
+ WARNING_NO_SPONGE_CHUNKS("Chunks unavailable on Sponge"),
;
private final String defaultValue;
diff --git a/Plan/common/src/main/resources/assets/plan/web/js/network-values.js b/Plan/common/src/main/resources/assets/plan/web/js/network-values.js
index 752743f02..5b2231041 100644
--- a/Plan/common/src/main/resources/assets/plan/web/js/network-values.js
+++ b/Plan/common/src/main/resources/assets/plan/web/js/network-values.js
@@ -238,6 +238,7 @@ function loadservers(servers, error) {
}
if (!servers || !servers.length) {
+ document.getElementById('game-server-warning').classList.remove('hidden');
document.getElementById('data_server_list').innerHTML =
`
No servers found in the database.
It appears that Plan is not installed on any game servers or not connected to the same database. See wiki for Network tutorial.
`
document.getElementById('quick_view_players_online').innerText = `No server to display online activity for.`;
@@ -404,6 +405,9 @@ function loadGeolocationGraph(json, error) {
});
worldMap('worldMap', json.colors.low, json.colors.high, geolocationSeries);
horizontalBarChart('countryBarChart', geolocationBarCategories, [geolocationBarSeries], s.name.unit_players);
+ if (!json.geolocations_enabled) {
+ document.getElementById('geolocation-warning').classList.remove('hidden');
+ }
} else if (error) {
const errorMessage = `Failed to load graph data: ${error}`;
document.getElementById('worldMap').innerText = errorMessage;
diff --git a/Plan/common/src/main/resources/assets/plan/web/js/server-values.js b/Plan/common/src/main/resources/assets/plan/web/js/server-values.js
index ba9902b66..4620368eb 100644
--- a/Plan/common/src/main/resources/assets/plan/web/js/server-values.js
+++ b/Plan/common/src/main/resources/assets/plan/web/js/server-values.js
@@ -327,6 +327,9 @@ function loadPerformanceValues(json, error) {
element.querySelector('#data_entities_30d').innerText = data.entities_30d;
element.querySelector('#data_entities_7d').innerText = data.entities_7d;
element.querySelector('#data_entities_24h').innerText = data.entities_24h;
+ if ("Unavailable" === data.chunks_30d) {
+ document.getElementById('sponge-chunk-warning').classList.remove('hidden');
+ }
element.querySelector('#data_chunks_30d').innerText = data.chunks_30d;
element.querySelector('#data_chunks_7d').innerText = data.chunks_7d;
element.querySelector('#data_chunks_24h').innerText = data.chunks_24h;
@@ -511,6 +514,9 @@ function loadGeolocationGraph(json, error) {
});
worldMap('worldMap', json.colors.low, json.colors.high, geolocationSeries);
horizontalBarChart('countryBarChart', geolocationBarCategories, [geolocationBarSeries], s.name.unit_players);
+ if (!json.geolocations_enabled) {
+ document.getElementById('geolocation-warning').classList.remove('hidden');
+ }
} else if (error) {
const errorMessage = `Failed to load graph data: ${error}`;
document.getElementById('worldMap').innerText = errorMessage;
diff --git a/Plan/common/src/main/resources/assets/plan/web/network.html b/Plan/common/src/main/resources/assets/plan/web/network.html
index 1fb8917cf..e32b7a916 100644
--- a/Plan/common/src/main/resources/assets/plan/web/network.html
+++ b/Plan/common/src/main/resources/assets/plan/web/network.html
@@ -236,6 +236,10 @@
Network as Numbers
+
+
+ Some data requires Plan to be installed on game servers.
+
Total Players
@@ -630,6 +634,10 @@
class="fas fa-fw fa-globe col-green">
Geolocations
+
+
+ Geolocation gathering needs to be enabled in the config (Accept GeoLite2 EULA).
+
@@ -887,7 +895,7 @@
time: {timezoneOffset: v.values.timezoneOffset * 60}
});
- refreshingJsonRequest("./v1/graph?type=playersOnline&server=${serverUUID}", loadPlayersOnlineGraph, 'network-overview');
+ refreshingJsonRequest("./v1/graph?type=playersOnline&server=${serverUUID}", loadPlayersOnlineGraph, 'network-overview', true);
refreshingJsonRequest("./v1/graph?type=uniqueAndNew", loadUniqueAndNewGraph, 'network-overview');
refreshingJsonRequest("./v1/graph?type=hourlyUniqueAndNew", loadHourlyUniqueAndNewGraph, 'network-overview');
refreshingJsonRequest("./v1/graph?type=serverPie", loadServerPie, 'sessions-overview');
diff --git a/Plan/common/src/main/resources/assets/plan/web/server.html b/Plan/common/src/main/resources/assets/plan/web/server.html
index 04f2fe910..bfff83a4e 100644
--- a/Plan/common/src/main/resources/assets/plan/web/server.html
+++ b/Plan/common/src/main/resources/assets/plan/web/server.html
@@ -929,6 +929,10 @@
class="fas fa-fw fa-globe col-green">
Geolocations
+
+
+ Geolocation gathering needs to be enabled in the config (Accept GeoLite2 EULA).
+
@@ -1112,7 +1116,11 @@
|
- Average Chunks |
+
+ Average Chunks
+
+ |
|
|
|