81 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
Matthew Penner 8ca098940a chore: update composer dependencies (#5198)
Signed-off-by: Matthew Penner <me@matthewp.io>
2024-10-21 19:18:20 -06:00
Matthew Penner 1d38b4f0e2 Laravel 10 (#4706) 2023-02-23 12:30:16 -07:00
Devonte W 634c9353e3 fix(transformers): force object type for properties (#4544) 2022-11-21 13:28:46 -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
DaneEveritt d4708e9e63 Always show IP address to admins 2022-07-10 14:56:19 -04:00
DaneEveritt d6c30092ec Utilize a unique ID for activity logs to improve rendering perf 2022-07-10 14:53:29 -04:00
DaneEveritt 33ab762f5a Add support for tracking more SFTP specific events 2022-07-09 19:30:38 -04:00
DaneEveritt 48af9bced1 Fix activity log rendering; closes #4208 2022-06-30 21:06:50 -04:00
DaneEveritt 4aa163b76f Hide IP addresses from activity logs not generated by the user themselves 2022-06-27 20:52:27 -04:00
DaneEveritt 76472411e3 Some better activity translations 2022-06-18 16:36:19 -04:00
DaneEveritt 95de4c30fc Abuse the translation engine to handle more of the formatting for us 2022-06-18 15:28:42 -04:00
DaneEveritt 0520014c0f Add support for tracking when an activity event is triggered from an API key 2022-06-18 12:07:44 -04:00
DaneEveritt 68a654f9e8 Selectively show the additional metadata if it isn't in the display string at all 2022-06-12 15:30:49 -04:00
DaneEveritt a5521ecb79 Add support for returning transforming activity logs on the front-end 2022-05-29 20:34:48 -04:00
DaneEveritt 33bafe9277 Simplify transformer logic 2022-05-22 16:23:22 -04:00
DaneEveritt e9c633fd03 Update transformers and controllers to no longer pull an API key attribute 2022-05-22 15:37:39 -04:00
DaneEveritt 6554164252 Add test coverage for the SSH key endpoints 2022-05-14 18:08:48 -04:00
DaneEveritt 97280a62a2 Add support for storing SSH keys on user accounts 2022-05-14 17:31:53 -04:00
DaneEveritt 5705d7dbdd Run php-cs-fixer 2022-05-14 16:03:50 -04:00
DaneEveritt 8c63eebf13 Fix fractal errors 2022-05-04 19:35:10 -04:00
DaneEveritt 4252014d18 Update includes definition to match updated package requirements 2022-05-04 19:11:42 -04:00
Alex ef4410bac6 expose uptime to client resources API endpoint (#3705)
resolves #3704
2021-10-24 10:12:17 -07:00
Dane Everitt 5fdb0a5909 Correctly expose OOM disable state for a server 2021-09-13 21:02:12 -07:00
Dane Everitt 5d5e4ca7b1 Add support for locking backups to prevent any accidental deletions 2021-05-03 21:26:09 -07:00
Dane Everitt 92cd659db3 Add underlying data changes necessary for new task & schedule features 2021-05-01 10:44:40 -07:00
Dane Everitt 18e5ce310a Use updated response from wings 2021-04-04 10:25:54 -07: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 EverittandMatthew Penner a043071e3c Update to Laravel 8
Co-authored-by: Matthew Penner <me@matthewp.io>
2021-01-23 12:12:54 -08:00
Dane Everitt b38b8f6465 Mark some fields as deprecated in the API 2021-01-17 16:02:11 -08:00
Dane Everitt a75a347d65 Remove suspended & installing fields, replace with single status field 2021-01-17 15:51:56 -08:00
Charles Morgan ffeedf17e4 Adds months for schedules
Adds month variable for schedules
2021-01-16 22:07:39 -05:00
Matthew Penner fd848985ee Add ServerTransferringException, use is_null 2020-12-17 10:35:54 -07:00
Matthew Penner e6c4a68e4a Update logic for tracking a server's transfer state 2020-12-17 10:35:54 -07:00
Dane Everitt 5bbb36b3cf Support updating docker image for a server from the frontend 2020-12-13 11:07:29 -08:00
Dane Everitt f9ea96f45d Less strict type; closes #2681 2020-12-06 14:17:54 -08:00
Dane Everitt 74b1776c00 Merge pull request #2646 from AreYouRlyScared/#2608
Add admin area link to view config
2020-11-08 11:48:22 -08:00
Dane Everitt c20d53bb17 Always return the primary allocation for a server, even without the allocation permissions 2020-11-07 09:57:53 -08:00
Dane Everitt aba7df3afa Basic concept for the EULA feature to demo how this will all work 2020-11-02 20:52:41 -08:00
Charles Morgan 6d909a4a97 Add admin area link to view config 2020-11-02 00:14:02 -05: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 2182a15494 Don't return variables to users that they should not be able to see; closes #2388 2020-09-22 21:12:00 -07:00
Dane Everitt 034a310702 Use checksum more broadly, not specifically SHA256 2020-08-23 18:06:47 -07:00
Dane Everitt 813a671571 Hide startup line from API response if user doesn't have startup permissions 2020-08-22 19:01:42 -07:00
Dane Everitt 1b69d82daa Don't return things a user shouldn't be able to see via the API includes 2020-08-22 16:54:12 -07:00
Dane Everitt cae604e79d Include egg variables in the output from the API 2020-08-22 15:43:28 -07:00
Dane Everitt e3178ba6f0 backend: support is_successful state for backups rather than deleting it when failing
This allows the UI to correctly show failed backups to the user and require them to manually delete those backups, rather than them mysteriously disappearing.

We can also hook into this later to send a notification to the user when the backup fails.
2020-08-20 21:07:53 -07:00