Commit Graph

20 Commits

Author SHA1 Message Date
Aurora Lahtela de9f9ec5b4
Sonar fixes (#3510)
* Remove deprecated code

- RemoveUnsatisfiedConditionalPlayerResultsTransaction.java
- RemoveUnsatisfiedConditionalServerResultsTransaction.java

* Fix apache compress deprecations

- Use org.apache.commons.io.IOUtils instead of org.apache.commons.compress.utils.IOUtils
- Use TarArchiveInputStream#getNextEntry instead of getNextTarEntry

* Rename variable in BukkitPingCounter

* Extract ApiServices from PlanSystem
2024-03-09 14:43:41 +02:00
Aurora Lahtela 7368eccbbd Optimize unsatisfied extension conditional value cleanup
Extensions support @Conditional value where a boolean provider determines if other values should exist.
Unsatisfied values were being removed during database cleanup task.
The cleanup transaction was very slow and could hang the server if it was performed near shutdown.

The cleanup is now performed on boolean value change (individual value for one player)
instead of with large cleanup transaction (all values and all players).

Affects issues:
- #3436
2024-03-02 08:53:38 +02:00
Aurora Lahtela 4615c6b6b0 Optimize unsatisfied condition removal for players with user_id join
The query was joining based on UUID which can be slow since it's a string.
2024-02-03 09:13:00 +02:00
Aurora Lahtela 01d904c7d1
2905/remove old web files (#3225)
* Removed Plugin.Use_Legacy_Frontend feature flag
* Remove version modal html generation in Java
* Remove contributor list html generation in Java
* Remove more html generation in Java
* Delete old web file bundle
* Removed locale html/js translation from backend
* Move Html#swapColorsToSpan to the React side
* Reimplement datatables and backend for preferences
* Load preferences from backend
* Usability fixes to the players table
* Delete WebAssetVersionCheckTask
* Add new locale to locale files
* Export defaultPreferences as json on react export

Affects issues:
- Close #2905
2023-09-23 22:24:34 +03:00
Aurora Lahtela a4a1001a8d Display new player name as light green in kills tables
Affects issues:
- Close #1262
2022-11-13 15:49:32 +02:00
Henri Schubin 96a14a24f5
Component DataExtension API (#2686)
* Component DataExtension API

* Finish up component extension data, add react-mcjsonchat library to the react dashboard in preparation for the rewrite

* Update Plan/common/src/main/java/com/djrapitops/plan/extension/implementation/results/ExtensionComponentData.java

* Update Plan/common/src/test/java/com/djrapitops/plan/storage/database/queries/ExtensionsDatabaseTest.java

* Update Plan/common/src/main/java/com/djrapitops/plan/extension/implementation/providers/gathering/DataValueGatherer.java

Co-authored-by: Aurora Lahtela <24460436+AuroraLS3@users.noreply.github.com>
2022-10-29 08:23:16 +03:00
Aurora Lahtela 3eff46523d Test and fix user move and combination transactions 2022-08-27 15:20:23 +03:00
Aurora Lahtela b646e18c68
Fix fabric join address gathering (#2546)
- Refactored player online listeners to move common. often changed logic to common package
- Changed method fabric uses to get join address to use the client handshake packet which has the address
- Added command `/plan db removejoinaddresses {server}` to allow removing invalid join address data
- Changed build pipeline to always build jars even if tests fail
- Disabled one flaky test

Affects issues:
- Closed #817
- Fixed  #2526
2022-08-14 20:35:32 +03:00
Aurora Lahtela 368f1e5002 Various fixes to transactions
- Hopefully fix user_id relation error once and for all.
- Set timezone to 00:00 properly when MySQL initializes connection

Affects issues:
- Close #1239
2022-05-26 21:51:22 +03:00
Aurora Lahtela 52b8afe6cb Store join addresses separately and link to plan_sessions table for time data.
Affects issues:
- #2362
2022-05-20 19:32:00 +03:00
Aurora Lahtela b74e338721
Query optimizations (#2320)
* Optimized network ping table query
* Removed icon id selection subqueries

- Take the icon ID into memory when the icons are stored

* Fix typos in the optimized ping table query
* Optimize server ping table query
* Attempt to optimize /v1/servers tps data query
* Optimize ping and geolocations tables uuid -> user_id foreign key
* Prevent Plan from crashing if patching takes too long

- HikariCP auto commit was true for some reason even though all transactions have commit mechanism built-in.
- The setting was reset during connection recreation and that could cause an index out of bounds error.

* Reduce try-nesting in ExecStatement
* Use user_id and server_id instead of uuid for plan_world_times table
* Use user_id and server_id instead of uuid for plan_sessions and plan_user_info table
* Fix more issues and test queries used by Query Filters
* Use deferRender for data tables to load data into the table faster
* Swap uuids to user ids for query page filters

Fixes an issue where SQL is too big to execute

Affects issues:
- #2196
2022-04-09 20:52:29 +03:00
Risto Lahtela 113d46669b
DataExtension Builder API (#1833)
* Rewrote annotated extension method extraction
* Enclose annotation based methods into a single ExtensionDataBuilder

All of the reflection related to extension annotation was difficult,
so now it's all dealt with in one place and it's abstracted away with the
upcoming builder based API.

Some odd additions had to be made to the interface, but they are mostly harmless,
as the annotations are used as method parameters where necessary. This way the
users of the API are unable to give weird values.

It was possible to reuse MethodWrapper and Parameters classes for calling the methods.

* Refactored server value storage to use builder data
* Refactored player value storage to use builder data
* Refactored table gathering to use builders
* Handle extension errors properly
* Javadocs for DataExtension builder API
* Removed DataProviders based implementation

- Renamed ProviderValueGatherer to DataValueGatherer
2021-04-07 19:09:38 +03:00
Risto Lahtela 3ca98bb634 Enabled ExtensionsDatabaseTest again
Might hang in Github Actions, but remains to be seen if changes to
testing environment have fixed the test hanging
2021-03-18 11:27:45 +02:00
Risto Lahtela 8f85c23c2f Refactoring: ActiveSession, FinishedSession and ServerUUID
- Split Session into ActiveSession and FinishedSession, replaced their usage
- Replaced UUID with ServerUUID when the data type

Affects issues:
- Close #1746
2021-03-12 18:03:12 +02:00
Rsl1122 94c9dd3f95 Username change Rsl1122 -> AuroraLS3 2021-02-13 15:16:03 +02:00
Risto Lahtela 7480aa9d63 Rename things for better understanding
fetchQueryPreviewPlayersOnline -> fetchViewPreviewGraphData
FilterQuery -> SpecifiedFilterInformation
ExtensionQueryPlayerDataTableQuery -> ExtensionQueryResultTableDataQuery
ExtensionServerPlayerDataTableQuery -> ExtensionServerTableDataQuery
2021-01-31 10:55:08 +02:00
Risto Lahtela d402b1c832 Refactored table html rendering classes away from TableContainer
TableContainer is deprecated and this has been on the todo list for a while
2021-01-01 10:00:35 +02:00
Risto Lahtela 6edb52d341 Attempt to fix sonarcloud test coverage 2020-05-30 10:28:08 +03:00
Risto Lahtela 29fb686a50 Commented out a test that hung Github Actions for 6h 2020-05-29 20:59:57 +03:00
Risto Lahtela e2e86cadc3 Extension RemoveEverythingTransaction test 2020-03-14 12:40:28 +02:00