Commit Graph

33 Commits

Author SHA1 Message Date
Aurora Lahtela 621e0b6f6e Add Network Calendar to Network Overview
Does the same as Server Calendar but for the whole network.

Affects issues:
- Close #3111
2023-09-30 17:10:18 +03:00
Aurora Lahtela f7cec19372
Multi proxy support (#2968)
- Change proxy server info storage to allow multiple proxies to exist in the database
- Allow naming Proxies with Server.Name config setting
- Server.IP is no longer required to be set during installation
- Change logic reliant on single proxy server to consider multiple proxies
  - If multiple proxies have webserver or export enabled, the address given by commands can be any of them.
- Network players online graph now stacks if redisbungee is not used. Individual players online graphs for different proxies can be viewed from Performance tab.
- Last Peak and All Time Peak are not given for multi-proxy networks without redisbungee since it would be expensive to calculate.
- Improved network performance tab considerably
- /plan info displays the Server UUID of the current server
- /plan server link goes to /server/UUID instead of /server/Name
- Fix join address graphs not loading if strict GROUP BY is enabled in MySQL

Affects issues:
- Close #1454
2023-04-09 10:10:28 +03:00
Aurora Lahtela 88b4191f6b
Implement http caching (#2840)
* Implement first response parts of http caching
* Implement cached response for static resources
* Implement HTTP caching for json responses
* Fix last seen value for online players
* Implement http caching for pages (.html)
* Use placeholder cache even with async requests.

Affects issues:
- Close #2813
2023-01-22 10:18:14 +02: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
Aurora Lahtela 0a14d17d7a Fixed issues related to MySQL ONLY_FULL_GROUP_BY
MySQL breaks GROUP BY syntax of standard SQL, and allows arbitrary columns with aggregate functions.
The ONLY_FULL_GROUP_BY stops this, instead raising an error. Since the SQL was originally designed
with this mode on, restricting the SQL broke the code in a few places.

Adding the extra group by clauses solves the issue without effecting query results.

These issues will be caught by MySQLTest in the future, since the issues could be reproduced by
enabling ONLY_FULL_GROUP_BY mode.

Affects issues:
- Fixed #2619
2022-09-25 10:30:13 +03:00
Aurora Lahtela 92910d647a Revert API jar to Java 8 and update to Java 11 APIs 2022-06-18 11:31:53 +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
Aurora Lahtela d06c753be1
Query page view server selector (#2117)
Affects issues:
- Close #1829
2021-10-09 13:17:12 +03:00
Risto Lahtela 6c26fc529e
Add server name to kill lists (#2013)
* Added server name to kill objects (and changed them a lot)
* Added server name to kill tables

Affects issues:
- Close #1437
2021-07-18 18:07:45 +03:00
Risto Lahtela 1bded295e2 Fixed "Plan" appearing as server name on session accordion 2021-04-15 09:42:43 +03: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 15cbbd86a1 Fixed AFK time calculation of query results 2021-02-12 13:11:57 +02:00
Risto Lahtela 0b3fb94509 Fixed the session summary query 2021-02-03 21:21:09 +02:00
Risto Lahtela 4a95ad5f5d Fixed session aggregate calculations in Query page
Players with no sessions within view did not affect the data
2021-02-03 19:46:00 +02:00
Risto Lahtela ae4fb0c98e Fixed error in serverPreferencePieValuesAreCorrect test 2021-02-02 14:01:16 +02:00
Risto Lahtela 25e98ef7b5 Reproduced, tested and fixed DbOpException
Error was caused by table name alias in the query

Affects issues:
- Fixed #1731
2021-02-02 07:51:43 +02:00
Risto Lahtela 4b4aa2d7d9 Added a players online graph to Query page to help selecting view 2021-01-29 11:58:06 +02:00
Risto Lahtela e8e7258443 Fixed an error related to query on query page 2021-01-29 11:04:45 +02:00
Risto Lahtela c0e253d56d Added session aggregates to query results 2021-01-29 11:02:48 +02:00
Risto Lahtela aac7bdc632 Begun work on Filters:
- Filter interface
- Wrote 5 filters
- Wrote QueryFilters that manages different Filters

Plan is to link the QueryFilters to Resolvers:
- One that returns all filters and their options as json
- One that users the query parameters (eg ?q={json}) and gets the filters
  - FilterQuery has a static method to parse the json
2021-01-29 11:02:31 +02:00
Risto Lahtela b479753fc9 Fixed server preference pie for network page
- Flipped the dates in the query (ugh)
- Proper names for the servers in the pie

Affects issues:
- Fixed #1728
2021-01-29 11:01:08 +02:00
Risto Lahtela a6a606494d PlayerKill now supports killer UUID 2021-01-01 10:00:36 +02:00
Risto Lahtela fd6877dcad Split Session related queries to own test class:
- Added a lot of new utility methods to RandomData
- Fixed a bug where duplicate PlayerKills were queried
  This bug was discovered by accident when PlayerKill saving was randomized
  for the tests.
- Testing constant REGISTER_TIME extracted
- String truncation constant extracted for KillsTable
  This was causing some Session equals issues due to truncated weapon names
- Session now sorts PlayerKill list as this was assumed in some places.
2020-03-14 12:40:27 +02: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 a50576e6e9 Fixed wrong usage of the word 'parse'
Reason: Parse means extracting information - In many cases the word was being
        used wrong (In Finnish 'parsia' means 'to patch together', which caused
        the wrong use)

The word 'parse' replaced with 'build', 'create' or 'generate' where appropriate
2019-12-05 20:25:42 +02:00
Rsl1122 1511162f5b Fixed a bunch of IntelliJ inspections
- Fixed possible null issues with NicknameCache
- Removed bunch of unused code, such as:
  - Point reduction algorithm implementations
  - HighCharts data String parsing methods
  - Unused Mutators
  - Unused AnalysisKeys
  - Leftovers from ConnectionSystem (Response codes)
  - Unused queries (Leftovers from Server box and Players table queries)
  - rendering.html.icon.Icons
- Made bunch of fields final

Note that old deprecated API classes do not have signature changes.
2019-11-02 16:28:43 +02:00
Rsl1122 549cad4da5 Use getDouble with SQL function AVG()
MySQL that restricts float being queried with getLong caused an
SQLException

All usages of getLong with AVG function replaced with
getDouble cast to long.

Affects issues:
- Fixed #1181
2019-10-19 12:42:25 +03:00
Rsl1122 e6696abffa PlaceholderAPI support (Thanks to aidn5) 2019-09-29 13:00:55 +03:00
Rsl1122 2139067ac5 Fixed timezone offset trouble:
- Day by Day graph no longer applies timezone offset twice
- MySQL no longer applies timezone offset on its own
  (Connections set timezone to UTC)
- Server calendar possibly fixed
2019-09-23 18:38:32 +03:00
Rsl1122 2412f5b9d5 Optimized (memory) /server players table query 2019-09-15 13:25:18 +03:00
Risto Lahtela 66a19d7de1 Removed system. from packages (#1147)
* system.commands -> commands

* system.delivery -> delivery

* system.gathering -> gathering

* system.identification -> identification

* system.processing -> processing

* system.settings -> settings

* system.storage -> storage

* system.version -> version

* system -> com.djrapitops.plan
2019-09-03 09:32:30 +03:00