Commit Graph
150 Commits
Author SHA1 Message Date
Dane Everitt a81c3b4d52 Add support for stripe-style identifiers on existing models with UUIDs (#5548)
This is a partial implementation to begin moving towards stripe-style
identifiers for resources in the system. Any models with an existing
`uuid` column can easily be updated to return an identifier in the
format of `prfx_xyz` where `prfx` is a four character prefix, and `xyz`
is the UUID, encoded using base-32.

These are quite easy to use within the API layer because we just need to
do one quick transformation to extract the UUID for those models. This
PR implements that logic for servers in the `SubstituteClientBindings`
logic.

A future PR will need to come through and handle identifiers for models
that _don't_ currently use UUIDs for reference that we want to expose to
clients. In those cases it is easier to just generate base-32 encoded
UUID7s that get stored in the database and indexed. They follow the same
base approach, but you don't need to do any transformations in the code
(other than stripping the prefix, unless we decide to store the prefix).

There is also now a `PTERODACTYL_USE_SERVER_IDENTIFIERS` environment
variable, that when set to true, updates the front-end and API response
to use this new identifier in place of the `uuidShort` value.
2026-02-14 11:21:57 -08:00
Dane Everitt a264791fd4 Update PHP and JS dependencies to latest versions and modernize codebase (#5446) 2025-12-20 15:55:13 -08:00
Matthew Penner 8ca098940a chore: update composer dependencies (#5198)
Signed-off-by: Matthew Penner <me@matthewp.io>
2024-10-21 19:18:20 -06:00
Daniel Barton 371c7a671d api: fix docker_image validation for local images (#5103) 2024-05-21 13:29:31 -06:00
Matthew Penner f671046947 admin: tweaks to validation and rendering 2024-04-10 18:13:25 -06:00
Matthew Penner 1172d71d31 app: improve docker_image validation 2024-04-10 17:22:29 -06:00
Matthew Penner 1d38b4f0e2 Laravel 10 (#4706) 2023-02-23 12:30:16 -07:00
Lance Pioch a4f6870518 server: track reinstall failures differently from initial install failures (#4531) 2022-11-21 13:53:54 -07:00
Boy132 032e4f2e31 Apply node maintenance mode to servers (#4421) 2022-11-06 16:02:30 -07:00
Matthew PennerandDaneEveritt cbcf62086f Upgrade to Laravel 9 (#4413)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
2022-10-14 10:59:20 -06:00
Matthew Penner 815e1e4c4d Ensure server is not in a conflicting state before initiating a transfer (#4403) 2022-10-04 19:57:24 -06:00
Matthew Penner 8e1a21563e server: add configuration for install notifications (#4331)
* server: track `installed_at`, only send install notification on first install
* server: add configuration for install notifications
2022-09-25 13:16:58 -06:00
DaneEveritt 0b2c0db170 Remove last references to audit logs 2022-05-29 18:20:54 -04:00
DaneEveritt 2fc5a734f9 Update backup logic to use activity logs, not audit logs 2022-05-29 16:19:04 -04:00
DaneEveritt e313dff674 Massively simplify API binding logic
Changes the API internals to use normal Laravel binding which automatically supports nested-models and can determine their relationships. This removes a lot of confusingly complex internal logic and replaces it with standard Laravel code.

This also removes a deprecated "getModel" method and fully replaces it with a "parameter" method that does stricter type-checking.
2022-05-22 14:10:01 -04:00
Dane Everitt f558bc880a Correctly handle error; don't overwrite laravel method 2021-01-30 18:07:48 -08:00
Dane Everitt e30a765071 Simplify logic when a server is in an unsupported state 2021-01-30 13:28:31 -08:00
Dane Everitt be26921fcc Merge branch 'develop' into dane/restore-backups 2021-01-30 10:10:29 -08:00
Dane Everitt 5515871b2f Turns out I hate that huge space formatting, disable that mess 2021-01-27 20:52:11 -08:00
Dane Everitt 0a2c89e9f4 Reeformat with new rules post merge 2021-01-25 19:20:51 -08:00
Dane Everitt 663143de0b Merge branch 'develop' into dane/restore-backups 2021-01-25 19:16:40 -08:00
Dane Everitt c449ca5155 Use more standardized phpcs 2021-01-23 12:33:34 -08:00
Dane Everitt e700b4da78 Whoops, don't store the model until we've successfully completed the transaction internals 2021-01-18 20:14:38 -08:00
Dane Everitt 87371901c0 Add base logic to support sending a request to restore a backup for a server 2021-01-17 17:51:09 -08:00
Dane Everitt cb40b280a4 Fix single failing test 2021-01-17 15:55:46 -08:00
Dane Everitt a75a347d65 Remove suspended & installing fields, replace with single status field 2021-01-17 15:51:56 -08:00
Dane Everitt ccecaa6694 Add basic auditing for filesystem actions
Specifically skipping read actions since there isn't much to say there, and it generally wouldn't be very helpful (plus, likely to generate lots of logs).
2021-01-17 11:46:08 -08:00
Dane Everitt b15679d3bb Add base logic for audit logging 2021-01-17 10:49:36 -08:00
Matthew Penner e6c4a68e4a Update logic for tracking a server's transfer state 2020-12-17 10:35:54 -07:00
Dane Everitt c00e5b36a5 Return all servers for a node as a paginated response
Avoids crashing the PHP process and avoids a bad runaway N+1 query issue that previously existed.
2020-10-31 11:14:28 -07:00
Dane Everitt 5763493c6c Allow setting the backup limit via the API; closes #2535 2020-10-17 14:23:00 -07:00
Dane Everitt d087bebc93 Add some additional test coverage and clean up modification service and suspension service 2020-10-07 21:56:44 -07:00
Dane Everitt cc6f98c0fd Replace all instances of 255 as a max length with 191; ref #2421 2020-09-26 16:29:26 -07:00
Dane Everitt 703f55271d Remove all references to daemon keys from the codebase 2020-09-13 11:38:42 -07:00
Dane Everitt 4dddcaebb0 Start ripping out old search functionality for models 2020-09-13 11:29:47 -07:00
Dane Everitt 3c7ffaaadb Remove all references of packs from the Panel 2020-09-13 11:13:37 -07:00
Dane Everitt 9a21584c42 Cleanup mount code; automatically include the mount in the configuration 2020-09-13 09:59:54 -07:00
Dane Everitt 92929c45d5 Fix query bug returning _all_ variables; closes #2250 2020-08-23 08:45:39 -07:00
Dane Everitt cae604e79d Include egg variables in the output from the API 2020-08-22 15:43:28 -07:00
Dane Everitt 61e9771333 Code cleanup for subuser API endpoints; closes #2247 2020-08-19 20:21:12 -07:00
Matthew Penner 0eb29dac9c Add mount_server table, fix wrong field type on other many to many tables, add routes for mounting and unmounting mounts on a server, finish server admin mounts page 2020-05-21 14:23:12 -06:00
Dane Everitt 41845ffdad Backups cannot be nullable 2020-05-04 19:06:20 -07:00
Dane Everitt f1c3762f4d Add base support for definining the number of backups that can be created for a server 2020-04-26 12:12:29 -07:00
Matthew Penner fd4de9168a Merge branch 'develop' into feature/server-transfers-actually 2020-04-04 16:28:02 -06:00
Matthew Penner 454ce6ce45 Add successful column to server_transfers table, get server transfers working properly :) 2020-04-04 16:16:18 -06:00
Matthew Penner 6ba6c34252 Add ServerTransfer relation in Models/Server.php, notify the new daemon about the incoming server transfer 2020-04-04 14:10:18 -06:00
Dane Everitt 9991989f89 Very basic implemention of frontend logic required to display backups and create a new one 2020-04-04 10:59:25 -07:00
Dane Everitt f51d65229b Add support for immutable carbon dates in models 2020-04-03 23:22:35 -07:00
Matthew Penner 49f0421e90 Fix issue with regex rule on 'threads' column, fix StyleCI issues on migration 2020-04-03 18:59:47 -06:00
Matthew Penner 829f05a2c7 Add migration for 'threads' column, fix errors on some admin pages, add validation rule for 'threads' column 2020-04-03 18:50:07 -06:00