681 Commits

Author SHA1 Message Date
Boy132
a768fadaea
Reimplement password reset (#1182)
* add password reset to all panels

* remove old leftovers

* fix reset url in account created mail
2025-03-28 23:51:42 +01:00
Charles
cb1c953540
Fix Egg Variable Order (#1172)
* Fix Egg Variable Order

* Fix Client Side Startup variable order
2025-03-27 05:45:59 -04:00
Boy132
c689f6860b
Disallow 0.0.0.0, 127.0.0.1 and localhost as node fqdn (#1158)
* disallow `0.0.0.0`, `127.0.01` and `localhost` as node fqdn

* use rules of model
2025-03-26 09:03:13 +01:00
Charles
5bea1ea80a
Fix 500 when viewing node (#1144)
* Fix node 500

* this feels better

* Update app/Models/Node.php

Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com>

* Update app/Models/Node.php

Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com>

* pint

---------

Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com>
2025-03-23 17:43:51 -04:00
Charles
e5d9d53aa3
Remove unused groupBy (#1130)
Fixes #1107
2025-03-18 18:07:35 -04:00
MartinOscar
29f3defc73
Catch DaemonFileRepository & show Alert (#1129)
* Catch `DaemonFileRepository`

Co-authored-by: notCharles <charles@pelican.dev>

* Pint

---------

Co-authored-by: notCharles <charles@pelican.dev>
2025-03-18 23:07:21 +01:00
Boy132
c52439132d
Add tags to egg importer & exporter, add tags to egg jsons (#1125)
* add tags to egg importer & exporter

* add tags to stock eggs
2025-03-18 17:35:15 +01:00
MartinOscar
e04abcbcf9
Replace existing Egg Reserved_Env_Variables with SERVER_ prefix (#1070)
* Add migration that updates egg->variables->env_variable, egg->startup, egg->servers->startup

* Update `EggImporterService` to replace `EggVariable::RESERVED_ENV_NAMES`

* Use `EggImporterService::parseReservedEnvNames`

* Refactor & Remove `Migration`
2025-03-15 14:51:10 -04:00
MartinOscar
98c36c4cc3
Fix revamp api_keys migration (#987) 2025-03-15 14:42:43 -04:00
MartinOscar
11b153d23c
Fix null Node Stats (#1075)
* Make sure we are talking to the right wings using `getSystemInformation` as a gate keeper

* Re use method

Co-authored-by: Lance Pioch <git@lance.sh>

---------

Co-authored-by: Lance Pioch <git@lance.sh>
2025-03-15 14:28:15 -04:00
MartinOscar
e93d122a27
Server does not use SoftDelete so deleted_at does not exist (#1083) 2025-03-13 01:00:55 +01:00
Lance Pioch
0179ade557
Add Laravel Data package, also some small fixes (#1065)
* Simplify

* Update these

* Add Laravel Data

* Remove unused imports

* Quick fix

* Fix double array

* Update app/Console/Commands/Egg/CheckEggUpdatesCommand.php
2025-03-08 19:56:06 -05:00
MartinOscar
d438e29154
Add missing Database address field (#1049)
* Add address field to display `host:port` to enduser on `ListDatabases` & `EditServer`

* Add `CopyAction` to `EditServer`

* Update databaseHost `display_name_help`
2025-03-06 15:55:40 +01:00
MartinOscar
1fdc428f3e
Allow sendCommand on Starting or Running Servers (#1061)
* Replace `string` with `enum`

* Add title

* Allow sendCommand on `Starting` or `Running` servers

* refactor: Use Filament interfaces

* Use `getLabel` instead of `str->headline`

Co-authored-by: Boy132 <Boy132@users.noreply.github.com>

---------

Co-authored-by: Boy132 <Boy132@users.noreply.github.com>
2025-03-06 15:55:00 +01:00
Lance Pioch
da195fd2fe
PHPstan updates (#1047)
* Not found property rule

* Make these “better”

* Day 1

* Day 2

* Day 3

* Dat 4

* Remove disabled check

* Day 4 continued

* Run pint

* Final changes hopefully

* Pint fixes

* Fix again

* Reset these

* Update app/Filament/Admin/Pages/Health.php

Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com>

* Update app/Traits/CheckMigrationsTrait.php

Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com>

---------

Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com>
2025-03-03 14:41:19 -05:00
Lance Pioch
82409f2fba
Laravel 12.x Shift (#1045)
* Convert route options to fluent methods

Laravel 8 adopts the tuple syntax for controller actions. Since the old options array is incompatible with this syntax, Shift converted them to use modern, fluent methods.

* Slim `lang` files

* Shift core files

* Validate via object directly within Controllers

* Use `Gate` facade for controller authorization

* Dispatch jobs directly

* Remove base controller inheritance

* Default config files

In an effort to make upgrading the constantly changing config files easier, Shift defaulted them and merged your true customizations - where ENV variables may not be used.

* Set new `ENV` variables

* Add new Laravel `composer run dev` script

* Add `storage/app/private` folder

* Bump Composer dependencies

* Convert `$casts` property to method

* Adopt Laravel type hints

* Shift cleanup

* Apply suggestions from code review

Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com>

* Add old key as backup

* Update composer

* Remove extra line

* Update this

---------

Co-authored-by: Shift <shift@laravelshift.com>
Co-authored-by: MartinOscar <40749467+rmartinoscar@users.noreply.github.com>
2025-03-03 14:41:00 -05:00
MartinOscar
7d68da41f4
Add HOSTNAME TERM LANG PWD TZ TIMEZONE to Egg RESERVED_ENV_NAMES (#1026) 2025-02-22 21:44:07 +01:00
David Groselj
206cc76a8b
Fix deleted users being shown as "System" in activity log (#1010)
* Show deleted users as "Deleted user"

* Update shown icon

* Apply suggestions from code review

Co-authored-by: Boy132 <Boy132@users.noreply.github.com>

* Update app/Models/ActivityLog.php

Co-authored-by: MartinOscar <40749467+RMartinOscar@users.noreply.github.com>

---------

Co-authored-by: Boy132 <Boy132@users.noreply.github.com>
Co-authored-by: MartinOscar <40749467+RMartinOscar@users.noreply.github.com>
2025-02-15 17:43:32 +01:00
MartinOscar
1f6b659546
Fix Translations (#994)
* Fix copy paste AllocationsRelationManager

* We shouldn't let the user know if the user is correct but the password isn't

* Add missing `trans()` `EditServer`

* Add missing `trans()` User `ServersRelationManager`

* Replace every `__()` with `trans()` helper

* Fix `exceptions` `User` Model

* Replace `Translator->get()` with `trans()` helper

* Revert "We shouldn't let the user know if the user is correct but the password isn't"

This reverts commit e156ee4b38e9e969662a532648c78fdc1e9b0166.
that's stock laravel, therefore it needs to stay
2025-02-11 22:16:48 +01:00
MartinOscar
a6963ad802
Remove Deprecated PHPDoc comment & AuditLog Model (#997)
* Remove missleading deprecation, you cant use can/cannot on apikeys

* Remove unused `AuditLog` Model
2025-02-11 19:25:36 +01:00
Lance Pioch
635cc6a029
Add PHP 8.4 Support (#858)
* Add php 8.4

* Update ide helper

* Add php 8.4

* Update laravel sanctum

* Update laravel framework

* Hash rounds were increased

* This is always false

* Extend model now

* This does nothing

* Move model validation methods to trait

* Remove base model

* Backup routes were previously referenced by uuids

* Remove commented code

* Upgrade laravel/framework

* Fix migration

* Update ide helper

* Update sanctum

* Add version to composer

* Add this back in, fixed

* Make this protected to be safer
2025-01-30 16:39:00 -05:00
MartinOscar
dde5305b3f
Add validation & missing reserved vars to EggVariables (#954)
* Add validation & Add missing reserved vars

* env_var not env_name 🤦‍

* Custom validationMessages
2025-01-28 14:22:03 +01:00
Boy132
3202a59b07
Activity log list improvements (#939)
* handle "server:crashed" log

* update activity log list

* add event filter

* add email to user column

* fix phpstan

* only show the email if the actor is the server owner/ a subuser or if the viewing user is an admin

* Apply same logic from ViewAction & make sure user is admi for url

* Add pagination to avoid showing 2000 records at once

* update can check & pagination

---------

Co-authored-by: RMartinOscar <40749467+RMartinOscar@users.noreply.github.com>
2025-01-27 09:46:39 +01:00
Boy132
37ba62410f
Fix translations for activity logs (#907)
* fix translations for activity logs

* add backwards compatibility for old logs

* update lang file

* small cleanup

* fix singular/ plural for "file"

* fix for "rename" + disable bulk move (because it's not working)
2025-01-23 09:05:23 +01:00
Boy132
03eaddb126
Fix server access for admins without subuser (#919)
* fix server access for admins without subuser

* add permission checks to power buttons

* add permission check for console command sending

* fix tests

* fix websocket token permissions

* fix sftp access

* fix server api + small cleanup

* it's "update", not "edit"...

* fix tests

* fix permission const for "activity read"

* fix activity subuser permission
2025-01-17 23:04:22 +01:00
Charles
cbacc18e56
get value of suspended (#922) 2025-01-16 21:18:00 -05:00
Lance Pioch
ad1a9cd33f
Update phpstan to latest (#804)
* Fix these

* Update phpstan

* Transform these into their identifiers instead

* Fix custom rule

* License is wrong

* Update these

* Pint fixes

* Fix this

* Consolidate these

* Never supported PHP 7

* Better evaluation

* Fixes

* Don’t need ignore

* Replace trait with service

* Subusers are simply the many to many relationship between Servers and Users

* Adjust to remove ignores

* Use new query builder instead!

* wip

* Update composer

* Quick fixes

* Use realtime facade

* Small fixes

* Convert to static to avoid new

* Update to statics

* Don’t modify protected properties directly

* Run pint

* Change to correct method

* Give up and use the facade

* Make sure this route is available

* Filament hasn’t been loaded yet

* This can be readonly

* Typehint

* These are no longer used

* Quick fixes

* Need doc block help

* Always true

* We use caddy with docker

* Pint

* Fix phpstan issues

* Remove unused import

---------

Co-authored-by: MartinOscar <40749467+RMartinOscar@users.noreply.github.com>
2025-01-16 14:53:50 -05:00
Boy132
885e03ee06
Alert banners (#892)
* add alert banner

* replace old server conflict banner with alert banner

* improve color and icon size

* add alert for websocket errors

* update file loading error to alert banner

* remove old events

* add back `console-status` event

* move @php block under @isset

* remove phpstan ignore

so I'm not getting force choked
2025-01-15 18:23:09 +01:00
MartinOscar
7c6b3a03db
Fix Suspendall & Server Condition (#913) 2025-01-15 17:46:27 +01:00
Boy132
c93a836ad8
Remove DaemonConnectionException (#885)
* remove DaemonConnectionException

* update tests
2025-01-07 22:58:04 +01:00
Scai
6707d1ccf6
Merge pull request #880 from pelican-dev/feature/vite
Remove old client area and switch to vite
2025-01-07 02:06:27 +02:00
Lance Pioch
b197e73173 Use route instead 2025-01-06 17:35:05 -05:00
Scai
17bb23b5b8 refactor: route redirect links 2025-01-06 19:58:32 +02:00
Scai
e4849d89d7 refactor: replace old index with new filament app 2025-01-06 17:33:32 +02:00
Boy132
448fe41e78
Add role permission for health page (#878) 2025-01-06 15:43:29 +01:00
MartinOscar
ae445840f7
Discard ipAddresses cache if wings is offline + Switch to Select (#862)
* Change TextInputColumn to SelectColumn

* Discard cache if wings is offline

* Return 0.0.0.0 instead of an empty array

* Adjustment & remove dns resolve
2025-01-06 03:37:39 +01:00
MartinOscar
18fe4f1123
Show suspended servers (#870) 2025-01-06 01:48:04 +01:00
Charles
2525af8f02
Revert "Listen to more framework webhook events (#728)" (#866)
This reverts commit 7a4c4ce02a8e55413ebee4c470a8245c1a767f1f.
2025-01-05 19:07:01 -05:00
Charles
7cc4358a04
Fix 500 on duplicate ports (#861)
* Fix 500 on duplicate ports

This should also address N+1 issues from the last PR

* Combine into one method

* Pint

* Add missing type

* Add 0.0.0.0

* Add notifications to help the user

* Pint

* Too verbose

* Show notification here

* Simplify code

* Reset the ports if the ip changes

* Don’t limit these anymore

---------

Co-authored-by: Lance Pioch <git@lance.sh>
2025-01-04 22:30:37 -05:00
Lance Pioch
23d515c3e5
Convert to bytes beforehand (#857) 2025-01-04 12:34:26 -05:00
Charles
8f51502c6d
Remove First/Last Name for Users (#855)
* Update Tests

* Update Translations

* Add Migration

* Remove First/Last Names
2025-01-03 17:13:44 -05:00
Lance Pioch
133c1a511f
Replace some guzzle exceptions and fix server creation failures (#848)
* Replace guzzle exceptions

* Pint fixes

* Fix test

* Remove unused imports

* Catch & Notify the user instead of 500

* Update app/Filament/Admin/Resources/ServerResource/Pages/CreateServer.php

Co-authored-by: Boy132 <Boy132@users.noreply.github.com>

---------

Co-authored-by: RMartinOscar <40749467+RMartinOscar@users.noreply.github.com>
Co-authored-by: Boy132 <Boy132@users.noreply.github.com>
2025-01-01 15:20:16 -05:00
MartinOscar
b5733715a6
Remove useless rightJoin (#851) 2024-12-31 14:05:14 +01:00
Charles
a8680c7aed
Mobile + Layout Changes (#836)
* Update Server Listing

* Update Edit/Create Server Pages

Re-arrange limits, CPU->Memory->Disk

* Remove auto focus

its cancer on mobile...

* Hide Title, Quick yaml fix

* Hide columns on mobile

* Hide backup locked on mobile

* Fix schedules for mobile

* Hide Notes on mobile

* Consolidate and clean these up

* Simplify

* Remove unused imports

* Replace tabler icon package

* Update app/Filament/Server/Resources/FileResource/Pages/EditFiles.php

Co-authored-by: Lance Pioch <git@lance.sh>

* Allow the unit to be changed

* Use existing method

* Update composer and pint

* Update resources/views/tables/columns/server-entry-column.blade.php

Co-authored-by: Boy132 <Boy132@users.noreply.github.com>

* Simplify html and add small margin

* Unused

* Add enum

---------

Co-authored-by: Lance Pioch <git@lance.sh>
Co-authored-by: Boy132 <Boy132@users.noreply.github.com>
2024-12-28 16:02:24 -05:00
pelican-vehikl
7a4c4ce02a
Listen to more framework webhook events (#728)
* Add new framework events to listen to

* Add simple test for framework events

* Update app/Models/WebhookConfiguration.php

Co-authored-by: Lance Pioch <git@lance.sh>

* Update app/Models/WebhookConfiguration.php

Co-authored-by: Lance Pioch <git@lance.sh>

* Update app/Models/WebhookConfiguration.php

---------

Co-authored-by: Vehikl <go@vehikl.com>
Co-authored-by: Lance Pioch <git@lance.sh>
2024-12-13 01:03:35 -05:00
Boy132
914f3dcdbd
Add own action class for "rotate database password" (#822) 2024-12-12 18:34:52 +01:00
Boy132
d43b99792f
(Admin) UI Consistency (#824)
* update phpdocs

* replace deprecated $label and $pluralLabel

* update record title attributes and labels

* update create pages

* run pint
2024-12-12 18:26:37 +01:00
Lance Pioch
5d2b892eab
Better IP addresses (#800)
* Unique ip addresses

* Only ipv4 addresses for now

* Switch to selects
2024-12-08 16:19:04 -05:00
pelican-vehikl
7e7f0be7df
Allow Database Hosts to have multiple Nodes (#767)
* WIP

* Update laravel and migrations

* WIP

* fix tests

* Update composer

* Fix transformer

* Fix filament pages

* WIP

* Update DatabaseHostTransformer

* fix: tests

* pint this files pls

* resolve merge better

* Update migration

* Update Migration, Again

* Update down migration

---------

Co-authored-by: Vehikl <go@vehikl.com>
2024-12-06 20:24:30 -05:00
MartinOscar
09eac71f05
Delete subuser on owner change (#748)
* Delete subuser on owner change

* Move logic to Model
2024-12-03 23:55:02 +01:00