Commit graph

4411 commits

Author SHA1 Message Date
Andras Bacsai
ff69bf17cd feat: add cloud-init scripts to global search
Add cloud-init scripts to the global search navigation routes, making
them discoverable via the quick search (Cmd+K / Ctrl+K).

Changes:
- Added dedicated "Cloud-Init Scripts" navigation entry
- Searchable via: cloud-init, scripts, cloud init, cloudinit,
  initialization, startup, server setup
- Updated Security entry to include cloud-init in search terms
- Links to /security/cloud-init-scripts route

Users can now quickly navigate to cloud-init script management by
typing "cloud-init" or related terms in global search.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 13:33:55 +02:00
Andras Bacsai
6c5adce633 fix: improve cloud-init scripts UI styling and behavior
Fix multiple UI/UX issues with cloud-init scripts management:

1. Fix card styling - Remove purple box background, use simple border
   - Changed from .box class to inline flex/border styling
   - Matches cloud provider tokens styling pattern

2. Remove script preview section
   - Preview was taking too much space and looked cluttered
   - Users can edit to see full script content

3. Make edit modal full width
   - Added fullWidth attribute to x-modal-input component
   - Provides better editing experience for long scripts

4. Fix fields clearing after update
   - Fields were being reset even in edit mode
   - Now only reset fields when creating new script
   - Edit mode preserves values after save

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 13:30:44 +02:00
Andras Bacsai
5463f4d496 feat: add cloud-init scripts management UI in Security section
Add comprehensive cloud-init script management interface in the Security
section, allowing users to create, edit, delete, and reuse cloud-init
scripts across their team.

New Components:
- CloudInitScripts: Main listing page with grid view of scripts
- CloudInitScriptForm: Modal form for create/edit operations

Features:
- Create new cloud-init scripts with name and content
- Edit existing scripts
- Delete scripts with confirmation (requires typing script name)
- View script preview (first 200 characters)
- Scripts are encrypted in database
- Full authorization using CloudInitScriptPolicy
- Real-time updates via Livewire events

UI Location:
- Added to Security section nav: /security/cloud-init-scripts
- Positioned between Cloud Tokens and API Tokens
- Follows existing security UI patterns

Files Created:
- app/Livewire/Security/CloudInitScripts.php
- app/Livewire/Security/CloudInitScriptForm.php
- resources/views/livewire/security/cloud-init-scripts.blade.php
- resources/views/livewire/security/cloud-init-script-form.blade.php

Files Modified:
- routes/web.php - Added route
- resources/views/components/security/navbar.blade.php - Added nav link

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 12:42:09 +02:00
Andras Bacsai
b31b080799 fix: reset cloud-init fields when closing server creation modal
Add cloud-init script fields to the resetSelection() method that's
called when the modal is closed. This ensures a clean slate when
reopening the "Connect a Hetzner Server" view.

Fields reset:
- cloud_init_script
- save_cloud_init_script
- cloud_init_script_name
- selected_cloud_init_script_id

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 12:37:12 +02:00
Andras Bacsai
e055c3b101 debug: add ray logging for Hetzner createServer API request/response
Add detailed ray logging to track exactly what is being sent to Hetzner's
API and what response is received. This will help debug cloud-init script
integration and verify that user_data is properly included in the request.

Logs include:
- Request endpoint and full params object
- Complete API response

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 11:17:44 +02:00
Andras Bacsai
6c0840d4e0 refactor: improve cloud-init script UX and remove description field
Changes:
1. Remove description field from cloud-init scripts
   - Updated migration to remove description column
   - Updated model to remove description from fillable array

2. Redesign script name input layout
   - Move script name input next to checkbox (always visible)
   - Remove conditional rendering - input always shown
   - Use placeholder instead of label for cleaner look

3. Fix dropdown type error
   - Replace wire:change event with wire:model.live
   - Use updatedSelectedCloudInitScriptId() lifecycle hook
   - Add "disabled" attribute to placeholder option
   - Properly handle empty string vs null in type casting

