From 0402df0bc6527cb2e73a35855f8edb40f24c0532 Mon Sep 17 00:00:00 2001 From: Nick Krecklow Date: Wed, 22 Apr 2020 17:30:47 -0500 Subject: [PATCH 1/3] test fix for historical graph retaining too much data --- lib/servers.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/servers.js b/lib/servers.js index 0ad6dd6..919be31 100644 --- a/lib/servers.js +++ b/lib/servers.js @@ -171,13 +171,8 @@ class ServerRegistration { this._lastGraphDataPush = timestamp // Trim old graphPoints according to graphDuration - for (let i = 1; i < this.graphData.length; i++) { - // Find a break point where i - 1 is too old and i is new - if (timestamp - this.graphData[i - 1][0] > config.graphDuration && timestamp - this.graphData[i] <= config.graphDuration) { - this.graphData.splice(0, i) - break - } - } + const filterTimestamp = new Date().getTime() - config.graphDuration + this.graphData = this.graphData.filter(point => point[0] >= filterTimestamp) return true } From 1a4a67f478485869de2d65e27f8f511c6823e375 Mon Sep 17 00:00:00 2001 From: Nick Krecklow Date: Wed, 22 Apr 2020 18:20:37 -0500 Subject: [PATCH 2/3] 5.1.2 release --- docs/CHANGELOG.md | 3 +++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index bd401ad..347473b 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,3 +1,6 @@ +**5.1.2** *(Apr 22 2020)* +- Fixes the historical graph overflowing the maximum graphDuration value. + **5.1.1** *(Apr 21 2020)* - Fixes records being overwritten after boot. This bug did not corrupt saves and is only a visual error. diff --git a/package-lock.json b/package-lock.json index 9a497ae..08f317a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "minetrack", - "version": "5.1.0", + "version": "5.1.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index b58efc8..9bdb3cf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "minetrack", - "version": "5.1.1", + "version": "5.1.2", "description": "A Minecraft server tracker that lets you focus on the basics.", "main": "main.js", "dependencies": { From 82fa023f2ffd3a5456c648a4e5844b82725d1363 Mon Sep 17 00:00:00 2001 From: Xavier Date: Wed, 22 Apr 2020 20:18:33 -0400 Subject: [PATCH 3/3] Updated README to fix usage instructions (#149) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e370185..0dec040 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ You can see an up-to-date copy of the production branch running on https://minet 2. Add/remove servers by editing the ```servers.json``` file 3. Run ```npm install``` 4. Run ```npm run build``` (this bundles `assets/` into `dist/`) -4. Run ```node app.js``` to boot the system (may need sudo!) +4. Run ```node main.js``` to boot the system (may need sudo!) (There's also ```install.sh``` and ```start.sh```, but they may not work for your OS.)