Commit Graph

2123 Commits

Author SHA1 Message Date
Mauricio Siu
b14b9300c0 feat: enhance rollback functionality with UI updates and database schema changes
- Updated Tailwind configuration for responsive design.
- Modified the ShowDeployments component to include rollback settings and actions.
- Introduced a new "rollback" table in the database schema with foreign key relationships.
- Updated deployment and application schemas to support rollback features.
- Added rollback mutation to the API for initiating rollbacks.
2025-06-01 22:52:33 -06:00
Mauricio Siu
a7d1fabd81 feat: add rollback functionality with new table and application schema updates
- Created a new "rollback" table to manage rollback operations.
- Added "rollbackActive" and "limitRollback" columns to the "application" table to support rollback features.
- Established foreign key constraints between the "rollback" and "application" tables for data integrity.
2025-06-01 19:45:33 -06:00
Mauricio Siu
d171e3da91 Merge branch 'canary' into 319-ability-to-roll-back-service-depoyments 2025-06-01 19:44:02 -06:00
Mauricio Siu
2c77029dad chore: remove rollback-related SQL files and snapshots
- Deleted SQL files for rollback table and related schema changes.
- Removed corresponding snapshot files to clean up the database schema history.
2025-06-01 19:43:48 -06:00
autofix-ci[bot]
030e482fce
[autofix.ci] apply automated fixes 2025-06-02 00:15:31 +00:00
Torsten Dittmann
88e862544b fix[domains]: Add CDN provider detection with dynamic display names
Implements generic CDN detection service supporting Cloudflare, Fastly,
and Bunny CDN. Replaces hardcoded "Behind Cloudflare" text with
dynamic provider names and adds IP range validation for comprehensive
CDN detection.
2025-06-01 23:03:00 +02:00
ayham291
56d21aff60
fix: add authorization checks in GitHub router to include userId validation
- Updated conditional checks to ensure that the GitHub provider's userId matches the session userId, in addition to the organizationId, for improved security and access control.
2025-06-01 20:53:54 +02:00
ayham291
8436d364be
refactor: linter fixes 2025-06-01 20:46:32 +02:00
ayham291
5d5e56d144
feat: GitHub and GitLab provider integration with user association
- Added userId to the GitHub and GitLab provider setup to associate providers with the user who created them.
- Updated redirect URL in GitHub provider to include userId for better tracking.
- Modified API handlers and service functions to accommodate userId in provider creation and validation.
2025-06-01 20:45:29 +02:00
ayham291
0627b6fd3a refactor: clean up conditional checks in Bitbucket and Gitea routers for improved readability 2025-05-31 01:52:24 +02:00
ayham291
39af44daef feat: add user property to git-providers (bitbucket, gitea)
- relate a provider to the user who created it.
- for now the provider is only visible to its user.
2025-05-31 01:21:46 +02:00
Mauricio Siu
2619cb49d1 refactor: restore commented-out test cases and imports in drop.test.test.ts for improved functionality
Some checks failed
Auto PR to main when version changes / create-pr (push) Has been cancelled
Build Docker images / build-and-push-cloud-image (push) Has been cancelled
Build Docker images / build-and-push-schedule-image (push) Has been cancelled
Build Docker images / build-and-push-server-image (push) Has been cancelled
Dokploy Docker Build / docker-amd (push) Has been cancelled
Dokploy Docker Build / docker-arm (push) Has been cancelled
autofix.ci / format (push) Has been cancelled
Dokploy Monitoring Build / docker-amd (push) Has been cancelled
Dokploy Monitoring Build / docker-arm (push) Has been cancelled
Dokploy Docker Build / combine-manifests (push) Has been cancelled
Dokploy Docker Build / generate-release (push) Has been cancelled
Dokploy Monitoring Build / combine-manifests (push) Has been cancelled
2025-05-28 02:44:06 -06:00
Mauricio Siu
a13e24dab0 refactor: simplify Chatwoot widget condition in dashboard layout for improved readability 2025-05-28 02:33:44 -06:00
Mauricio Siu
4aac3476b6 refactor: update Chatwoot widget settings and types to enhance configuration options 2025-05-28 02:33:14 -06:00
Mauricio Siu
037343a796 feat: integrate Chatwoot widget into dashboard layout and replace project layout with dashboard layout in various pages 2025-05-28 02:22:56 -06:00
Mauricio Siu
274d80ea7c refactor: comment out test cases and imports in drop.test.test.ts for cleanup 2025-05-28 00:51:20 -06:00
Mauricio Siu
629889f1a8 refactor: reorganize imports and enhance backup functionality across various components 2025-05-28 00:38:53 -06:00
Mauricio Siu
27b2106630 chore: bump version to v0.22.7 in package.json
Some checks failed
Auto PR to main when version changes / create-pr (push) Has been cancelled
Build Docker images / build-and-push-cloud-image (push) Has been cancelled
Build Docker images / build-and-push-schedule-image (push) Has been cancelled
Build Docker images / build-and-push-server-image (push) Has been cancelled
Dokploy Docker Build / docker-amd (push) Has been cancelled
Dokploy Docker Build / docker-arm (push) Has been cancelled
autofix.ci / format (push) Has been cancelled
Dokploy Monitoring Build / docker-amd (push) Has been cancelled
Dokploy Monitoring Build / docker-arm (push) Has been cancelled
Dokploy Docker Build / combine-manifests (push) Has been cancelled
Dokploy Docker Build / generate-release (push) Has been cancelled
Dokploy Monitoring Build / combine-manifests (push) Has been cancelled
2025-05-26 03:11:23 -06:00
Mauricio Siu
84faa9747e chore: update Node.js version to 20.16.0 in configuration files 2025-05-26 03:09:09 -06:00
Mauricio Siu
b94a6bff92 Merge branch 'canary' into nginx-static-spa-build 2025-05-26 02:59:03 -06:00
Mauricio Siu
dfc75a9116 chore: remove Dockerfile for dokploy as part of project restructuring 2025-05-26 01:53:24 -06:00
Mauricio Siu
9c73b8dc36 feat: add pino and pino-pretty for logging, implement logger utility 2025-05-26 01:45:14 -06:00
Khiet Tam Nguyen
43d22c2bd4 test: fix typescript error for isStaticSpa 2025-05-20 16:33:34 +10:00
Khiet Tam Nguyen
ba3645933f
feat: added SPA option for static sites 2025-05-20 16:11:48 +10:00
Mauricio Siu
17a26353b6 chore: bump version to v0.22.6 in package.json
Some checks failed
Auto PR to main when version changes / create-pr (push) Has been cancelled
Build Docker images / build-and-push-cloud-image (push) Has been cancelled
Build Docker images / build-and-push-schedule-image (push) Has been cancelled
Build Docker images / build-and-push-server-image (push) Has been cancelled
Dokploy Docker Build / docker-amd (push) Has been cancelled
Dokploy Docker Build / docker-arm (push) Has been cancelled
autofix.ci / format (push) Has been cancelled
Dokploy Monitoring Build / docker-amd (push) Has been cancelled
Dokploy Monitoring Build / docker-arm (push) Has been cancelled
Dokploy Docker Build / combine-manifests (push) Has been cancelled
Dokploy Docker Build / generate-release (push) Has been cancelled
Dokploy Monitoring Build / combine-manifests (push) Has been cancelled
2025-05-18 02:30:04 -06:00
Khiet Tam Nguyen
616e11722c
fix: randomize-compose missing await 2025-05-18 18:26:44 +10:00
autofix-ci[bot]
0f48f2c830
[autofix.ci] apply automated fixes 2025-05-18 05:12:06 +00:00
Khiet Tam Nguyen
5dfa7645f3
fix: multiple notifications for isolated compose and randomize compose 2025-05-18 15:07:05 +10:00
Mauricio Siu
19b56771b8 style: update styling for environment display and increase scroll area height in import component 2025-05-17 15:28:52 -06:00
Mauricio Siu
cff01ed438 refactor: modify template processing to include APP_NAME variable in configuration 2025-05-17 15:27:42 -06:00
Mauricio Siu
380656efee feat: enhance project duplication functionality with options for new or same project 2025-05-17 14:33:07 -06:00
Mauricio Siu
a985998b93 feat: add VPS provider recommendations and alerts in server settings 2025-05-17 03:53:37 -06:00
Mauricio Siu
4f3ba16dfa chore: bump version to v0.22.5 in package.json 2025-05-17 03:34:31 -06:00
Mauricio Siu
94a6a9587e
Merge pull request #1872 from IPdotSetAF/git-lfs-not-supported
fix: installed git-lfs in docker image
2025-05-17 02:09:03 -06:00
autofix-ci[bot]
52b2158309
[autofix.ci] apply automated fixes 2025-05-17 05:22:55 +00:00
Mauricio Siu
178d84d438 fix: update dependencies in save provider components to use optional chaining for applicationId and composeId 2025-05-16 23:22:26 -06:00
Mauricio Siu
b4b2d12f6e feat(ui): add loading state and no data message to converted compose display 2025-05-16 23:16:02 -06:00
Mauricio Siu
294378d95b
Merge pull request #1886 from oshanavishkapiries/canary
fix: Submit Log in issue on Github
2025-05-16 23:03:50 -06:00
Mauricio Siu
c52812f9d3
Merge pull request #1903 from yergom/fix/watch-path-wording
fix: more informative placeholder for watch path
2025-05-16 23:03:13 -06:00
Mauricio Siu
82f7c5d5f3
Merge pull request #1904 from darena-patrick/fix/compose-deploy-url
fix: Missing `/compose` in auto-deploy URL
2025-05-16 23:00:47 -06:00
Patrick Schiess
bf115c7895 fix: Missing /compose in auto-deploy URL 2025-05-16 16:12:09 -06:00
yergom
c2c29dbaba fix: more informative placeholder for watch path 2025-05-16 13:25:28 +00:00
Tam Nguyen
136570b36c
fix(ui): compose grid responsiveness starts from xl instead of lg 2025-05-13 16:01:25 +10:00
Tam Nguyen
7d0075c230
fix(ui): domain responsiveness with screen width 2025-05-13 15:43:52 +10:00
Tam Nguyen
19b4edee8d
refactor: remove redundant class bg-card due to bg-transparent set later 2025-05-13 15:15:54 +10:00
153918928+oshanavishkapiries@users.noreply.github.com
7f04eb856e fix: Submit Log in issue on Github 2025-05-13 01:56:55 +05:30
IPdotSetAF
5156b45ffc fix: installed git-lfs in docker image 2025-05-11 10:36:52 +03:30
Mauricio Siu
80e6f21840 chore: bump version to v0.22.4 in package.json
Some checks failed
Auto PR to main when version changes / create-pr (push) Has been cancelled
Build Docker images / build-and-push-cloud-image (push) Has been cancelled
Build Docker images / build-and-push-schedule-image (push) Has been cancelled
Build Docker images / build-and-push-server-image (push) Has been cancelled
Dokploy Docker Build / docker-amd (push) Has been cancelled
Dokploy Docker Build / docker-arm (push) Has been cancelled
autofix.ci / format (push) Has been cancelled
Dokploy Monitoring Build / docker-amd (push) Has been cancelled
Dokploy Monitoring Build / docker-arm (push) Has been cancelled
Dokploy Docker Build / combine-manifests (push) Has been cancelled
Dokploy Docker Build / generate-release (push) Has been cancelled
Dokploy Monitoring Build / combine-manifests (push) Has been cancelled
2025-05-10 20:54:36 -06:00
Mauricio Siu
5b519151e8 refactor: streamline Remove Invitation dropdown menu item in ShowInvitations component 2025-05-10 20:40:11 -06:00
Mauricio Siu
2ad8bf355b feat: implement rollback functionality with UI components and database schema updates
- Added ShowEnv and ShowRollbackSettings components for displaying and configuring rollback settings.
- Implemented ShowRollbacks component to list and manage rollbacks for applications.
- Created rollback database schema and updated application schema to include rollback settings.
- Added API routes for managing rollbacks, including fetching, creating, and deleting rollbacks.
- Integrated rollback functionality into the application deployment process.
2025-05-10 20:28:34 -06:00
Mauricio Siu
c1640cba29 chore: update better-auth to v1.2.8-beta.7 in package.json and pnpm-lock.yaml 2025-05-10 01:30:03 -06:00
Mauricio Siu
e6028e73ac feat: add alert block to ShowBuildChooseForm for resource usage guidance 2025-05-06 23:37:05 -06:00
Mauricio Siu
c708f7ba62 Update version in package.json to v0.22.3 2025-05-06 23:13:42 -06:00
Mauricio Siu
ebc8c2f73d Add default user role and impersonation settings in tests
- Updated the baseAdmin user object in the update-server-config test to include default values for allowImpersonation and role, ensuring comprehensive test coverage for user management features.
2025-05-06 02:37:41 -06:00
Mauricio Siu
1227d2b5fc Update version in package.json to v0.22.2 2025-05-06 02:35:08 -06:00
Mauricio Siu
314438b84c Enhance impersonation functionality and user management
- Updated the ImpersonationBar component to fetch users dynamically and handle impersonation actions more efficiently.
- Refactored the ProfileForm to set the allowImpersonation value directly, improving form handling.
- Modified the DashboardLayout to conditionally render the ImpersonationBar based on user permissions and cloud settings.
- Added a new role column to the user_temp table to support user role management.
- Updated API routes to include checks for root access and improved user listing functionality.
2025-05-06 02:32:08 -06:00
Mauricio Siu
cc5574e08a Add impersonation feature to user management
- Introduced an ImpersonationBar component for admin users to impersonate other users, enhancing user management capabilities.
- Updated the ProfileForm to include an option for allowing impersonation, with a description for clarity.
- Modified the DashboardLayout to conditionally display the impersonation bar based on user roles and cloud settings.
- Added database schema changes to support the new impersonation feature, including a new column for allowImpersonation in the user table.
- Implemented necessary API updates to handle impersonation actions and user data retrieval.
2025-05-06 01:46:20 -06:00
Mauricio Siu
7faab54a65 Update version in package.json to v0.22.1 2025-05-05 02:58:57 -06:00
Mauricio Siu
2b081166f9 Update version in package.json to v0.22.0 2025-05-04 22:19:58 -06:00
Mauricio Siu
95d949f112 Add databaseType prop to HandleBackup component in ShowBackups
- Enhanced the HandleBackup component by passing the databaseType prop, improving the context for backup handling.
- This update aims to streamline the backup process and provide better integration with the database type information.
2025-05-04 21:37:40 -06:00
Mauricio Siu
1ec0c8e8b3
Merge pull request #1821 from Dokploy/1798-gitea-provider-only-returns-a-subset-of-repositories-to-choose-from
Refactor Gitea repository fetching to handle pagination
2025-05-04 21:07:47 -06:00
Mauricio Siu
b9ac25ef42 Refactor schedule run handling in ShowSchedules component
- Simplified the schedule run logic by directly displaying a success toast upon execution.
- Removed redundant error handling for schedule runs, streamlining the code for better readability and maintainability.
2025-05-04 21:06:34 -06:00
Mauricio Siu
9fe2460b88 Add message for empty branches in Gitea provider
- Introduced a conditional rendering for displaying a message when no branches are found in the Gitea provider component, enhancing user feedback during branch selection.
- This update improves the overall user experience by clearly indicating the absence of branches.
2025-05-04 21:05:16 -06:00
Mauricio Siu
c110fae965 Remove console log from appName generation in AddDatabase component 2025-05-04 20:15:17 -06:00
Mauricio Siu
86b56e2597 Refactor appName generation in dashboard components
- Updated the appName generation logic in `AddApplication`, `AddCompose`, and `AddDatabase` components to use the `slugify` function for improved consistency and readability.
- Enhanced the `slugify` function to return a default value of "service" if the input is empty, ensuring robustness in name generation.
- Improved project name validation in `handle-project.tsx` to enforce stricter rules on naming conventions.
2025-05-04 20:14:49 -06:00
Mauricio Siu
7e365e1947
Merge pull request #1817 from Rxflex/patch-1
limit rawLogs to max number of lines by trimming old entries
2025-05-04 20:00:49 -06:00
autofix-ci[bot]
d458536803
[autofix.ci] apply automated fixes 2025-05-05 01:57:10 +00:00
Mauricio Siu
9cb5b9a7d0 Update deployments tab styling for improved layout
- Added a full-width class to the `TabsContent` for deployments, enhancing the visual layout.
- Introduced a border and rounded corners to the deployment container for better aesthetics and user experience.
2025-05-04 19:31:18 -06:00
Mauricio Siu
1c73dab719 Refactor user role handling in TRPC context and routers
- Updated the user role property from `rol` to `role` across multiple TRPC context and router files to ensure consistency and clarity in role management.
- Adjusted conditional checks for user roles in various procedures to reflect the updated property name, enhancing code readability and maintainability.
2025-05-04 19:26:09 -06:00
Andy
3ec339fc89
limit rawLogs to max number of lines by trimming old entries
https://github.com/Dokploy/dokploy/issues/1815
2025-05-05 02:10:34 +02:00
Mauricio Siu
4bb60b9f7e Enhance backup table schema with dynamic appName generation
- Modified the `backup` table to include a new `appName` column, which is now populated with a dynamically generated name combining random selections from predefined arrays and a random hash.
- Ensured the `appName` column is set to NOT NULL after the update, maintaining data integrity.
- Retained existing columns and added new ones for improved backup management.
2025-05-04 15:52:37 -06:00
Mauricio Siu
e3ec8f1589 Add backup and deployment schema updates for improved data handling
- Introduced new SQL file `0089_noisy_sandman.sql` to create a new enum type `backupType` and add relevant columns to the `backup` and `deployment` tables, enhancing data structure for backup management.
- Removed outdated SQL files `0090_lame_gressill.sql` and `0091_colossal_lifeguard.sql` that contained redundant column definitions, streamlining the database schema.
- Updated journal and snapshot JSON files to reflect the latest schema changes, ensuring consistency across the database structure.
2025-05-04 15:13:49 -06:00
Mauricio Siu
9aa56870b0 Update deployment and backup components for improved handling and user experience
- Refined the `ShowDeployments` component to conditionally render `CancelQueues` and `RefreshToken` based on deployment type, enhancing flexibility.
- Removed unnecessary console logging in `RestoreBackup` and updated input field to disable when the database type is "web-server", improving user guidance.
- Enhanced logging in `runWebServerBackup` to provide clearer output during backup operations, ensuring better traceability of actions.
2025-05-04 13:19:45 -06:00
Mauricio Siu
06c9e43143 Refactor deployment handling by moving formatDuration function and removing ShowSchedulesLogs component
- Moved the `formatDuration` function from `show-schedules-logs.tsx` to `show-deployments.tsx` for better accessibility.
- Deleted the `ShowSchedulesLogs` component to streamline the codebase and improve maintainability, as its functionality is no longer needed.
2025-05-04 13:00:50 -06:00
Mauricio Siu
e09447d4b4 Add ShowDeploymentsModal component and refactor ShowDeployments for enhanced deployment handling
- Introduced `ShowDeploymentsModal` component to manage deployment logs and details in a modal interface.
- Updated `ShowDeployments` to accept `serverId` and `refreshToken` props, allowing for more flexible deployment data handling.
- Refactored API queries in `ShowDeployments` to utilize a unified query for fetching deployments by type, improving code efficiency.
- Replaced instances of `ShowSchedulesLogs` with `ShowDeploymentsModal` in relevant components to streamline deployment log access.
2025-05-04 12:58:46 -06:00
Mauricio Siu
2fa0c7dfd2 Refactor deployment components to unify application and compose handling
- Updated `CancelQueues`, `RefreshToken`, and `ShowDeployments` components to accept a unified `id` and `type` prop, allowing for streamlined handling of both applications and compose deployments.
- Removed redundant compose-specific components (`CancelQueuesCompose`, `RefreshTokenCompose`, `ShowDeploymentCompose`, and `ShowDeploymentsCompose`) to simplify the codebase.
- Enhanced loading state management in `ShowDeployments` to improve user experience during data fetching.
2025-05-04 12:39:17 -06:00
Mauricio Siu
27521decbd Enhance loading state and UI for provider selection in dashboard components
- Added loading indicators using the Loader2 icon to improve user experience while fetching provider data in both ShowProviderForm and ShowProviderFormCompose components.
- Updated the minimum height of the provider selection messages to enhance visual consistency and user guidance during loading states.
- Refactored data fetching logic to include loading states for GitHub, GitLab, Bitbucket, and Gitea providers, ensuring a smoother user interface.
2025-05-04 12:29:37 -06:00
Mauricio Siu
4bec311ad0 Refactor domain handling layout in AddDomain component
- Updated the structure of the AddDomain component to improve layout consistency by replacing fragment elements with a div container.
- This change enhances the visual organization of the domain management interface, contributing to a better user experience.
2025-05-04 12:23:41 -06:00
Mauricio Siu
432f616896 Add ValidationStates type for improved domain validation handling
- Introduced `ValidationStates` type to enhance the structure and clarity of domain validation logic in the ShowDomains component.
- This addition aims to streamline the management of validation states, contributing to better code organization and maintainability.
2025-05-04 12:16:56 -06:00
Mauricio Siu
4575f16be4 Add DNS helper modal and refactor domain handling components
- Introduced `DnsHelperModal` for guiding users on DNS configuration, including steps for adding A records and verifying configurations.
- Refactored domain handling by consolidating domain management into `handle-domain.tsx`, replacing the previous `add-domain.tsx`.
- Updated `ShowDomains` and related components to utilize the new domain handling structure, improving code organization and maintainability.
- Enhanced user experience by integrating domain validation and service selection features in the domain management interface.
2025-05-04 12:07:09 -06:00
Mauricio Siu
96b1df2199 Enhance backup scheduling interface and logging
- Updated the backup scheduling form to include a tooltip explaining cron expression format and examples, improving user guidance.
- Integrated a selection component for predefined cron expressions, allowing users to choose or enter custom schedules more easily.
- Added logging for backup details in the server utility to aid in debugging and monitoring backup schedules.
2025-05-04 03:31:51 -06:00
Mauricio Siu
614b9d25a8 Implement restore functionality for various database types
- Added `apiRestoreBackup` schema to define input requirements for restore operations.
- Refactored restore utilities for PostgreSQL, MySQL, MariaDB, and MongoDB to utilize a unified command generation approach, enhancing maintainability.
- Improved logging during restore processes to provide clearer feedback on command execution and success/failure states.
- Streamlined the handling of database credentials and backup file paths across different database types, ensuring consistency and reducing redundancy.
2025-05-04 03:25:58 -06:00
Mauricio Siu
66dd890448 Enhance backup command generation and logging for database backups
- Refactored backup utilities for PostgreSQL, MySQL, MariaDB, and MongoDB to streamline command generation and improve logging.
- Introduced a unified `getBackupCommand` function to encapsulate backup command logic, enhancing maintainability.
- Improved error handling and logging during backup processes, providing clearer feedback on command execution and success/failure states.
- Updated container retrieval methods to return null instead of throwing errors when no containers are found, improving robustness.
2025-05-04 00:15:09 -06:00
Mauricio Siu
0690f07262 Enhance backup validation and improve backup display
- Added validation to require a service name for compose backups in the backup handling logic, improving user feedback.
- Refactored the ShowBackups component to sort deployments by creation date and enhance the display of backup information, including service names and statuses, for better user experience.
- Updated logging in the compose backup utility to include command execution details, aiding in debugging and monitoring.
2025-05-03 12:59:22 -06:00
Mauricio Siu
e437903ef8 Enhance backup and deployment features
- Updated the RestoreBackupSchema to require serviceName for compose backups, improving validation and user feedback.
- Refactored the ShowBackups component to include deployment information, enhancing the user interface and experience.
- Introduced new SQL migration files to add backupId to the deployment table and appName to the backup table, improving data relationships and integrity.
- Enhanced deployment creation logic to support backup deployments, ensuring better tracking and management of backup processes.
- Improved backup and restore utility functions to streamline command execution and error handling during backup operations.
2025-05-03 12:39:52 -06:00
Mauricio Siu
50aeeb2fb8 Refactor backup management and enhance database schema
- Updated the ShowBackups component to improve layout and user experience by adding a minimum height and centering content when no backups are available.
- Removed the outdated SQL file `0089_dazzling_marrow.sql` and replaced it with a new schema file `0089_eminent_winter_soldier.sql` that introduces new columns and types for the `backup` table, enhancing data structure.
- Updated the journal and snapshot metadata to reflect the new schema changes and maintain consistency in the database structure.
- Adjusted the service component layout to accommodate new grid configurations for better responsiveness.
2025-05-03 09:58:50 -06:00
Mauricio Siu
d85fc2e513 Merge branch 'canary' into 187-backups-for-docker-compose 2025-05-03 09:48:24 -06:00
Mauricio Siu
4a8cadc6ee Update schedule access control to restrict access to owners only
- Modified the `isEnabled` function in the side menu to check if the user has the "owner" role in addition to the non-cloud environment condition.
- Updated the server-side props validation in the schedules page to redirect users who are not owners, enhancing security and access control.
2025-05-03 09:42:28 -06:00
Mauricio Siu
b2d938d2fc Remove the schedule table from the database schema to streamline the overall structure and eliminate outdated components. 2025-05-03 09:40:18 -06:00
Mauricio Siu
9277427153 Add new schedule management schema and update deployment tracking
- Introduced a new `schedule` table with fields for `scheduleId`, `name`, `cronExpression`, `appName`, `serviceName`, `shellType`, `scheduleType`, `command`, `script`, `applicationId`, `composeId`, `serverId`, `userId`, `enabled`, and `createdAt`.
- Added ENUM types `scheduleType` and `shellType` for better data integrity.
- Updated the `deployment` table to include `startedAt`, `finishedAt`, and `scheduleId` columns for enhanced tracking of deployment timing and associations.
- Established foreign key constraints between `schedule` and related tables to maintain referential integrity.
- Removed outdated SQL files to streamline the schema management process.
2025-05-03 01:23:19 -06:00
Mauricio Siu
ccb141339b Enhance schedule management and job handling features
- Updated the scheduleRouter to manage job scheduling and removal based on the enabled status of schedules, improving job lifecycle management.
- Refactored the scheduleJob and removeJob utilities to support scheduling and removing jobs for both server and schedule types.
- Introduced a new schema for jobQueue to accommodate schedule jobs, enhancing the flexibility of job definitions.
- Improved the runJobs function to execute scheduled jobs based on their enabled status, ensuring proper execution of active schedules.
- Enhanced the initialization process for schedules to automatically schedule active jobs from the database, streamlining the setup process.
2025-05-03 00:54:01 -06:00
Mauricio Siu
a5fb5532fd Update drizzle-zod dependency and enhance deployment tracking features
- Downgraded the drizzle-zod package from version 0.7.1 to 0.5.1 for compatibility.
- Added new fields `startedAt` and `finishedAt` to the deployment schema to track deployment timing.
- Enhanced deployment creation logic to set `startedAt` and `finishedAt` timestamps during deployment processes.
- Improved the ShowDeployments and ShowSchedulesLogs components to display deployment duration using a new Badge component.
- Refactored deployment removal logic to streamline the process of cleaning up old deployments.
2025-05-03 00:12:49 -06:00
Mauricio Siu
43ab1aa7b8 Enhance ShowSchedules component with improved user feedback and schedule execution
- Updated the ShowSchedules component to include a delay before refetching schedules after a successful manual run, enhancing user experience by providing a brief confirmation period.
- Removed unnecessary console logging in the updateSchedule function to streamline the code and improve maintainability.
- Modified the scheduleJob utility to accept scheduleId as the first parameter, improving clarity and consistency in job scheduling.
2025-05-02 23:11:21 -06:00
Mauricio Siu
3072795232 Enhance schedule initialization and management features
- Introduced a new `initSchedules` function to initialize and schedule active schedules from the database, improving the management of scheduled tasks.
- Updated the `createSchedule` and `updateSchedule` functions to handle scheduling jobs based on the enabled status of schedules, ensuring proper job management.
- Refactored the `removeScheduleJob` utility to cancel existing scheduled jobs, enhancing the flexibility of schedule updates.
- Improved the `HandleSchedules` and `ShowSchedules` components by removing unused imports and enhancing the user interface for better clarity and usability.
2025-05-02 23:05:39 -06:00
Mauricio Siu
98d0f1d5bf Enhance schedule management with new fields and improved components
- Introduced new fields in the schedule schema: `serviceName`, `scheduleType`, and `script`, allowing for more flexible schedule configurations.
- Updated the `HandleSchedules` component to incorporate the new fields, enhancing user input options for schedule creation and updates.
- Refactored the `ShowSchedules` component to support the new `scheduleType` and display relevant information based on the selected type.
- Improved API handling for schedule creation and updates to accommodate the new fields, ensuring proper validation and error handling.
- Added a new `ShowSchedulesModal` component for better integration of schedule viewing in server settings, enhancing user experience.
2025-05-02 20:17:21 -06:00
Mauricio Siu
49e55961db Refactor ShowSchedules component for improved layout and user interaction
- Replaced the table layout with a grid layout for better visual organization of schedules.
- Enhanced the display of schedule details, including status badges and command information.
- Updated action buttons for running schedules and managing them with improved icons and tooltips.
- Streamlined the code for better readability and maintainability.
2025-05-02 16:26:47 -06:00
Mauricio Siu
4ee220c1d8 Refactor HandleSchedules component for improved UI and user experience
- Updated the layout of the HandleSchedules component to enhance the selection of predefined schedules and custom cron expressions.
- Introduced a flexbox layout for better spacing and organization of form elements.
- Improved placeholder text for clarity in the schedule selection dropdown.
2025-05-02 16:19:30 -06:00
Mauricio Siu
c69992c4f0 Improve error handling in ShowSchedules component and remove unnecessary logging in schedule API
- Updated error messaging in the ShowSchedules component to provide more informative feedback when a schedule fails to run.
- Removed redundant console logging in the schedule API to streamline error handling and improve code cleanliness.
2025-05-02 16:18:05 -06:00
Mauricio Siu
1f6ba45c12 Refactor ShowSchedules component and enhance error handling in schedule API
- Simplified the mutation calls in the ShowSchedules component by removing success callbacks, streamlining the code.
- Improved the display logic to conditionally render the HandleSchedules component when schedules are present.
- Enhanced error handling in the runManually mutation within the schedule API, ensuring proper logging and error messaging for better debugging.
2025-05-02 16:16:44 -06:00
Mauricio Siu
ef02ba22b5 Refactor delete schedule action in ShowSchedules component
- Replaced the delete button with a DialogAction component for improved user interaction.
- Added confirmation dialog for deleting schedules, enhancing user experience and preventing accidental deletions.
- Updated success and error notifications for better feedback upon schedule deletion.
2025-05-02 16:07:46 -06:00