275 Commits

Author SHA1 Message Date
MartinOscar
22d02c0df5
Remove NodeCreationService (#1092) 2025-03-17 05:46:33 +01:00
MartinOscar
6bc55b1039
Silent file_exists when its not in defaults allowed open_basedir (#1086) 2025-03-15 14:28:59 -04: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
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
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
cba4cf11aa
Fix Admin Area translations (#991)
* Fix button

* Replace array with index

* Fix Server ToggleInstallService

* FiNodeVersionsCheck

* Fix CreateWebhookConfiguration

* Fixdatabasehost post_help > port_help

* Fix User CreateServer

* Fix Profile language_help

* Fix Role permission UserResource

* Remove debug & Pint
2025-02-10 10:28:14 -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
c93a836ad8
Remove DaemonConnectionException (#885)
* remove DaemonConnectionException

* update tests
2025-01-07 22:58:04 +01:00
Boy132
00644c2c60
Health page (#469)
* add spatie health

* change slug for health page

* add check for panel version

* only check for debug mode if env isn't local

* add check for node versions

* improve short summary

* fix outdated check

* run pint

* fix health checks during tests

* add count to ok message

* fix typo

* temp fix for phpstan job

* fix pint...

* improve "outdated" count

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

* run pint

* skip node versions check if no nodes are created

* auto run health checks if they didn't run before

* small refactor

* update navigation

Co-authored-by: Charles <sir3lit@gmail.com>

* fix errors if tests didn't run yet

* fix disk usage check

* remove plugin and use own page

* use health status indicator from spatie

* fix after merge

* update icon

* update color classes

* fix after merge

* add back imports

oops...

* wrong import

oops²...

* update spatie/laravel-health to latest

* move Health page to correct namespace

* update NodeVersionsCheck

* use style instead of tailwind classes

workaround until we have vite

* cleanup custom checks

---------

Co-authored-by: MartinOscar <40749467+RMartinOscar@users.noreply.github.com>
Co-authored-by: Charles <sir3lit@gmail.com>
2024-12-24 19:09:16 +01:00
Boy132
3dfdc70790
Make use of Laravels AboutCommand (#809)
* add pelican info to laravel AboutCommand

* simplify p:info command
2024-12-10 23:07:59 +01:00
Boy132
d555c42644
Update all dependencies (#712)
* update composer.lock

* run pint

* fix phpstan

* update migrations (sqlite `dropForeign`)

* fix migrations

* Reset these back for now

* Alphabetize the rules

* run `php artisan filament:upgrade`

---------

Co-authored-by: Lance Pioch <git@lance.sh>
2024-11-22 09:27:57 +01:00
Boy132
9717aa4b5f
Cleanup SoftwareVersionService (#704)
* cleanup SoftwareVersionService

* fix old admin area

* show latest wings version on EditNode page

* even more cleanup
2024-11-13 16:26:10 -05:00
MartinOscar
3f9c1dbc3c
Add prune & event blacklist (#682)
* Add prune & event blacklist

* Pinted 3times with --dirty bruh

* Add to Settings

* Fix prune & description

* Prune Logs not Configuration
2024-10-28 18:44:32 -04:00
Boy132
c53ef78d89
Make sure schedules run with UTC (#657)
* make sure schedules use UTC for `next_run_at`

* use function from Utilities
2024-10-23 21:59:13 +02:00
Lance Pioch
81c75f7966
Merge branch 'main' into lance/phpstan-return-types 2024-10-20 11:39:04 -04:00
Lance Pioch
c7a307af6e Enforce return and parameter types 2024-10-19 21:02:49 -04:00
Lance Pioch
54ea55d426 Enforce DI 2024-10-19 17:22:03 -04:00
Boy132
f357c9501f
Auto-check eggs for update (#620)
* add command to check eggs for update

* add "update" button to ListEggs

* fix "unset"

* rename class

* add confirmation modal to update button
2024-10-15 22:54:06 +02:00
Charles
f95ba6447c
Add Filament Optimize (#619) 2024-10-12 10:58:18 -04:00
Boy132
c0eedc16e0
Update web installer (#614)
* update web installer

* make sure we have a user

* save SESSION_SECURE_COOKIE as text so it's written correctly to the .env

* set `SESSION_COOKIE` so session doesn't expire when changing the app name

* Allow enter to go to next step

---------

Co-authored-by: notCharles <charles@pelican.dev>
2024-10-12 10:19:52 -04:00
Boy132
a946669dc8
Add warning about database data to database settings command (#612) 2024-10-08 23:45:50 +02:00
Boy132
3e7c29d264
Add artisan command for setting up redis (#580) 2024-09-26 21:53:34 +02:00
Boy132
fc643f57f9
Admin Roles (#502)
* add spatie/permissions

* add policies

* add role resource

* add root admin role handling

* replace some "root_admin" with function

* add model specific permissions

* make permission selection nicer

* fix user creation

* fix tests

* add back subuser checks in server policy

* add custom model for role

* assign new users to role if root_admin is set

* add api for roles

* fix phpstan

* add permissions for settings page

* remove "restore" and "forceDelete" permissions

* add user count to list

* prevent deletion if role has users

* update user list

* fix server policy

* remove old `root_admin` column

* small refactor

* fix tests

* forgot can checks here

* forgot use

* disable editing own roles & disable assigning root admin

* don't allow to rename root admin role

* remove php bombing exception handler

* fix role assignment when creating a user

* fix disableOptionWhen

* fix missing `root_admin` attribute on react frontend

* add permission check for bulk delete

* rename viewAny to viewList

* improve canAccessPanel check

* fix admin not displaying for non-root admins

* make sure non root admins can't edit root admins

* fix import

* fix settings page permission check

* fix server permissions for non-subusers

* fix settings page permission check v2

* small cleanup

* cleanup config file

* move consts from resouce into enum & model

* Update database/migrations/2024_08_01_114538_remove_root_admin_column.php

Co-authored-by: Lance Pioch <lancepioch@gmail.com>

* fix config

* fix phpstan

* fix phpstan 2.0

---------

Co-authored-by: Lance Pioch <lancepioch@gmail.com>
2024-09-21 12:27:41 +02:00
Boy132
1fba700096
Improve error handling for Installer (#532)
* make sure migrations ran

* add loading indicator to finish button

* make error notification persistent

* fix migration checker

* cleanup traits
2024-08-09 08:23:03 +02:00
MartinOscar
7f8fb3f650
Patch Env CLI (#528)
* Remove unused option

* Add redis user

* Adapt lang

* Change default redis username

* Cleanup

* Update app/Traits/Commands/RequestRedisSettingsTrait.php

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

---------

Co-authored-by: Boy132 <Boy132@users.noreply.github.com>
2024-08-08 17:59:28 -04:00
Boy132
953ee940aa
Installer followup (#519)
* remove queue worker service creation from installer

* auto check redis
2024-08-04 18:53:54 +02:00
Boy132
496eaaaf83
Web Installer (#504)
* simplify setup command

* add installer page

* add route for installer

* adjust gitignore

* set colors globally

* add "unsaved data changes" alert

* add helper method to check if panel is installed

* make nicer

* redis username isn't required

* bring back db settings command

* store current date in "installed" file

* only redirect if install was successfull

* remove fpm requirement

* change "installed" marker to env variable

* improve requirements step

* add commands to change cache, queue or session drivers respectively

* removed `grouped` for better mobile view
2024-08-03 21:13:17 +02:00
Boy132
a58e159478
Settings page (#486)
* remove old settings stuff

* add basic settings page

* add some settings

* add "test mail" button

* fix mail fields not updating

* fix phpstan

* fix default for "top navigation"

* force toggle buttons to be bool

* force toggle to be bool

* add class to view to allow customization

* add mailgun settings

* add notification settings

* add timeout settings

* organize tabs into sub-functions

* add more settings

* add backup settings

* add sections to mail settings

* add setting for trusted_proxies

* fix unsaved data alert not showing

* fix clear action

* Fix clear action v2

TagsInput expects an array, not a string, fails on saving when using `''`

* Add App favicon

* Remove defaults, collapse misc sections

* Move Save btn, Add API rate limit

* small cleanup

---------

Co-authored-by: notCharles <charles@pelican.dev>
2024-07-29 12:14:24 +02:00
Boy132
bddd6af8af
Fix user deletion in no interactive mode (#506) 2024-07-29 12:13:08 +02:00
Boy132
dfba8e3993
Command to cleanup docker images (#495)
* add command to cleanup docker images

* automatically cleanup images daily

* fix request

* fix empty check

* run pint
2024-07-20 17:23:03 +02:00
Charles
1fdff43ae7
Add Node CPU/Memory Graphs (#459)
* Update Node Stats

Soon TM

* Update

* Make these smaller

* Change graphs

* Remove this.

Didn't work anyways.

* Update Graphs

* Use User TZ and config var

* Fix math

* Change to per thread.
2024-07-14 16:48:14 -04:00
Boy132
7557dc1c8d
Restart queue worker when changing email settings (#457) 2024-07-05 16:17:35 +02:00
Boy132
2a740b43e6
Fix schedules running every minute (second try) (#444) 2024-06-29 23:16:28 +02:00
MartinOscar
276b51f477
Remove locationId in MakeNodeCommand (#405)
* Concat + Default

* Concat + Default + Enforce scheme

* fix typo

---------

Co-authored-by: Boy132 <Boy132@users.noreply.github.com>
2024-06-17 08:51:04 -04:00
Boy132
59bbb63739
Fix queue worker file when using redis (#399) 2024-06-15 23:20:08 +02:00
Boy132
42ecd2951d
Update p:info command (#389) 2024-06-14 17:17:49 +02:00
Boy132
10796f8916
Dedicated MariaDB driver (#365)
* dedicated tests for mariadb

* fix migrations

* update database config

* update database setup command
2024-06-11 21:01:14 +02:00
Charles
dd7a01aa04
Merge pull request #345 from Boy132/show-git-version
Show update info on dashboard & show git commit (when using git)
2024-06-07 20:00:04 -04:00
Boy132
93f059025c show update info on dashboard, show git commit (when using git) 2024-06-08 00:38:46 +02:00
Boy132
0156456919
Merge branch 'pelican-dev:main' into feature/node-sftp-alias 2024-06-07 23:49:38 +02:00
Boy132
91bf38b63d fix schedules running every minute 2024-06-06 15:53:29 +02:00
Boy132
d245751c97 use env value instead of config value 2024-06-06 11:59:24 +02:00
Boy132
328e159c6b
Merge branch 'pelican-dev:main' into feature/node-sftp-alias 2024-06-05 08:47:20 +02:00
Lance Pioch
6166fac929
Merge pull request #322 from Boy132/fix/make-user-db-test
Replace DB check in MakeUserCommand
2024-06-04 17:33:47 -04:00
Lance Pioch
2d6e30b646
Merge pull request #326 from Boy132/fix/artisan-queue-again
Another call fix in AppSettingsCommand
2024-06-04 17:29:48 -04:00
Boy132
bb03ddda50
listen on all queues 2024-06-04 17:26:19 +02:00
Boy132
1c66681c0e
make default sqlite database path relative 2024-06-04 13:26:05 +02:00
Boy132
0728266826 restart queue service if service already exists 2024-06-04 13:14:54 +02:00
Boy132
d81c9faac6 improve prompts 2024-06-04 13:01:52 +02:00