Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into boy132/view-pages-p…
Browse files Browse the repository at this point in the history
…art-one

# Conflicts:
#	app/Filament/Admin/Resources/WebhookResource/Pages/CreateWebhookConfiguration.php
  • Loading branch information
Boy132 committed Feb 11, 2025
2 parents e7c83f7 + a6963ad commit 8ac4e42
Show file tree
Hide file tree
Showing 20 changed files with 46 additions and 107 deletions.
2 changes: 1 addition & 1 deletion app/Checks/NodeVersionsCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function run(): Result
if ($all === 0) {
$result = Result::make()
->notificationMessage(trans('admin/health.results.nodeversions.no_nodes_created'))
->shortSummary(trans('admin/health.results.node_version.no_nodes'));
->shortSummary(trans('admin/health.results.nodeversions.no_nodes'));
$result->status = Status::skipped();

return $result;
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/User/DisableTwoFactorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class DisableTwoFactorCommand extends Command
public function handle(): void
{
if ($this->input->isInteractive()) {
$this->output->warning(trans('command/messages.user.2fa_help_text'));
$this->output->warning(trans('command/messages.user.2fa_help_text.0') . trans('command/messages.user.2fa_help_text.1'));
}

$email = $this->option('email') ?? $this->ask(trans('command/messages.user.ask_email'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function table(Table $table): Table
])
->headerActions([
Tables\Actions\Action::make('create new allocation')
->label(trans('admin/node.create_allocations'))
->label(trans('admin/node.create_allocation'))
->form(fn () => [
Select::make('allocation_ip')
->options(collect($this->getOwnerRecord()->ipAddresses())->mapWithKeys(fn (string $ip) => [$ip => $ip]))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,21 +139,21 @@ public function form(Form $form): Form
->getOptionLabelFromRecordUsing(fn (User $user) => "$user->email | $user->username " . (blank($user->roles) ? '' : '(' . $user->roles->first()->name . ')'))
->createOptionForm([
TextInput::make('username')
->label(trans('admin/user.edit.username'))
->label(trans('admin/user.username'))
->alphaNum()
->required()
->minLength(3)
->maxLength(255),

TextInput::make('email')
->label(trans('admin/user.edit.email'))
->label(trans('admin/user.email'))
->email()
->required()
->unique()
->maxLength(255),

TextInput::make('password')
->label(trans('admin/user.edit.password'))
->label(trans('admin/user.password'))
->hintIcon('tabler-question-mark')
->hintIconTooltip(trans('admin/user.password_help'))
->password(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function table(Table $table): Table
->label(fn (Allocation $allocation) => $allocation->id === $this->getOwnerRecord()->allocation_id ? '' : trans('admin/server.make_primary')),
])
->headerActions([
CreateAction::make()->label(trans('admin/node.create_allocations'))
CreateAction::make()->label(trans('admin/server.create_allocation'))
->createAnother(false)
->form(fn () => [
Select::make('allocation_ip')
Expand Down Expand Up @@ -94,7 +94,7 @@ public function table(Table $table): Table
->preloadRecordSelect()
->recordSelectOptionsQuery(fn ($query) => $query->whereBelongsTo($this->getOwnerRecord()->node)->whereNull('server_id'))
->recordSelectSearchColumns(['ip', 'port'])
->label(trans('admin/server.add_allocations')),
->label(trans('admin/server.add_allocation')),
])
->bulkActions([
Tables\Actions\BulkActionGroup::make([
Expand Down
2 changes: 1 addition & 1 deletion app/Filament/Pages/Auth/EditProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ protected function getForms(): array
->prefixIcon('tabler-flag')
->live()
->default('en')
->helperText(fn ($state, LanguageService $languageService) => new HtmlString($languageService->isLanguageTranslated($state) ? '' : trans('profile.language_helper', ['state' => $state])))
->helperText(fn ($state, LanguageService $languageService) => new HtmlString($languageService->isLanguageTranslated($state) ? '' : trans('profile.language_help', ['state' => $state])))
->options(fn (LanguageService $languageService) => $languageService->getAvailableLanguages()),
]),

Expand Down
2 changes: 1 addition & 1 deletion app/Filament/Server/Resources/UserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ public static function table(Table $table): Table
->descriptions([
'rename' => trans('server/users.permissions.setting_rename'),
'reinstall' => trans('server/users.permissions.setting_reinstall'),
'activity' => trans('server/users.permissions.setting_activity'),
'activity' => trans('server/users.permissions.activity_desc'),
]),
]),
]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ protected function getHeaderActions(): array
->descriptions([
'rename' => trans('server/users.permissions.setting_rename'),
'reinstall' => trans('server/users.permissions.setting_reinstall'),
'activity' => trans('server/users.permissions.setting_activity'),
'activity' => trans('server/users.permissions.activity_desc'),
]),
]),
]),
Expand Down
4 changes: 3 additions & 1 deletion app/Jobs/ProcessWebhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ public function __construct(
public function handle(): void
{
try {
Http::post($this->webhookConfiguration->endpoint, $this->data)->throw();
Http::withHeader('X-Webhook-Event', $this->eventName)
->post($this->webhookConfiguration->endpoint, $this->data)
->throw();
$successful = now();
} catch (\Exception) {
$successful = null;
Expand Down
87 changes: 0 additions & 87 deletions app/Models/AuditLog.php

This file was deleted.

1 change: 0 additions & 1 deletion app/Models/Backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
* @property \Carbon\CarbonImmutable $updated_at
* @property \Carbon\CarbonImmutable|null $deleted_at
* @property \App\Models\Server $server
* @property \App\Models\AuditLog[] $audits
*/
class Backup extends Model implements Validatable
{
Expand Down
2 changes: 1 addition & 1 deletion app/Services/Servers/ToggleInstallService.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ToggleInstallService
public function handle(Server $server): void
{
if ($server->status === ServerState::InstallFailed) {
abort(500, trans('admin/server.exceptions.marked_as_failed'));
abort(500, trans('exceptions.server.marked_as_failed'));
}

$server->status = $server->isInstalled() ? ServerState::Installing : null;
Expand Down
2 changes: 0 additions & 2 deletions app/Transformers/Api/Application/BaseTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ public static function fromRequest(Request $request): static
* Determine if the API key loaded onto the transformer has permission
* to access a different resource. This is used when including other
* models on a transformation request.
*
* @deprecated — prefer $user->can/cannot methods
*/
protected function authorize(string $resource): bool
{
Expand Down
23 changes: 23 additions & 0 deletions database/migrations/2025_02_11_181129_remove_audit_logs_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::dropIfExists('audit_logs');
}

/**
* Reverse the migrations.
*/
public function down(): void
{
// Not needed
}
};
2 changes: 1 addition & 1 deletion lang/en/admin/databasehost.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
'host' => 'Host',
'host_help' => 'The IP address or Domain name that should be used when attempting to connect to this MySQL host from this Panel to create new databases.',
'port' => 'Port',
'post_help' => 'The port that MySQL is running on for this host.',
'port_help' => 'The port that MySQL is running on for this host.',
'max_database' => 'Max Databases',
'max_databases_help' => 'The maximum number of databases that can be created on this host. If the limit is reached, no new databases can be created on this host. Blank is unlimited.',
'display_name' => 'Display Name',
Expand Down
2 changes: 1 addition & 1 deletion lang/en/admin/health.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
'debugmode' => [
'label' => 'Debug Mode',
'ok' => 'Debug mode is disabled',
'failed' => 'The debug mode was expected to be :actual, but actually was :expected',
'failed' => 'The debug mode was expected to be :expected, but actually was :actual',
],
'environment' => [
'label' => 'Environment',
Expand Down
2 changes: 1 addition & 1 deletion lang/en/admin/node.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@

'next_step' => 'Next Step',
'node_has_servers' => 'Node Has Servers',
'create_allocations' => 'Create Allocations',
'create_allocation' => 'Create Allocation',
'primary_allocation' => 'Primary Allocation',
'databases' => 'Databases',
'backups' => 'Backups',
Expand Down
1 change: 1 addition & 0 deletions lang/en/admin/server.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
'change_egg' => 'Change Egg',
'new_egg' => 'New Egg',
'keep_old_variables' => 'Keep old variables if possible?',
'create_allocation' => 'Create Allocation',
'add_allocation' => 'Add Allocation',
'view' => 'View',
'tabs' => [
Expand Down
2 changes: 1 addition & 1 deletion lang/en/admin/setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

return [
'title' => 'Settings',
'saved' => 'Settings saved',
'save_success' => 'Settings saved',
'save_failed' => 'Failed to save Settings',
'navigation' => [
'general' => 'General',
Expand Down
3 changes: 3 additions & 0 deletions lang/en/exceptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,7 @@
'mount' => [
'servers_attached' => 'A mount must have no servers attached to it in order to be deleted.',
],
'server' => [
'marked_as_failed' => 'This server has not yet completed its installation process, please try again later.',
],
];

0 comments on commit 8ac4e42

Please sign in to comment.