4. Improve validation
   - Require both script content AND name for saving
   - Remove description validation rule
   - Add selected_cloud_init_script_id validation

5. Auto-populate name when loading saved script
   - When user selects saved script, auto-fill the name field

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-11 11:16:28 +02:00
Andras Bacsai
7061eacfa5 feat: add cloud-init script support for Hetzner server creation
This commit adds the ability to use cloud-init scripts when creating Hetzner servers through the integration. Users can write custom scripts that will be executed during server initialization, and optionally save these scripts at the team level for future reuse.

Key features:
- Textarea field for entering cloud-init scripts (bash or cloud-config YAML)
- Checkbox to save scripts for later use at team level
- Dropdown to load previously saved scripts
- Scripts are encrypted in the database
- Full validation and authorization checks
- Comprehensive unit and feature tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 19:37:16 +02:00
Andras Bacsai
b48db997d6 feat: add pricing display to Hetzner server creation button
Display the monthly cost on the "Buy & Create Server" button
to give users clear visibility of the price before purchasing.

- Add computed property to calculate selected server's monthly price
- Update button text to show price dynamically (e.g., "€12.99/mo")
- Add tests for price formatting and edge cases
- Price updates reactively when user changes server type

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 18:50:44 +02:00
Andras Bacsai
7069236714 feat: add IPv4/IPv6 network configuration for Hetzner server creation
Add support for configuring IPv4 and IPv6 public network interfaces when creating servers through the Hetzner integration. Users can now enable or disable IPv4 and IPv6 independently, with both enabled by default.

