Commit Graph

3943 Commits

Author SHA1 Message Date
Rsl1122
f16bd6a565 Updated font awesome to 5.12.0
- Adds support for fonts to Plan webserver
2020-01-17 21:11:06 +02:00
Rsl1122
c73eeda59e Added missing sidebar toggles.
Some togglers were missing from titles
- on players page
- on error pages
- on debug page

Affects issues:
- Fixed #1287
2020-01-17 21:11:06 +02:00
Rsl1122
c87f981d6a Rewrote TPSCounter Task
This commit is a squash of 8 optimization commits to TPSCounter.

1. Extracted duplicate code in TPSCounters to ServerSensors.

- TPSCounter tasks now live inside common module
  - ServerTPSCounter and ProxyTPSCounter
- Gathering methods are implemented with ServerSensor interface:
  Player count, TPS, Entity count, Chunk count
- ServerProperties#getOnlinePlayers was replaced with ServerSensor
- Fixed sonar smells: "Hiding field" in TPSStoreTransaction & NavLink

2. Optimizations down to 0.15ms / run

- Optimized entity+chunk count (same for loop)
- Added warm-up for system resource methods
- Removed Stream API usages
- Removed List copy operation
- Entities & chunks only count once per minute
- CPU & RAM averages now produced with Average class
- Maximum player count per minute now produced with Maximum class

Affects issues:
- Fixed #1289
2020-01-17 21:11:05 +02:00
Rsl1122
8a059ced0b Added SystemUsage class
This class is collection of some methods in TPSCounter that
were refactored out of it.
2020-01-17 21:11:05 +02:00
Rsl1122
d6e3817c71 All Extension tables now displayed
Original query used an odd inner join which caused some tables to
not be displayed at all, in some cases no tables were displayed at all.
The inner join was joining the value table, which is lower in the table hierarchy.

Changed the query to instead inner join upwards in the table hierarchy, joining the
plugin table.

Affects issues:
- #1260
2020-01-17 21:11:05 +02:00
Rsl1122
5908c6f41b Extra Extension tabs now take full width
Regression during redesign placed single tab content in card-columns div,
which caused the content to be displayed with a sub-par width.

Fixed by extracting new code that handles case for wide tabs, which
display the plugin container as full page width.

- Additionally, solved some issues with the plugin tab names & ids

Affects issues:
- Fixed #1276
2020-01-17 21:11:05 +02:00
Rsl1122
50948c7a65 Fixed Plugin tab names
Tab name was not being used, instead every plugin would show "Plugins Overview"
The server name was also missing on server & network page
2020-01-17 21:11:04 +02:00
Rsl1122
7c0f4450a7 Update Tebex Extension to R0.3
Fixes column names of the table

Affects issues:
- Fixed #1286
2020-01-17 21:11:04 +02:00
Rsl1122
4776305b78 Fixed test compile errors 2020-01-17 21:11:04 +02:00
Rsl1122
8dcfd3ad9a Fixed new sonar smells
- Reduced constructor parameters in Exporter
- Removed Throwable#printStackTrace calls
- Cleaned up SessionsMutator#toJSONMaps a little
- Replaced uses of getString/Number/ methods of PlanConfig with PlanConfig#get
2020-01-17 21:11:04 +02:00
Rsl1122
a5219dd901 Fixed broken tests 2020-01-17 21:11:03 +02:00
Rsl1122
9480245dae Made Geolocator init asynchronous. 2020-01-17 21:11:03 +02:00
Rsl1122
304d8da86b Changed back links /server -> /server/
Also for /network -> /network/

This was causing some issues with relative links when Plan was in
subdirectory eg address/plan/server would direct requests to address/v1/
instead of address/plan/v1/

Affects issues:
- Fixed #1210
2020-01-17 21:11:03 +02:00
Rsl1122
3d3c7289bb Fixed /v1/players permisison level
Affects issues:
- #1210
2020-01-17 21:11:03 +02:00
Rsl1122
ca89ab70d9 Prevent use of /plugins/Plan/web/ for export.
Warns if the export path is bad and falls back to 'Analysis Results'

Affects issues:
- Fixed #1194, Fixed #1279, Fixed #1195
2020-01-17 21:11:03 +02:00
Rsl1122
d22c850253 Changed sessionAccordion to use player names
Player names were in use previously, but changed to uuids to reduce
odd player name issues (On cracked servers the names can be whatever)

Encoded the playernames to URL (new session json parameter) and added that
to sessionAccordion

