Commit Graph

140 Commits

Author SHA1 Message Date
Aurora Lahtela 5a2bdaf6ba
2360/plugin versions (#3249)
* Add methods to gather plugin versions from servers
* Gathering and storage for plugin version history
* Test plugin gathering
* Test plugin metadata storage
* /v1/pluginHistory endpoint
* Plugin history tab
* Plugin history to performance tab
* Possibly fix ConfigChange.MovedValue being applied all the time
* Updated locale files
* Export pluginHistory for server page
* Add plugin history to network page
* Access control and improvements
* Remove pluginHistory from export since it now requires auth
* Fix access visibility tests
* Fix VelocitySensor during test

Affects issues:
- Close #2360
2023-10-07 08:39:00 +03:00
dependabot[bot] 7ba3dd23f3
Bump daggerVersion from 2.47 to 2.48 in /Plan (#3187)
* Bump daggerVersion from 2.47 to 2.48 in /Plan

Bumps `daggerVersion` from 2.47 to 2.48.

Updates `com.google.dagger:dagger` from 2.47 to 2.48
- [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.47...dagger-2.48)

Updates `com.google.dagger:dagger-compiler` from 2.47 to 2.48
- [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.47...dagger-2.48)

---
updated-dependencies:
- dependency-name: com.google.dagger:dagger
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.dagger:dagger-compiler
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix duplicate binding issue

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aurora Lahtela <24460436+AuroraLS3@users.noreply.github.com>
2023-10-01 16:55:19 +03: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 b2d78bb491 Add support for dynamic DNS in IP Allowlist
Affects issues:
- Close #1502
2023-05-06 15:54:17 +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 e3bea9ee77 Add online player names to player tab completion
Affects issues:
- Close #2216
2022-11-22 13:25:12 +02:00
Aurora Lahtela 7dce52245f Remove some uses of PlanPlugin#getDataFolder (deprecated) 2022-08-31 12:48:19 +03:00
Aurora Lahtela be3da8ee2e Use newer Hover api for Bungee message part builder 2022-08-31 09:14:50 +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 37f11e3269 Remove PlanSystem#getErrorLogger
This code was improper use of dagger for dependency injection,
and could be fixed by introducing new method to Component classes
that gives the initialized ErrorLogger directly.
2022-07-15 08:34:18 +03:00
Aurora Lahtela b0be4f296d Use plugin classloader for thread context when initializing system
This allows ServiceLoader to find slf4j-nop provider for Jetty
preventing SLF4J "No provider" error

Affects issues:
- Fixed #2438
2022-07-15 08:21:23 +03:00
Aurora Lahtela 8f239b010c
Add Swagger & Swagger UI (#2470)
* Adds swagger dependencies and annotations for json endpoints for documentation
* Add swagger ui to react project
* Access control to swagger endpoints
* Include swagger.json in jars using custom configuration

Also:
* Reworked project shadow configurations to avoid shadowing shadow versions of modules

Why: Extra dependencies were being included when using shadow scope

What:
- modules no longer depend on shadow configurations,
  which speeds up IDEA indexing after build considerably
  (No need to index *-all.jars)
- 'shadow' scope is now used for artifacts that need to be included
- 'shadow' scope is also 'api' so that modules that depend on common
  can import the libraries. This may cause issues in projects
  depending on Plan so this may need to be reconsidered
- Relocations and exclusions were moved to plugin module
  org.slf4j is now included in 2 locations which may cause issues.
  Needs testing with servers
- Found out that all Extension dependencies include junit as compile
  scope which caused it to be included.

Affects issues:
- Close #1890
2022-07-13 21:21:20 +03:00
Rsl1122 aa67794881 Remove unnecessary files from jar and relocate Jetty 2022-07-03 10:54:01 +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 e9dcb591c8 Made MySQL tests 3 times faster (3.5 minutes vs 1 minute) 2022-04-18 15:10:33 +03:00
Aurora Lahtela 69c54fb5cb Fix some issues with data registering for new users 2022-04-11 19:08:05 +03:00
Aurora Lahtela 604bfd9e67 Add Plan version to /plan servers
Affects issues:
- Resolve #2245
2022-04-07 18:24:40 +03:00
Risto Lahtela a7478645bd Reduce the amount of tasks used for upkeep
- Ping gathering now uses a map of timestamps
  - Removes a task that waited for ping data to be reliable (one task / join)
- Cookie expiration now uses a map of timestamps
  - Removes a task that waited for cookie to expire (one task / login cookie)

Affects issues:
- Possibly fixed #1984
2022-01-06 15:43:48 +02:00
Henri S efd3b75a29
Database Driver downloading (#2144)
Affects issues:
- Fixed #1944
2021-10-31 13:16:47 +02:00
Aurora Lahtela ebb1108969
Comment out slimjar related configuration (#2138) 2021-10-27 18:43:14 +03:00
dependabot[bot] e066ff7215
Bump io.github.slimjar from 1.2.1 to 1.2.2 in /Plan (#2043)
* Bump io.github.slimjar from 1.2.1 to 1.2.2 in /Plan

Bumps io.github.slimjar from 1.2.1 to 1.2.2.

---
updated-dependencies:
- dependency-name: io.github.slimjar
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Added vshnv.tech repository for including the slimjar library jar

* use papermc.io/repo for downloading slimjar dependencies

Affects issues:
- Resolved https://github.com/slimjar/slimjar/issues/52
- Resolved https://github.com/slimjar/slimjar/issues/53

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Risto Lahtela <24460436+AuroraLS3@users.noreply.github.com>
2021-08-08 09:21:44 +03:00
Antti Koponen d29a94e6a4
Implement SlimJar as a runtime dependency downloader (#1990)
MySQL & SQLite are dynamically (down)loaded to the classpath instead of being shaded.

Affects issues:
- Close #1944
2021-08-07 15:29:54 +03:00
Emilia Dreamer a90f003462
Notify about old versions of html customized files (#2014)
Affects issues:
- Close #1995
2021-07-23 17:17:35 +03:00
Risto Lahtela cd2d0fcb0f Write new html customized Plan web files when Plan enables (no overwrite)
Affects issues:
- Close #1745
2021-07-17 16:28:18 +03:00
Risto Lahtela db0d3ff6ac Implemented more ways to get Ping on bukkit
Affects issues:
- Close #1962
2021-07-03 10:05:34 +03:00
Risto Lahtela e90606b68a
5.4: Java 16 support, remove H2 (#1932)
* Stop downloading dependencies at startup, include them instead
* 5.4: Removed H2
* Platform Abstraction Layer 5.0.0, delete dependency downloading
* Removed some unnecessary native sqlite drivers
* Serve jquery via CDN

Affects issues:
- Fixes #1886
- Close #1908 (No longer relevant, library no longer included)
2021-06-12 10:21:38 +03:00
Risto Lahtela fa4a2e6595
Gradle 7 Update by Kopo (#1931)
Updates gradle to version 7 and sorts out all the deprecated stuff

Affects issues:
- Clsoe #1871

Co-authored-by: Antti Koponen <koponen942@outlook.com>
2021-06-12 08:24:24 +03:00
Risto Lahtela 2c67e063ea Log message when loading server information 2021-04-26 14:16:43 +03:00
Risto Lahtela 6f73af4719 Delete old dependency cache directories 2021-04-23 10:40:09 +03:00
Risto Lahtela b6f1bb22c8 Updated PlatformAbstraction layer
- Replace usage of DepDownloader with MVNLoader

Affects issues:
- Fixed #1839
2021-04-23 10:23:50 +03:00
Risto Lahtela 2997e882a5 Fixed a bunch of IntelliJ inspection issues and typos 2021-03-23 11:57:01 +02:00
Risto Lahtela bfcb7eea85
Dependency downloading (#1795)
Affects issues:
- Fix #1759
2021-03-15 15:28:36 +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
Risto Lahtela e1bffbcc1f
Swap Abstract Plugin Framework for Platform Abstraction Layer library (#1787)
Replaced Abstract Plugin Framework with Platform Abstraction Layer

Large amount of changes due to removal of features from the library,
and change of the way the abstraction is achieved.
Removes features from Plan:

    Removed debug logging (Considered useless when debugging issues)
    Removed /debug page (Considered useless when debugging issues)
    Removed enable timing (Benchmarking utility was removed from the library)
2021-03-09 11:36:07 +02:00
Rsl1122 94c9dd3f95 Username change Rsl1122 -> AuroraLS3 2021-02-13 15:16:03 +02:00
Risto Lahtela 0769ddc3d4 Removed some unused variables I missed 2021-02-12 11:08:53 +02:00
Risto Lahtela 95af3f5f8b Removed JSONCache and its invalidation uses 2021-02-12 10:56:48 +02:00
Risto Lahtela b660c3b57b Moved JSON storage to delivery.webserver.cache 2021-02-10 13:11:12 +02:00
Risto Lahtela 3619ff814a JSON File storage clean task
- Cleans query files
- Cleans other json files that are old
2021-02-10 13:11:01 +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 76fe304dbd Replaced old links to repository with new one 2021-01-29 09:51:44 +02:00
dependabot-preview[bot] 1e0f875897
Bump bstatsVersion from 1.8 to 2.1.0 in /Plan (#1720)
* Bump bstatsVersion from 1.8 to 2.1.0 in /Plan

Bumps `bstatsVersion` from 1.8 to 2.1.0.

Updates `bstats-bukkit` from 1.8 to 2.1.0
- [Release notes](https://github.com/Bastian/bStats-Metrics/releases)
- [Commits](https://github.com/Bastian/bStats-Metrics/commits/v2.1.0)

Updates `bstats-sponge` from 1.8 to 2.1.0
- [Release notes](https://github.com/Bastian/bStats-Metrics/releases)
- [Commits](https://github.com/Bastian/bStats-Metrics/commits/v2.1.0)

Updates `bstats-bungeecord` from 1.8 to 2.1.0
- [Release notes](https://github.com/Bastian/bStats-Metrics/releases)
- [Commits](https://github.com/Bastian/bStats-Metrics/commits/v2.1.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Updated metrics imports

* Relocate Sponge bstats metrics

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Risto Lahtela <24460436+Rsl1122@users.noreply.github.com>
2021-01-25 12:09:36 +02:00
dependabot-preview[bot] 63bc4a667a
Bump bstatsVersion from 1.4 to 1.8 in /Plan (#1706)
* Bump bstatsVersion from 1.4 to 1.8 in /Plan

Bumps `bstatsVersion` from 1.4 to 1.8.

Updates `bstats-bukkit` from 1.4 to 1.8
- [Release notes](https://github.com/Bastian/bStats-Metrics/releases)
- [Commits](https://github.com/Bastian/bStats-Metrics/commits)

Updates `bstats-sponge` from 1.4 to 1.8
- [Release notes](https://github.com/Bastian/bStats-Metrics/releases)
- [Commits](https://github.com/Bastian/bStats-Metrics/commits)

Updates `bstats-bungeecord` from 1.4 to 1.8
- [Release notes](https://github.com/Bastian/bStats-Metrics/releases)
- [Commits](https://github.com/Bastian/bStats-Metrics/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Update bStats construction

Affects issues:
- Possibly fixed #1680

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Risto Lahtela <24460436+Rsl1122@users.noreply.github.com>
2021-01-20 16:43:37 +02:00
Risto Lahtela 9b692480da Patch proxy server detection
- Added a field is_proxy to plan_servers
  - Patch to populate the new field
  - Field is set to true when proxy enables to fix any broken data
  - Allows any name for a proxy
- Updated server save queries
- Changed isProxy method in Server.java to match the change
- Changed query for fetching the proxy server

Affects issues:
- Close #1678
2021-01-01 11:26:07 +02:00
Risto Lahtela c8fb39ada5 Replaced TaskSystem implementations with dagger modules
- Removes the need for duplicate code in 5 places in charge of registering
  the tasks for different platforms, as all the delays were the same too.

Affects issues:
- Close #1387
2021-01-01 10:00:38 +02:00
Risto Lahtela 87fd3b0762 Fixed Server ID not being stored in ServerInfoFile.yml 2020-11-18 09:19:46 +02:00
Rsl1122 6effdbec39 Full System no longer required for database tests
- Extracted ErrorLogger interface
- Created a new Component for Database tests
- Added TestAPFModule and TestSystemObjectBindingModule
- Database tests no longer enable the full system

Affects issues:
- Close #1401
2020-11-08 11:46:44 +02:00
Risto Lahtela 7420e46df2 Fixed SonarCloud code smells
- Redundancies:
  - MySQLDB: Removed null check
  - DeathEventListener: Removed warning suppression
  - several Test classes: Removed public class identifier
  - Unused private fields
- Constructors of abstract classes should be protected x31
- Added missing Parameterized types x2
- "throws" declerations for runtime EnableException
- Prevented Boxed Boolean from causing NPE in the future x15
- Renamed lesser scope variables that were hiding variables x12

- Some smaller ones that I was too tired to write down
2020-11-05 23:16:01 +02:00
Risto Lahtela e13516b43c Rewrote the way server information is loaded on enable
- The UUID of the server (and other info) is stored in a file
  on Proxy servers as well to speed up loading time.
- The information is stored in two places, with preference for the info in
  the file. The information is updated after the plugin has enabled.

This opens a possibility for a bug, where user changes UUID inside
Bungee file, leading to the Bungee storing a second BungeeCord entry to
the database. This can lead to issues. If this comes up the file
can be changed to different format (to deter users from modifying it manually)

Affects issues:
- Close #1247
  - Fixed #1478
  - Fixed #1496
  - Fixed #1637
2020-11-05 20:17:48 +02:00
Risto Lahtela eff5faba44 Improved code a bit for errors 2020-10-06 10:59:59 +03:00