diff --git a/CHANGELOG.md b/CHANGELOG.md
index c154537..cfc9f48 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
# CHANGELOG
+## v8.6
+
+* Telemetry statistics page for environments using the Telemetry Server. Please check `README.md`
+
## v8.5.1
* Fixed undefined variable warning message
diff --git a/README.md b/README.md
index e1cb3ed..3dea56c 100644
--- a/README.md
+++ b/README.md
@@ -116,6 +116,7 @@ In step 2, you need to configure the `app.json.sample` within the `api/v1/inc` f
- `demo`: If set to `true`, demo credentials are shown on the login page. Useful for demo installations.
- `telemetry`: Enable/disable telemetry (Default: `enabled` - **PLEASE DISABLE IF NEEDED**)
- `telemetry_server_url`: Full server url to telemetry upload
+- `telemetryServer`: Enables/disables the Server Telemetry Statistics page
#### **SMTP section**
@@ -254,6 +255,23 @@ To upload a new theme, simply place it into the `/assets/css` folder.
The theme the user selected is saved as a cookie, meaning it is only selected on the current device. On mobile or on another device, the user has to set the desired theme again.
+## Run as Telemetry server
+
+Basically, there are only a few steps to do
+
+1. Navigate to the telemetry server directory: `cd api/v1/class/telemetry/server`
+2. Start server: `nohup php -S 0.0.0.0:8888 server.php > telemetry.log 2>&1 &`
+3. Set `telemetryServer` inside app.json `general` section to `true`.
+4. Check received telemetry data on the "Server Telemetry" page.
+
+## Change Telemetry server URL for managed environments
+
+If you want all of your TimeTrack instances to point to your telemetry server instance, you need to change the app.json `general` `telemetry_server_url` attribute to your URL.
+Also make sure the `telemetry` attribute is set to `"enabled"`.
+
+To check if all worked simply visit the Settings page using an admin account. Check the checkbox within the Telemetry section at the bottom of the page and click the Submit button.
+On your server timetrack instance you need to visit the "Server Telemetry" page to check if you received the new/updated telemetry data.
+
## Updates
TimeTrack has to be updated in two ways: database and application.
diff --git a/VERSION b/VERSION
index f9c71a5..48c26da 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-8.5.1
+8.6
diff --git a/api/v1/class/i18n/suite/nav/snippets_DE.json b/api/v1/class/i18n/suite/nav/snippets_DE.json
index 2a61043..367ff77 100644
--- a/api/v1/class/i18n/suite/nav/snippets_DE.json
+++ b/api/v1/class/i18n/suite/nav/snippets_DE.json
@@ -10,5 +10,6 @@
"a_sickness": "Alle Krankheiten",
"a_vacation": "Alle Urlaube",
"a_plugins": "Plugins",
- "a_projects": "Projektmanagement"
+ "a_projects": "Projektmanagement",
+ "a_serverTelemetry": "Server-Telemetrie"
}
\ No newline at end of file
diff --git a/api/v1/class/i18n/suite/nav/snippets_EN.json b/api/v1/class/i18n/suite/nav/snippets_EN.json
index 9f0fc29..d1f224d 100644
--- a/api/v1/class/i18n/suite/nav/snippets_EN.json
+++ b/api/v1/class/i18n/suite/nav/snippets_EN.json
@@ -10,5 +10,6 @@
"a_sickness": "Sickness reports",
"a_vacation": "Vacation reports",
"a_plugins": "Plugins",
- "a_projects": "Projects management"
+ "a_projects": "Projects management",
+ "a_serverTelemetry": "Server Telemetry"
}
\ No newline at end of file
diff --git a/api/v1/class/i18n/suite/nav/snippets_NL.json b/api/v1/class/i18n/suite/nav/snippets_NL.json
index ef441e6..c67c73d 100644
--- a/api/v1/class/i18n/suite/nav/snippets_NL.json
+++ b/api/v1/class/i18n/suite/nav/snippets_NL.json
@@ -10,5 +10,6 @@
"a_sickness": "Alle ziekten",
"a_vacation": "Alle vakanties",
"a_plugins": "Plug-ins",
- "a_projects": "Projects management"
+ "a_projects": "Projects management",
+ "a_serverTelemetry": "Server Telemetry"
}
\ No newline at end of file
diff --git a/api/v1/class/i18n/suite/status/snippets_DE.json b/api/v1/class/i18n/suite/status/snippets_DE.json
index 27407d4..0696248 100644
--- a/api/v1/class/i18n/suite/status/snippets_DE.json
+++ b/api/v1/class/i18n/suite/status/snippets_DE.json
@@ -52,5 +52,6 @@
"plugins_disabled": "Fehler: Das Plugin-System ist deaktiviert. Bitte wende dich an deinen Administrator!",
"telemetry_sent": "Hinweis: Telemetriedaten wurden erfolgreich gesendet!",
"telemetry_disabled": "Hinweis: Telemetriedaten wurden nicht gesendet!",
- "success": "Hinweis: Die Aktion wurde erfolgreich ausgeführt!"
+ "success": "Hinweis: Die Aktion wurde erfolgreich ausgeführt!",
+ "telemetryServer_disabled": "Hinweis: Die Serverfunktion der Telemetry ist derzeit deaktiviert!"
}
diff --git a/api/v1/class/i18n/suite/status/snippets_EN.json b/api/v1/class/i18n/suite/status/snippets_EN.json
index 56dcb95..e1d2244 100644
--- a/api/v1/class/i18n/suite/status/snippets_EN.json
+++ b/api/v1/class/i18n/suite/status/snippets_EN.json
@@ -52,5 +52,6 @@
"plugins_disabled": "Error: The plugin system is disabled. Please contact your administrator!",
"telemetry_sent": "Note: Telemetry data sent successfully!",
"telemetry_disabled": "Note: Telemetry data not sent!",
- "success": "Note: The action was completed successfully!"
+ "success": "Note: The action was completed successfully!",
+ "telemetryServer_disabled": "Note: The server telemetry functionality is currently disabled!"
}
diff --git a/api/v1/class/telemetry/server/README.md b/api/v1/class/telemetry/server/README.md
index 9d83184..8a81124 100644
--- a/api/v1/class/telemetry/server/README.md
+++ b/api/v1/class/telemetry/server/README.md
@@ -3,4 +3,5 @@
Make sure your clients point to a specific client for the telemetry server.
Install TimeTrack on that server and start the telemetry server with `cd path/to/timetrack/api/v1/class/telemetry/server && php -S 0.0.0.0:8888 server.php`
-Inside DB check the results within the `telemetry_server` table. A GUI is comming soon.
+Inside DB check the results within the `telemetry_server` table. Set `telemetryServer` var within app.json `general` section to `true`.
+A new entry called Server Telemetry will appear within the Navigation bar.
diff --git a/api/v1/class/telemetry/telemetry.arbeit.inc.php b/api/v1/class/telemetry/telemetry.arbeit.inc.php
index 22b0f84..e77481a 100644
--- a/api/v1/class/telemetry/telemetry.arbeit.inc.php
+++ b/api/v1/class/telemetry/telemetry.arbeit.inc.php
@@ -57,6 +57,69 @@ public function isTelemetryEnabled(): bool
return isset($ini["general"]["telemetry"]) && $ini["general"]["telemetry"] === "enabled";
}
+ public function isTelemetryServerEnabled(): bool
+ {
+ $ini = $this->get_app_ini();
+ return isset($ini["general"]["telemetryServer"]) && $ini["general"]["telemetryServer"] == true;
+ }
+
+public function getServerTelemetryData(): array
+{
+ $stmt = $this->db->sendQuery("SELECT * FROM telemetry_server ORDER BY id DESC");
+ $stmt->execute();
+ return $stmt->fetchAll(\PDO::FETCH_ASSOC) ?: [];
+}
+
+
+public function renderServerTelemetryHTML(): void
+{
+ $rows = $this->getServerTelemetryData();
+
+ if (empty($rows)) {
+ echo "