Commit Graph

36 Commits

Author SHA1 Message Date
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 9e11d9f484 Removed untrusted data from exception messages in case they end up on the webpage 2023-01-15 10:04:10 +02:00
Aurora Lahtela aa897fe8de Implemented support for reverse-proxy subdirectory addresses
Reverse proxied version of React website now works
when subdirectory address is used (eg. /plan/...)

The functionality was unit tested to ensure things work
2023-01-06 14:24:18 +02:00
Aurora Lahtela f36ed678a3 Implemented register page in react 2022-11-25 16:49:06 +02:00
Aurora Lahtela 86f6cffc66 Enable query page in Frontend BETA 2022-11-22 10:30:02 +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 4195865394 Enable network page in Frontend BETA 2022-09-11 19:32:42 +03:00
Aurora Lahtela c607ef2869 Rewrite /errors page with React 2022-09-01 18:59:59 +03:00
Aurora Lahtela 4c53a9a406 Enabled React server page in Frontend BETA
Various fixes to React frontend

- Implemented Extension DataTables table support
- Fixed colors in night mode
- Fixed DataTables night mode
- Fixed chart opacity in night mode (HighCharts doesn't like hsl values)
- Fixed color selector buttons in night mode
- Translated Login button
- Added license to package.json
- Changed Extension endpoint table representation to objects to allow value formatting
2022-08-27 22:26:30 +03:00
Aurora Lahtela b5005afbc5 Implement Login page using react 2022-08-18 18:53:35 +03:00
Aurora Lahtela 5382049dcd Show React version of /players page if opted to Frontend BETA 2022-06-05 22:20:30 +03:00
Aurora Lahtela 3822155b40
Frontend BETA: Rewrite Player page with React (#2312)
* Add extension data to /v1/player endpoint
* Use node gradle plugin for building with yarn
* Add /v1/whoami endpoint
* Add back button to sidebar
* Selenium Tests for locale related js errors
* Convert locale system to use YAML-based storage
* Added a conversion process that runs on startup
* Replace cravatar.eu with crafatar.com for skins (more reliable)
* Add the Header made by Kopo to React

Co-authored-by: Antti Koponen <koponen942@outlook.com>

Affected issues:
- Resolve #1733
- Fixed #1092
- Resolve #1895
- Resolve #1965
- Partial #2260 
- Partial #2099
2022-04-06 17:37:23 +03:00
KairuByte 364a407177
Append version string to all resource URLs (#1975)
Co-authored-by: Aurora Lahtela <24460436+AuroraLS3@users.noreply.github.com>
2021-11-10 20:57:33 +02:00
Risto Lahtela cd5590bb32 Added /errors page for reading error logs 2021-06-13 11:25:15 +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
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 714b1a2b0c Stored plugin tabs in different cache 2021-02-12 09:50:40 +02:00
Risto Lahtela 76dc1a98a7 Updated locale
- Login & Register pages now translate
- Query page now translates
- Version information modal now translated
- Some things had gone on multiple lines and as the result were not
  translating, that was fixed.
- Updated locale files
2021-01-30 13:38:41 +02:00
Risto Lahtela 6ff2d68b99 Added a /query page
What currently works:
- Adding filters dynamically
2021-01-29 11:02:33 +02:00
Risto Lahtela e53b9f1602 Replace ErrorHandler usage with ErrorLogger
This was done to get deprecation to show up where context is not
given to the error logger.
2020-05-14 16:57:29 +03:00
Risto Lahtela 3903a266a3
Added Login & Registration pages (#1422)
- Added login.html and register.html
- Added .bg-gradient
- Added logonsine.js for a decoration.
- Added /login, /register, /auth/login, /auth/logout and /auth/register endpoints
- Redirects to /login if cookie not present with auth enabled.
- Basic login functionality using cookies
- Registration page allows new kind of registration that doesn't log passwords on console.
- Fixes a bug with stippets that blocked any cross-plugin modifications (PageExtension API)
- Fixes a typo with css snippet code that made the css not apply (PageExtension API)
2020-05-02 23:31:29 +03:00
Risto Lahtela dae96ef53d Implemented ResourceSvc
- Customizable resources
- Snippets
- Fixed issue with a web resource being fetched on enable (favicon in ResponseResolver)
- Fixed some issues with Config#addNode used in an orElse block of Optional
- Deprecated PlanFiles#getCustomizableResourceOrDefault
2020-03-20 22:26:02 +02:00
Risto Lahtela aca9d22e1f Applied theme to pages properly
New utility UnaryChain:
- Allows writing nested modifications as a chain
2020-03-14 12:40:23 +02:00
Risto Lahtela 77d33c991a Moved NotFoundException to API 2020-03-14 12:40:22 +02:00
Risto Lahtela c204ce9b1b Fixed some code smells & bugs 2020-03-14 12:40:19 +02:00
Rsl1122 f869de01b8 Applied Locale to Pages 2020-03-14 12:40:00 +02:00
Rsl1122 420e098d41 Moved ServerPage colors to the JSON responses 2020-03-14 12:39:57 +02:00
Rsl1122 a8126f6669 Rename VersionCheckSystem -> VersionChecker 2020-03-14 12:39:56 +02:00
Rsl1122 77dbc74cc5 Refactored Root page redirect
- Fixed issue where response code was not set
- Fixed ResponseSender not setting values for response headers
- Changed ResponseResolver to mostly use Response instead of _old
2020-03-14 12:39:31 +02:00
Rsl1122 6ed6dd1f9f Refactored Resolver to use new Request class
URIPath and URIQuery were not enough info on the Request
In addition the Request supports
- WebUser
- Request Headers
- Request method (GET, POST etc)
2020-03-14 12:39:30 +02:00
Rsl1122 e997289a20 Refactored /players page to use ResolverService
- Changed all css, js and png requests on player page to use relative address.
- Changed the export accordingly

Deprecated a lot of the old response factory methods
2020-03-14 12:38:32 +02:00
Rsl1122 2914966650 Refactored /players page to use ResolverService
Deprecated a lot of the old response factory methods
2020-03-14 12:37:25 +02:00
Rsl1122 2736ba042a Refactored /debug page to use ResolverService
Some issues that were identified:
- Going to /debug/ makes the style requests return the debug page content
  because the /debug resolver is used
- In the future when / is to be resolved it might override a bunch of requests.
- Use of RequestTarget as incompatible with URIPath for some reason which lead to infinite
  redirect, so the attempted change was reverted before this commit.
- Some Responses are using PlanFiles to obtain a html file (SRP violation)

Rest of the pages still use the old resolution that is now deprecated.
2020-03-14 12:37:23 +02:00
Rsl1122 06d4d2fef2 Moved utilities.formatting -> delivery.formatting 2019-09-03 09:32:31 +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