Skip to content
Open
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/Enums/WebhookScope.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ enum WebhookScope: string
public function getLabel(): string
{
return match ($this) {
self::Global => 'Global',
self::Server => 'Server',
self::Global => trans('admin/webhook.scope.global'),
self::Server => trans('admin/webhook.scope.server'),
};
}
}
8 changes: 4 additions & 4 deletions app/Extensions/Captcha/Schemas/BaseSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ public function getSettingsForm(): array

return [
TextInput::make("CAPTCHA_{$id}_SITE_KEY")
->label('Site Key')
->placeholder('Site Key')
->label(trans('admin/setting.captcha.site_key'))
->placeholder(trans('admin/setting.captcha.site_key'))
->columnSpan(2)
->required()
->password()
->revealable()
->autocomplete(false)
->default(env("CAPTCHA_{$id}_SITE_KEY")),
TextInput::make("CAPTCHA_{$id}_SECRET_KEY")
->label('Secret Key')
->placeholder('Secret Key')
->label(trans('admin/setting.captcha.secret_key'))
->placeholder(trans('admin/setting.captcha.secret_key'))
->columnSpan(2)
->required()
->password()
Expand Down
2 changes: 1 addition & 1 deletion app/Extensions/OAuth/Schemas/DiscordSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function getSetupSteps(): array
->hiddenLabel()
->state(new HtmlString('<p>Under <b>Redirects</b> add the below URL.</p>')),
TextInput::make('_noenv_callback')
->label('Redirect URL')
->label(trans('admin/setting.oauth.redirect'))
->dehydrated()
->disabled()
->hintCopy()
Expand Down
2 changes: 1 addition & 1 deletion app/Extensions/OAuth/Schemas/GithubSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function getSetupSteps(): array
->hiddenLabel()
->state(new HtmlString(Blade::render('<p>Visit the <x-filament::link href="https://github.com/settings/developers" target="_blank">GitHub Developer Dashboard</x-filament::link>, go to <b>OAuth Apps</b> and click on <b>New OAuth App</b>.</p><p>Enter an <b>Application name</b> (e.g. your panel name), set <b>Homepage URL</b> to your panel url and enter the below url as <b>Authorization callback URL</b>.</p>'))),
TextInput::make('_noenv_callback')
->label('Authorization callback URL')
->label(trans('admin/setting.oauth.auth_url'))
->dehydrated()
->disabled()
->hintCopy()
Expand Down
8 changes: 4 additions & 4 deletions app/Extensions/OAuth/Schemas/OAuthSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ public function getSettingsForm(): array

return [
TextInput::make("OAUTH_{$id}_CLIENT_ID")
->label('Client ID')
->placeholder('Client ID')
->label(trans('admin/setting.oauth.client_id'))
->placeholder(trans('admin/setting.oauth.client_id'))
->columnSpan(2)
->required()
->password()
->revealable()
->autocomplete(false)
->default(env("OAUTH_{$id}_CLIENT_ID")),
TextInput::make("OAUTH_{$id}_CLIENT_SECRET")
->label('Client Secret')
->placeholder('Client Secret')
->label(trans('admin/setting.oauth.client_secret'))
->placeholder(trans('admin/setting.oauth.client_secret'))
->columnSpan(2)
->required()
->password()
Expand Down
4 changes: 2 additions & 2 deletions app/Extensions/OAuth/Schemas/SteamSchema.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ public function getSettingsForm(): array
{
return [
TextInput::make('OAUTH_STEAM_CLIENT_SECRET')
->label('Web API Key')
->placeholder('Web API Key')
->label(trans('admin/setting.oauth.web_api_key'))
->placeholder(trans('admin/setting.oauth.web_api_key'))
->columnSpan(4)
->required()
->password()
Expand Down
2 changes: 1 addition & 1 deletion app/Filament/Admin/Resources/Eggs/Pages/EditEgg.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ protected function getDefaultTabs(): array
->label(trans('admin/egg.features'))
->columnSpan(['default' => 2, 'sm' => 2, 'md' => 2, 'lg' => 3]),
Hidden::make('script_is_privileged')
->helperText('The docker images available to servers using this egg.'),
->helperText(trans('admin/egg.docker_help')),
TagsInput::make('tags')
->label(trans('admin/egg.tags'))
->columnSpan(['default' => 2, 'sm' => 2, 'md' => 2, 'lg' => 3]),
Expand Down
2 changes: 1 addition & 1 deletion app/Filament/Admin/Resources/Nodes/Pages/EditNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ protected function getDefaultTabs(): array
->columnSpanFull()
->state(new HtmlString(trans('admin/node.instructions_help'))),
CodeEntry::make('config')
->label('/etc/pelican/config.yml')
->label(trans('admin/node.config_path'))
Comment thread
kazaminosuke marked this conversation as resolved.
Outdated
->grammar(Grammar::Yaml)
->state(fn (Node $node) => $node->getYamlConfiguration())
->copyable()
Expand Down
4 changes: 2 additions & 2 deletions app/Filament/Admin/Resources/Nodes/Pages/ListNodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function table(Table $table): Table
->checkIfRecordIsSelectableUsing(fn (Node $node) => $node->servers_count <= 0)
->columns([
TextColumn::make('uuid')
->label('UUID')
->label(trans('admin/node.table.uuid'))
->searchable()
->hidden(),
NodeHealthColumn::make('health'),
Expand All @@ -46,7 +46,7 @@ public function table(Table $table): Table
->searchable(),
IconColumn::make('scheme')
->visibleFrom('xl')
->label('SSL')
->label(trans('admin/node.table.ssl'))
->trueIcon(TablerIcon::Lock)
->falseIcon(TablerIcon::LockOpenOff)
->state(fn (Node $node) => $node->scheme === 'https'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function table(Table $table): Table
->selectCurrentPageOnly() //Prevent people from trying to nuke 30,000 ports at once.... -,-
->columns([
TextColumn::make('id')
->label('ID')
->label(trans('admin/node.table.id'))
->sortable()
->toggleable()
->toggledHiddenByDefault(),
Expand Down
2 changes: 1 addition & 1 deletion app/Filament/Admin/Resources/Plugins/PluginResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public static function table(Table $table): Table
->visible(fn (Plugin $plugin) => $plugin->getReadme() || $plugin->url)
->url(fn (Plugin $plugin) => !$plugin->getReadme() ? $plugin->url : null, true)
->slideOver(true)
->modalHeading('Readme')
->modalHeading(trans('admin/plugin.readme'))
->modalSubmitAction(fn (Plugin $plugin) => Action::make('exclude_visit_website')
->label(trans('admin/plugin.visit_website'))
->visible(!is_null($plugin->url))
Expand Down
6 changes: 3 additions & 3 deletions app/Filament/Admin/Resources/Servers/Pages/CreateServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected function getDefaultSteps(): array
->prefixIcon(TablerIcon::Server)
->label(trans('admin/server.name'))
->suffixAction(Action::make('hint_random')
->tooltip('Random')
->tooltip(trans('admin/server.random'))
->icon('tabler-dice-' . random_int(1, 6))
->action(function (Set $set, Get $get) {
$egg = Egg::find($get('egg_id'));
Expand Down Expand Up @@ -651,8 +651,8 @@ protected function getDefaultSteps(): array
])
->schema([
Hidden::make('io')
->helperText('The IO performance relative to other running containers')
->label('Block IO Proportion')
->helperText(trans('admin/server.block_io_helper'))
->label(trans('admin/server.block_io'))
->default(500),

Grid::make()
Expand Down
6 changes: 3 additions & 3 deletions app/Filament/Admin/Resources/Servers/Pages/EditServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ protected function getDefaultTabs(): array
->prefixIcon(TablerIcon::Server)
->label(trans('admin/server.name'))
->suffixAction(Action::make('hint_random')
->tooltip('Random')
->tooltip(trans('admin/server.random'))
->icon('tabler-dice-' . random_int(1, 6))
->action(function (Set $set, Get $get) {
$egg = Egg::find($get('egg_id'));
Expand Down Expand Up @@ -462,8 +462,8 @@ protected function getDefaultTabs(): array
]),

Hidden::make('io')
->helperText('The IO performance relative to other running containers')
->label('Block IO Proportion'),
->helperText(trans('admin/server.block_io_helper'))
->label(trans('admin/server.block_io')),

Grid::make()
->columns(4)
Expand Down
2 changes: 1 addition & 1 deletion app/Filament/Admin/Resources/Servers/Pages/ListServers.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function table(Table $table): Table
->color(fn (Server $server) => $server->condition->getColor()),
TextColumn::make('uuid')
->hidden()
->label('UUID')
->label(trans('admin/server.uuid'))
->searchable(),
TextColumn::make('name')
->label(trans('admin/server.name'))
Expand Down
2 changes: 1 addition & 1 deletion app/Filament/Admin/Resources/Users/UserResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public static function defaultTable(Table $table): Table
->label(trans('profile.tabs.2fa'))
->visibleFrom('lg')
->icon(fn (User $user) => filled($user->mfa_app_secret) ? TablerIcon::Qrcode : ($user->mfa_email_enabled ? TablerIcon::Mail : TablerIcon::LockOpenOff))
->tooltip(fn (User $user) => filled($user->mfa_app_secret) ? 'App' : ($user->mfa_email_enabled ? 'E-Mail' : 'None')),
->tooltip(fn (User $user) => filled($user->mfa_app_secret) ? trans('profile.mfa.app') : ($user->mfa_email_enabled ? trans('profile.mfa.email') : trans('profile.mfa.none'))),
TextColumn::make('roles.name')
->label(trans('admin/user.roles'))
->badge()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function getTabs(): array
{
return collect(WebhookScope::cases())
->mapWithKeys(fn (WebhookScope $scope) => [
$scope->value . '-webhooks' => Tab::make($scope->getLabel() . ' Webhooks')
$scope->value . '-webhooks' => Tab::make(trans('admin/webhook.tabs.' . $scope->value))
->modifyQueryUsing(fn (Builder $query) => $query->where('scope', $scope))
->badge(WebhookConfiguration::where('scope', $scope)->count()),
])
Expand Down
4 changes: 2 additions & 2 deletions app/Filament/Admin/Resources/Webhooks/WebhookResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static function defaultTable(Table $table): Table
IconColumn::make('type')
->label(trans('admin/webhook.type')),
TextColumn::make('server.name')
->label('Server')
->label(trans('admin/webhook.server'))
->placeholder('—')
->icon('tabler-server')
->iconColor('info'),
Expand Down Expand Up @@ -140,7 +140,7 @@ public static function defaultTable(Table $table): Table
->options(WebhookType::class)
->attribute('type'),
SelectFilter::make('server_id')
->label('Server')
->label(trans('admin/webhook.server'))
->options(Server::query()->pluck('name', 'id')->toArray()),
]);
}
Expand Down
2 changes: 1 addition & 1 deletion app/Filament/Server/Pages/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function mount(): void
$server->validateCurrentState();
} catch (ServerStateConflictException $exception) {
AlertBanner::make('server_conflict')
->title('Warning')
->title(trans('admin/log.warning'))
->body($exception->getMessage())
->warning()
->send();
Expand Down
10 changes: 5 additions & 5 deletions app/Livewire/NodeClientConnectivity.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ public function render(): View
'httpUrl' => $httpUrl,
'wsUrl' => $wsUrl,
'wsToken' => $wsToken,
'loadingIcon' => $this->makeIcon(TablerIcon::WorldQuestion, 'warning', 'Checking...'),
'offlineIcon' => $this->makeIcon(TablerIcon::WorldX, 'danger', 'Node is not reachable from your browser'),
'onlineIcon' => $this->makeIcon(TablerIcon::WorldCheck, 'success', 'Node is reachable'),
'warningIcon' => $this->makeIcon(TablerIcon::WorldExclamation, 'warning', 'Node is reachable, but WebSocket failed. Check reverse proxy config.'),
'onlineNoWsIcon' => $this->makeIcon(TablerIcon::WorldCheck, 'success', 'Node is reachable (WebSocket not tested — no servers)'),
'loadingIcon' => $this->makeIcon(TablerIcon::WorldQuestion, 'warning', trans('admin/node.connectivity.checking')),
'offlineIcon' => $this->makeIcon(TablerIcon::WorldX, 'danger', trans('admin/node.connectivity.offline')),
'onlineIcon' => $this->makeIcon(TablerIcon::WorldCheck, 'success', trans('admin/node.connectivity.online')),
'warningIcon' => $this->makeIcon(TablerIcon::WorldExclamation, 'warning', trans('admin/node.connectivity.websocket_failed')),
'onlineNoWsIcon' => $this->makeIcon(TablerIcon::WorldCheck, 'success', trans('admin/node.connectivity.websocket_not_tested')),
Comment thread
coderabbitai[bot] marked this conversation as resolved.
]);
}

Expand Down
11 changes: 11 additions & 0 deletions lang/en/admin/node.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
'diagnostics' => 'Diagnostics',
],
'table' => [
'id' => 'ID',
'uuid' => 'UUID',
'ssl' => 'SSL',
'health' => 'Health',
'reachable' => 'Reachable',
'name' => 'Name',
Expand All @@ -28,6 +31,13 @@
'no_server' => 'No server',
'no_alias' => 'No alias',
],
'connectivity' => [
'checking' => 'Checking...',
'offline' => 'Node is not reachable from your browser',
'online' => 'Node is reachable',
'websocket_failed' => 'Node is reachable, but WebSocket failed. Check reverse proxy config.',
'websocket_not_tested' => 'Node is reachable (WebSocket not tested — no servers)',
],
'node_info' => 'Node Information',
'wings_version' => 'Wings Version',
'cpu_threads' => 'CPU Threads',
Expand Down Expand Up @@ -88,6 +98,7 @@
'no' => 'No',

'instructions' => 'Instructions',
'config_path' => '/etc/pelican/config.yml',
'instructions_help' => 'Save this file to your daemon\'s root directory, named config.yml',

'auto_deploy' => 'Auto Deploy Command',
Expand Down
1 change: 1 addition & 0 deletions lang/en/admin/plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
'status' => 'Status',
'visit_website' => 'Visit Website',
'settings' => 'Settings',
'readme' => 'Readme',
'install' => 'Install',
'uninstall' => 'Uninstall',
'update' => 'Update',
Expand Down
3 changes: 3 additions & 0 deletions lang/en/admin/server.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
'lock' => 'Lock',
'unlock' => 'Unlock',
'name' => 'Name',
'random' => 'Random',
'external_id' => 'External ID',
'owner' => 'Owner',
'description' => 'Description',
Expand Down Expand Up @@ -51,6 +52,8 @@
'disk' => 'Disk Space',
'disk_limit' => 'Disk Space Limit',
'advanced_limits' => 'Advanced Limits',
'block_io' => 'Block IO Proportion',
'block_io_helper' => 'The IO performance relative to other running containers',
'cpu_pin' => 'CPU Pinning',
'threads' => 'Pinned Threads',
'pin_help' => 'Add pinned thread, e.g. 0 or 2-4',
Expand Down
8 changes: 8 additions & 0 deletions lang/en/admin/webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
'name' => 'Name',
'type' => 'Type',
'server' => 'Server',
'scope' => [
'global' => 'Global',
'server' => 'Server',
],
'tabs' => [
'global' => 'Global Webhooks',
'server' => 'Server Webhooks',
],
'information' => 'Information',
'payload' => 'Payload',
'events' => 'Events',
Expand Down
5 changes: 5 additions & 0 deletions lang/en/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
'invalid_code' => 'Invalid 2FA Code',
'code_help' => 'Scan the QR code above using your two-step authentication app, then enter the code generated.',
'2fa_enabled' => 'Two Factor Authentication is currently enabled!',
'mfa' => [
'app' => 'App',
'email' => 'E-Mail',
'none' => 'None',
],
'backup_help' => 'These will not be shown again!',
'backup_codes' => 'Backup Codes',
'disable_2fa' => 'Disable 2FA',
Expand Down
Loading