Features:
- Added enable_ipv4 and enable_ipv6 checkboxes in the server creation form
- Both options are enabled by default as per Hetzner best practices
- IPv4 is preferred when both are enabled
- Fallback to IPv6 when only IPv6 is enabled
- Proper validation and error handling for network configuration
- Comprehensive test coverage for IP address selection logic

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-10 18:22:25 +02:00
Andras Bacsai
3c74620f36 feat: add modal support for creating private keys in server creation form and enhance UI for private key selection 2025-10-10 15:53:17 +02:00
Andras Bacsai
ac3af8a882 feat: add support for selecting additional SSH keys from Hetzner in server creation form 2025-10-10 12:17:05 +02:00
Andras Bacsai
2e21d875af feat: implement ValidHostname validation rule and integrate it into server creation process 2025-10-10 11:03:13 +02:00
Andras Bacsai
bd88bbca5b fix: streamline proxy status handling in StartProxy and Navbar components 2025-10-10 10:41:58 +02:00
Andras Bacsai
9c152fd40a feat: add retry mechanism with rate limit handling to API requests in HetznerService 2025-10-10 10:41:37 +02:00
Andras Bacsai
5362952e2a fix: correct dispatch logic for Hetzner server status refresh in checkHetznerServerStatus method 2025-10-10 10:13:14 +02:00
Andras Bacsai
2bca22082c feat: add retry functionality for server validation process 2025-10-10 10:13:08 +02:00
Andras Bacsai
00cb06150e fix: improve error logging and handling in ServerConnectionCheckJob for Hetzner server status 2025-10-10 10:12:59 +02:00
Andras Bacsai
32b53d756a feat: enhance proxy status notifications with detailed messages for various states 2025-10-10 09:37:05 +02:00
Andras Bacsai
513f6b54f7 feat: implement Hetzner deletion failure notification system with email and messaging support 2025-10-10 09:35:58 +02:00
Andras Bacsai
bbaef03602 fix: update Hetzner server status handling to prevent unnecessary database updates and improve UI responsiveness 2025-10-10 09:35:54 +02:00
Andras Bacsai
77dcabe51c fix: refresh server data before showing notification to ensure accurate proxy status 2025-10-10 09:35:49 +02:00
Andras Bacsai
f4e5c195fe refactor: replace direct SslCertificate queries with server relationship methods for consistency 2025-10-09 17:00:05 +02:00
Andras Bacsai
bf5c08d071 work work on hetzner integration 2025-10-09 16:54:13 +02:00
Andras Bacsai
f85a4f04d9 fix(css): update focus styles for Checkbox and modal input components to enhance accessibility 2025-10-09 16:53:46 +02:00
Andras Bacsai
8d5ac0da00 feat(deployment): save build-time .env file before build and enhance logging for Dockerfile 2025-10-09 16:38:17 +02:00
Andras Bacsai
da93a52976 feat(cleanup): add force deletion of stuck servers and orphaned SSL certificates 2025-10-09 16:37:56 +02:00
Andras Bacsai
704ddf2968 improved hetzner features 2025-10-09 12:53:57 +02:00
Andras Bacsai
61e688affd refactor(checkbox, utilities, global-search): enhance focus styles for better accessibility 2025-10-09 12:46:36 +02:00
Andras Bacsai
215301fa8f basics of adding / removing hetzner servers 2025-10-09 10:41:29 +02:00
Andras Bacsai
c1bcc41546 init of cloud providers 2025-10-08 20:47:50 +02:00
Andras Bacsai
b803a137f6 refactor(global-search, environment): streamline environment retrieval with new query method
- Replaced the inline query for fetching environments in GlobalSearch with a new static method `ownedByCurrentTeam` in the Environment model, enhancing code readability and maintainability.
- This change simplifies the logic for retrieving environments associated with the current team, promoting better organization of query logic within the model.
2025-10-08 19:58:36 +02:00
Andras Bacsai
c548013e2d feat(global-search): add navigation routes and enhance search functionality
- Introduced a comprehensive set of navigation routes for quick access to key sections such as Dashboard, Servers, Projects, and more.
- Enhanced the search functionality to include a 'new' prefix for creating resources directly from the search input.
- Improved UI elements for search results, ensuring better visibility and interaction.
2025-10-08 19:50:30 +02:00
Andras Bacsai
2e6e07bcc3 make global search frontend heavy 2025-10-08 16:53:02 +02:00
Andras Bacsai
afd10048bd update globalsearch 2025-10-08 13:38:38 +02:00
Andras Bacsai
adf5bbd91a improvements of global search 2025-10-08 10:54:26 +02:00
Andras Bacsai
a39bd8c5b0 fix(project): update redirect logic after resource creation to include environment UUID
- Modified the redirect route after project resource creation to include the UUID of the production environment, ensuring users are directed to the correct resource index page.
- This change enhances navigation and improves user experience by providing direct access to the relevant environment resources.
2025-10-07 20:46:32 +02:00
Andras Bacsai
d7bee48735 feat(global-search): enhance resource creation functionality in search modal
- Introduced a new create mode in the global search component, allowing users to initiate the creation of resources directly from the search input.
- Implemented logic to detect specific resource types based on user input, enabling quick access to creation modals for projects, servers, teams, storage, private keys, and GitHub apps.
- Updated the UI to display a list of creatable items when in create mode, improving user experience and accessibility for resource management.
- Added necessary modals for each resource type to facilitate the creation process seamlessly.
2025-10-07 20:45:16 +02:00
Andras Bacsai
fc7e31799c fix: on team creation, redirect to the new team instantly 2025-10-07 20:45:04 +02:00
Andras Bacsai
201e30e849 feat(project): enhance project index with resource creation capabilities
- Added logic to determine if the user can create resources for each project and generate the corresponding route for adding resources based on the project's first environment.
- Updated the project index view to display the new resource creation option alongside existing project settings.
- Adjusted various views to include a margin-top adjustment for better layout consistency.
2025-10-07 17:17:31 +02:00
Andras Bacsai
618378714a fix(job): correct build logs URL structure in ApplicationPullRequestUpdateJob
- Updated the build_logs_url to use the correct environment UUID instead of the environment name, ensuring accurate links to deployment logs.
- This change improves the reliability of the deployment notification system by directing users to the correct log location.
2025-10-07 15:32:37 +02:00
Andras Bacsai
fbbaab55f5 feat(storage): implement transaction handling in storage settings submission
- Wrapped the storage settings submission process in a database transaction to ensure data integrity.
- Added connection testing within the transaction to verify settings before finalizing the save.
- Enhanced error handling by refreshing the model state after a rollback, ensuring the UI reflects the latest database values.
- Dispatch success event upon successful update and verification of storage settings.
2025-10-07 15:08:22 +02:00
Andras Bacsai
2c64136503 feat(backup): enhance backup job with S3 upload handling and notifications
- Introduced a new notification class, BackupSuccessWithS3Warning, to alert users when local backups succeed but S3 uploads fail.
- Updated DatabaseBackupJob to track local backup success and handle S3 upload errors, improving error reporting and user notifications.
- Modified ScheduledDatabaseBackupExecution model to include a new s3_uploaded boolean field for tracking S3 upload status.
- Adjusted views and validation logic to reflect changes in backup execution status and S3 handling.
- Added tests to ensure the new s3_uploaded column is correctly implemented and validated.
2025-10-07 15:02:23 +02:00
Andras Bacsai
bc8cf8ed84 fix(deployment): save runtime environment variables when skipping build
- Updated the should_skip_build method to save runtime environment variables even when the build step is skipped, ensuring that the latest environment settings are preserved.
- Enhanced logging in prepare_builder_image to differentiate between the first attempt and subsequent attempts, improving clarity in deployment logs.
2025-10-07 14:26:23 +02:00
Andras Bacsai
1a42187d5d fix 2025-10-07 14:20:33 +02:00
Andras Bacsai
981f46c406 fix(deployment): add warning for NIXPACKS_NODE_VERSION in node configurations
- Implemented a check for the NIXPACKS_NODE_VERSION variable in the ApplicationDeploymentJob.
- Added log entries to notify users when NIXPACKS_NODE_VERSION is not set, indicating that Node.js 18 will be used by default, which is EOL.
- Provided guidance on how to override the default version by setting NIXPACKS_NODE_VERSION in environment variables.
2025-10-07 14:19:34 +02:00
Andras Bacsai
9962b69a13 fix(core): set default base_directory and include in submit method
- Updated the base_directory property to default to '/' for better compatibility with Docker setups.
- Included base_directory in the submit method's application array to ensure it is correctly passed during submission, enhancing the functionality of the GithubPrivateRepository component.
2025-10-07 14:12:07 +02:00
Andras Bacsai
8b221552a2 fix(backup): update backup job to use backup_log_uuid for container naming
- Refactored the DatabaseBackupJob to replace instances of backup->uuid with backup_log_uuid for consistency in container naming.
- Ensured that all related Docker commands and processes reference the updated backup_log_uuid, improving clarity and reducing potential errors during backup operations.
2025-10-07 14:05:03 +02:00
Andras Bacsai
eb1f16b62e fix(environment): clear computed property cache after adding environment variables
- Added cache clearing for environment variables and their preview after a new variable is added to ensure the UI reflects the latest data.
- Updated the refreshEnvs method to include cache clearing, enhancing the responsiveness of the environment variable display.
2025-10-07 13:57:59 +02:00
Andras Bacsai
cef3d3af5d feat(proxy): enhance proxy configuration regeneration by extracting custom commands
- Added a new function to extract custom proxy commands from existing Traefik configurations before regenerating the proxy configuration.
- Updated the proxy configuration generation logic to include these custom commands, ensuring they are preserved during regeneration.
- Introduced unit tests to validate the extraction of custom commands and handle various scenarios, including invalid YAML and different proxy types.
2025-10-07 11:11:13 +02:00
Andras Bacsai
ae64f8cb86 fix validation on a few views 2025-10-06 21:25:24 +02:00