Affects issues:
- Fixed #1269
2020-01-17 21:11:02 +02:00
Rsl1122
d2b3b86154 Replace '+' with ' ' in exported file paths.
Affects issues:
- Fixed #1278
2020-01-17 21:11:02 +02:00
Rsl1122
6e4dce2553 Truncated some other Strings 2020-01-17 21:11:02 +02:00
Rsl1122
5bd325c2a7 Truncate weapon names to 30 chars
Affects issues:
- Fixed #1272
2020-01-17 21:11:02 +02:00
Rsl1122
16a5b41db5 Implemented new GeoLite2 & IP2C geolocators
- GeoLite2 downloads the file using License key, only if EULA is accepted
- Fallback to IP2C if GeoLite2 is not available
- Remove GeoIP.dat after successfully downloading GeoLite2-Country.mmdb
- Added case where geolocation fails to enable and doesn't cause issues

- Adds Apache commons-compress to the dependencies because of a tar archive

Affects issues:
- Fixed #1273
2020-01-17 21:11:02 +02:00
Risto Lahtela
8d86a752a9
Update versions.txt 2020-01-14 21:40:56 +02:00
dependabot-preview[bot]
f90079edff Bump HikariCP from 3.4.1 to 3.4.2 in /Plan (#1285)
Bumps [HikariCP](https://github.com/brettwooldridge/HikariCP) from 3.4.1 to 3.4.2.
- [Release notes](https://github.com/brettwooldridge/HikariCP/releases)
- [Changelog](https://github.com/brettwooldridge/HikariCP/blob/dev/CHANGES)
- [Commits](https://github.com/brettwooldridge/HikariCP/compare/HikariCP-3.4.1...HikariCP-3.4.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-01-12 17:05:50 +02:00
Risto Lahtela
84bd679997
Changed http to https for repositories
https://www.alphabot.com/security/blog/2020/java/Your-Java-builds-might-break-starting-January-13th.html
2020-01-10 12:29:55 +02:00
Risto Lahtela
920ef0153a
Update versions.txt 2020-01-06 14:01:24 +02:00
dependabot-preview[bot]
a9d9e0d718 Bump dagger-compiler from 2.25.3 to 2.25.4 in /Plan
Bumps [dagger-compiler](https://github.com/google/dagger) from 2.25.3 to 2.25.4.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.25.3...dagger-2.25.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-30 05:38:13 +00:00
dependabot-preview[bot]
7653595c1c Bump dagger from 2.25.3 to 2.25.4 in /Plan
Bumps [dagger](https://github.com/google/dagger) from 2.25.3 to 2.25.4.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.25.3...dagger-2.25.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-30 05:30:39 +00:00
yukieiji
ce23e41607 Update locale_JA (#1267)
* Update locale_JA.txt

Fix and translation of untranslated parts

* Update locale_JA.txt
2019-12-27 15:18:02 +02:00
dependabot-preview[bot]
061804a73a Bump sqlite-jdbc from 3.28.0 to 3.30.1 in /Plan
Bumps [sqlite-jdbc](https://github.com/xerial/sqlite-jdbc) from 3.28.0 to 3.30.1.
- [Release notes](https://github.com/xerial/sqlite-jdbc/releases)
- [Changelog](https://github.com/xerial/sqlite-jdbc/blob/master/CHANGELOG)
- [Commits](https://github.com/xerial/sqlite-jdbc/compare/3.28.0...3.30.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-24 05:26:32 +00:00
Risto Lahtela
ae3b6b8d59
Update versions.txt 2019-12-21 11:38:08 +02:00
Risto Lahtela
d5a26905ff
Update README.md 2019-12-19 16:14:04 +02:00
dependabot-preview[bot]
dcbd43f33d Bump geoip2 from 2.12.0 to 2.13.0 in /Plan
Bumps [geoip2](https://github.com/maxmind/GeoIP2-java) from 2.12.0 to 2.13.0.
- [Release notes](https://github.com/maxmind/GeoIP2-java/releases)
- [Changelog](https://github.com/maxmind/GeoIP2-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/maxmind/GeoIP2-java/compare/v2.12.0...v2.13.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-19 05:27:58 +00:00
Rsl1122
a3cd3adb32 Cleaning up some code:
- Some extension API implementation things refactored
- getOrDefault+put calls replaced with computeIfAbsent
  using Maps#create, Lists#create
- stream().map(mapper).collect(toList/toSet) optimized
  using Lists#map, #mapUnique
- stream().filter(by).collect(toList) optimized
  using Lists#filter
2019-12-19 00:09:29 +02:00
Rsl1122
241cdbe82e Fixed compile error introduced in previous commit 2019-12-17 10:49:50 +02:00
Rsl1122
732c7858d0 Fixing Sonar smells:
- Removed unused code in Reflection
- Removed duplicated Strings in GMTimes
- Added private constructor to TimeZoneUtility
- Renamed local variable in RegisterDateMinimizationPatch
- Replaced Function<String, Boolean> with Predicate in ExtensionRegister
- Changed AFKListeners to use primitive boolean
- Changed Config#get(Setting<Boolean>) uses to isTrue and isFalse
- comment to NukkitListenerSystem
2019-12-17 10:41:50 +02:00
Rsl1122
b3325bfc6e Comment jacoco report path to see if it fixes sonar 2019-12-17 10:00:38 +02:00
Rsl1122
3e57cf45e4 Fixed relative links on sessionAccordion on /network page
- Added jyhsu2000 to contributor list

Note: #1258
2019-12-17 09:31:16 +02:00
Risto Lahtela
4776b1b058
Update gradle.yml 2019-12-17 09:22:48 +02:00
dependabot-preview[bot]
dcccca4e1d Bump mockito-junit-jupiter from 3.2.0 to 3.2.4 in /Plan (#1256)
Bumps [mockito-junit-jupiter](https://github.com/mockito/mockito) from 3.2.0 to 3.2.4.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.2.0...v3.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-17 09:08:02 +02:00
dependabot-preview[bot]
18aa91a8c7 Bump dagger-compiler from 2.25.2 to 2.25.3 in /Plan (#1255)
Bumps [dagger-compiler](https://github.com/google/dagger) from 2.25.2 to 2.25.3.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.25.2...dagger-2.25.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-17 09:07:41 +02:00
dependabot-preview[bot]
d40952fee7 Bump slf4jVersion from 1.7.29 to 1.7.30 in /Plan (#1257)
Bumps `slf4jVersion` from 1.7.29 to 1.7.30.

Updates `slf4j-nop` from 1.7.29 to 1.7.30
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](https://github.com/qos-ch/slf4j/compare/v_1.7.29...v_1.7.30)

Updates `slf4j-api` from 1.7.29 to 1.7.30
- [Release notes](https://github.com/qos-ch/slf4j/releases)
- [Commits](https://github.com/qos-ch/slf4j/compare/v_1.7.29...v_1.7.30)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-17 09:07:01 +02:00
dependabot-preview[bot]
4e8f476499 Bump mockito-core from 3.2.0 to 3.2.4 in /Plan (#1254)
Bumps [mockito-core](https://github.com/mockito/mockito) from 3.2.0 to 3.2.4.
- [Release notes](https://github.com/mockito/mockito/releases)
- [Commits](https://github.com/mockito/mockito/compare/v3.2.0...v3.2.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-17 09:06:38 +02:00
dependabot-preview[bot]
5d0ead8532 Bump dagger from 2.25.2 to 2.25.3 in /Plan (#1253)
Bumps [dagger](https://github.com/google/dagger) from 2.25.2 to 2.25.3.
- [Release notes](https://github.com/google/dagger/releases)
- [Changelog](https://github.com/google/dagger/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/dagger/compare/dagger-2.25.2...dagger-2.25.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-12-17 09:06:26 +02:00
KID
905fcfc1e8 Use relative path in Player Page button and Server Analysis button (#1258) 2019-12-17 09:06:05 +02:00
Rsl1122
d5864bf594 12am now at start of PunchCard
An earlier fix attempt for another bug #247 (ages ago)
was still in the code, moving 12 am to the next day by
adding 24 hours to the time.

Fixed by removing the check

Affects issues:
- Fixed #712
2019-12-16 16:30:35 +02:00
Rsl1122
00d366748d Fixed Punchcard not using TimeZone
- Started using TimeZone in PunchCard

Affects issues:
- Fixed #1250
2019-12-16 16:26:42 +02:00
Rsl1122
9c5d503526 Changed Punchcard to say 12am instead of 0am
Affects issues:
- #712
2019-12-16 15:46:47 +02:00
Rsl1122
4611c327d4 Improved Extension error cases
- Extensions can now be disabled even when the creation fails
- Extension creation error stack traces are pruned better

Affects issues:
- #1248, #1246
2019-12-16 15:22:46 +02:00
Risto Lahtela
a7baf157d8
Update gradle.yml 2019-12-16 12:38:48 +02:00
Rsl1122
13e00543c2 Implemented Access-Control-Allow-Origin
- Added Config setting Webserver.Security.CORS.Allow_origin
- Webserver returns the header for all requests
- Added an HTTP 204 response for OPTIONS-method to speed up CORS requests.

Affects issues:
- Close #1251
2019-12-16 12:36:14 +02:00
Risto Lahtela
eb7dd381b1
Update gradle.yml 2019-12-16 12:09:06 +02:00