Compare commits

...

893 Commits

Author SHA1 Message Date
Simon Larsen
c4c6793b29 feat: Implement KEDA autoscaling configuration for probes and add metrics endpoints 2025-08-01 15:38:04 +01:00
Simon Larsen
c894b112e6 fix: Await monitorResource call to ensure proper error handling in incoming request processing 2025-08-01 14:34:17 +01:00
Simon Larsen
304baf1bb4 fix: Await monitorResource call to ensure proper error handling in probe response processing 2025-08-01 14:33:17 +01:00
Simon Larsen
9adea6b1ba feat: Remove Helm annotations for post-install and post-upgrade hooks from templates 2025-08-01 14:01:04 +01:00
Simon Larsen
5498521e02 feat: Add Helm annotations for post-install and post-upgrade hooks 2025-08-01 13:47:52 +01:00
Simon Larsen
9e97c6ddbc feat: Update autoscaler conditions for fluent-ingest, incoming-request-ingest, probe-ingest, and server-monitor-ingest templates 2025-08-01 13:23:39 +01:00
Nawaz Dhandala
63272e09f8 refactor: Simplify function parameter formatting and improve readability in various files 2025-08-01 10:45:55 +01:00
Simon Larsen
327c28afdc feat: Implement fluent ingest worker for processing queue jobs 2025-08-01 10:34:17 +01:00
Simon Larsen
896020b93b feat: Add KEDA autoscaling configuration for various ingests
- Introduced KEDA autoscaling configuration in values.yaml for probeIngest, fluentIngest, incomingRequestIngest, and serverMonitorIngest.
- Added endpoints for queue statistics, size, and failed jobs in IncomingRequestIngest and ProbeIngest APIs.
- Implemented asynchronous processing of incoming requests and probes using job queues.
- Created Metrics API for KEDA metrics integration in IncomingRequestIngest, ProbeIngest, and ServerMonitorIngest.
- Refactored IncomingRequest and Probe APIs to utilize queue services for processing.
- Added job processing logic for incoming requests and probes in respective job files.
- Implemented queue service classes for managing job addition and retrieval of queue statistics.
2025-08-01 10:29:02 +01:00
Simon Larsen
15a68472b0 feat: comment out ClusterKeyAuthorization import for KEDA debugging 2025-07-31 21:23:41 +01:00
Simon Larsen
0210480d97 feat: remove Prometheus metrics endpoint for KEDA debugging 2025-07-31 21:22:04 +01:00
Simon Larsen
72fdc06687 feat: temporarily disable authentication middleware for KEDA debugging in metrics endpoint 2025-07-31 20:52:10 +01:00
Simon Larsen
3710b81b9a feat: add replica count support for deployments in Helm templates 2025-07-31 20:03:25 +01:00
Simon Larsen
9fcb3dc2e0 feat: update cluster key handling for KEDA compatibility in authorization middleware and Helm chart 2025-07-31 19:50:25 +01:00
Simon Larsen
43e2ccf51a feat: improve secret handling in Helm chart for upgrade scenarios 2025-07-31 19:29:07 +01:00
Nawaz Dhandala
48c3d8603a fix: format code for better readability and consistency in MonitorResource and Metrics 2025-07-31 12:57:39 +01:00
Simon Larsen
9cfc912161 feat: enhance response messages for incoming request checks with time difference 2025-07-31 12:56:06 +01:00
Simon Larsen
29e3ee57ab feat: add metrics-api endpoint for queue size retrieval in KEDA autoscaling 2025-07-31 12:44:48 +01:00
Simon Larsen
be7e849822 feat: add KEDA ScaledObjects for OpenTelemetry Ingest with configurable metrics 2025-07-31 12:34:43 +01:00
Simon Larsen
59d76b601a feat: add KEDA autoscaling support for OpenTelemetry Ingest with configurable metrics 2025-07-31 12:18:57 +01:00
Simon Larsen
b77ef336b8 feat: add replica count configuration for multiple deployments in Helm templates 2025-07-31 11:47:03 +01:00
Nawaz Dhandala
7df21fe8e5 refactor: add type annotations for pagination parameters in OTelIngest 2025-07-30 22:42:24 +01:00
Nawaz Dhandala
f39e1943c7 refactor: improve code formatting and readability in Queue and TelemetryQueueService 2025-07-30 22:40:45 +01:00
Simon Larsen
966a903646 feat: implement pagination for retrieving failed jobs from the queue 2025-07-30 22:39:58 +01:00
Simon Larsen
1d9d37c6d1 refactor: optimize queue size and stats calculations by using count methods 2025-07-30 22:37:46 +01:00
Simon Larsen
7edcc4dbce feat: add endpoint to retrieve failed jobs from the queue 2025-07-30 22:37:08 +01:00
Simon Larsen
0939294d22 Refactor code structure for improved readability and maintainability 2025-07-30 19:45:46 +01:00
Simon Larsen
dbcbfe5f79 refactor: simplify telemetry processing worker initialization and remove unused export 2025-07-30 19:25:52 +01:00
Simon Larsen
a638972817 feat: update @oneuptime/common dependency in test-release workflow 2025-07-30 16:44:05 +01:00
Simon Larsen
37c6310465 feat: update @oneuptime/common to version 7.0.4800 and adjust workflow dependencies 2025-07-30 16:42:39 +01:00
Nawaz Dhandala
a7d38389fd style: improve formatting and consistency in Prometheus metrics generation 2025-07-30 16:30:26 +01:00
Nawaz Dhandala
2f55336db7 Merge branch 'master' of https://github.com/OneUptime/oneuptime 2025-07-30 16:29:25 +01:00
Nawaz Dhandala
f99a15b95b refactor: enhance type annotations for better clarity in queue processing methods 2025-07-30 16:28:53 +01:00
Simon Larsen
de5bff2ffe feat: add Prometheus metrics endpoint for telemetry queue monitoring 2025-07-30 16:26:38 +01:00
Nawaz Dhandala
cef2764499 style: format code for better readability and consistency across multiple files 2025-07-30 16:22:26 +01:00
Simon Larsen
a7014ac3ff fix: update projectId handling to ensure proper ObjectID conversion in telemetry processing 2025-07-30 16:12:19 +01:00
Simon Larsen
fa31dc670c feat: implement telemetry ingestion processing with queue integration 2025-07-30 15:37:08 +01:00
Simon Larsen
4c2a12cf31 feat: add queue stats and size endpoints with authorization middleware 2025-07-30 15:34:51 +01:00
Simon Larsen
b4115e1529 feat: initialize telemetry processing worker with logging for better monitoring 2025-07-30 15:30:23 +01:00
Simon Larsen
3883790c50 feat: add getQueueSize and getQueueStats methods to Queue class for improved queue monitoring 2025-07-30 15:29:53 +01:00
Simon Larsen
1702558d73 chore: update package-lock.json files to add @types/web-push and web-push dependencies
- Added "@types/web-push": "^3.6.4" to multiple package-lock.json files.
- Added "web-push": "^3.6.7" to multiple package-lock.json files.
- Removed "lodash" and "@types/lodash" from multiple package-lock.json files.
2025-07-30 15:21:03 +01:00
Simon Larsen
cacdbff50e Implement feature X to enhance user experience and optimize performance 2025-07-30 13:58:46 +01:00
Nawaz Dhandala
0bc6b432a2 refactor: Update getNestedValue function signature for improved type safety in Detail and TableRow components 2025-07-30 13:57:23 +01:00
Simon Larsen
eaa09d4a13 refactor: Replace lodash get with custom nested value helper in Detail and TableRow components 2025-07-30 13:52:30 +01:00
Simon Larsen
08c85dd31c refactor: Remove lodash and its type definitions from package dependencies 2025-07-30 12:48:19 +01:00
Nawaz Dhandala
42e82b6fb7 refactor: Clean up whitespace in various components for improved readability 2025-07-30 12:08:53 +01:00
Simon Larsen
463a20f342 feat: Add ingestedAt timestamp to ProbeMonitorResponse and update ingestion logic 2025-07-30 12:08:21 +01:00
Simon Larsen
1b8a7e3261 chore: Add sw.js to .gitignore to prevent tracking of service worker file 2025-07-30 11:23:26 +01:00
Simon Larsen
8b27dd1f26 refactor: Remove deprecated service worker implementation from Dashboard 2025-07-30 11:23:09 +01:00
Simon Larsen
17c72f65e3 refactor: Update service worker template and generated version information for Dashboard 2025-07-30 11:22:29 +01:00
Simon Larsen
5eee900fd3 feat: Implement service worker generation script and update build process for Dashboard 2025-07-30 11:18:55 +01:00
Simon Larsen
0a6cdd11af refactor: Simplify esbuild configuration by disabling minification and removing build version generation 2025-07-30 10:47:23 +01:00
Simon Larsen
8514b6b82e refactor: Enhance PWA service worker with caching strategies and update notifications 2025-07-30 10:45:18 +01:00
Simon Larsen
dfa8f6cd24 refactor: Remove unused LocalStorage import and update status page ID handling in DashboardMasterPage 2025-07-30 10:41:19 +01:00
Simon Larsen
61614227e1 refactor: Update dependency version for @oneuptime/common to allow any version 2025-07-30 10:01:46 +01:00
Simon Larsen
f3d20eb544 refactor: Add spacing before nav element in Pagination component for improved layout 2025-07-29 13:47:33 +01:00
Simon Larsen
a11ff57fda refactor: Clean up layout in Pagination component with improved mobile navigation and added comments for clarity 2025-07-29 13:46:23 +01:00
Simon Larsen
deb635bc80 refactor: Remove unnecessary height style from Modal component for improved responsiveness 2025-07-29 11:25:26 +01:00
Simon Larsen
c707830811 refactor: Adjust margin for label in ProbePicker component for better alignment 2025-07-29 11:20:28 +01:00
Nawaz Dhandala
24ada68d1e refactor: Replace lodash Dictionary import with local Dictionary type in multiple files 2025-07-29 11:12:37 +01:00
Nawaz Dhandala
ca23234ba9 refactor: Update import statement for Dictionary in Route.ts 2025-07-29 11:10:22 +01:00
Nawaz Dhandala
ea40a955e9 refactor: Enhance Slack notification structure for balance refill in NotificationService 2025-07-29 11:07:56 +01:00
Nawaz Dhandala
a46ee07d70 refactor: Format imports and improve error logging in NotificationService 2025-07-29 11:07:10 +01:00
Simon Larsen
5c5bab408d refactor: Simplify Terraform examples by removing unused monitor configurations and variables 2025-07-29 11:02:57 +01:00
Simon Larsen
540d632baf feat: Add Slack notification for balance refill in NotificationService 2025-07-28 12:03:40 +01:00
Simon Larsen
74718017ad refactor: Update jest.config.json for module name mapping and transform ignore patterns 2025-07-25 16:03:01 +01:00
Simon Larsen
d16897db1b refactor: update dependencies in package.json
- Replaced "Common" dependency with "@oneuptime/common" version 7.0.4773.
- Maintained existing versions for "dotenv" and "ts-node".
2025-07-25 15:38:07 +01:00
Simon Larsen
be3fc6f077 refactor: Update monitorTask type from PromiseVoidFunction to Promise<void> for consistency 2025-07-25 14:37:52 +01:00
Nawaz Dhandala
b7b577517c refactor: Improve type safety by defining PromiseVoidFunction for monitorTask in CheckOnlineStatus 2025-07-25 14:34:04 +01:00
Simon Larsen
ccf7a96e43 refactor: Streamline monitor processing logic in CheckOnlineStatus for improved error handling and parallel execution 2025-07-25 14:26:54 +01:00
Simon Larsen
892f3c052a feat: Add timeNow property to ServerMonitorResponse and update related logic in ServerMonitorCriteria and CheckOnlineStatus 2025-07-25 14:25:01 +01:00
Simon Larsen
00833a06f4 fix: Update time calculation in CheckOnlineStatus to use three minutes ago 2025-07-25 14:20:32 +01:00
Simon Larsen
472adf610a refactor: Update comment to clarify SSL monitor check in MonitorResourceUtil 2025-07-25 14:14:12 +01:00
Nawaz Dhandala
976c36de9a feat: Add migration for new default values and indexes in OnCallDutyPolicyScheduleLayer 2025-07-25 13:50:08 +01:00
Simon Larsen
6026c9c9af refactor: Remove unused import for ProbeApiIngestResponse in ServerMonitor.ts 2025-07-25 13:49:34 +01:00
Simon Larsen
791aa1421b feat: Optimize server monitor response handling by returning early and streamlining processing 2025-07-25 13:49:14 +01:00
Simon Larsen
79dbc94f82 feat: Add log viewing instructions and improve error logging in agent 2025-07-25 13:42:25 +01:00
Simon Larsen
ded41fc7ec feat: Enhance logging functionality with log file path configuration and log directory management 2025-07-25 13:38:23 +01:00
Simon Larsen
581c374745 refactor: Remove PWA install prompt to streamline user experience 2025-07-25 13:31:26 +01:00
Simon Larsen
64c0c8b4cb haraka delete 2025-07-25 09:07:09 +01:00
Simon Larsen
7d2241ba98 feat: Add indexes to improve query performance across multiple database models 2025-07-24 20:02:23 +01:00
Nawaz Dhandala
30bada5b7a feat: Add additional performance indexes and update migration index list 2025-07-24 18:40:40 +01:00
Simon Larsen
61bfb37747 Merge branch 'release' of github.com:OneUptime/oneuptime into release 2025-07-24 18:39:42 +01:00
Simon Larsen
4686aa941a feat: Add performance indexes to improve query efficiency across multiple database models 2025-07-24 18:39:04 +01:00
Nawaz Dhandala
3c065c76b0 feat: Add missing indexes for improved query performance in IncidentStateTimeline and MonitorProbe 2025-07-24 18:26:03 +01:00
Simon Larsen
5dccd03ed4 refactor: Remove ProcessMetrics job to streamline monitor metric handling 2025-07-24 18:16:32 +01:00
Simon Larsen
a395a95997 feat: Add composite indexes for efficient querying in IncidentStateTimeline, MonitorProbe, and MonitorStatusTimeline 2025-07-24 18:16:06 +01:00
Nawaz Dhandala
89082b1232 refactor: Improve error handling and type definitions in core operations across multiple services 2025-07-24 17:42:38 +01:00
Nawaz Dhandala
7cb33de450 refactor: Enhance error handling and type definitions in core operations for AlertService and IncidentService 2025-07-24 17:34:46 +01:00
Nawaz Dhandala
353ac875fb refactor: Simplify promise handling and error logging in service operations 2025-07-24 17:25:54 +01:00
Simon Larsen
d6560fdb32 feat: Refactor incident creation to execute core operations asynchronously 2025-07-24 17:23:53 +01:00
Simon Larsen
5115e21a7a feat: Refactor scheduled maintenance creation to execute core operations asynchronously 2025-07-24 17:17:52 +01:00
Simon Larsen
0e6119ddce feat: Execute owner assignment asynchronously in StatusPageService 2025-07-24 17:14:46 +01:00
Simon Larsen
b842a49cfb feat: Refactor monitor creation to run core operations in parallel, deferring workspace operations 2025-07-24 16:42:29 +01:00
Nawaz Dhandala
9737e50467 refactor: Clean up whitespace and improve code formatting in migration and service files 2025-07-24 16:00:49 +01:00
Simon Larsen
91beb6091d feat: Optimize monitor creation by parallelizing workspace, billing, and probe operations 2025-07-24 15:56:35 +01:00
Simon Larsen
68e610aa9f fix: Disable workflow operations for MetricType entity 2025-07-24 15:25:04 +01:00
Simon Larsen
d673ef3a01 feat: Enhance memory management and error handling in telemetry ingestion processes 2025-07-24 15:22:29 +01:00
Simon Larsen
6dff8f07bf feat: Update deviceToken column type to VeryLongText and add migration for changes 2025-07-24 08:54:03 +01:00
Simon Larsen
4ca836c91f fix: Remove OPENTELEMETRY_EXPORTER_OTLP_HEADERS from environment variables in multiple Helm templates 2025-07-24 08:30:51 +01:00
Simon Larsen
d59ba73993 fix: Set current time for log entries without timeUnixNano 2025-07-23 21:08:24 +01:00
Simon Larsen
e878855b31 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-07-23 13:43:56 +01:00
Simon Larsen
8f95ae65f6 feat: Add disableAutoscaler option for various services in Helm templates and values 2025-07-23 13:42:53 +01:00
Nawaz Dhandala
995b93f525 fix: Remove unnecessary blank line in root route handler 2025-07-22 14:21:56 +01:00
Simon Larsen
fc3c11b12d Merge branch 'master' of github.com:OneUptime/oneuptime 2025-07-22 13:57:00 +01:00
Simon Larsen
d0ce225b66 fix: Update request parameter to ignore unused variable in root route handler 2025-07-22 13:56:24 +01:00
Nawaz Dhandala
b486b59598 fix: Correct syntax in navigation group definition and clean up route file 2025-07-22 12:54:04 +01:00
Simon Larsen
4d7135fb11 refactor: Remove mobile detection and redirection logic from routes for PWA 2025-07-22 12:52:35 +01:00
Simon Larsen
0c4464ed87 Add comprehensive FAQ and troubleshooting documentation for OneUptime PWA across all platforms
- Created a new FAQ and troubleshooting guide for OneUptime Mobile and Desktop Apps, covering general questions, installation issues, notification problems, and security considerations.
- Added detailed installation guides for iOS, Linux, macOS, and Windows, including step-by-step instructions and troubleshooting tips.
- Included platform-specific issues and solutions to enhance user experience and support.
2025-07-22 12:48:50 +01:00
Simon Larsen
d705ea6896 fix: Update shortcut names to include "OneUptime" for clarity in manifest files 2025-07-22 12:07:44 +01:00
Simon Larsen
ac146df9e8 refactor: Remove caching and offline functionality from service workers for PWA 2025-07-22 12:01:43 +01:00
Simon Larsen
3ce7d54eef fix: Update theme color to black across multiple files for consistency 2025-07-22 11:53:16 +01:00
Simon Larsen
418c89c15b Merge branch 'master' into pwa 2025-07-22 11:47:57 +01:00
Simon Larsen
80144814d1 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-07-22 10:05:43 +01:00
Simon Larsen
f3223e397b fix: Correct capitalization in help text for OneUptime URL flag 2025-07-22 10:03:44 +01:00
Nawaz Dhandala
fce5e18fba style: Format class name for better readability 2025-07-22 09:57:15 +01:00
Nawaz Dhandala
cdd60c1d6b Refactor StatusPage and related services to enhance code readability and maintainability
- Updated StatusPage model to improve formatting.
- Modified migration script for adding enableCustomSubscriberEmailNotificationFooterText to ensure backward compatibility.
- Adjusted Index.ts to include the new migration.
- Refactored StatusPageService methods for better readability and consistency.
- Cleaned up Push component by removing unnecessary whitespace.
- Improved SubscriberSettings component by enhancing formatting and readability.
- Refactored OtelIngestService to streamline log, metric, and trace processing logic.
- Enhanced incident and scheduled event detail components for better type handling and readability.
2025-07-22 09:56:01 +01:00
Simon Larsen
cb35a0d420 feat: Implement asynchronous processing for logs, metrics, and traces with immediate response 2025-07-22 09:51:15 +01:00
Simon Larsen
b198d4d87d feat: Refactor email footer settings for subscriber notifications 2025-07-22 08:31:33 +01:00
Simon Larsen
285a5355a7 feat(PWA): Enhance PWA support with service worker, mobile redirection, and manifest updates
- Implemented service worker registration for PWA functionality on both home and dashboard.
- Added mobile detection to redirect mobile users to the dashboard for a better experience.
- Updated manifest.json with improved app details, shortcuts, and caching strategies.
- Enhanced offline experience with a custom offline page and improved caching strategies in the service worker.
- Added proper headers for manifest and service worker in Nginx configuration.
- Included iOS splash screens and Microsoft tiles for better platform integration.
- Improved meta tags for better PWA compliance and user experience.
2025-07-22 08:26:36 +01:00
Simon Larsen
777093d2e1 feat: Add support for custom subscriber email notification footer text 2025-07-21 22:23:31 +01:00
Simon Larsen
0444b09ad5 feat: Update sorting logic to prioritize 'startsAt' date for incidents and scheduled events 2025-07-21 21:56:08 +01:00
Simon Larsen
7be9c4b1e7 fix: Improve error handling and display in push notification registration 2025-07-21 21:23:20 +01:00
Simon Larsen
79910b6c0b feat: Add VAPID key validation for push notifications registration 2025-07-21 20:37:05 +01:00
Simon Larsen
0686dea83c Merge pull request #1968 from dmizelle/dmizelle/terraform-arm64-targets
chore(ci): [terraform] Add Missing arm64 Targets
2025-07-21 20:11:52 +01:00
Devon Mizelle
e1e27c4e94 chore(ci): [terraform] Add Missing arm64 Targets
A previous commit added `arm` targets, which is 32-bit ARM. We also need
`arm64` targets (64-bit ARM.)

This commit also adds `arm`/`arm64` for other `GOOS` targets.
2025-07-21 15:08:33 -04:00
Simon Larsen
6fe14fbed3 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-07-21 16:52:00 +01:00
Simon Larsen
9ef248f71e chore: Remove outdated PUSH_NOTIFICATIONS.md documentation file 2025-07-21 16:51:55 +01:00
Nawaz Dhandala
e243a76dab refactor: Simplify modal close and submit handlers in Push component 2025-07-21 16:51:20 +01:00
Nawaz Dhandala
71466089a4 refactor: Improve type annotations and error handling across multiple files 2025-07-21 16:45:33 +01:00
Simon Larsen
31e6172af4 Merge pull request #1967 from dmizelle/dmizelle/terraform-darwin-arm-build-target
chore(ci): [terraform] Add darwin/arm Build Target
2025-07-21 16:29:46 +01:00
Devon Mizelle
7a228f76e4 chore(ci): [terraform] Add darwin/arm Build Target
The Terraform provider wasn't releasing with a `darwin/arm` target, so
you couldn't use it on Apple Silicon Macs. This adds that target to the
build process.
2025-07-21 11:25:07 -04:00
Nawaz Dhandala
40d473d195 Refactor push notification message creation for improved readability
- Updated the formatting of push notification message creation across multiple services to enhance code clarity and maintainability.
- Adjusted the structure of function calls to align parameters vertically, making it easier to read and understand.
- Ensured consistent use of line breaks and indentation for better code style adherence.
2025-07-21 16:21:20 +01:00
Simon Larsen
f2f5b757eb feat: Enhance push notification handling by updating user on call log timeline status and adding userOnCallLogTimelineId option 2025-07-21 16:18:28 +01:00
Simon Larsen
1d4d93ceec refactor: Update alert and incident view links to use service methods for improved accuracy 2025-07-21 16:05:03 +01:00
Simon Larsen
40819562f7 feat: Add userPushId to UserOnCallLogTimeline and related migration 2025-07-21 15:57:09 +01:00
Simon Larsen
066ad4a52d refactor: Enhance logging for web push notification results and payload details 2025-07-21 15:47:45 +01:00
Simon Larsen
a109ae33e0 refactor: Update push notification creation to use parameter objects for improved clarity and maintainability 2025-07-21 15:33:28 +01:00
Simon Larsen
19ac60d8db fix tests 2025-07-21 15:15:58 +01:00
Simon Larsen
7557103cc0 refactor: Update notification methods to use parameter objects for improved readability 2025-07-21 15:01:32 +01:00
Simon Larsen
d1bd8c09d1 feat: Add push notification messages for various alert and incident events 2025-07-21 14:57:12 +01:00
Simon Larsen
861c1782fc feat: Remove lastUsedAt column from UserPush table and update related migrations 2025-07-17 19:06:05 +01:00
Simon Larsen
f937749c7e feat: Replace hardcoded limit with LIMIT_PER_PROJECT constant in sendPushNotificationToUser method 2025-07-17 18:51:35 +01:00
Simon Larsen
6752ba8b63 feat: Add toggle option for push notification alerts in user settings 2025-07-17 18:28:01 +01:00
Simon Larsen
dce9f2fe78 Add new PNG image for OneUptime dashboard 2025-07-17 18:21:14 +01:00
Simon Larsen
d18c3af5ac feat: Update PushNotificationUtil properties to public for improved accessibility in PushNotificationService 2025-07-17 18:16:08 +01:00
Simon Larsen
d48f864512 feat: Refactor push notification creation in OnCallDutyPolicy services to utilize PushNotificationUtil for improved consistency and maintainability 2025-07-17 18:14:34 +01:00
Simon Larsen
0976b2700c add img 2025-07-17 18:08:38 +01:00
Simon Larsen
58990d9991 feat: Update VAPID_PRIVATE_KEY definition in Helm template; remove duplicate entry and ensure correct placement 2025-07-17 18:02:41 +01:00
Simon Larsen
934b08d643 feat: Refactor push notification handling by utilizing PushNotificationUtil for consistency and maintainability 2025-07-17 17:59:19 +01:00
Simon Larsen
b832613fb2 feat: Refactor error handling in Push component; remove duplicate device modal and update error display 2025-07-17 17:11:38 +01:00
Simon Larsen
3faa2fe302 feat: Remove visibility condition for verified user push notifications in Push component 2025-07-17 17:09:30 +01:00
Simon Larsen
a1fe600863 feat: Update device name placeholder in Push component to suggest browser names 2025-07-17 17:00:31 +01:00
Simon Larsen
74af666d70 feat: Remove unused fields from device registration form in Push component 2025-07-17 16:58:43 +01:00
Simon Larsen
4707b4b4dd feat: Improve device registration by adding browser name detection and updating device name handling 2025-07-17 16:58:24 +01:00
Simon Larsen
78d34542b6 feat: Enhance device registration flow in UserPushAPI and Push component; add handling for duplicate device registrations 2025-07-17 15:59:27 +01:00
Simon Larsen
141280ad0e feat: Integrate push notification handling in UserNotificationRuleService; add userPush support in Alert and Incident on-call rules 2025-07-17 15:36:56 +01:00
Simon Larsen
92f978df20 feat: Add success modal for test notification in Push component; enhance user feedback on notification delivery 2025-07-17 14:41:09 +01:00
Simon Larsen
e3db66734f feat: Enhance logging in PushNotificationService and Service Worker; add detailed logs for push notifications and installation events 2025-07-17 14:33:59 +01:00
Simon Larsen
618dcbdcce feat: Improve logging and error handling in PushNotificationService and Service Worker; remove Logger from Cookie and LocalStorage classes 2025-07-17 14:06:17 +01:00
Simon Larsen
af66709363 feat: Enhance push notification logging and add web-push dependencies 2025-07-16 20:48:12 +01:00
Simon Larsen
5ebe067efd feat: Update device type handling in test notification for web push 2025-07-16 20:39:57 +01:00
Simon Larsen
a59c98d7e6 feat: Add VAPID configuration for web push notifications in EnvironmentConfig and update PushNotificationService 2025-07-16 20:28:39 +01:00
Simon Larsen
5ff1d15b36 feat: Add VAPID configuration for web push notifications 2025-07-16 20:19:37 +01:00
Simon Larsen
f4cdefc4f9 feat: Update service worker registration path for push notifications 2025-07-16 20:00:13 +01:00
Simon Larsen
8b11be85bf feat: Refactor device registration flow for push notifications 2025-07-16 19:57:45 +01:00
Simon Larsen
6e2416910e feat: Add push notification support for on-call policy changes and probe status updates 2025-07-16 19:02:13 +01:00
Simon Larsen
0cd0e174bf feat: Add UserPush table and related migrations for push notification support 2025-07-16 15:53:17 +01:00
Simon Larsen
b7153ed283 feat: Add migration for MigrationName1752659054949 to schema migrations 2025-07-16 10:47:52 +01:00
Simon Larsen
34718f6fa7 feat: Add UserPush model and related database migrations for push notifications 2025-07-16 10:47:24 +01:00
Simon Larsen
ed69c5de39 feat: Restrict push notification support to web devices only 2025-07-16 10:39:55 +01:00
Simon Larsen
5f9f741b82 feat: Implement push notification system for OneUptime
- Added UserPushAPI for managing device registrations and notifications.
- Created PushNotificationService for sending notifications via Web Push and Firebase.
- Developed UserPushService for CRUD operations on user push devices.
- Introduced PushNotificationUtil for generating notification messages.
- Defined PushNotificationMessage and PushNotificationRequest types for structured data.
- Integrated service worker (sw.js) for handling push notifications in the browser.
- Built React component (Push.tsx) for user interface to manage push notifications.
- Documented implementation details and usage in PUSH_NOTIFICATIONS.md.
- Added support for device registration, verification, and test notifications.
- Enhanced security features including user-scoped access and device verification.
2025-07-15 21:39:00 +01:00
Nawaz Dhandala
a427a82327 style: Clean up whitespace in TableBody and TableRow components for improved readability 2025-07-15 20:06:52 +01:00
Simon Larsen
6244ff4ebc style: Update Button and Page components for improved responsive layout 2025-07-15 18:36:08 +01:00
Simon Larsen
9007ed5ddc feat: Implement responsive design for Table component with mobile view support 2025-07-14 23:23:36 +01:00
Simon Larsen
108d1fdfcc style: Enhance ChartGroup component layout for improved spacing and responsive description visibility 2025-07-14 21:08:23 +01:00
Simon Larsen
7678cc9d77 style: Update Card and StartAndEndDate components for improved layout and responsiveness 2025-07-14 21:03:12 +01:00
Nawaz Dhandala
708ea2c977 style: Add responsive visibility classes to date buttons for improved layout 2025-07-14 19:22:46 +01:00
Nawaz Dhandala
0ebfb294ff fix: Update model type validation to use lowercase values for consistency 2025-07-14 19:13:33 +01:00
Nawaz Dhandala
d6d61a61fd style: Adjust formatting for improved readability in HeaderAlert and Modal components 2025-07-14 19:11:56 +01:00
Simon Larsen
46a0e54771 fix: Update Modal and ModalFooter components for improved layout and responsiveness 2025-07-14 19:11:22 +01:00
Simon Larsen
71807da876 feat: Enhance HeaderAlert and Header components to utilize suffix prop for improved title display 2025-07-14 19:05:28 +01:00
Simon Larsen
d7b45106d8 feat: Add suffix prop to HeaderAlert for additional text display 2025-07-14 18:54:59 +01:00
Nawaz Dhandala
1a39c2f6c5 refactor: Improve type annotations and enhance readability in SideMenu component 2025-07-14 16:04:08 +01:00
Nawaz Dhandala
7b2041f6a4 style: Clean up code formatting and remove unnecessary whitespace in various components 2025-07-14 15:43:31 +01:00
Simon Larsen
31cfba9ab8 fix: Update subscriber email notification footer text to include page title if available 2025-07-14 14:56:25 +01:00
Simon Larsen
1ead9679c3 fix: Update Banner component to correctly hide on mobile screens 2025-07-11 11:35:21 +01:00
Simon Larsen
01be21d0ed feat: Add hideOnMobile property to various components for improved mobile responsiveness 2025-07-11 11:34:27 +01:00
Simon Larsen
c8986fb314 fix: Add hideOnMobile property to AnnouncementTable fields for improved mobile responsiveness 2025-07-11 11:23:42 +01:00
Simon Larsen
951fcbe474 fix: Add hideOnMobile property to various fields for improved mobile responsiveness 2025-07-11 11:19:40 +01:00
Simon Larsen
7483ff2c2f fix: Ensure title div is hidden on smaller screens for better responsiveness 2025-07-11 10:14:37 +01:00
Simon Larsen
14fc484e37 Refactor SideMenu components to use sections array for improved structure and readability across multiple pages
- Updated DashboardSideMenu in MonitorGroup, OnCallDuty, ScheduledMaintenanceEvents, Settings, StatusPages, Telemetry, UserSettings, and Workflow to utilize a sections array for SideMenu rendering.
- Removed individual SideMenuItem and SideMenuSection imports, consolidating imports to a single SideMenu component with SideMenuSectionProps.
- Enhanced code maintainability and consistency by standardizing the SideMenu structure across different pages.
2025-07-11 10:13:24 +01:00
Simon Larsen
bd2da4358b fix: Adjust column classes for PageLoader in responsive layout 2025-07-10 17:15:55 +01:00
Nawaz Dhandala
78d43e1a1c fix: Clean up formatting and improve readability in DataType and MailService classes 2025-07-10 16:21:44 +01:00
Simon Larsen
a84a6a0c55 fix: Refactor Modal and ModalFooter components for improved layout and responsiveness 2025-07-10 15:41:06 +01:00
Simon Larsen
66343e6920 fix: Increase maximum concurrent connections in TransporterPool to improve email transport performance 2025-07-10 15:19:55 +01:00
Simon Larsen
6a7a8ad8d9 fix: Simplify connection pooling options by removing unnecessary rate limiting parameters 2025-07-10 15:14:56 +01:00
Simon Larsen
b8faa692cb feat: Implement connection pooling for email transporters to optimize performance and resource management 2025-07-10 15:13:13 +01:00
Simon Larsen
ca99f452ac feat: Enhance Subscriber Settings with Email, SMS, and Slack configurations 2025-07-10 14:34:20 +01:00
Simon Larsen
cd8d851366 fix: Update Includes example values and enhance description for clarity 2025-07-10 14:26:25 +01:00
Simon Larsen
16bed1861c Merge branch 'master' of github.com:OneUptime/oneuptime 2025-07-10 14:14:39 +01:00
Simon Larsen
c0909c68c8 feat: Add 'includes' functionality with documentation and example usage 2025-07-10 14:14:36 +01:00
Nawaz Dhandala
97654f61a2 fix: Add type annotations for improved type safety in various components 2025-07-10 12:50:13 +01:00
Nawaz Dhandala
faa4d8372c Refactor components for improved readability and consistency
- Updated Pagination component to enhance formatting and readability.
- Refactored TableHeader and TableRow components for better clarity and structure.
- Cleaned up NavBar component by organizing imports and improving formatting.
- Enhanced ApiMonitor, PortMonitor, SslMonitor, and WebsiteMonitor classes for better error handling.
- Improved StatusPage components by refining layout and event handling.
- Adjusted Page component for consistent prop spreading and formatting.
2025-07-10 12:19:22 +01:00
Simon Larsen
da4741fcf4 fix: Enhance Modal component layout for improved responsiveness and usability 2025-07-10 12:15:31 +01:00
Simon Larsen
3c420b2114 fix: Implement responsive behavior in Detail and ListRow components to filter fields based on mobile view 2025-07-10 12:08:54 +01:00
Simon Larsen
9c5a649157 fix: Add hideOnMobile property to Field, Column, and related components for responsive behavior 2025-07-10 11:58:02 +01:00
Simon Larsen
4908e9cd1d fix: Add hideOnMobile property to ActionButtonSchema and implement responsive behavior in ListRow, Item, and TableRow components 2025-07-10 11:46:18 +01:00
Simon Larsen
f552115fd5 fix: Refactor Modal component for improved layout and responsiveness 2025-07-10 11:08:32 +01:00
Simon Larsen
a96fc24562 fix: Update FeedItem component to ensure more text button has a fitting width 2025-07-09 18:18:03 +01:00
Simon Larsen
a54d44df01 fix: Update BasicForm component to hide form steps on small screens 2025-07-09 17:04:03 +01:00
Simon Larsen
7afa17cd8d fix: Enhance Modal component layout for better responsiveness and structure 2025-07-09 17:01:59 +01:00
Simon Larsen
2d15d85310 fix: Update Modal component styles for improved responsiveness and layout 2025-07-09 16:57:50 +01:00
Simon Larsen
1a577cf406 fix: Implement retry logic for sending emails with exponential backoff 2025-07-09 16:52:48 +01:00
Simon Larsen
3869725742 fix: Update Breadcrumbs component to ensure proper visibility on medium and larger screens 2025-07-09 16:49:32 +01:00
Simon Larsen
2b286e76f1 fix: Update Pagination component to ensure item count visibility on all screen sizes 2025-07-09 16:49:13 +01:00
Simon Larsen
3a791cec3b fix: Remove unnecessary padding from mobile navigation component 2025-07-09 15:32:46 +01:00
Simon Larsen
0e4557dba7 fix: Update Pagination component to improve visibility of item count on larger screens 2025-07-09 15:32:39 +01:00
Simon Larsen
c594d390cb fix: Refactor DashboardNavbar to use NavItem structure and improve menu handling 2025-07-09 15:24:15 +01:00
Simon Larsen
8a66434af9 fix: Refactor Button component styles for improved readability and consistency 2025-07-09 14:55:43 +01:00
Simon Larsen
c8ddba76f7 fix: Enhance DashboardNavbar with mobile support and additional navigation items 2025-07-09 14:29:39 +01:00
Simon Larsen
4831ed0535 fix: Update Button and Card components for improved responsive layout and styling 2025-07-09 14:09:17 +01:00
Simon Larsen
7e4f1d6b55 fix: Remove unnecessary positioning styles from Footer component for improved layout 2025-07-09 13:57:07 +01:00
Simon Larsen
1a254ee8cc fix: Remove fixed height from Footer component for flexible layout 2025-07-09 13:54:46 +01:00
Simon Larsen
429a1497ec fix: Update Footer component className to use min-h-16 for consistent height 2025-07-09 13:52:37 +01:00
Simon Larsen
e9bff64ea1 fix: Improve layout and styling of Card component buttons and right elements 2025-07-09 13:48:15 +01:00
Simon Larsen
603f803dd5 fix: Refactor API key and project ID validation logic in middleware 2025-07-09 13:40:16 +01:00
Simon Larsen
0df55c0b6f Merge branch 'master' into release 2025-07-09 10:10:03 +01:00
Simon Larsen
a22e42cf8d Merge pull request #1942 from zzukin/set-permission-on-tmp-npm
Set permission to write logs and cache on /tmp/npm in case container run as non root
2025-07-08 18:28:32 +01:00
Simon Larsen
2e8340ee76 Merge pull request #1961 from OneUptime/master
Release
2025-07-08 18:27:47 +01:00
Simon Larsen
72429923ed Merge pull request #1960 from OneUptime/mobile-responsive
Mobile responsive
2025-07-08 17:52:12 +01:00
Simon Larsen
ca5eccfe83 feat: Add Bars3 icon to IconProp enum and update NavBar to use Bars3 for mobile toggle 2025-07-08 17:41:36 +01:00
Simon Larsen
3b4f3e5f1e feat: Update NavBarItem component styles for mobile responsiveness 2025-07-08 17:38:51 +01:00
Simon Larsen
0a65c72b80 feat: Add responsive design to EventHistoryDayList component for better mobile experience 2025-07-08 17:29:20 +01:00
Simon Larsen
42a468720f feat: Update MonitorOverview component to improve responsiveness for larger screens 2025-07-08 17:06:39 +01:00
Simon Larsen
267bbad661 feat: Improve responsive design across multiple components for better mobile experience 2025-07-08 16:59:43 +01:00
Simon Larsen
6542bf7564 feat: Add projectId and _id fields to alert, incident, and scheduled maintenance selections in note services 2025-07-07 21:47:56 +01:00
Simon Larsen
ec746ba507 feat: Enhance SSLMonitor getCertificate method with retry logic and error logging 2025-07-04 09:03:10 +01:00
Simon Larsen
5aacfd05a9 feat: Add disableAutoscaler option to probe configuration in values.yaml 2025-07-02 21:44:43 +01:00
Simon Larsen
2840a3560b feat: Enhance error handling in PortMonitor to return null for AggregateError 2025-07-02 14:51:44 +01:00
Simon Larsen
0f688350dc fix: Update error handling in PingMonitor to check for AggregateError directly 2025-07-02 09:15:55 +01:00
Simon Larsen
39b572da3f feat: Update error handling in monitors to use getFriendlyErrorMessage for AggregateError 2025-07-02 09:09:58 +01:00
Nawaz Dhandala
5423293fbc refactor: Enhance type safety and readability in test files by adding explicit types and improving variable declarations 2025-07-02 09:08:01 +01:00
Nawaz Dhandala
009ef21d16 refactor: Clean up code formatting and improve readability in test files and monitor classes 2025-07-01 21:06:05 +01:00
Simon Larsen
793a33f873 feat: Improve error handling and logging in OneUptimeApiService and related tests 2025-07-01 21:02:32 +01:00
Simon Larsen
bafbf3fc01 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-07-01 20:00:36 +01:00
Simon Larsen
4586b27039 feat: Add handling for AggregateError in multiple monitor classes to improve error response 2025-07-01 20:00:33 +01:00
Nawaz Dhandala
9f65f31d6c Add comprehensive tests for MCP functionality and logging
- Implement integration tests for MCP server operations including create, read, update, delete, list, and count functionalities.
- Add error response formatting tests to handle various scenarios such as not found and empty lists.
- Create tests for MCPLogger to ensure proper logging behavior, including message formatting and log level filtering.
- Develop mock tests to validate mock function behavior and error handling.
- Introduce tests for OneUptimeApiService to verify service initialization, operation validation, error handling, and request data building.
- Add type validation tests for OneUptimeOperation and ModelType enums, ensuring type safety and compatibility with JSON schema structures.
2025-07-01 18:44:35 +01:00
Nawaz Dhandala
5a9d351d39 fix: Add missing commas in API class method signatures for consistency 2025-07-01 15:12:15 +01:00
Simon Larsen
6dc432b7f3 feat: Enhance error handling in API class to support AggregateError messages 2025-07-01 15:02:06 +01:00
Simon Larsen
1e04f37727 fix: Update npm install command to include all dependencies and ensure dev dependencies are removed after build 2025-07-01 12:17:52 +01:00
Simon Larsen
be34930cd5 fix: Ensure creation of /usr/src directory with parent directories in Dockerfile 2025-07-01 11:59:56 +01:00
Simon Larsen
c8b053d17c feat: Remove unused 'node-fetch' dependency from package.json 2025-07-01 11:30:47 +01:00
Simon Larsen
ced4d0446c feat: Remove DynamicToolGenerator test file as it is no longer needed 2025-07-01 11:27:26 +01:00
Nawaz Dhandala
357f76ae5b refactor: Simplify loop variable usage in DynamicToolGenerator tests and fix model instantiation in tool generation test 2025-07-01 09:47:38 +01:00
Nawaz Dhandala
7f11735f79 refactor: Clean up console logging in Index.ts and improve structure in DynamicToolGenerator tests 2025-07-01 09:45:22 +01:00
Nawaz Dhandala
4ad1918b1d refactor: Add type annotations for improved type safety and clarity in various files 2025-07-01 09:33:08 +01:00
Nawaz Dhandala
122b0d6be7 Refactor DynamicToolGenerator tests and utility functions for improved readability and consistency
- Enhanced test cases in DynamicToolGenerator.test.ts for better logging and structure.
- Updated OneUptimeOperation.ts to maintain consistent formatting.
- Refactored DynamicToolGenerator.ts for improved code clarity and organization, including consistent use of commas and spacing.
- Improved sanitization and JSON schema generation methods for better handling of OpenAPI metadata.
- Cleaned up description handling in DynamicToolGenerator to ensure proper formatting.
- Adjusted server.test.ts for consistent quotation marks and improved readability.
2025-06-30 23:27:57 +01:00
Nawaz Dhandala
3116100f1a feat: Remove test-logger.ts as it is no longer needed for MCP Logger testing 2025-06-30 23:18:35 +01:00
Simon Larsen
38194331e6 feat: Update JSON key handling in DatabaseBaseModel to convert 'id' to '_id' and remove the original 'id' key 2025-06-30 23:14:19 +01:00
Simon Larsen
d6ebd65417 feat: Update key handling in DatabaseBaseModel to convert 'id' to '_id' during record creation 2025-06-30 23:01:30 +01:00
Simon Larsen
4c467d0e3b feat: Replace 'removeValue' with 'delete' for id property in DatabaseBaseModel 2025-06-30 22:45:09 +01:00
Simon Larsen
49efec2a77 feat: Add support for converting 'id' to '_id' in DatabaseBaseModel and update DatabaseService for consistency 2025-06-30 22:44:49 +01:00
Simon Larsen
d73b6c6205 feat: Enhance item handling in DatabaseService to support new object structure 2025-06-30 22:27:44 +01:00
Simon Larsen
8db9c69e1e feat: Add modelType User to deletedByUserId relations across multiple database models
- Updated PromoCode, Reseller, ResellerPlan, ScheduledMaintenance, ScheduledMaintenanceCustomField, ScheduledMaintenanceFeed, ScheduledMaintenanceInternalNote, ScheduledMaintenanceNoteTemplate, ScheduledMaintenanceOwnerTeam, ScheduledMaintenanceOwnerUser, ScheduledMaintenancePublicNote, ScheduledMaintenanceState, ScheduledMaintenanceStateTimeline, ScheduledMaintenanceTemplate, ScheduledMaintenanceTemplateOwnerTeam, ScheduledMaintenanceTemplateOwnerUser, ServiceCatalog, ServiceCatalogDependency, ServiceCatalogMonitor, ServiceCatalogOwnerTeam, ServiceCatalogOwnerUser, ServiceCatalogTelemetryService, ServiceCopilotCodeRepository, ShortLink, SmsLog, StatusPage, StatusPageAnnouncement, StatusPageAnnouncementTemplate, StatusPageCustomField, StatusPageDomain, StatusPageFooterLink, StatusPageGroup, StatusPageHeaderLink, StatusPageHistoryChartBarColorRule, StatusPageOwnerTeam, StatusPageOwnerUser, StatusPagePrivateUser, StatusPageResource, StatusPageSso, StatusPageSubscriber, TableView, Team, TeamMember, TeamPermission, TelemetryException, TelemetryIngestionKey, TelemetryService, TelemetryUsageBilling, User, UserCall, UserEmail, UserNotificationRule, UserNotificationSetting, UserOnCallLog, UserOnCallLogTimeline, UserSMS, UserTwoFactorAuth, Workflow, WorkflowLog, WorkflowVariable, WorkspaceNotificationRule, WorkspaceProjectAuthToken, WorkspaceSetting, WorkspaceUserAuthToken to include modelType User for deletedByUserId relations.
- Updated OneUptimeApiService to exclude additional keys from update operations.
2025-06-30 22:11:21 +01:00
Simon Larsen
00e50f023f chore: Update DynamicToolGenerator for improved code organization and readability 2025-06-30 21:58:56 +01:00
Simon Larsen
f4db88e874 feat: Enhance OpenAPI metadata handling for array types in DynamicToolGenerator 2025-06-30 21:47:03 +01:00
Simon Larsen
255149e3d5 feat: Add EqualTo support in QueryUtil for enhanced query functionality 2025-06-30 21:21:06 +01:00
Simon Larsen
f1b4a396ec feat: Implement EqualTo class and related tests for comparison functionality 2025-06-30 21:19:24 +01:00
Simon Larsen
82b62d32fd refactor: Remove MCP Server Verification workflow from GitHub Actions 2025-06-30 20:58:56 +01:00
Simon Larsen
161b80c19a feat: Add initial GitHub Actions workflow for MCP Server Test 2025-06-30 20:58:32 +01:00
Simon Larsen
ff58beb50e refactor: Enhance cleanDescription method to remove permission information and improve description sanitization 2025-06-30 20:51:50 +01:00
Simon Larsen
63236366ee refactor: Improve comments in sanitizeToolName method for better clarity on string transformations 2025-06-30 20:42:51 +01:00
Simon Larsen
cbdc3186af refactor: Update User model to hide certain columns in documentation for cleaner API output 2025-06-30 20:34:39 +01:00
Simon Larsen
ab0936067c refactor: Remove disableOpenApiSchema option from schema generation methods for cleaner implementation 2025-06-30 20:08:30 +01:00
Simon Larsen
24c083cdb8 refactor: Add disableOpenApiSchema option to schema generation methods for conditional OpenAPI schema application 2025-06-30 19:18:52 +01:00
Simon Larsen
6ce945ac2c fix docs for mcp 2025-06-30 18:20:07 +01:00
Simon Larsen
1c9e9b37d3 refactor: Remove unused select schema from tool generation and enhance pagination descriptions 2025-06-30 16:36:55 +01:00
Simon Larsen
83c740d8cb refactor: Improve data handling in OneUptimeApiService for create and update operations 2025-06-30 14:58:32 +01:00
Simon Larsen
84819c73ff refactor: Mark database columns as computed for improved metadata handling 2025-06-30 13:44:57 +01:00
Simon Larsen
ce166f2f35 refactor: Update JSON Schema generation to disallow additional properties for stricter validation 2025-06-30 13:15:58 +01:00
Nico Aymet (nikuzz)
11b54365f0 Merge branch 'OneUptime:master' into set-permission-on-tmp-npm 2025-06-30 12:53:13 +01:00
Simon Larsen
432debc014 refactor: Update JSON Schema generation to allow additional properties for improved flexibility 2025-06-27 21:55:17 +01:00
Simon Larsen
d9f87c4103 refactor: Enhance request data generation and logging for OneUptimeApiService 2025-06-27 21:39:46 +01:00
Simon Larsen
680e33ba43 refactor: Update executeOperation method to use tableName instead of modelName for improved clarity 2025-06-27 21:20:22 +01:00
Simon Larsen
22162425fb refactor: Update API operation methods to use direct URL creation for improved route handling 2025-06-27 21:00:47 +01:00
Simon Larsen
93d935d117 refactor: Update buildApiRoute method to use Route.fromString for absolute route creation 2025-06-27 20:52:56 +01:00
Simon Larsen
48d9964c70 refactor: Change API initialization base route from '/api' to '/' to prevent route accumulation 2025-06-27 20:47:52 +01:00
Simon Larsen
d2921e3516 refactor: Update API initialization to use the correct base route for OneUptimeApiService 2025-06-27 20:46:58 +01:00
Simon Larsen
5c7e5a1eda refactor: Simplify API route initialization and enhance route building logic in OneUptimeApiService 2025-06-27 20:46:29 +01:00
Simon Larsen
f62a01594d refactor: Replace logger with MCPLogger for improved logging compliance and add MCPLogger class for stderr logging 2025-06-27 16:47:45 +01:00
Simon Larsen
99de9fbd3d refactor: Update secondTLDs list in Domain class for improved domain validation 2025-06-27 16:39:26 +01:00
Simon Larsen
7a0f31e10a refactor: Update MCP tool names to use a consistent prefix format 2025-06-27 16:38:57 +01:00
Simon Larsen
22cee30cdb refactor: Implement sanitizeToolName method to ensure valid MCP tool names and update tool name generation accordingly 2025-06-27 16:26:51 +01:00
Simon Larsen
5524d9d147 refactor: Rename bin command from 'oneuptime-mcp-server' to 'oneuptime-mcp' in package.json 2025-06-27 16:18:40 +01:00
Simon Larsen
9fb4f00460 docs: Add optional link command for global CLI usage in README; remove postinstall script from package.json 2025-06-27 16:18:18 +01:00
Simon Larsen
7e761cc6dd refactor: Update executable script path in package.json and set correct permissions for Index.ts 2025-06-27 15:56:45 +01:00
Simon Larsen
bcfbed0249 refactor: Update OneUptimeApiService to handle Count and Read operations correctly; adjust request data structure for Create and Update operations 2025-06-27 15:08:26 +01:00
Simon Larsen
208c7406f9 refactor: Improve base route handling and add support for Count operation in OneUptimeApiService 2025-06-27 14:58:59 +01:00
Simon Larsen
2a41fec3cd refactor: Update base route for API initialization and change authorization header to APIKey 2025-06-27 14:51:52 +01:00
Simon Larsen
73ea4bbb7c refactor: Implement Zod to JSON Schema conversion for MCP tools; enhance schema generation for database and analytics models 2025-06-27 14:32:33 +01:00
Simon Larsen
1b657b4758 refactor: Add MCP compilation job to GitHub Actions workflow; ensure proper environment setup and dependencies 2025-06-27 14:23:44 +01:00
Simon Larsen
7027739a81 refactor: Enforce required API key in OneUptimeApiConfig and initialize method; improve error handling for missing API key 2025-06-27 14:21:21 +01:00
Simon Larsen
3491869196 refactor: Update API service configuration to conditionally include apiKey; improve parameter handling in executeOperation and generateToolsForDatabaseModel methods 2025-06-27 14:18:46 +01:00
Simon Larsen
f6e106fb65 refactor: Update API service configuration to use bracket notation for environment variables; remove unused variables from imports 2025-06-27 14:17:17 +01:00
Simon Larsen
fd96b0f287 refactor: Remove unused APP_NAME constant from MCP server initialization 2025-06-27 14:15:05 +01:00
Simon Larsen
04ee339d58 refactor: Simplify environment configuration by removing hostname, protocol, and base route; update API service to use URL 2025-06-27 14:06:32 +01:00
Simon Larsen
2a74183de5 Refactor code structure for improved readability and maintainability 2025-06-27 14:02:59 +01:00
Simon Larsen
747d46eb83 refactor: Remove MCP server generation and publishing scripts from package.json 2025-06-27 13:07:57 +01:00
Simon Larsen
00b0be251e refactor: Rename MCP server generation to verification and update related steps 2025-06-27 13:05:47 +01:00
Simon Larsen
1cc057d256 refactor: Update .gitignore to include MCP Server build and environment files 2025-06-27 13:05:26 +01:00
Simon Larsen
907d3308d5 refactor: Update Dockerfile and package.json for MCP Server structure and build process 2025-06-27 13:05:20 +01:00
Simon Larsen
1e254e32fd feat: Implement MCP Hello World Server with basic tools and configuration 2025-06-27 12:56:38 +01:00
Simon Larsen
f2de3cc8a8 refactor: remove OpenAPIParser, StringUtils, and Types modules
- Deleted OpenAPIParser.ts, StringUtils.ts, and Types.ts as part of the refactoring process.
- Removed associated methods and interfaces that were no longer needed.
- Cleaned up the MCP server generation script and README documentation to reflect these changes.
- Updated the publish script to streamline the publishing process.
2025-06-27 12:52:26 +01:00
Simon Larsen
e6c33c8e6d feat: Add parameter validation for required inputs in MCPService methods 2025-06-26 21:51:32 +01:00
Simon Larsen
74c42ab0fe feat: Enhance MCPServerGenerator with path parameter extraction and request data handling 2025-06-26 21:21:52 +01:00
Simon Larsen
31434d7eb3 chore: update package dependencies across multiple modules
- Added new dependencies including @asteasolutions/zod-to-openapi, @bull-board/express, and @clickhouse/client (updated to version 1.10.1) in IsolatedVM, Nginx, OpenTelemetryIngest, Probe, ProbeIngest, ServerMonitorIngest, TestServer, Worker, and Workflow.
- Updated existing dependencies such as axios, express, and nodemailer to their latest versions.
- Removed unnecessary dependencies and cleaned up package-lock files.
- Updated devDependencies to include @testing-library packages and jest-related packages for improved testing capabilities.
- Renamed package names for ServerMonitorIngest and Worker to reflect their purpose more accurately.
2025-06-26 20:42:01 +01:00
Simon Larsen
9b9d6cf6a8 fix: Update OneUptime URL in configuration and README for clarity 2025-06-26 20:31:58 +01:00
Simon Larsen
abb793b2ae fix: Ensure root node_modules are removed before processing subdirectories 2025-06-26 20:17:55 +01:00
Simon Larsen
3119b8cfc2 feat: Add scripts for cleaning and installing node modules 2025-06-26 20:15:16 +01:00
Simon Larsen
eed5ce6ec9 fix: Improve handling of computed fields and attribute types in ResourceGenerator 2025-06-26 20:12:10 +01:00
Simon Larsen
46558d4a77 fix: Add non-null assertions for schema properties in OpenAPIParser to improve type safety 2025-06-26 20:07:34 +01:00
Simon Larsen
cef6638b2c fix: Update job dependencies in release workflows to include publish-mcp-server 2025-06-26 20:03:04 +01:00
Simon Larsen
031750d573 feat: Update build and test scripts for improved efficiency and clarity 2025-06-26 20:01:34 +01:00
Simon Larsen
4287632371 fix: Correct spelling and grammatical errors across multiple files 2025-06-26 15:16:07 +01:00
Nawaz Dhandala
5c464ae137 refactor: Add type annotations for improved type safety across multiple files 2025-06-26 14:24:15 +01:00
Nawaz Dhandala
cf6ee298cc Refactor and clean up code formatting across multiple files
- Improved code formatting in AnnouncementsTable.tsx for better readability.
- Simplified description formatting in AnnouncementView.tsx.
- Adjusted lazy loading syntax in StatusPagesRoutes.tsx for consistency.
- Enhanced script formatting in MCPServerGenerator.ts for better clarity.
- Streamlined error handling and response parsing in OpenAPIParser.ts.
- Refined resource generation logic in ResourceGenerator.ts for improved maintainability.
- Updated comments and structure in GenerateMCPServer.ts for better understanding.
- General code cleanup and formatting adjustments across various files to adhere to style guidelines.
2025-06-26 13:51:11 +01:00
Simon Larsen
8718e58dcb feat: Enhance npm authentication setup in release workflow and verify package before publishing 2025-06-26 13:32:14 +01:00
Simon Larsen
df4bc5ce12 feat: Capture OpenAPI format information and preserve original values for binary fields in resource generation 2025-06-26 12:34:10 +01:00
Simon Larsen
fccfb5b026 feat: Update SVG path for improved icon representation in enterprise-ready section 2025-06-26 12:33:36 +01:00
Simon Larsen
793de2623a feat: Add new features to enterprise-ready section including 5000+ integrations and full API access 2025-06-26 12:15:14 +01:00
Simon Larsen
05f2096e3e feat: Refactor Base64 handling for file columns in DatabaseService to convert strings to buffers 2025-06-26 11:46:18 +01:00
Simon Larsen
d291cdad26 feat: Enhance Base64 handling in Text utility and update DatabaseService for MIME type extraction 2025-06-26 11:10:31 +01:00
Simon Larsen
84fef8e48f feat: Add MCP Server documentation and navigation links 2025-06-26 09:00:05 +01:00
Simon Larsen
de62d40d6e feat: Remove publish MCP server workflow from GitHub Actions 2025-06-26 08:41:43 +01:00
Simon Larsen
98bf1ef155 feat: Add publish MCP server workflow to release and test workflows 2025-06-26 08:40:19 +01:00
Simon Larsen
4939305c08 feat: Add base64 string conversion for file columns in DatabaseService 2025-06-25 21:56:11 +01:00
Simon Larsen
cd77106939 erge branch 'master' into release 2025-06-25 21:42:02 +01:00
Simon Larsen
678a2ac498 Merge branch 'master' into release 2025-06-25 21:40:57 +01:00
Simon Larsen
0b3765594f feat: Add EnableDocumentation decorator to File model for improved documentation generation 2025-06-25 18:33:50 +01:00
Simon Larsen
9f77e8d82d feat: Update access control in FileModel to include AuthenticatedRequest permission 2025-06-25 18:26:51 +01:00
Simon Larsen
78fca73b8a feat: Update File access control to include AuthenticatedRequest permission 2025-06-25 18:24:13 +01:00
Simon Larsen
82e2bc75bf feat: Add spacing div in AnnouncementView for improved layout 2025-06-25 17:30:28 +01:00
Simon Larsen
85de170031 feat: Add AnnouncementView component and update routing for viewing announcements 2025-06-25 17:28:27 +01:00
Simon Larsen
338a2dc2cc refactor: Rename MCP-Generated directory to MCP and update related references in scripts and documentation 2025-06-25 17:09:27 +01:00
Simon Larsen
d400271f3c refactor: Remove MCPServerGenerator class and related methods for code cleanup 2025-06-25 16:56:59 +01:00
Simon Larsen
8c735e1500 fix: Update API key example in README for clarity and consistency 2025-06-25 16:56:26 +01:00
Simon Larsen
d4b0ac7b9c feat: Update README and MCPServerGenerator for consistent directory usage and improved API key example 2025-06-25 16:56:10 +01:00
Simon Larsen
8edcdd37e3 feat: Update MCP package configuration and add server generator
- Enhanced package.json with detailed description, keywords, and repository information.
- Updated scripts for building and starting the server.
- Added new dependencies for axios and dotenv.
- Modified tsconfig.json for improved TypeScript settings.
- Introduced MCPServerGenerator class to automate server file generation.
- Implemented methods to generate essential files: package.json, Index.ts, MCPService, APIClient, configuration utilities, README, tsconfig, nodemon config, and Dockerfile.
- Ensured proper error handling and environment variable validation in the generated code.
2025-06-25 16:53:24 +01:00
Simon Larsen
ed65a477e4 feat: Rename MCP-Generated directory to MCP for consistency across workflows and scripts 2025-06-25 16:51:30 +01:00
Simon Larsen
98e3386d22 feat: Implement OpenAPI Parser and MCP Server Generator
- Added OpenAPIParser class for parsing OpenAPI specifications and extracting MCP tools.
- Introduced StringUtils class for string manipulation utilities.
- Defined TypeScript interfaces for OpenAPI operations, parameters, and schemas.
- Created GenerateMCPServer script to orchestrate the generation of the MCP server from OpenAPI spec.
- Developed README.md for comprehensive documentation on usage and features of the MCP server.
- Implemented publish-mcp-server.sh script for automating the publishing process to NPM and GitHub.
- Established a structured output directory for generated MCP server files, including configuration and documentation.
2025-06-25 16:47:23 +01:00
Simon Larsen
c2b4f1d117 Remove MCP package.json and tsconfig.json files as part of project restructuring 2025-06-25 16:19:17 +01:00
Simon Larsen
fe879d86ce feat: Update linting commands to use npx eslint with increased memory limit and caching 2025-06-24 21:45:10 +01:00
Simon Larsen
9e63a4cbf5 feat: Enhance lint-batches.sh with configurable options for cache, memory, format, timeout, and batch size 2025-06-24 21:25:44 +01:00
Simon Larsen
6c5ba10a52 feat: Remove ESLint configuration file to streamline linting process 2025-06-24 20:46:09 +01:00
Simon Larsen
9c9751c2c7 feat: Remove ignore rule for TerraformProvider in ESLint configuration to address linting issues 2025-06-24 20:31:21 +01:00
Simon Larsen
1b70517463 feat: Refactor DataSourceGenerator, DocumentationGenerator, OpenAPIParser, ResourceGenerator, and StringUtils for improved readability and maintainability 2025-06-24 20:16:45 +01:00
Simon Larsen
38f79900cc feat: Enhance multi-platform build process and improve error messages for provider generation 2025-06-24 20:03:02 +01:00
Simon Larsen
9fc8d679d8 feat: Enhance ModelSchema to combine column and permissions descriptions for improved schema clarity 2025-06-24 18:43:13 +01:00
Simon Larsen
83838da879 feat: Enhance DataSourceGenerator and OpenAPIParser to support dynamic imports and identify read operations for GET and POST methods 2025-06-24 18:37:11 +01:00
Simon Larsen
4e6e7cf354 feat: Replace linting commands with a new script to handle batch linting and prevent memory issues 2025-06-24 18:23:34 +01:00
Simon Larsen
dfc4e2e7f8 feat: Update access control and add computed properties for various models to enhance notification handling 2025-06-24 18:13:49 +01:00
Simon Larsen
8f9c463d85 feat: Enhance OpenAPIParser and ResourceGenerator to support optional and computed fields in schema handling 2025-06-24 15:20:04 +01:00
Simon Larsen
82af0bee58 feat: Update Alert, Incident, and Monitor models to include isDefaultValueColumn and enhance access control permissions 2025-06-24 15:07:50 +01:00
Simon Larsen
babf818963 feat: Enhance ModelSchema to mark computed fields as readOnly and update create/update operations handling 2025-06-24 15:03:05 +01:00
Simon Larsen
b4477e04ef feat: Update Incident, Monitor, and ScheduledMaintenance models to use isDefaultValueColumn for state ID fields 2025-06-24 14:54:54 +01:00
Simon Larsen
f0457df102 feat: Add computed property to various database models for enhanced data handling 2025-06-24 14:53:56 +01:00
Simon Larsen
73a1997f4c feat: Skip computed fields for create operations in ModelSchema to enhance data handling 2025-06-24 14:23:32 +01:00
Simon Larsen
e4e7b7c7d8 feat: Update Incident and Monitor models to include computed properties and simplify access control 2025-06-24 14:08:54 +01:00
Simon Larsen
aa7bd3140c feat: Add computed property to various database models for enhanced data handling 2025-06-24 14:02:56 +01:00
Simon Larsen
095ad5dbf4 feat: Add computed property support in TableColumnMetadata and update related permissions logic 2025-06-24 13:47:53 +01:00
Simon Larsen
f8c8f26cab feat: Enhance response handling for list and object types in ResourceGenerator 2025-06-24 13:29:57 +01:00
Simon Larsen
a923b0f885 refactor: Update default value handling to consider both create and update schemas in ResourceGenerator 2025-06-24 13:18:38 +01:00
Simon Larsen
d352610ca7 refactor: Remove unused onBeforeUpdate method from MonitorService 2025-06-24 13:01:31 +01:00
Simon Larsen
23c57a1483 feat: Add support for complex objects in OpenAPIParser and ResourceGenerator 2025-06-24 12:52:00 +01:00
Simon Larsen
d3106e4ac8 refactor: Enhance resource schema handling by adding support for default values and list types in ResourceGenerator 2025-06-24 12:17:47 +01:00
Simon Larsen
a0acf8cac2 feat: Add operationSchemas to TerraformResource and implement schema generation for CRUD operations in OpenAPIParser 2025-06-24 11:53:18 +01:00
Simon Larsen
b29df21b4d refactor: Enhance OpenAPI schema handling by incorporating default values in ModelSchema and ResourceGenerator 2025-06-24 11:21:47 +01:00
Simon Larsen
e1f52ebd26 refactor: Implement helper function to add default values to OpenAPI schema in AnalyticsModelSchema and ModelSchema 2025-06-23 18:29:06 +01:00
Simon Larsen
0248ae5ec6 Add default values for boolean fields across various database models
- Set defaultValue to false for boolean fields in Monitor, MonitorGroupOwnerTeam, MonitorGroupOwnerUser, MonitorOwnerTeam, MonitorOwnerUser, MonitorProbe, MonitorStatus, MonitorStatusTimeline, MonitorTest, OnCallDutyPolicy, OnCallDutyPolicyExecutionLog, OnCallDutyPolicyOwnerTeam, OnCallDutyPolicyOwnerUser, Probe, ProbeOwnerTeam, ProbeOwnerUser, Project, ProjectSmtpConfig, ProjectSso, PromoCode, ScheduledMaintenance, ScheduledMaintenanceInternalNote, ScheduledMaintenanceOwnerTeam, ScheduledMaintenanceOwnerUser, ScheduledMaintenancePublicNote, ScheduledMaintenanceStateTimeline, ScheduledMaintenanceTemplate, ServiceCopilotCodeRepository, SmsLog, StatusPage, StatusPageAnnouncement, StatusPageAnnouncementTemplate, StatusPageDomain, StatusPageGroup, StatusPageOwnerTeam, StatusPageOwnerUser, StatusPagePrivateUser, StatusPageResource, StatusPageSso, StatusPageSubscriber, TeamMember, TeamPermission, TelemetryException, User, UserEmail, UserNotificationSetting, UserSMS, UserTwoFactorAuth, Workflow, WorkflowVariable.
- Set defaultValue to true for specific boolean fields in MonitorProbe, MonitorTest, OnCallDutyPolicy, ScheduledMaintenance, StatusPage, and StatusPageResource.
- Adjusted default values for various fields to ensure consistent behavior across the application.
2025-06-23 18:16:18 +01:00
Simon Larsen
064ff68147 refactor: Add JSONObject type to defaultValue in TableColumnMetadata interface 2025-06-23 16:31:19 +01:00
Simon Larsen
5794e40fd1 docs: Update contributing guidelines to clarify repository status and forking instructions 2025-06-23 15:52:45 +01:00
Simon Larsen
51faf12723 refactor: Enhance OpenAPI example handling in DocumentationGenerator and OpenAPIParser 2025-06-23 15:50:06 +01:00
Simon Larsen
1c658651ac refactor: Change provider parameter from "host" to "oneuptime_url" for clarity and consistency 2025-06-23 15:42:28 +01:00
Simon Larsen
482c6d3e0b refactor: Improve toSnakeCase method to handle consecutive uppercase letters and camelCase conversion 2025-06-23 15:41:01 +01:00
Simon Larsen
441ab82acf refactor: Update documentation to mark api_key as required for authentication 2025-06-23 15:27:14 +01:00
Simon Larsen
7d18b81ea5 refactor: Update api_key to be required for authentication in DocumentationGenerator and ProviderGenerator 2025-06-23 15:20:29 +01:00
Simon Larsen
a8c3ca5f01 refactor: Change provider parameter from "host" to "oneuptime_url" for clarity and consistency 2025-06-23 15:18:49 +01:00
Simon Larsen
1d57657b72 refactor: Make "Project ID" optional in ModelSchema when derived from API key 2025-06-23 14:55:35 +01:00
Simon Larsen
a4bb6744f4 refactor: Add isDefaultValueColumn property to Current Monitor Status ID in Monitor model 2025-06-23 14:41:33 +01:00
Simon Larsen
4d3ef70765 refactor: Adjust logic for handling optional columns in ModelSchema 2025-06-23 14:40:25 +01:00
Simon Larsen
6f71a67adf refactor: Update example values and adjust optionality for default value columns in ModelSchema 2025-06-23 14:37:09 +01:00
Simon Larsen
a701f5eff0 refactor: Improve code formatting for better readability in DataSourceGenerator, ResourceGenerator, and StringUtils 2025-06-23 14:22:20 +01:00
Simon Larsen
7f7f3cf62b refactor: Add --test-release flag to publish-terraform-provider command 2025-06-20 22:06:36 +01:00
Simon Larsen
2f4d51b833 refactor: Remove Terraform configuration and provider files from TerraformTest 2025-06-20 22:05:12 +01:00
Simon Larsen
c09369c351 refactor: Add TerraformTest directory to .gitignore 2025-06-20 22:04:22 +01:00
Simon Larsen
aeb3d93a1f refactor: Update authentication error message to include API key requirement 2025-06-20 21:59:38 +01:00
Simon Larsen
24803362cb refactor: Enhance publish script for OneUptime Terraform Provider with improved argument parsing, validation, and error handling 2025-06-20 21:28:19 +01:00
Simon Larsen
1dcd3664c7 refactor: Add PostWithSelect method and update resource handling for API calls 2025-06-20 17:34:22 +01:00
Simon Larsen
3e51f3542b refactor: Update path for get item endpoint in OpenAPIUtil to include '/get-item' 2025-06-20 16:50:29 +01:00
Simon Larsen
f8d80b59ac refactor: Add createdByUserId and deletedByUserId to computed fields check in OpenAPIParser 2025-06-20 16:41:24 +01:00
Simon Larsen
36f6561b2c refactor: Enhance response value handling in generateResponseSetter method 2025-06-20 15:55:06 +01:00
Simon Larsen
5ed9b8ec24 refactor: Improve handling of Terraform map and response data in ResourceGenerator 2025-06-20 15:49:02 +01:00
Simon Larsen
672caa8c0a refactor: Change authorization header from Bearer token to APIKey in DoRequest method 2025-06-20 14:40:46 +01:00
Simon Larsen
46e7d9aca6 refactor: Preserve original OpenAPI parameter and property names in ResourceGenerator and OpenAPIParser 2025-06-20 14:38:24 +01:00
Simon Larsen
aa617ec0ba refactor: Enhance handling of Terraform map and list types in ResourceGenerator 2025-06-20 14:33:49 +01:00
Simon Larsen
aaa8d13526 refactor: Exclude Entity columns while retaining EntityArray columns in ModelSchema 2025-06-20 14:15:32 +01:00
Simon Larsen
b055a999e3 refactor: Clarify logic for making fields optional in ModelSchema 2025-06-20 14:00:12 +01:00
Simon Larsen
3c7426ffac refactor: Sanitize attribute names in DataSourceGenerator and ResourceGenerator to avoid reserved keywords 2025-06-20 13:50:49 +01:00
Simon Larsen
09a8d89106 refactor: Update API host URL in README and scripts for consistency 2025-06-20 12:35:30 +01:00
Simon Larsen
3e8273ce55 refactor: Improve code formatting and readability in OpenAPIParser and StringUtils 2025-06-20 12:17:02 +01:00
Simon Larsen
7f08319da2 refactor: Enhance type annotations for methods and variables in OpenAPIParser, ResourceGenerator, StringUtils, and TerraformProviderGenerator 2025-06-20 00:09:33 +01:00
Simon Larsen
9f8c88ec91 refactor: Improve code formatting and readability across multiple generator files 2025-06-20 00:02:47 +01:00
Simon Larsen
571858aad5 refactor: Enhance type annotations and access modifiers across the Terraform provider codebase
- Updated constructors and methods in various classes to use public access modifiers for better clarity.
- Added explicit type annotations for variables and function return types to improve type safety and readability.
- Refactored the DocumentationGenerator, FileGenerator, GoCodeGenerator, GoModuleGenerator, OpenAPIParser, ProviderGenerator, ResourceGenerator, StringUtils, TerraformProviderGenerator, and GenerateProvider scripts.
- Removed deprecated Index.ts file related to Terraform provider generation.
2025-06-19 23:57:50 +01:00
Simon Larsen
6c6612fde9 refactor: Improve readability and consistency in example generation and resource imports 2025-06-19 23:45:00 +01:00
Simon Larsen
30dd60f01f feat: Add example generation for resource documentation and enhance schema handling 2025-06-19 23:32:39 +01:00
Simon Larsen
f9372928fd refactor: Enhance handling of map and list types in resource generation, adding comments for future implementation 2025-06-19 21:35:42 +01:00
Simon Larsen
0475f1cbea refactor: Update import determination logic based on actual usage and resource operations 2025-06-19 21:25:18 +01:00
Simon Larsen
461b64eb56 Refactor code for improved readability and consistency
- Updated formatting in DocumentationGenerator.ts for better readability.
- Enhanced writeFileInDir method in FileGenerator.ts with consistent formatting.
- Refactored GoCodeGenerator.ts for improved code structure and readability.
- Improved error handling and formatting in OpenAPIParser.ts.
- Enhanced ProviderGenerator.ts with consistent formatting for file writing.
- Refactored ResourceGenerator.ts for improved readability and consistency.
- Updated StringUtils.ts for better formatting and readability.
- Improved TerraformProviderGenerator.ts with consistent formatting.
- Refactored GenerateProvider.ts for better error handling and readability.
- Updated Index.ts for improved formatting and consistency.
2025-06-19 21:05:06 +01:00
Simon Larsen
22d326bf6f feat: Implement dynamic example generation for model schemas and enhance schema descriptions 2025-06-19 20:54:39 +01:00
Simon Larsen
e8b0d76bf0 refactor: Enhance schema handling for unknown column types and improve descriptions in ModelSchema 2025-06-19 20:39:17 +01:00
Simon Larsen
37c8ab5405 refactor: Remove debug logging from schema processing in OpenAPIParser 2025-06-19 19:51:26 +01:00
Simon Larsen
f73a964916 feat: Add build and installation script generation for Terraform provider 2025-06-19 19:50:32 +01:00
Simon Larsen
d9412b6c0c refactor: Improve operation type determination and schema extraction in OpenAPIParser 2025-06-19 19:46:49 +01:00
Simon Larsen
eed38eed8d refactor: Update host configuration to remove '/api' path and clarify documentation 2025-06-19 19:14:04 +01:00
Simon Larsen
fdfabe080c refactor: Enhance toSnakeCase method to replace multiple underscores with a single underscore 2025-06-19 19:07:50 +01:00
Simon Larsen
8b41779fa2 refactor: Update provider configuration to use default host and remove unused authentication fields 2025-06-19 19:03:33 +01:00
Simon Larsen
1ef5894325 feat: Implement Terraform Provider Generator with OpenAPI integration
- Added StringUtils class for string manipulation and formatting.
- Created TerraformProviderGenerator class to handle provider generation.
- Defined TypeScript interfaces for Terraform provider configuration and OpenAPI specifications.
- Developed GenerateProvider script to orchestrate the provider generation process.
- Added README documentation for the Terraform provider generator.
- Implemented installation script for local provider installation.
- Created publish script for preparing and publishing the provider to Terraform Registry.
2025-06-19 18:55:46 +01:00
Simon Larsen
aec4878948 refactor: remove unused select schema references in OpenAPIUtil 2025-06-19 18:31:36 +01:00
Simon Larsen
f28dd9468f refactor: remove unused select schema reference in OpenAPIUtil 2025-06-19 18:29:31 +01:00
Simon Larsen
ba3d665e19 refactor: remove unused select schema reference in create API spec 2025-06-19 18:28:42 +01:00
Simon Larsen
035e9273d9 Refactor: Remove old Terraform provider implementation and scripts
- Deleted main.go and provider.go files as part of the provider refactor.
- Removed publish-terraform-provider.sh script, which was responsible for publishing the provider to the Terraform Registry.
- Eliminated validate-generation.sh script used for local validation of the provider generation process.
- Introduced new Index.ts file to initiate the Terraform provider generation process from the OpenAPI specification.
- Updated the generation process to ensure a clean slate by removing any existing Terraform directory before generating new files.
2025-06-19 17:58:39 +01:00
Simon Larsen
849e06ec35 feat: implement type conflict resolution in TypeConflictResolver 2025-06-19 17:39:26 +01:00
Simon Larsen
9e1cc85c09 refactor: improve resource and data source handling in GeneratorConfig 2025-06-19 17:22:23 +01:00
Simon Larsen
04ce633338 refactor: simplify response schema registration in OpenAPIUtil 2025-06-19 17:17:29 +01:00
Simon Larsen
a04c561ad5 fix: add missing newline for better readability in GenerateProvider.ts 2025-06-19 16:05:52 +01:00
Simon Larsen
f221b2b4ff feat: add response schemas for list, create, get, update, and analytics operations in OpenAPIUtil 2025-06-19 15:33:39 +01:00
Simon Larsen
4ab7b09661 fix: correct function call for provider initialization in main.go 2025-06-19 14:32:23 +01:00
Simon Larsen
523b842e57 fix: ensure error is thrown after failed Go module initialization and tidy command 2025-06-19 14:27:19 +01:00
Simon Larsen
023fe0b742 fix: correct import statement for provider package in main.go 2025-06-19 14:26:32 +01:00
Simon Larsen
e06085a16a feat: implement initial provider structure and functionality for OneUptime Terraform provider 2025-06-19 14:19:25 +01:00
Simon Larsen
e074b38e3d fix: correct path references in Go module initialization and main.go file reading 2025-06-19 13:38:23 +01:00
Simon Larsen
3d6a61ddc1 feat: add Go module setup and main entry point for Terraform provider generation 2025-06-19 13:28:00 +01:00
Simon Larsen
f3dc3e976e refactor: format output path for Terraform provider generation for improved readability 2025-06-19 13:18:54 +01:00
Simon Larsen
f556cf1174 fix: update output path for Terraform provider generation to include full provider name 2025-06-18 17:11:27 +01:00
Simon Larsen
6b7a102b9a refactor: replace <span> with <div> for monitor status elements to improve structure 2025-06-18 14:50:19 +01:00
Simon Larsen
a7d672263a refactor: rename 'type' to 'fileType' in various components for consistency and clarity 2025-06-18 14:47:18 +01:00
Simon Larsen
3ebc19fb78 refactor: rename 'type' columns to 'fileType', 'paymentMethodType', and 'customFieldType' in migration files for clarity; update related code references 2025-06-18 13:48:54 +01:00
Simon Larsen
7c509791f4 fix: update fieldType references to use customFieldType for consistency in CustomFieldsDetail component 2025-06-18 13:43:13 +01:00
Simon Larsen
5225fdde0d feat: add migration to rename 'type' columns to improve clarity in database schema 2025-06-18 13:41:31 +01:00
Simon Larsen
8a57fdbac7 refactor: rename 'type' to 'customFieldType' and 'paymentMethodType' in various models and components for clarity 2025-06-18 13:40:15 +01:00
Simon Larsen
77e097bf5f feat: implement ProviderCodeSpecGenerator for generating provider code specifications 2025-06-18 12:04:49 +01:00
Simon Larsen
b13f1d03c0 fix: remove Go module setup from provider generation process and add scaffolding for framework output directory 2025-06-18 11:15:01 +01:00
Simon Larsen
9af40e0efb feat: enhance provider.go generation with dynamic resource and data source implementations 2025-06-17 20:55:22 +01:00
Simon Larsen
eceeffec2e fix: remove unnecessary terraform block from example configuration 2025-06-17 20:44:14 +01:00
Simon Larsen
f057710abf fix: update get_provider_version function to return a default version for testing 2025-06-17 20:34:31 +01:00
Simon Larsen
bdf21e3598 chore: remove local installation script for OneUptime Terraform provider 2025-06-17 20:32:47 +01:00
Simon Larsen
55a40d80d5 fix: update .gitignore to include Terraform provider files and modify install script to use --force option 2025-06-17 20:31:05 +01:00
Simon Larsen
70cd4e7a46 feat: Add OneUptime Terraform Provider Publisher script
- Implemented a comprehensive bash script to automate the publishing process of the OneUptime Terraform provider to the Terraform Registry.
- Included functionalities for version specification, testing mode, dependency installation, provider generation, GitHub repository interaction, release creation, and asset uploading.
- Added error handling, prerequisite validation, and detailed logging for better user experience.
- Integrated GPG signing for release assets and SHA256 checksum generation.
- Provided usage instructions and examples for ease of use.
2025-06-17 20:28:24 +01:00
Simon Larsen
301cf0611d feat: add local installation script and update README for Terraform provider 2025-06-17 20:14:05 +01:00
Simon Larsen
16fd822f4f fix: update GPG private key reference in Terraform provider workflow 2025-06-17 12:26:00 +01:00
Simon Larsen
100bfbe5db fix: enhance GPG signing process with key validation and debugging output 2025-06-17 12:00:42 +01:00
Simon Larsen
e420e44bee fix: add GPG key import and export steps in Terraform provider publishing process 2025-06-17 11:34:42 +01:00
Simon Larsen
18b5323bc2 fix: add asset existence check and deletion before uploading in release process 2025-06-17 11:24:17 +01:00
Simon Larsen
cb002e25f9 fix: remove GPG key import and export steps from Terraform provider publishing process 2025-06-17 11:12:01 +01:00
Simon Larsen
19a0cfd3fd fix: add GPG key import and export steps in Terraform provider generation workflow 2025-06-17 11:06:26 +01:00
Simon Larsen
3b6a746d41 fix: streamline GPG key handling in SHASUMS signing process 2025-06-17 11:00:04 +01:00
Simon Larsen
f27090dc4f fix: improve GPG key import error handling and output for better debugging 2025-06-17 10:50:41 +01:00
Simon Larsen
2b68ec3d1b fix: enhance GPG key import process by using a temporary file and improving status messages 2025-06-17 10:44:18 +01:00
Simon Larsen
02e3d1138e fix: update Terraform provider publish command to use quotes for better handling of secrets 2025-06-17 10:32:08 +01:00
Simon Larsen
fdb2823fda fix: streamline GPG key handling in Terraform provider publish workflow 2025-06-17 10:27:29 +01:00
Simon Larsen
0ed160f68f fix: streamline GPG key handling and enhance publish script options for Terraform provider 2025-06-17 10:20:42 +01:00
Simon Larsen
66f6952ad9 fix: remove fallback for GPG private key in release workflow 2025-06-17 10:11:16 +01:00
Simon Larsen
d08387d4c8 fix: improve GPG key import process with enhanced error handling and automation 2025-06-17 09:59:12 +01:00
Simon Larsen
78835f8fb4 fix: enhance GPG signing process with improved error handling and automation 2025-06-17 09:48:14 +01:00
Simon Larsen
ae9af32768 fix: update GitHub release title and name format to simplify versioning 2025-06-17 09:42:13 +01:00
Simon Larsen
16de3a0380 fix: include signature files in release asset creation and upload process 2025-06-17 09:39:55 +01:00
Simon Larsen
5196fc1385 fix: enhance GPG signing process with validation and improved error handling 2025-06-16 23:14:37 +01:00
Simon Larsen
964afb0a1d fix: streamline provider generation by removing redundant validations and enhancing zip archive creation 2025-06-16 23:05:03 +01:00
Simon Larsen
c5b382c122 fix: replace multi-platform build process with verification of existing builds 2025-06-16 22:47:46 +01:00
Simon Larsen
e74fddfe75 fix: update build command in publish script to use variable for ldflags 2025-06-16 22:44:28 +01:00
Simon Larsen
2ef6698f1b fix: update publish script to validate provider framework directory and adjust paths for Go operations 2025-06-16 22:31:27 +01:00
Simon Larsen
7dac270540 fix: enhance provider generation validation with checks for essential files and Go module dependencies 2025-06-16 22:02:57 +01:00
Simon Larsen
bfb0cf1a79 fix: update file paths in provider generation and build scripts to reflect new directory structure 2025-06-16 21:54:59 +01:00
Simon Larsen
8765bc07ed fix: add retry logic with exponential backoff to Slack API requests 2025-06-16 21:51:21 +01:00
Simon Larsen
388a842da4 fix: add checks for essential files in provider generation and build process 2025-06-16 21:45:02 +01:00
Simon Larsen
157e5563db fix: add multi-platform build, SHASUM generation, and asset upload to publish script 2025-06-16 21:31:21 +01:00
Simon Larsen
619dacf18b fix: simplify GitHub release title in publish-terraform-provider script 2025-06-16 21:23:59 +01:00
Simon Larsen
f76915f56f fix: enhance push_to_repository function to handle remote changes and tag management 2025-06-16 21:14:46 +01:00
Simon Larsen
37dc6a82cb fix: update publish-terraform-provider script to use 'master' branch instead of 'main'
fix: revise Terraform documentation to clarify project creation and resource structure
fix: enhance examples and quick start guide for better clarity on project ID usage
2025-06-16 21:07:14 +01:00
Simon Larsen
a0b980fb56 fix: remove unnecessary closing brace in publish-terraform-provider script 2025-06-16 20:56:32 +01:00
Simon Larsen
8065dcdb18 fix: update publish-terraform-provider script for test release mode 2025-06-16 20:50:58 +01:00
Simon Larsen
3be7b0e4ee fix: improve formatting of manifestContent declaration in GoModuleSetup 2025-06-16 20:44:43 +01:00
Simon Larsen
1e3f5fb7e4 fix: improve GitHub release creation logic for dry runs and actual releases 2025-06-16 20:39:26 +01:00
Simon Larsen
df52df8fe0 fix: clean up formatting and whitespace in FormField and GoModuleSetup files 2025-06-16 20:35:54 +01:00
Simon Larsen
514ee1e6ed fix: enhance repository access validation and clarify GITHUB_TOKEN permissions in publish script 2025-06-16 20:31:39 +01:00
Simon Larsen
5350c22833 fix: ensure SSH directory exists before setting up deploy key for GitHub release 2025-06-16 20:23:54 +01:00
Simon Larsen
e82092dbd7 fix: remove unnecessary fail-fast strategy from multiple Docker image deploy jobs 2025-06-16 20:18:56 +01:00
Simon Larsen
44e80d6707 fix: update environment variables for publish-terraform-provider job in release workflows 2025-06-16 20:17:28 +01:00
Simon Larsen
6c67b61cc1 fix: enhance GitHub authentication method in publish script to support deploy keys 2025-06-16 20:15:59 +01:00
Simon Larsen
d58b5170d9 fix: update description type in multiple components to support ReactElement 2025-06-16 16:57:09 +01:00
Simon Larsen
8262cc5a00 fix: correct script path casing for publish-terraform-provider in package.json 2025-06-16 16:49:09 +01:00
Simon Larsen
c579bc21a8 fix: update dependencies for test-helm-chart job to include publish-terraform-provider 2025-06-16 16:37:54 +01:00
Simon Larsen
ac131d6ae6 feat: add publishing workflow for Terraform provider with versioning and dependency management 2025-06-16 16:36:53 +01:00
Simon Larsen
6b03b541b3 fix: improve dry run handling in Terraform provider publishing script 2025-06-16 16:36:07 +01:00
Simon Larsen
14f95d54f4 fix: enhance GitHub authentication and error handling in publishing script 2025-06-16 16:20:41 +01:00
Simon Larsen
bd2c70e5fe fix: remove redundant success message from publishing process 2025-06-16 16:16:26 +01:00
Simon Larsen
498a481162 feat: add multi-platform build support for Terraform provider 2025-06-16 15:56:04 +01:00
Simon Larsen
3ec126eed9 fix: update Go module setup to create cmd directory and adjust main.go path 2025-06-16 15:43:30 +01:00
Simon Larsen
b0d9e08f1b feat: implement Go module setup and build configuration for Terraform provider 2025-06-16 15:08:48 +01:00
Simon Larsen
625ad9cc47 fix: remove unnecessary whitespace in features table for cleaner code 2025-06-16 14:52:43 +01:00
Simon Larsen
d17b272c61 fix: update feature descriptions for clarity and consistency 2025-06-16 14:26:04 +01:00
Simon Larsen
5188f0fb2d fix: remove PR comment step from OpenAPI spec generation workflow 2025-06-16 14:17:07 +01:00
Simon Larsen
cafe51ed38 fix: remove comment PR step from Terraform provider generation workflow 2025-06-16 14:16:53 +01:00
Simon Larsen
25ff258d83 fix: remove unnecessary blank lines in route definitions for cleaner code 2025-06-16 13:14:29 +01:00
Simon Larsen
140547d796 fix: update link styling for improved visibility in Markdown cheatsheet 2025-06-16 13:07:59 +01:00
Simon Larsen
b68f25b80d fix: ensure consistent styling for Markdown link in cheatsheet 2025-06-16 13:07:29 +01:00
Simon Larsen
6521009e29 feat: add Terraform support option to pricing plans and improve route formatting 2025-06-16 13:07:26 +01:00
Simon Larsen
589cd8d8ee feat: add Markdown description support across various components for enhanced user guidance 2025-06-16 13:04:14 +01:00
Simon Larsen
bc644a75f8 fix: update Markdown utility import path and adjust helpText state type in CodeEditor component 2025-06-16 12:45:40 +01:00
Simon Larsen
d564c573e5 refactor: remove unused Markdown imports and improve description formatting in various components 2025-06-16 12:44:02 +01:00
Simon Larsen
60b6b55f0f fix: update descriptions in Alert, ScheduledMaintenanceTemplate, and StatusPageAnnouncement models to clarify Markdown usage 2025-06-16 12:39:55 +01:00
Simon Larsen
5179107c02 fix: update remediation notes description in Alert model and remove unused Markdown import in IncidentNoteTemplate 2025-06-16 12:38:55 +01:00
Simon Larsen
fa6ef8070c feat: enhance Markdown support with utility functions and update descriptions across various components 2025-06-16 12:36:41 +01:00
Simon Larsen
c21623d275 feat: add Terraform Provider navigation links and restructure publishing documentation 2025-06-16 09:56:37 +01:00
Simon Larsen
f9d17364f3 Add comprehensive documentation for OneUptime Terraform Provider
- Created main documentation index for Terraform Provider.
- Added Quick Start Guide for rapid setup and configuration.
- Developed detailed installation and usage guide from Terraform Registry.
- Introduced Self-Hosted Configuration Guide emphasizing version compatibility.
- Included troubleshooting sections and best practices for self-hosted users.
- Provided complete configuration examples for various environments.
2025-06-16 09:41:10 +01:00
Simon Larsen
a1c719b653 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-06-16 09:32:27 +01:00
Simon Larsen
42e9016c31 feat: implement Terraform provider release workflow and documentation 2025-06-16 09:32:24 +01:00
Simon Larsen
6c4d64455f Merge pull request #1949 from OneUptime/snyk-fix-dee1b14b5aa17ca1ba382a4c7a01772c
[Snyk] Security upgrade jest from 29.7.0 to 30.0.0
2025-06-14 21:30:46 +01:00
snyk-bot
1931b9a45b fix: package.json & package-lock.json to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-BABELHELPERS-9397697
- https://snyk.io/vuln/SNYK-JS-INFLIGHT-6095116
- https://snyk.io/vuln/SNYK-JS-BRACEEXPANSION-9789073
2025-06-14 11:29:13 +00:00
Simon Larsen
5b4233a61c feat: add Terraform provider publishing workflow and script 2025-06-13 22:13:37 +01:00
Simon Larsen
e059d9ee0c style: format code for better readability in AnnouncementCreate and StatusPageAnnouncementTemplates components 2025-06-13 20:55:55 +01:00
Simon Larsen
0c3a90ed83 fix: correct PageRoute structure in StatusPagesRoutes component 2025-06-13 20:53:17 +01:00
Simon Larsen
b62e6a4b23 feat: create AnnouncementCreate component and update routing for announcements 2025-06-13 20:51:08 +01:00
Simon Larsen
c42e13d160 feat: enhance Status Pages field structure in StatusPageAnnouncementTemplates 2025-06-13 20:49:29 +01:00
Simon Larsen
febb0c77e6 feat: add Announcement creation page and update routing for announcements 2025-06-13 20:43:00 +01:00
Simon Larsen
d5706167a6 refactor: remove unused overrideFieldKey property from StatusPageAnnouncementTemplateView and StatusPageAnnouncementTemplates 2025-06-13 20:22:32 +01:00
Simon Larsen
bcbddd480d refactor: standardize formatting and improve readability in StatusPageAnnouncementTemplateView and SpecificationConverter 2025-06-13 20:20:25 +01:00
Simon Larsen
58067a989b feat: update permissions for Status Page Announcement Template and enhance route handling in the settings page 2025-06-13 14:11:48 +01:00
Simon Larsen
242b6a3dde feat: add Status Page Announcement Template view and update routes for enhanced functionality 2025-06-13 14:08:27 +01:00
Simon Larsen
17a67eb19d refactor: improve code readability by standardizing formatting across multiple files 2025-06-13 13:54:36 +01:00
Simon Larsen
0ef1b717aa refactor: add type annotations for improved type safety across various components 2025-06-13 13:50:06 +01:00
Simon Larsen
c0be3e2fa5 fix: standardize formatting and improve readability in various files 2025-06-13 12:58:46 +01:00
Simon Larsen
739256bd19 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-06-13 12:53:37 +01:00
Simon Larsen
cdf26234d5 feat: add disableSpellCheck prop to various components to enhance user experience 2025-06-13 11:53:12 +00:00
Simon Larsen
025ceb7a3d feat: add Status Page Announcement Template API integration 2025-06-13 12:51:17 +01:00
Simon Larsen
fae86b13d7 feat: add routes for Status Page Announcement Templates in settings 2025-06-13 12:46:52 +01:00
Simon Larsen
6f26f1b5f9 feat: add migration for Status Page Announcement Template and related tables with foreign key constraints 2025-06-13 12:23:13 +01:00
Simon Larsen
81ec5a42de refactor: improve readability of template selection logic in AnnouncementTable 2025-06-13 12:16:43 +01:00
Simon Larsen
3084438cf9 feat: add functionality for creating announcements from templates with modal integration and error handling 2025-06-13 12:13:52 +01:00
Simon Larsen
d74be2e23a feat: add Status Page Announcement Template functionality with permissions and UI integration 2025-06-13 12:09:13 +01:00
Simon Larsen
3234f730fe Refactor ToolInstaller and ProviderSpec for improved readability and consistency
- Updated import statements to use double quotes for consistency.
- Refactored ToolInstaller methods to enhance readability and maintainability.
- Improved error handling and logging in ToolInstaller methods.
- Simplified the installation verification process for tools.
- Enhanced the ProviderSpec class to maintain consistent formatting and error handling.
- Refactored SpecificationConverter for better structure and clarity.
- Improved the extraction and sanitization of resource names in SpecificationConverter.
- Enhanced schema generation logic to accommodate various OpenAPI specifications.
2025-06-13 12:07:22 +01:00
Simon Larsen
60a6714e40 feat: update spellCheck behavior in Input component to conditionally disable based on input type 2025-06-13 11:04:31 +00:00
Simon Larsen
a2be299583 feat: add disableSpellCheck prop to MarkdownEditor, CodeEditor, and FormField components with corresponding tests 2025-06-13 11:02:39 +00:00
Simon Larsen
22c705881c feat: add disableSpellCheck prop to Input and TextArea components and update tests for spellcheck behavior 2025-06-13 10:54:00 +00:00
Simon Larsen
d4225d35a0 feat: add resource name sanitization to follow Terraform naming conventions 2025-06-13 10:57:53 +01:00
Simon Larsen
577b5ea0a7 feat: enhance GenerateProvider to include Framework Generator installation and add detailed logging for each step 2025-06-13 10:50:16 +01:00
Simon Larsen
d71338ffae feat: implement FrameworkGenerator class for Terraform provider code generation and scaffolding 2025-06-13 10:41:01 +01:00
Simon Larsen
9b8bf4c997 feat: add openapi.json to .gitignore to prevent tracking of generated files 2025-06-13 10:40:18 +01:00
Simon Larsen
7fcd7d7769 feat: enhance ToolInstaller to support installation of Framework Generator and improve logging 2025-06-13 10:40:03 +01:00
Simon Larsen
d39f59e33f feat: remove unused miscDataProps from create API specifications 2025-06-13 10:39:38 +01:00
Simon Larsen
85c643dd8b feat: refactor Terraform provider code generation into ProviderSpec class 2025-06-13 10:20:51 +01:00
Simon Larsen
dc114e7b6f feat: enhance resource handling in generator config for Terraform provider 2025-06-12 23:17:31 +01:00
Simon Larsen
ab9d6cceac feat: add ToolInstaller for managing Terraform Plugin Codegen OpenAPI installation and integrate it into GenerateProvider 2025-06-12 23:12:19 +01:00
Simon Larsen
858a04ea36 feat: update generate-openapi-spec script to use relative path for OpenAPI spec file 2025-06-12 23:04:14 +01:00
Simon Larsen
4db1320d47 feat: update generate-openapi-spec script to accept output path as an argument 2025-06-12 23:04:07 +01:00
Simon Larsen
962071aa21 feat: update OpenAPI spec path in GenerateProvider to ensure correct file location 2025-06-12 22:52:06 +01:00
Simon Larsen
350943f78b feat: update output path for Terraform provider generator config to ensure correct file placement 2025-06-12 22:50:46 +01:00
Simon Larsen
270eafef6a feat: enhance resource and data source generation logic based on operationId for better handling of CRUD operations 2025-06-12 22:40:35 +01:00
Simon Larsen
61d7cbd6a6 feat: add operationId to API paths for better identification and organization 2025-06-12 22:34:50 +01:00
Simon Larsen
4e53dd45db feat: remove debug logging from AnalyticsModelSchema to streamline code 2025-06-12 22:26:05 +01:00
Simon Larsen
35b1c50f18 feat: remove debug logging from ModelSchema class to clean up code 2025-06-12 22:24:54 +01:00
Simon Larsen
eaf11e42ea feat: improve resource and data source naming by prioritizing operationId and refining fallback logic 2025-06-12 22:00:44 +01:00
Simon Larsen
38b0113842 feat: enhance resource and data source naming by using operationId or fallback to path and method 2025-06-12 21:56:56 +01:00
Simon Larsen
faa7f3a8aa feat: implement Terraform provider generator configuration and OpenAPI spec generation 2025-06-12 21:54:09 +01:00
Simon Larsen
7beb0be9a9 feat: enhance generateOpenAPISpec function to accept output path and ensure directory exists 2025-06-12 21:42:23 +01:00
Simon Larsen
b47494073b feat: remove GenerateProvider.ts file and its associated logic 2025-06-12 21:17:05 +01:00
Simon Larsen
e172c7c80a feat: enhance Terraform provider generation by extracting resources and data sources from OpenAPI spec 2025-06-12 21:04:11 +01:00
Simon Larsen
a92dc56c55 fix: update generator configuration path and ensure output directory exists 2025-06-12 19:38:17 +01:00
Simon Larsen
9f8fe31b70 feat: dynamically generate resources and datasources in generator configuration 2025-06-12 19:36:09 +01:00
Simon Larsen
14023df7a6 fix: improve error message formatting in ProjectMiddleware and its tests 2025-06-12 18:23:20 +01:00
Simon Larsen
0e6761d291 fix: standardize error messages for API key validation in ProjectMiddleware 2025-06-12 18:20:53 +01:00
Simon Larsen
53ff7ebc5c fix: improve code formatting and readability in Routes and OpenAPI service files 2025-06-12 18:00:45 +01:00
Simon Larsen
8190ae0624 feat: add OpenAPI specification support and update navigation links 2025-06-12 17:57:27 +01:00
Simon Larsen
c1009a3361 fix: standardize formatting and improve readability in various schema and model files 2025-06-12 17:38:28 +01:00
Simon Larsen
917e43143a fix: simplify ObjectID schema and update ModelSchema to use string format for identifiers 2025-06-12 17:29:21 +01:00
Simon Larsen
657cdfd2d9 fix: refactor column type handling in AnalyticsModelSchema and simplify example value assignment in ModelSchema 2025-06-12 12:17:51 +01:00
Simon Larsen
3cdedee597 fix: filter out columns marked to be hidden in documentation from table columns 2025-06-12 11:51:54 +01:00
Simon Larsen
bfc958dffe fix: update TableColumn metadata to include hideColumnInDocumentation flag and enhance date schema handling in ModelSchema 2025-06-12 11:48:44 +01:00
Simon Larsen
01916e6323 fix: return baseValue for EqualTo operator in AnalyticsModelSchema and ModelSchema 2025-06-12 11:20:57 +01:00
Simon Larsen
2621b69d9f fix: clean up formatting and improve OpenAPI schema examples in ModelSchema 2025-06-12 11:16:57 +01:00
Simon Larsen
1c3c612306 fix: enhance error message for missing API key and improve project ID handling in ProjectMiddleware 2025-06-12 11:13:06 +01:00
Simon Larsen
b42665ec67 fix: update error message for invalid API key in ProjectMiddleware 2025-06-12 10:05:36 +01:00
Simon Larsen
823886e15e fix: improve error handling for invalid API key in ProjectMiddleware 2025-06-12 10:01:26 +01:00
Simon Larsen
1943ecdfe6 fix: format mockRefreshProjectUsersByProject declaration for improved readability 2025-06-11 22:06:58 +01:00
Simon Larsen
d426a54f09 fix: enhance type definition for mockRefreshProjectUsersByProject in TeamMemberService tests 2025-06-11 22:05:04 +01:00
Simon Larsen
e20fbe1662 fix: update ProjectAuthorization and TeamMemberService tests for improved mock handling 2025-06-11 17:28:30 +01:00
Simon Larsen
92eb79c954 fix: simplify error handling in afterEach of TeamMemberService tests 2025-06-11 17:20:31 +01:00
Simon Larsen
19917dfc29 fix: add projectId selection to ProjectMiddleware test and improve error handling in TeamMemberService tests 2025-06-11 17:09:20 +01:00
Simon Larsen
cf428ea5a9 fix: simplify techStackItems mapping in TechStackView component 2025-06-11 16:49:42 +01:00
Simon Larsen
39f873b34d fix: update test assertions and remove unused subscription status in BillingService tests 2025-06-11 16:44:00 +01:00
Simon Larsen
cc20f041a5 fix: enhance type definition for techStackItems in TechStackView component 2025-06-11 15:52:29 +01:00
Simon Larsen
6389a70207 fix: update context type in VMRunner to allow string values 2025-06-11 15:42:37 +01:00
Simon Larsen
0e210320e5 fix: update ComponentProps to allow string type and adjust TechStackView to map tech stack items correctly 2025-06-11 15:40:40 +01:00
Simon Larsen
801ded5bb4 fix: update type constraints in QueryHelper methods to use FindWhereProperty<any> 2025-06-11 15:24:33 +01:00
Simon Larsen
74dc22fcff fix: remove unused import of GenericObject in StatementGenerator tests 2025-06-11 15:04:09 +01:00
Simon Larsen
bd45b59725 fix: update test cases in AnalyticsDatabaseService to use specific query and props objects 2025-06-11 15:03:54 +01:00
Simon Larsen
c05e5cb0ef fix: ensure async handling of billing service mock initialization in tests 2025-06-11 14:42:25 +01:00
Simon Larsen
2c02500fd3 fix: update type constraints in QueryOperator and initialize query/props as empty objects in tests 2025-06-11 14:37:31 +01:00
Simon Larsen
1a4c652bfc fix: format type assertion for mocked Navigation module for consistency 2025-06-11 14:28:34 +01:00
Simon Larsen
a069fa97df fix: refactor conditional checks for onChange props across multiple components 2025-06-11 14:25:35 +01:00
Simon Larsen
a7f00105ac fix: update ESLint configuration and ignore patterns for improved linting performance 2025-06-11 13:46:53 +01:00
Simon Larsen
29339b75ba fix: update Navigation mock structure to use default export for consistency in tests 2025-06-11 13:38:16 +01:00
Simon Larsen
8a3afb8fb0 fix: simplify event handler checks using optional chaining for onClick and onChange props across multiple components 2025-06-11 13:30:57 +01:00
Simon Larsen
be6627cd2e fix: refactor onClick handler in ColorInput to use explicit check for props.onClick 2025-06-11 13:18:05 +01:00
Simon Larsen
d200ee3d6f fix: format import statement for BillingService in mockIsBillingEnabled function 2025-06-11 13:11:32 +01:00
Simon Larsen
dd52a97dfa fix: improve error handling by replacing catch blocks with empty catch statements across multiple components 2025-06-11 13:08:28 +01:00
Simon Larsen
2b801c3d08 fix: update action start and end handlers to use explicit checks before calling 2025-06-11 10:28:36 +01:00
Simon Larsen
d6d5ecec64 fix: correct syntax for checking disabled attribute in ConfirmModal test 2025-06-11 10:27:53 +01:00
Simon Larsen
73f248c367 fix: improve error handling in CommonModel and update mock function to return a promise in BillingServiceHelper 2025-06-11 10:27:42 +01:00
Simon Larsen
9d3b2b5fc9 fix: correct function call syntax in OrderedStatesList test and improve error handling in various classes 2025-06-11 10:26:42 +01:00
Simon Larsen
98a4f058dd fix: add error logging across multiple components and services 2025-06-11 10:14:09 +01:00
Nico Aymet
b7ea97c246 Set permission to write logs and cache on /tmp/npm in case container run as non root 2025-06-10 19:11:37 +01:00
Simon Larsen
289308b01e fix: enhance error logging for statusPageId conversion in StatusPageAPI
fix: improve onClick handler in Logo component for better readability
2025-06-10 15:23:32 +01:00
Simon Larsen
dd05f540c1 fix: update error logging to include error details in data migration classes
refactor: change GenericObject type from Object to object for consistency
fix: increase memory limit for eslint commands in package.json
2025-06-10 15:17:55 +01:00
Simon Larsen
656420ac7b Remove dotenv and sass dependencies from Dashboard and StatusPage package.json files 2025-06-10 15:07:58 +01:00
Simon Larsen
f7597bf35e fix: add null checks for startTimeUnixNano and timeUnixNano in getMetricFromDatapoint method 2025-06-10 14:22:22 +01:00
Simon Larsen
a579b97584 fix: update script tags to use type="module" for improved compatibility 2025-06-10 12:26:54 +01:00
Simon Larsen
0cc64550c9 refactor: change esbuild output format from IIFE to ESM to enable code splitting 2025-06-10 12:24:52 +01:00
Simon Larsen
0931ae577a refactor: remove development environment setup from Dockerfiles and nodemon configurations 2025-06-10 12:02:20 +01:00
Simon Larsen
67636da2dd fix: update script references from bundle.js to Index.js in multiple views 2025-06-10 10:13:40 +01:00
Simon Larsen
26aef9c2ea fix: disable minification in esbuild configuration for development 2025-06-10 10:10:24 +01:00
Simon Larsen
2c512abb7b feat: add sass as a development dependency 2025-06-09 20:48:06 +01:00
Simon Larsen
2d0752aede refactor: update esbuild configuration paths and add esbuild dependency 2025-06-09 20:14:47 +01:00
Simon Larsen
b1383029f3 fix: remove unnecessary comments from port mappings in docker-compose.dev.yml 2025-06-09 20:04:57 +01:00
Simon Larsen
1392aba0dc refactor: remove webpack dependencies and update documentation for migration to esbuild 2025-06-09 20:04:36 +01:00
Simon Larsen
f5e6b04070 refactor: migrate from webpack to esbuild for all services
- Updated package.json scripts to use esbuild instead of webpack.
- Removed webpack.config.js files from all services.
- Added esbuild.config.js files for Dashboard, Accounts, AdminDashboard, and StatusPage.
- Created a shared esbuild configuration in Scripts/esbuild-config.js.
- Implemented CSS and file loader plugins for handling styles and assets.
- Added a migration cleanup script to remove webpack dependencies and configurations.
- Updated ESLint configuration to ignore webpack.config.js.
2025-06-09 20:02:24 +01:00
Simon Larsen
4ae8a64857 fix: update ESLint rule references and upgrade TypeScript dependencies 2025-06-09 15:58:01 +01:00
Simon Larsen
ddb8bdb5f2 fix: update output directory name for Terraform provider generation 2025-06-09 15:35:05 +01:00
Simon Larsen
c16ef4b8fd fix: correct syntax errors and improve error messages in Terraform provider generation 2025-06-09 15:32:33 +01:00
Simon Larsen
5177af1b33 fix: install script dependencies and export generateOpenAPISpec function for Terraform provider generation 2025-06-09 15:30:48 +01:00
Simon Larsen
e00ee85483 fix: correct directory name for installing script dependencies in OpenAPI spec generation workflow 2025-06-09 15:26:20 +01:00
Simon Larsen
1d01ffd293 fix: ensure script dependencies are installed before generating OpenAPI spec 2025-06-09 15:22:50 +01:00
Simon Larsen
7d069065c9 Merge pull request #1939 from OneUptime/terraform
Terraform
2025-06-09 15:01:47 +01:00
Simon Larsen
a37a0c4b3b fix: ensure tfplugingen-openapi is installed and use correct path for generation command 2025-06-09 14:58:28 +01:00
Simon Larsen
9633cbcb40 refactor: update provider generation to use dynamic API version and improve naming conventions 2025-06-09 14:55:29 +01:00
Simon Larsen
81d7168a0e feat: implement Terraform provider generation workflow with validation and documentation 2025-06-09 14:44:56 +01:00
Simon Larsen
6064f060a7 refactor: improve code consistency by adding missing commas in function parameters and statements 2025-06-09 14:34:50 +01:00
Simon Larsen
e34ede0c75 refactor: clean up formatting and remove unnecessary changes in StatementGenerator class 2025-06-09 14:26:18 +01:00
Simon Larsen
6a141c2cf1 refactor: enhance type annotations and replace console logs with Logger for OpenAPI spec generation 2025-06-09 14:22:12 +01:00
Simon Larsen
e03d1c3e1a refactor: simplify validation call and clean up whitespace in generateOpenAPISpec function 2025-06-09 14:19:08 +01:00
Simon Larsen
44f1f40a93 feat: add OpenAPI spec generation workflow with validation and artifact upload 2025-06-09 14:15:23 +01:00
Simon Larsen
39d6eac670 refactor: streamline OpenAPI spec validation and error handling 2025-06-09 14:13:17 +01:00
Simon Larsen
ed4936af30 refactor: restructure generateOpenAPISpec function for improved readability and organization 2025-06-09 14:11:03 +01:00
Simon Larsen
d5f0a29959 feat: Update package dependencies and add OpenAPI spec generation
- Added @readme/openapi-parser as a dependency in Scripts/package.json.
- Introduced a new script command "generate-openapi-spec" in package.json for generating OpenAPI specifications.
- Removed the obsolete test_schema_permissions.js file.
- Created a new script (GenerateSpec.ts) to generate and validate the OpenAPI spec, saving it to openapi.json.
2025-06-09 14:08:56 +01:00
Simon Larsen
b7ee17fa3e refactor: clean up formatting and remove unnecessary line breaks in ProjectAuthorization, OpenAPI, and ModelSchema files 2025-06-09 13:50:37 +01:00
Simon Larsen
eb3039f8d7 refactor: update Monitor column type to use MonitorSteps and integrate schema retrieval 2025-06-09 13:47:54 +01:00
Simon Larsen
f7464d6807 refactor: add IP and Port types to ColumnType and update related schemas in AnalyticsModelSchema and ModelSchema 2025-06-09 13:45:53 +01:00
Simon Larsen
db56b83734 refactor: remove ProjectID header from API Key example in authentication guide 2025-06-09 13:04:36 +01:00
Simon Larsen
907fd3f7e2 refactor: update tenant ID retrieval logic based on API key presence in ProjectMiddleware 2025-06-09 13:02:33 +01:00
Simon Larsen
5e7fd03564 refactor: remove API key header from default API headers in OpenAPI utility 2025-06-09 12:57:34 +01:00
Simon Larsen
db16554390 refactor: clean up code formatting and remove unused nested model example in AnalyticsModelSchema 2025-06-09 11:59:55 +01:00
Simon Larsen
f2f29398ee refactor: remove KeyValueNestedModel and clean up related code in CommonModel 2025-06-09 11:57:20 +01:00
Simon Larsen
41d0c4034d refactor: remove NestedModel support and clean up related code in AnalyticsBaseModel and StatementGenerator 2025-06-09 11:54:58 +01:00
Simon Larsen
3099d96e3c refactor: enhance type safety and improve parameter handling in OpenAPI utility methods 2025-06-09 11:36:09 +01:00
Simon Larsen
1ed266b9f5 feat: add API key authentication and enhance API specifications with default headers 2025-06-09 11:25:49 +01:00
Simon Larsen
03e26a61d8 refactor: improve code formatting for better readability in AnalyticsModelSchema and BaseSchema 2025-06-08 21:01:19 +01:00
Simon Larsen
e58377df9f refactor: add type annotations for better type safety in OpenAPI and schema files 2025-06-08 19:08:27 +01:00
Simon Larsen
a0002ac172 refactor: improve code formatting and readability across multiple schema files 2025-06-08 16:07:47 +01:00
Simon Larsen
f8da2c2c5a feat: enhance column access control checks for read and create permissions in AnalyticsModelSchema 2025-06-06 14:51:26 +01:00
Simon Larsen
196ba295f4 feat: enhance permission handling in ModelSchema for column access control 2025-06-06 13:59:56 +01:00
Simon Larsen
fbc98a74a6 feat: update singular and plural names for OnCallDutyPolicyTimeLog model 2025-06-06 13:59:18 +01:00
Simon Larsen
6d154f1c8a feat: update singular and plural names for OnCallDutyPolicyEscalationRuleSchedule model 2025-06-06 13:58:18 +01:00
Simon Larsen
b32b936bba feat: update singular and plural names for OnCallDutyPolicyEscalationRuleUser model 2025-06-06 13:57:26 +01:00
Simon Larsen
f36caf6242 feat: update singular and plural names for OnCallDutyPolicyEscalationRuleTeam model 2025-06-06 13:49:59 +01:00
Simon Larsen
ff8d19443b feat: update singular and plural names for ExceptionInstance model 2025-06-06 13:48:08 +01:00
Simon Larsen
19a811f935 feat: restore and enhance API Reference documentation 2025-06-06 13:33:22 +01:00
Simon Larsen
535848ba78 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-06-06 13:26:48 +01:00
Simon Larsen
06ab514211 feat: refactor schema generation methods in BaseSchema for improved reusability and clarity 2025-06-06 13:26:45 +01:00
Simon Larsen
ad78f9de22 Merge pull request #1936 from OneUptime/add-api-reference-link
feat: Add API Reference link to documentation
2025-06-06 13:02:29 +01:00
google-labs-jules[bot]
916954e71f feat: Add API Reference link to documentation
This commit introduces a new "API Reference" section in the documentation navigation.

- A new navigation group "API Reference" is added to `Docs/Utils/Nav.ts`.
- This group links to a new page `/docs/api-reference/api-reference`.
- The new page `Docs/Content/api-reference/API Reference.md` is created and contains a link to the main OneUptime API Reference at `/reference`.
2025-06-06 11:50:52 +00:00
Simon Larsen
4c49023cb6 feat: add Analytics model schemas and API generation methods to OpenAPIUtil 2025-06-06 12:50:18 +01:00
Simon Larsen
d589afafbd feat: update singular and plural names in ServiceCatalog and ServiceCopilotCodeRepository models for clarity 2025-06-06 12:05:53 +01:00
Simon Larsen
c1b1789307 feat: update model endpoint descriptions in OpenAPI specification 2025-06-06 11:51:02 +01:00
Simon Larsen
dd3220f3d6 feat: add tags for model endpoints in OpenAPI specification 2025-06-06 11:48:19 +01:00
Simon Larsen
57709f71a6 feat: update permission check logic in OpenAPIUtil to ensure valid permissions are present 2025-06-06 11:36:21 +01:00
Simon Larsen
2f4c513a85 feat: add slackWorkspaceName field to StatusPageSubscriber model and update migration 2025-06-05 16:10:49 +01:00
Simon Larsen
8faf75d4c8 feat: add slackWorkspaceName field to subscription form and update field type to text 2025-06-05 16:10:25 +01:00
Simon Larsen
54948c08c2 feat: add Slack Workspace Name field to subscription form with validation 2025-06-05 15:42:13 +01:00
Simon Larsen
7e1b3ce8d8 feat: update submit button text to 'Send Management Link' in Email, Slack, and SMS subscription pages 2025-06-05 15:38:45 +01:00
Simon Larsen
65f43448fe feat: update Slack subscriber query to use slackWorkspaceName instead of slackIncomingWebhookUrl 2025-06-05 15:35:35 +01:00
Simon Larsen
0358e21958 feat: update permission handling and remove unused Slack fields in subscriber model 2025-06-05 15:28:51 +01:00
Simon Larsen
811f4338b0 feat: add migration to include slackWorkspaceName in StatusPageSubscriber table 2025-06-05 15:24:12 +01:00
Simon Larsen
fdfd66e21e feat: add Slack workspace name field for subscriber validation and update related logic 2025-06-05 15:22:04 +01:00
Simon Larsen
d5f8df322e feat: improve Slack subscriber handling and validation across services 2025-06-05 15:04:19 +01:00
Simon Larsen
340d44c389 feat: streamline Slack notification messages by removing redundant titles 2025-06-05 15:03:10 +01:00
Simon Larsen
4532f5bc04 feat: enhance Slack notification message for new subscribers 2025-06-05 14:48:41 +01:00
Simon Larsen
2eebac054e feat: add Slack webhook validation and notification for new subscribers 2025-06-05 14:44:07 +01:00
Simon Larsen
42e9f42350 feat: update Slack subscriber handling to use incoming webhook URL 2025-06-05 14:35:08 +01:00
Simon Larsen
75814cdec0 feat: enforce Slack subscriber requirement and update related components 2025-06-04 21:45:40 +01:00
Simon Larsen
7a2b0a159d feat: enable Slack subscribers in StatusPage API and update subscription logic 2025-06-04 21:32:10 +01:00
Simon Larsen
12d266aabf feat: enable Slack subscribers in StatusPage settings and update subscription logic 2025-06-04 21:15:30 +01:00
Simon Larsen
5ba9556584 feat: add migration for enabling Slack subscribers and webhook URL in StatusPage 2025-06-04 20:37:53 +01:00
Simon Larsen
b659d0ab4a refactor: remove SlackWebhookTester component from StatusPageSlackSubscribers 2025-06-04 20:17:14 +01:00
Simon Larsen
e725ab4b7b fix: add type annotations for markdown messages and remove unused props in Slack subscription components 2025-06-04 20:14:36 +01:00
Simon Larsen
a4bc78439d Merge branch 'master' into slack-subscribers 2025-06-04 19:53:34 +01:00
Simon Larsen
7f59e62b5d Refactor Slack Markdown Conversion and Update Slack Notification Logic
- Renamed `convertMarkdownToSlack` to `convertMarkdownToSlackRichText` for clarity in Slack utility.
- Updated various components and worker jobs to utilize the new Slack markdown conversion method.
- Removed unused test webhook functionality from the Slack subscribers page.
- Improved formatting of Slack messages in notification jobs to enhance readability.
- Cleaned up code by removing unnecessary fragments and ensuring consistent formatting.
- Enhanced error handling and user feedback for Slack webhook testing.
2025-06-04 19:52:59 +01:00
Simon Larsen
9d7f2aebf6 fix: update status page ID reference in test notification message 2025-06-04 19:26:27 +01:00
Simon Larsen
ba08edc61f feat: Implement Slack webhook testing functionality and enhance Slack notifications 2025-06-04 14:39:33 +00:00
Simon Larsen
f538b89553 fix: correct typo in title for scheduled event message 2025-06-04 15:34:51 +01:00
Simon Larsen
9779f12806 chore: update ModelSchema class for improved readability and maintainability 2025-06-04 15:34:08 +01:00
Simon Larsen
1b4758070b refactor: improve type annotations and formatting in OpenAPI and ModelSchema classes 2025-06-04 15:30:42 +01:00
Simon Larsen
f15cff0064 feat: add permissions formatting and description for OpenAPI schema in ModelSchema 2025-06-04 14:52:53 +01:00
Simon Larsen
dcadbadf25 feat: Add Slack subscription feature for status page notifications
- Implemented Slack notifications for scheduled maintenance events, incidents, and announcements.
- Added UI components for managing Slack subscribers in the dashboard.
- Introduced new settings to enable Slack subscribers in status page settings.
- Created forms for subscribing and managing Slack subscriptions.
- Updated API routes and utility functions to handle Slack webhook URLs.
- Enhanced existing notification jobs to include Slack messaging capabilities.
2025-06-04 13:44:49 +00:00
Simon Larsen
bb51de9d10 feat: implement permission checks for API generation in OpenAPIUtil 2025-06-04 14:37:54 +01:00
Simon Larsen
4c6f51f3bc feat: add groupBy schema support in OpenAPI and ModelSchema classes 2025-06-04 12:58:10 +01:00
Simon Larsen
0ba3db57d6 refactor: enhance type annotations and structure in ModelSchema class 2025-06-03 23:45:37 +01:00
Simon Larsen
ed7861e092 fix: add type annotation for schemaMethod variable in ModelSchema class 2025-06-03 23:35:08 +01:00
Simon Larsen
2616b77a59 feat: implement model schema registration with permission checks for create, read, update, and delete operations 2025-06-03 23:19:30 +01:00
Simon Larsen
4b3636a6a6 feat: register query, select, and sort schemas in OpenAPI specification 2025-06-03 23:04:46 +01:00
Simon Larsen
1a650ab624 feat: enhance query and select schemas with operator validation and OpenAPI documentation 2025-06-03 22:18:02 +01:00
Simon Larsen
6ddae4f0ef refactor: improve type annotations and formatting in alert, incident, and scheduled maintenance services 2025-06-03 20:50:13 +01:00
Simon Larsen
524c5311ff feat: add consistency jobs for incidents and scheduled maintenance 2025-06-03 20:45:34 +01:00
Simon Larsen
649c43d896 feat: add daily cron job to refresh incident current status for all projects 2025-06-03 20:43:38 +01:00
Simon Larsen
aa7110ca12 feat: implement cron jobs to refresh alert and scheduled maintenance states daily 2025-06-03 20:41:38 +01:00
Simon Larsen
6fb4c663d4 fix: enhance next event scheduling logic to handle future dates correctly 2025-06-03 15:44:00 +01:00
Simon Larsen
ee40cedd21 fix: format dashboard link retrieval for improved readability 2025-06-03 11:33:12 +01:00
Simon Larsen
e28bdeb129 fix: remove unsubscribe link from ProjectSubscriptionOverdue template for clarity 2025-06-03 09:02:21 +01:00
Simon Larsen
cd86aa52ec fix: await dashboard link retrieval in email vars for accurate project link 2025-06-03 09:02:09 +01:00
Simon Larsen
293c9e9317 fix: remove unnecessary blank lines in OpenAPIUtil methods for improved readability 2025-06-02 23:03:29 +01:00
Simon Larsen
36be5b7eba fix: update API path summaries and descriptions to use singular model names for clarity 2025-06-02 22:57:44 +01:00
Simon Larsen
9b8a36d2a4 fix: update default API headers to remove Content-Type and provide a specific example for APIKey 2025-06-02 22:50:21 +01:00
Simon Larsen
4814532e23 fix: update schema references in OpenAPIUtil for consistency in input and update specifications 2025-06-02 22:46:20 +01:00
Simon Larsen
224c95832e fix: format execution time calculation for consistency in CustomCodeMonitor and SyntheticMonitor 2025-06-02 22:32:52 +01:00
Simon Larsen
75a2439c1e fix: optimize response time calculation by using Math.ceil for consistency across monitors 2025-06-02 22:29:19 +01:00
Simon Larsen
e74bfc295b feat: add default API headers for GET, UPDATE, and DELETE specifications in OpenAPIUtil 2025-06-02 22:19:20 +01:00
Simon Larsen
e59e1b7718 fix: change HTTP method from GET to POST for list and count endpoints in OpenAPIUtil; update array item schema in ModelSchema 2025-06-02 22:04:46 +01:00
Simon Larsen
c44f3d7d83 fix: update column titles in DatabaseBaseModel for clarity and improve conditional logic in ModelSchema 2025-06-02 21:55:51 +01:00
Simon Larsen
1b9677d8da feat: add OpenAPI examples for various column types in ModelSchema 2025-06-02 21:47:18 +01:00
Simon Larsen
c0b19d4e57 fix: correct formatting in CriteriaAlertSchema and update import statement in MonitorCriteriaInstance 2025-06-02 20:52:41 +01:00
Simon Larsen
612f4260c2 feat: enhance CriteriaAlert, CriteriaFilter, and CriteriaIncident with ZodSchema typing and improve imports in MonitorCriteriaInstance 2025-06-02 20:49:50 +01:00
Simon Larsen
1ccc3765e8 refactor: standardize import statements and format example objects in Monitor and Database classes 2025-06-02 17:49:31 +01:00
Simon Larsen
342c6d7912 feat: implement Zod schema validation for CriteriaAlert, CriteriaFilter, CriteriaIncident, and update MonitorCriteriaInstance and MonitorSteps to use schemas 2025-06-02 17:45:29 +01:00
Simon Larsen
6db6857dbe feat: add Zod schema validation for Domain, Email, IP, MonitorCriteria, MonitorCriteriaInstance, MonitorStep, MonitorSteps, Name, ObjectID, Phone, Port, and Version classes 2025-06-02 17:33:33 +01:00
Simon Larsen
7709016328 feat: add Color type handling in ModelSchema and remove unused getSchemaForDatabaseProperty method 2025-06-02 17:24:20 +01:00
Simon Larsen
8fd89ebd4f Merge branch 'master' of github.com:OneUptime/oneuptime 2025-06-02 17:16:24 +01:00
Simon Larsen
394f5255cf feat: implement Zod schema validation for Color and DatabaseProperty classes
fix: update ApiMonitor and WebsiteMonitor to correctly set isOnline status to false on timeout
2025-06-02 17:16:21 +01:00
Simon Larsen
2afdda0869 Merge pull request #1928 from zzukin/zzukin-patch-conatiner
Fix typo in HelmChart Readme
2025-06-02 17:04:28 +01:00
Simon Larsen
511317886f fix: refactor getProjectLinkInDashboard method and update cron job for sending overdue subscription emails 2025-06-02 14:45:51 +01:00
Simon Larsen
14466f4723 feat: add email template and cron job for notifying project owners of overdue subscriptions 2025-06-02 14:41:45 +01:00
Simon Larsen
f5d326c086 fix: simplify isSubscriptionOverdue method and improve formatting in MasterPage component 2025-06-02 14:18:26 +01:00
Simon Larsen
acf11e25fe fix: enhance subscription status checks to include overdue and inactive states 2025-06-02 14:16:34 +01:00
Simon Larsen
20cf50a497 fix: add 'Paused' status to SubscriptionStatus enum and update active status check 2025-06-02 14:05:01 +01:00
Nico Aymet (nikuzz)
602d198685 Fix typo in HelmChart Readme
Change:
  conatinerSecurityContext
with:
  containerSecurityContext
2025-06-02 10:25:23 +01:00
Simon Larsen
b18c2d4964 fix: clean up OpenAPI spec generation code and improve logging for model schema creation 2025-06-01 22:44:13 +01:00
Simon Larsen
bd5ce9029a fix: update OpenAPI spec title and description for clarity 2025-06-01 22:33:34 +01:00
Simon Larsen
84261786f9 fix: streamline OpenAPI spec generation by consolidating endpoint registration and improving model handling 2025-06-01 22:31:45 +01:00
Simon Larsen
cfdc789fae fix: update API spec summaries and descriptions to use model table names 2025-06-01 21:15:56 +01:00
Simon Larsen
08d4eaab4e fix: enhance model schema generation with OpenAPI type annotations and examples 2025-06-01 20:57:22 +01:00
Simon Larsen
324da96797 feat: add OpenAPI spec generation and enhance model schema logging 2025-06-01 20:45:39 +01:00
Simon Larsen
dc7895501f fix: improve OpenAPI spec generation with caching and enhanced logging 2025-06-01 20:22:52 +01:00
Simon Larsen
4a6a09169a fix: enhance OpenAPI documentation generation with model validation and logging 2025-06-01 14:24:37 +01:00
Simon Larsen
92ab2a3467 fix: update Suspense fallback to use PageLoader for improved loading experience 2025-05-30 10:20:32 +01:00
Simon Larsen
6f99d71d7f fix: enhance error handling in domain migration and log errors using Logger 2025-05-29 15:15:56 +01:00
Simon Larsen
14a70846d0 fix: remove unnecessary await from UserUtil.logout in Logout component 2025-05-29 14:49:41 +01:00
Simon Larsen
61f3fae19d fix: refactor logout method to handle API errors and log them using Logger 2025-05-29 14:45:51 +01:00
Simon Larsen
7f9bd8e150 fix: correct NotAuthorizedException code and update forbidden route handling to return a valid Route 2025-05-29 13:52:49 +01:00
Simon Larsen
6a16301b3f fix: update forbidden route handling to prevent navigation errors and return null 2025-05-29 13:49:00 +01:00
Simon Larsen
17f23b788d feat: add BILLING_ENABLED environment variable to probe configuration and update online check logic 2025-05-29 13:08:08 +01:00
Simon Larsen
3f8370468e feat: enhance timeout handling by checking for executing logs older than 3 hours in OnCallDutyPolicy and UserOnCallLog 2025-05-29 12:54:20 +01:00
Simon Larsen
b151753506 feat: trim whitespace from monitor creation details and enhance comparison criteria with equalTo checks 2025-05-29 12:15:11 +01:00
Simon Larsen
2f9189a181 feat: implement LowercaseDomains migration to ensure all domain entries are stored in lowercase 2025-05-29 12:06:54 +01:00
Simon Larsen
32c2d7ea26 feat: refactor domain handling by renaming Domain import and enhancing CNAME record retrieval with error handling 2025-05-29 11:40:20 +01:00
Simon Larsen
72d0a29e89 feat: improve domain input handling by ensuring it is trimmed and converted to lowercase in onBeforeCreate method 2025-05-29 11:35:40 +01:00
Simon Larsen
14e4949c1a feat: normalize domain and subdomain inputs by trimming and converting to lowercase in DomainService and StatusPageDomainService 2025-05-29 10:58:43 +01:00
Simon Larsen
5d8d24dd58 feat: add SubscriptionStatusUtil methods for improved subscription state handling and update BillingInvoiceService to utilize them 2025-05-29 09:18:19 +01:00
Simon Larsen
b6f4a533e6 refactor: clean up code formatting and improve readability in StatusPageService, IP, and MasterPage components 2025-05-28 21:52:25 +01:00
Simon Larsen
5972697cdf feat: enhance IP whitelist validation to support multiple IPs and improve error logging 2025-05-28 21:51:02 +01:00
Simon Larsen
23ec8de39a feat: add forbidden route handling in DashboardMasterPage and update App component routing 2025-05-28 21:38:06 +01:00
Simon Larsen
2d74d37346 feat: enhance lazy loading of page components for improved performance and readability 2025-05-28 21:31:09 +01:00
Simon Larsen
ed55830e2d feat: refactor App component to lazy load page components and enhance routing structure 2025-05-28 20:58:51 +01:00
Simon Larsen
52923dadc1 feat: create ForbiddenPage component to display access restriction message 2025-05-28 20:57:03 +01:00
Simon Larsen
8f3b17c20f feat: add forbidden page and update routing for forbidden access 2025-05-28 20:55:29 +01:00
Simon Larsen
501c9b655c feat: add handling for forbidden access and implement getForbiddenRoute method in API class 2025-05-28 20:51:15 +01:00
Simon Larsen
3dcdf56c7c fix: correct syntax by adding missing commas in StatusPageService methods 2025-05-28 20:44:24 +01:00
Simon Larsen
474998a3bf feat: implement IP whitelist functionality for status pages and enhance access control 2025-05-28 20:41:03 +01:00
Simon Larsen
65fc159560 feat: add migration to add ipWhitelist column to StatusPage table 2025-05-28 19:39:13 +01:00
Simon Larsen
bba09b8b21 refactor: clean up whitespace and improve formatting in SerializableObject, API, Cookie, and ModelSchema 2025-05-28 19:23:34 +01:00
Simon Larsen
9cde6febfe feat: implement clearAllCookies method and integrate it into logout process 2025-05-28 19:09:52 +01:00
Simon Larsen
279e15276d fix: change error logging from trace to error level for database connection failure 2025-05-28 18:59:01 +01:00
Simon Larsen
6799b55041 refactor: update error logging to use trace level and improve code formatting in ModelSchema 2025-05-28 18:42:31 +01:00
Simon Larsen
7656c67f58 fix: add type annotation for octet in IPv4 validation 2025-05-28 18:28:07 +01:00
Simon Larsen
bec377edea refactor: improve code formatting and consistency in StatusPageService and DNSUtil 2025-05-28 18:04:48 +01:00
Simon Larsen
66fc10221f refactor: improve code formatting and whitespace consistency across multiple files 2025-05-28 17:53:43 +01:00
Simon Larsen
0c7c0b1179 feat: update ipWhitelist type to string and implement IP whitelist validation in StatusPageService 2025-05-28 17:46:53 +01:00
Simon Larsen
af37030dd3 feat: add IP Whitelist section to Authentication Settings page 2025-05-28 17:35:02 +01:00
Simon Larsen
5eda80361e feat: add IP Whitelist column with access control to StatusPage model 2025-05-28 17:32:07 +01:00
Simon Larsen
daaeeb4957 feat: add CNAME record validation in StatusPageDomainService and implement DNSUtil for CNAME resolution 2025-05-28 17:26:37 +01:00
Simon Larsen
e69b700dad refactor: clean up whitespace and formatting in multiple files 2025-05-28 16:18:31 +01:00
Simon Larsen
943075e562 feat: add getSelectModelSchema method for nested property selection 2025-05-27 21:34:37 +01:00
Simon Larsen
fc3daeaebb feat: add methods for query and sort model schemas in ModelSchema 2025-05-27 21:30:35 +01:00
Simon Larsen
8e788d0acc refactor: move ConfigLogLevel to a separate file and update imports 2025-05-27 20:46:30 +01:00
Simon Larsen
ae7d3fe247 Merge pull request #1917 from OneUptime/fix/baseapi-test-typeerror
Fix(tests): Correct EnvironmentConfig mock in BaseAPI.test.ts
2025-05-27 20:43:29 +01:00
Simon Larsen
b690415764 fix: update method signatures in OpenAPIUtil for consistent return types 2025-05-27 20:11:20 +01:00
Simon Larsen
7134709154 refactor: clean up OpenAPI path registration for improved readability 2025-05-27 19:18:24 +01:00
Simon Larsen
194695d1e0 refactor: streamline zod type determination in ModelSchema for improved readability 2025-05-27 16:56:37 +01:00
Simon Larsen
a539bd3c92 feat: refactor DatabaseBaseModel and ModelSchema for improved schema generation and validation 2025-05-27 16:43:56 +01:00
Simon Larsen
d5fd2ec1bf fix: correct formatting and add missing commas in DatabaseBaseModel and ModelSchema 2025-05-27 15:22:20 +01:00
Simon Larsen
ef808fdf10 feat: integrate ModelSchemaUtil for enhanced schema management in DatabaseBaseModel 2025-05-27 15:10:05 +01:00
Simon Larsen
4d4d7d6d26 feat: add Zod schema generation to DatabaseBaseModel for enhanced validation 2025-05-27 14:50:11 +01:00
Simon Larsen
4dc589f9ce feat: add zod and zod-to-openapi dependencies to enhance OpenAPI support 2025-05-27 14:33:05 +01:00
Simon Larsen
5fe97c422f feat: add OpenAPI class and integrate OpenAPI router into BaseAPIFeatureSet 2025-05-27 13:50:33 +01:00
Simon Larsen
7085a4d4e0 feat: implement MCP service to add tools and model APIs to server 2025-05-27 13:24:39 +01:00
google-labs-jules[bot]
4135b3ba0f Fix(tests): Correct EnvironmentConfig mock in BaseAPI.test.ts
I've updated the Jest mock for 'Common/Server/EnvironmentConfig' in 'Common/Tests/Server/API/BaseAPI.test.ts' to include 'LogLevel' and 'ConfigLogLevel'. This resolves a TypeError (Cannot read properties of undefined (reading 'INFO')) that occurred when the logger was invoked during test execution.

The error was caused by an incomplete mock that did not provide the logging configuration, leading to a crash in 'Logger.getLogLevel()'.

Additionally, I've added 'DisableTelemetry: true' to the mock to prevent unnecessary telemetry initialization during these specific API tests.
2025-05-27 12:22:31 +00:00
Simon Larsen
3b71adc009 fix(deps): update @oneuptime/common dependency to version 7.0.4263 2025-05-27 12:42:43 +01:00
Simon Larsen
8bff664f2f fix(deps): update @oneuptime/common dependency to version 7.0.4263 2025-05-27 12:22:18 +01:00
Simon Larsen
0563c492a6 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-05-27 12:17:19 +01:00
Simon Larsen
500fb5842e refactor: update main function return type to Promise<void> 2025-05-27 12:16:27 +01:00
Simon Larsen
b82f51bea4 refactor: add type annotations for main function and transport variable in MCP server 2025-05-27 12:11:33 +01:00
Simon Larsen
5e81f4be35 Merge pull request #1916 from OneUptime/fix/statement-generator-test
Fix(tests): Update expected SQL in StatementGenerator test
2025-05-27 12:09:28 +01:00
google-labs-jules[bot]
77fe7ce1ce Fix(tests): Update expected SQL in StatementGenerator test
The expected SQL statement in the `toTableCreateStatement` test was outdated and did not include the `PARTITION BY` clause, which is now correctly generated by the StatementGenerator.

This commit updates the expected statement to match the actual output, resolving the test failure.
2025-05-27 11:08:39 +00:00
Simon Larsen
bd938736d6 feat: add StdioServerTransport and logger integration to MCP server 2025-05-27 12:04:45 +01:00
Simon Larsen
4d4ddd9bfc refactor: Clean up imports and improve formatting in configuration files 2025-05-27 12:02:11 +01:00
Simon Larsen
93123f6042 Refactor: Move BaseDatabase utilities to Common/Types and update imports
- Moved GroupBy, ListResult, Select, and RequestOptions from Common/UI/Utils/BaseDatabase to Common/Types/BaseDatabase.
- Updated all relevant imports across the codebase to reflect the new paths.
- Removed obsolete BaseDatabase utility files from the UI components.
- Ensured consistent usage of the new types in ModelDetail, ModelList, ModelTable, and Dashboard components.
2025-05-27 11:47:53 +01:00
Simon Larsen
856cff3e85 feat: initialize MCP server with TypeScript configuration and package setup
- Added package.json for MCP server with necessary scripts, dependencies, and configurations.
- Created tsconfig.json with comprehensive TypeScript compiler options for strict type checking and module resolution.
2025-05-27 11:12:41 +01:00
Simon Larsen
47fa401a67 refactor: Improve formatting for better readability in OfflineIndicator component 2025-05-26 14:05:51 +01:00
Simon Larsen
c536e1e642 refactor: Improve structure and readability of MasterPage and OfflineIndicator components 2025-05-26 14:03:06 +01:00
Simon Larsen
c06d4f0b63 feat: Add OfflineIndicator component to handle online/offline status and integrate it into MasterPage 2025-05-26 14:00:08 +01:00
Simon Larsen
d8388666ef docs: Update documentation to include available modules for custom scripts in monitors 2025-05-26 12:51:23 +01:00
Simon Larsen
511b4c9045 refactor: Change field type from Text to LongText for improved description handling across multiple components 2025-05-24 11:26:44 +01:00
Simon Larsen
140f12c0fb refactor: Clean up formatting and improve readability in LongTextViewer and WorkflowElement components 2025-05-23 21:58:13 +01:00
Simon Larsen
a00d72b771 refactor: Update LongTextViewer to use Button component and adjust character limit for truncation 2025-05-23 21:54:35 +01:00
Simon Larsen
1789be519e refactor: Enhance Probe and WorkflowElement components with new decorators and project ID handling 2025-05-23 20:58:50 +01:00
Simon Larsen
8e3f23d885 refactor: Update field type to LongText for better description handling in Workflows component 2025-05-23 20:48:28 +01:00
Simon Larsen
335b6ed15f refactor: Integrate WorkflowElement for rendering workflow items in Workflows component 2025-05-23 20:37:37 +01:00
Simon Larsen
95b53ca4ce refactor: Improve readability of lazy-loaded component declarations in App.tsx 2025-05-23 12:03:16 +01:00
Simon Larsen
3a80fcca73 refactor: Implement lazy loading for route components with a custom fallback loader 2025-05-23 12:01:58 +01:00
Simon Larsen
6d5e186505 refactor: Remove unused description fields from incident and scheduled maintenance notification templates 2025-05-23 10:40:56 +01:00
Simon Larsen
13450d32af refactor: Replace loading fallback with custom PageLoader component in Suspense 2025-05-22 21:27:13 +01:00
Simon Larsen
e77ea73ffc refactor: Implement lazy loading for route components to improve performance 2025-05-22 21:24:27 +01:00
Simon Larsen
dcfadf9051 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-05-22 20:55:38 +01:00
Simon Larsen
f9869105b6 refactor: Update API import paths for consistency across utility files 2025-05-22 20:55:36 +01:00
Simon Larsen
71881bb822 Merge pull request #1912 from zzukin/master
Missing "$" in Helm Charts
2025-05-22 13:15:20 +01:00
Nico Aymet
a10c914757 Missing "$" in get autoscaling.enabled = true from Values.yaml in Helm Charts 2025-05-22 12:37:33 +01:00
Simon Larsen
f4390dd1da refactor: Add hidden class to copyright div for responsive design 2025-05-22 11:32:00 +01:00
Simon Larsen
f0e4e4147c refactor: Remove unnecessary whitespace from HeaderAlert component 2025-05-22 11:28:40 +01:00
Simon Larsen
296e664da2 refactor: Remove unused lodash import from NotificationMiddleware test 2025-05-22 10:58:03 +01:00
Simon Larsen
152517b85a refactor: Remove optional chaining from JSONFunctions.flattenObject call 2025-05-22 10:56:55 +01:00
Simon Larsen
599d4fff17 refactor: Import lodash and update mock implementation for flattenObject 2025-05-22 10:56:20 +01:00
Simon Larsen
a1a3dee380 refactor: Reformat import statements for consistency across multiple files 2025-05-22 10:27:25 +01:00
Simon Larsen
fbde9f9052 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-05-21 20:34:30 +01:00
Simon Larsen
9bec06672c refactor: Update import paths for consistency across various components 2025-05-21 20:33:59 +01:00
Simon Larsen
19926d4260 refactor: Update import paths for consistency across various components 2025-05-21 20:31:32 +01:00
Simon Larsen
09a8d73867 refactor: Update import paths to use relative paths for consistency across various components 2025-05-21 20:26:23 +01:00
Simon Larsen
4f798ea570 Merge pull request #1910 from zzukin/master
Exclude parameter "replicas" in Deployments, if autoscaling.enabled = true
2025-05-21 20:11:58 +01:00
Simon Larsen
4f4a171ba1 Merge pull request #1911 from zzukin/otel-collector-non-root
Fix permission issues if otel-collector runs as non root
2025-05-21 20:09:51 +01:00
Nico Aymet (nikuzz)
fed1478bcb Update Dockerfile.tpl
When otel-collector runs with runAsNonRoot: true and a specific runAsUser UID, gomplate can't write to /etc. Change the output path to /tmp to avoid permission issues
2025-05-21 18:15:22 +01:00
Nico Aymet (nikuzz)
707b43c399 Update workflow.yaml
Exclude parameter "replicas" in Deployments, if autoscaling.enabled = true
2025-05-21 17:47:55 +01:00
Nico Aymet (nikuzz)
974cf16cf1 Update worker.yaml
Exclude parameter "replicas" in Deployments, if autoscaling.enabled = true
2025-05-21 17:47:35 +01:00
Nico Aymet (nikuzz)
ac014395a7 Update server-monitor-ingest.yaml
Exclude parameter "replicas" in Deployments, if autoscaling.enabled = true
2025-05-21 17:46:55 +01:00
Nico Aymet (nikuzz)
8bdbae8f09 Update probe.yaml
Exclude parameter "replicas" in Deployments, if autoscaling.enabled = true
2025-05-21 17:45:58 +01:00
Nico Aymet (nikuzz)
13545732ea Update probe-ingest.yaml
Exclude parameter "replicas" in Deployments, if autoscaling.enabled = true
2025-05-21 17:39:59 +01:00
Nico Aymet (nikuzz)
5bd6f59f71 Update otel-collector.yaml
Exclude parameter "replicas" in Deployments, if autoscaling.enabled = true
2025-05-21 17:39:39 +01:00
Nico Aymet (nikuzz)
1ca48f567d Update open-telemetry-ingest.yaml
Exclude parameter "replicas" in Deployments, if autoscaling.enabled = true
2025-05-21 17:39:04 +01:00
Nico Aymet (nikuzz)
84cc55d22c Update nginx.yaml
Exclude parameter "replicas" in Deployments, if autoscaling.enabled = true
2025-05-21 17:38:38 +01:00
Nico Aymet (nikuzz)
dc73166fec Update isolated-vm.yaml
Exclude parameter "replicas" in Deployments, if autoscaling.enabled = true
2025-05-21 17:38:05 +01:00
Nico Aymet (nikuzz)
9d45ee6d28 Update incoming-request-ingest.yaml
Exclude parameter "replicas" in Deployments, if autoscaling.enabled = true
2025-05-21 17:37:33 +01:00
Nico Aymet (nikuzz)
4dfea390e2 Update home.yaml
Exclude parameter "replicas" in Deployments, if autoscaling.enabled = true
2025-05-21 17:37:05 +01:00
Nico Aymet (nikuzz)
f9a424ec29 Update fluent-ingest.yaml
Exclude parameter "replicas" in Deployments, if autoscaling.enabled = true
2025-05-21 17:36:19 +01:00
Nico Aymet (nikuzz)
be1dc35d29 Update docs.yaml
Exclude parameter "replicas" in Deployments, if autoscaling.enabled = true
2025-05-21 17:34:36 +01:00
Nico Aymet (nikuzz)
1d8d84c6a5 Update app.yaml
Exclude parameter "replicas" in Deployments, if autoscaling.enabled = true
2025-05-21 17:33:49 +01:00
Nico Aymet (nikuzz)
bb571f8aae Update api-reference.yaml
Exclude parameter "replicas" in Deployments, if autoscaling.enabled = true
2025-05-21 17:33:12 +01:00
Nico Aymet (nikuzz)
56fcb3a37f Update _helpers.tpl
Exclude parameter "replicas" in Deployments, if autoscaling.enabled = true
2025-05-21 17:28:39 +01:00
Simon Larsen
a2baeb1a20 refactor: Update import paths to use absolute paths for consistency across various components 2025-05-21 17:03:48 +01:00
Simon Larsen
168224363c refactor: Update import paths for consistency across various components 2025-05-21 16:56:04 +01:00
Simon Larsen
22e92f4ed5 refactor: Update import paths for consistency across various components 2025-05-21 16:53:07 +01:00
Simon Larsen
81a7dcbab6 refactor: Update import paths for consistency across various components 2025-05-21 16:46:53 +01:00
Simon Larsen
6872fa627e refactor: Update import paths to use relative paths for consistency across various components 2025-05-21 16:43:01 +01:00
Simon Larsen
99c545e8b0 refactor: Update import paths for consistency across AnalyticsDatabase and Workflow components 2025-05-21 16:36:51 +01:00
Simon Larsen
11bad57109 refactor: Correct import path for AnalyticsBaseModel in Query.ts for consistency 2025-05-21 16:28:31 +01:00
Simon Larsen
9d9a8eeee2 Refactor import paths for Database and Workflow components
- Updated import statements in various files to use relative paths for better modularity and maintainability.
- Adjusted imports in Database types including DeleteBy, FindBy, UpdateBy, and others to reflect the new directory structure.
- Modified imports in Workflow components such as Email, JavaScript, Log, Manual, Schedule, and Webhook to ensure consistency across the codebase.
2025-05-21 16:24:52 +01:00
Simon Larsen
714823514c Refactor import paths in test and UI component files for consistency
- Updated import statements in various test files to use relative paths instead of absolute paths.
- Adjusted import paths in UI components to ensure they correctly reference the Types and Models directories.
- Ensured all components and tests are aligned with the new directory structure for better maintainability.
2025-05-21 16:19:35 +01:00
Simon Larsen
49025da2b0 refactor: Update import paths to use relative paths for consistency across AnalyticsDatabase types 2025-05-21 15:14:37 +01:00
Simon Larsen
0488770151 refactor: Update import paths to use relative paths for consistency across DatabaseConfig, EnvironmentConfig, DataSourceOptions, and various AnalyticsDatabase types 2025-05-21 15:04:22 +01:00
Simon Larsen
f32b208cea refactor: Update import paths to use relative paths for consistency across the codebase 2025-05-21 14:51:30 +01:00
Simon Larsen
ebd14dd497 Refactor import paths in Workflow components to use relative paths from Types directory
- Updated import statements in ComponentSettingsModal, ComponentValuePickerModal, ComponentsModal, DocumentationViewer, RunForm, RunModal, Utils, VariableModal, Workflow, WorkflowStatus, Config, EntityFieldType, and various API utility files to reflect the new directory structure.
- Ensured all imports from "Common/Types" are now sourced from "../../../Types" to maintain consistency and improve module resolution.
2025-05-21 14:02:32 +01:00
Simon Larsen
54c526ffed Refactor import paths in utility files to use relative paths instead of absolute paths. This change enhances module resolution and maintains consistency across the codebase. Updated imports in Execute.ts, Express.ts, Greenlock.ts, JsonToCsv.ts, JsonWebToken.ts, LocalFile.ts, Logger.ts, various Monitor criteria files, Realtime.ts, Response.ts, StartServer.ts, Stream.ts, Telemetry.ts, TwoFactorAuth.ts, VMAPI.ts, VMRunner.ts, and Workspace files. 2025-05-21 13:55:49 +01:00
Simon Larsen
327367e7ca fix: Remove local file reference for Common module in package.json 2025-05-21 13:25:02 +01:00
Simon Larsen
eaaa75f261 feat: Add moduleNameMapper for Common module path resolution in Jest config 2025-05-21 13:23:49 +01:00
Simon Larsen
aa0365d2b2 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-05-21 12:06:46 +01:00
Simon Larsen
b8529621ff fix: Correct variable names for scheduled maintenance event timing calculations 2025-05-21 12:06:43 +01:00
Simon Larsen
8e3325bfc8 Merge pull request #1905 from GunniBusch/patch-1
Fix undefined as domain name when saving custom SSL-Certs
2025-05-21 11:02:23 +01:00
Leon Adomaitis
b49d0e1d32 Fix undefined as domain name when saving custom SSL-Certs 2025-05-20 14:18:50 +02:00
1398 changed files with 58554 additions and 66772 deletions

View File

@@ -209,22 +209,6 @@ jobs:
- name: build docker image
run: sudo docker build -f ./Dashboard/Dockerfile .
docker-build-haraka:
runs-on: ubuntu-latest
env:
CI_PIPELINE_ID: ${{github.run_number}}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Preinstall
run: npm run prerun
# build images
- name: build docker image
run: sudo docker build -f ./Haraka/Dockerfile .
docker-build-probe:
runs-on: ubuntu-latest
env:

View File

@@ -31,8 +31,6 @@ jobs:
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'javascript', 'typescript', 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]

View File

@@ -290,4 +290,16 @@ jobs:
with:
node-version: latest
- run: cd Common && npm install
- run: cd TestServer && npm install && npm run compile && npm run dep-check
- run: cd TestServer && npm install && npm run compile && npm run dep-check
compile-mcp:
runs-on: ubuntu-latest
env:
CI_PIPELINE_ID: ${{github.run_number}}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
- run: cd Common && npm install
- run: cd MCP && npm install && npm run compile && npm run dep-check

View File

@@ -0,0 +1,74 @@
name: OpenAPI Spec Generation
on:
pull_request:
push:
branches-ignore:
- 'hotfix-*'
- 'release'
jobs:
generate-openapi-spec:
runs-on: ubuntu-latest
env:
CI_PIPELINE_ID: ${{ github.run_number }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: latest
cache: 'npm'
- name: Install Common dependencies
run: cd Common && npm install
- name: Install root dependencies
run: npm install
- name: Install Script dependencies
run: cd Scripts && npm install
- name: Generate OpenAPI specification
run: npm run generate-openapi-spec
- name: Check if OpenAPI spec was generated
run: |
if [ -f "./openapi.json" ]; then
echo "✅ OpenAPI spec file generated successfully"
echo "📄 File size: $(du -h ./openapi.json | cut -f1)"
echo "📊 Spec contains $(jq '.paths | length' ./openapi.json) API paths"
echo "🏷️ API version: $(jq -r '.info.version' ./openapi.json)"
echo "📝 API title: $(jq -r '.info.title' ./openapi.json)"
else
echo "❌ OpenAPI spec file was not generated"
exit 1
fi
- name: Validate OpenAPI spec format
run: |
# Check if the file is valid JSON
if jq empty ./openapi.json; then
echo "✅ OpenAPI spec is valid JSON"
else
echo "❌ OpenAPI spec is not valid JSON"
exit 1
fi
# Check if it has required OpenAPI fields
if jq -e '.openapi and .info and .paths' ./openapi.json > /dev/null; then
echo "✅ OpenAPI spec has required fields"
else
echo "❌ OpenAPI spec missing required fields (openapi, info, paths)"
exit 1
fi
- name: Upload OpenAPI spec as artifact
uses: actions/upload-artifact@v4
with:
name: openapi-spec
path: ./openapi.json
retention-days: 30

View File

@@ -68,6 +68,142 @@ jobs:
git commit -m "Helm Chart Release 7.0.${{needs.generate-build-number.outputs.build_number}}"
git push origin master
publish-mcp-server:
runs-on: ubuntu-latest
needs: [generate-build-number, publish-npm-packages]
env:
CI_PIPELINE_ID: ${{ github.run_number }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
permissions:
contents: write # For creating releases
packages: write # For publishing packages
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for changelog generation
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: latest
cache: 'npm'
- name: Install Common dependencies
run: cd Common && npm install
- name: Install root dependencies
run: npm install
- name: Install Script dependencies
run: cd Scripts && npm install
- name: Determine version
id: version
run: |
VERSION="7.0.${{needs.generate-build-number.outputs.build_number}}"
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Publishing MCP server version: $VERSION"
- name: Verify MCP server directory
run: |
MCP_DIR="./MCP"
if [ ! -d "$MCP_DIR" ]; then
echo "❌ MCP server directory not found"
exit 1
fi
echo "✅ MCP server directory found"
echo "📊 Source files:"
find "$MCP_DIR" -type f -name "*.ts" -o -name "*.js" -o -name "*.json" | wc -l
echo "📁 Directory structure:"
ls -la "$MCP_DIR"
- name: Setup npm authentication
run: |
# Clean up any existing npm configuration that might cause warnings
rm -f ~/.npmrc
# Create npmrc file with authentication
touch ~/.npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" >> ~/.npmrc
echo "//registry.npmjs.org/:email=npm@oneuptime.com" >> ~/.npmrc
echo "✅ npm authentication configured"
- name: Update package version
run: |
cd MCP
npm version ${{ steps.version.outputs.version }} --no-git-tag-version
- name: Install dependencies
run: |
cd MCP
npm update @oneuptime/common
npm install
- name: Build MCP server
run: |
cd MCP
npm run build
- name: Run tests
run: |
cd MCP
npm test || echo "No tests found or tests failed, continuing..."
- name: Verify package before publish
run: |
cd MCP
echo "📦 Package information:"
npm publish --dry-run
echo "📋 Package.json bin configuration:"
cat package.json | grep -A 5 -B 5 '"bin"'
echo "📁 Build directory contents:"
ls -la build/
- name: Publish to npm
run: |
cd MCP
npm publish --access public
echo "✅ Published @oneuptime/mcp-server@${{ steps.version.outputs.version }} to npm"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
--file ./MCP/Dockerfile.tpl \
--tag oneuptime/mcp-server:${{ steps.version.outputs.version }} \
--tag oneuptime/mcp-server:release \
--tag ghcr.io/oneuptime/mcp-server:${{ steps.version.outputs.version }} \
--tag ghcr.io/oneuptime/mcp-server:release \
--build-arg GIT_SHA=${{ github.sha }} \
--build-arg APP_VERSION=${{ steps.version.outputs.version }} \
--push .
echo "✅ Pushed Docker images to Docker Hub and GitHub Container Registry"
- name: Upload MCP server artifact
uses: actions/upload-artifact@v4
with:
name: mcp-server-${{ steps.version.outputs.version }}
path: ./MCP/
retention-days: 90
nginx-docker-image-deploy:
needs: [generate-build-number]
runs-on: ubuntu-latest
@@ -917,67 +1053,6 @@ jobs:
GIT_SHA=${{ github.sha }}
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
haraka-docker-image-deploy:
needs: [generate-build-number]
runs-on: ubuntu-latest
steps:
- name: Docker Meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
oneuptime/haraka
ghcr.io/oneuptime/haraka
tags: |
type=raw,value=release,enable=true
type=semver,value=7.0.${{needs.generate-build-number.outputs.build_number}},pattern={{version}},enable=true
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: actions/setup-node@v4
with:
node-version: latest
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Generate Dockerfile from Dockerfile.tpl
run: npm run prerun
# Build and deploy haraka.
- name: Login to Docker Hub
uses: docker/login-action@v2.2.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
file: ./Haraka/Dockerfile
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GIT_SHA=${{ github.sha }}
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
admin-dashboard-docker-image-deploy:
needs: [generate-build-number]
runs-on: ubuntu-latest
@@ -1299,8 +1374,6 @@ jobs:
llm-docker-image-deploy:
needs: generate-build-number
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
@@ -1384,8 +1457,6 @@ jobs:
docs-docker-image-deploy:
needs: generate-build-number
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
@@ -1451,8 +1522,6 @@ jobs:
worker-docker-image-deploy:
needs: generate-build-number
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
@@ -1518,8 +1587,6 @@ jobs:
workflow-docker-image-deploy:
needs: generate-build-number
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
@@ -1581,13 +1648,71 @@ jobs:
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
publish-terraform-provider:
runs-on: ubuntu-latest
needs: [generate-build-number]
env:
CI_PIPELINE_ID: ${{github.run_number}}
GITHUB_TOKEN: ${{ secrets.SIMLARSEN_GITHUB_PAT }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
TERRAFORM_PROVIDER_GITHUB_REPO_DEPLOY_KEY: ${{ secrets.TERRAFORM_PROVIDER_GITHUB_REPO_DEPLOY_KEY }}
permissions:
contents: write # For creating releases
packages: write # For publishing packages
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for changelog generation
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'
cache: 'npm'
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
cache: true
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
install-only: true
- name: Determine version
id: version
run: |
VERSION="7.0.${{needs.generate-build-number.outputs.build_number}}"
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Publishing Terraform provider version: $VERSION"
- name: Install dependencies
run: |
npm install
if [ -d "Common" ]; then cd Common && npm install && cd ..; fi
if [ -d "Scripts" ]; then cd Scripts && npm install && cd ..; fi
- name: Import GPG key
run: |
echo '${{ secrets.GPG_PRIVATE_KEY }}' > private.key
gpg --import private.key || true
rm private.key
echo "GPG key imported successfully"
gpg --export-secret-keys >~/.gnupg/secring.gpg
echo "GPG key exported successfully"
- name: Generate Terraform provider
run: npm run publish-terraform-provider -- --version "${{ steps.version.outputs.version }}" --github-token "${{ secrets.SIMLARSEN_GITHUB_PAT }}" --github-repo-deploy-key "${{ secrets.TERRAFORM_PROVIDER_GITHUB_REPO_DEPLOY_KEY }}"
api-reference-docker-image-deploy:
needs: generate-build-number
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
@@ -1653,7 +1778,7 @@ jobs:
test-e2e-release-saas:
runs-on: ubuntu-latest
needs: [open-telemetry-ingest-docker-image-deploy, copilot-docker-image-deploy, fluent-ingest-docker-image-deploy, docs-docker-image-deploy, api-reference-docker-image-deploy, workflow-docker-image-deploy, llm-docker-image-deploy, accounts-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, dashboard-docker-image-deploy, haraka-docker-image-deploy, probe-ingest-docker-image-deploy, server-monitor-ingest-docker-image-deploy, isolated-vm-docker-image-deploy, home-docker-image-deploy, worker-docker-image-deploy, otel-collector-docker-image-deploy, probe-docker-image-deploy, status-page-docker-image-deploy, test-docker-image-deploy, test-server-docker-image-deploy, publish-npm-packages, e2e-docker-image-deploy, helm-chart-deploy, generate-build-number, nginx-docker-image-deploy, incoming-request-ingest-docker-image-deploy]
needs: [open-telemetry-ingest-docker-image-deploy, copilot-docker-image-deploy, fluent-ingest-docker-image-deploy, docs-docker-image-deploy, api-reference-docker-image-deploy, workflow-docker-image-deploy, llm-docker-image-deploy, accounts-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, dashboard-docker-image-deploy, probe-ingest-docker-image-deploy, server-monitor-ingest-docker-image-deploy, isolated-vm-docker-image-deploy, home-docker-image-deploy, worker-docker-image-deploy, otel-collector-docker-image-deploy, probe-docker-image-deploy, status-page-docker-image-deploy, test-docker-image-deploy, test-server-docker-image-deploy, publish-npm-packages, e2e-docker-image-deploy, helm-chart-deploy, generate-build-number, nginx-docker-image-deploy, incoming-request-ingest-docker-image-deploy]
env:
CI_PIPELINE_ID: ${{github.run_number}}
steps:
@@ -1706,7 +1831,7 @@ jobs:
test-e2e-release-self-hosted:
runs-on: ubuntu-latest
# After all the jobs runs
needs: [open-telemetry-ingest-docker-image-deploy, copilot-docker-image-deploy, incoming-request-ingest-docker-image-deploy, fluent-ingest-docker-image-deploy, docs-docker-image-deploy, api-reference-docker-image-deploy, workflow-docker-image-deploy, llm-docker-image-deploy, accounts-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, dashboard-docker-image-deploy, haraka-docker-image-deploy, probe-ingest-docker-image-deploy, server-monitor-ingest-docker-image-deploy, isolated-vm-docker-image-deploy, home-docker-image-deploy, worker-docker-image-deploy, otel-collector-docker-image-deploy, probe-docker-image-deploy, status-page-docker-image-deploy, test-docker-image-deploy, test-server-docker-image-deploy, publish-npm-packages, e2e-docker-image-deploy, helm-chart-deploy, generate-build-number, nginx-docker-image-deploy]
needs: [open-telemetry-ingest-docker-image-deploy, publish-mcp-server, copilot-docker-image-deploy, incoming-request-ingest-docker-image-deploy, fluent-ingest-docker-image-deploy, docs-docker-image-deploy, api-reference-docker-image-deploy, workflow-docker-image-deploy, llm-docker-image-deploy, accounts-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, dashboard-docker-image-deploy, probe-ingest-docker-image-deploy, server-monitor-ingest-docker-image-deploy, isolated-vm-docker-image-deploy, home-docker-image-deploy, worker-docker-image-deploy, otel-collector-docker-image-deploy, probe-docker-image-deploy, status-page-docker-image-deploy, test-docker-image-deploy, test-server-docker-image-deploy, publish-npm-packages, e2e-docker-image-deploy, helm-chart-deploy, generate-build-number, nginx-docker-image-deploy]
env:
CI_PIPELINE_ID: ${{github.run_number}}
steps:
@@ -1824,4 +1949,3 @@ jobs:
prerelease: false
tag_name: 7.0.${{needs.generate-build-number.outputs.build_number}}

View File

@@ -0,0 +1,97 @@
name: Terraform Provider Generation
on:
pull_request:
push:
branches:
- main
- master
- develop
workflow_dispatch: # Allow manual trigger
jobs:
generate-terraform-provider:
runs-on: ubuntu-latest
env:
CI_PIPELINE_ID: ${{ github.run_number }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: latest
cache: 'npm'
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
cache: true
- name: Install Common dependencies
run: cd Common && npm install
- name: Install root dependencies
run: npm install
- name: Install Script dependencies
run: cd Scripts && npm install
- name: Generate Terraform provider
run: npm run generate-terraform-provider
- name: Verify provider generation
run: |
PROVIDER_DIR="./Terraform"
# Check if provider directory was created
if [ ! -d "$PROVIDER_DIR" ]; then
echo "❌ Terraform provider directory not created"
exit 1
fi
echo "✅ Provider directory created: $PROVIDER_DIR"
# Count generated files
GO_FILES=$(find "$PROVIDER_DIR" -name "*.go" | wc -l)
echo "📊 Generated Go files: $GO_FILES"
if [ "$GO_FILES" -eq 0 ]; then
echo "❌ No Go files were generated"
exit 1
fi
# Check for essential files
if [ -f "$PROVIDER_DIR/go.mod" ]; then
echo "✅ Go module file created"
fi
if [ -f "$PROVIDER_DIR/README.md" ]; then
echo "✅ Documentation created"
fi
# Show directory structure for debugging
echo "📁 Provider directory structure:"
ls -la "$PROVIDER_DIR" || true
- name: Test Go build
run: |
PROVIDER_DIR="./Terraform"
if [ -d "$PROVIDER_DIR" ] && [ -f "$PROVIDER_DIR/go.mod" ]; then
cd "$PROVIDER_DIR"
echo "🔨 Testing Go build..."
go mod tidy
go build -v ./...
echo "✅ Go build successful"
else
echo "⚠️ Cannot test build - missing go.mod or provider directory"
fi
- name: Upload Terraform provider as artifact
uses: actions/upload-artifact@v4
with:
name: Terraform
path: ./Terraform/
retention-days: 30

View File

@@ -23,10 +23,183 @@ jobs:
token: ${{secrets.github_token}}
- run: echo "Build number is ${{ steps.buildnumber.outputs.build_number }}"
publish-terraform-provider:
runs-on: ubuntu-latest
needs: [generate-build-number]
env:
CI_PIPELINE_ID: ${{github.run_number}}
GITHUB_TOKEN: ${{ secrets.SIMLARSEN_GITHUB_PAT }}
GPG_PRIVATE_KEY: ${{ secrets.TERRAFORM_GPG_PRIVATE_KEY }}
TERRAFORM_PROVIDER_GITHUB_REPO_DEPLOY_KEY: ${{ secrets.TERRAFORM_PROVIDER_GITHUB_REPO_DEPLOY_KEY }}
permissions:
contents: write # For creating releases
packages: write # For publishing packages
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for changelog generation
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'
cache: 'npm'
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
cache: true
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
install-only: true
- name: Determine version
id: version
run: |
VERSION="7.0.${{needs.generate-build-number.outputs.build_number}}"
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Publishing Terraform provider version: $VERSION"
- name: Install dependencies
run: |
npm install
if [ -d "Common" ]; then cd Common && npm install && cd ..; fi
if [ -d "Scripts" ]; then cd Scripts && npm install && cd ..; fi
- name: Import GPG key
run: |
echo '${{ secrets.TERRAFORM_GPG_PRIVATE_KEY }}' > private.key
gpg --import private.key || true
rm private.key
echo "GPG key imported successfully"
gpg --export-secret-keys >~/.gnupg/secring.gpg
echo "GPG key exported successfully"
- name: Generate Terraform provider
run: npm run publish-terraform-provider -- --version "${{ steps.version.outputs.version }}" --github-token "${{ secrets.SIMLARSEN_GITHUB_PAT }}" --github-repo-deploy-key "${{ secrets.TERRAFORM_PROVIDER_GITHUB_REPO_DEPLOY_KEY }}" --test-release
publish-mcp-server:
runs-on: ubuntu-latest
needs: [generate-build-number]
env:
CI_PIPELINE_ID: ${{ github.run_number }}
permissions:
contents: write # For creating releases
packages: write # For publishing packages
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history for changelog generation
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: latest
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- name: Install Common dependencies
run: cd Common && npm install
- name: Install root dependencies
run: npm install
- name: Install Script dependencies
run: cd Scripts && npm install
- name: Determine version
id: version
run: |
VERSION="7.0.${{needs.generate-build-number.outputs.build_number}}-test"
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Publishing MCP server version: $VERSION"
- name: Verify MCP server directory
run: |
MCP_DIR="./MCP"
if [ ! -d "$MCP_DIR" ]; then
echo "❌ MCP server directory not found"
exit 1
fi
echo "✅ MCP server directory found"
echo "📊 Source files:"
find "$MCP_DIR" -type f -name "*.ts" -o -name "*.js" -o -name "*.json" | wc -l
echo "📁 Directory structure:"
ls -la "$MCP_DIR"
- name: Update package version
run: |
cd MCP
npm version ${{ steps.version.outputs.version }} --no-git-tag-version
- name: Install dependencies and build
run: |
cd MCP
npm update @oneuptime/common
npm install
npm run build
- name: Run tests
run: |
cd MCP
npm test || echo "No tests found or tests failed, continuing..."
- name: Publish to npm (dry run for test releases)
run: |
cd MCP
npm pack --dry-run
echo "✅ Dry run completed successfully for test release"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker images (test)
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
--file ./MCP/Dockerfile.tpl \
--tag oneuptime/mcp-server:${{ steps.version.outputs.version }} \
--tag oneuptime/mcp-server:test \
--tag ghcr.io/oneuptime/mcp-server:${{ steps.version.outputs.version }} \
--tag ghcr.io/oneuptime/mcp-server:test \
--build-arg GIT_SHA=${{ github.sha }} \
--build-arg APP_VERSION=${{ steps.version.outputs.version }} \
--push .
echo "✅ Pushed test Docker images to Docker Hub and GitHub Container Registry"
- name: Upload MCP server artifact
uses: actions/upload-artifact@v4
with:
name: mcp-server-${{ steps.version.outputs.version }}
path: ./MCP/
retention-days: 90
llm-docker-image-deploy:
needs: generate-build-number
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
@@ -974,67 +1147,6 @@ jobs:
GIT_SHA=${{ github.sha }}
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
haraka-docker-image-deploy:
needs: generate-build-number
runs-on: ubuntu-latest
steps:
- name: Docker Meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
oneuptime/haraka
ghcr.io/oneuptime/haraka
tags: |
type=raw,value=test,enable=true
type=semver,value=7.0.${{needs.generate-build-number.outputs.build_number}}-test,pattern={{version}},enable=true
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: actions/setup-node@v4
with:
node-version: latest
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Generate Dockerfile from Dockerfile.tpl
run: npm run prerun
# Build and deploy haraka.
- name: Login to Docker Hub
uses: docker/login-action@v2.2.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
file: ./Haraka/Dockerfile
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GIT_SHA=${{ github.sha }}
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
dashboard-docker-image-deploy:
needs: generate-build-number
runs-on: ubuntu-latest
@@ -1596,7 +1708,7 @@ jobs:
test-helm-chart:
runs-on: ubuntu-latest
needs: [infrastructure-agent-deploy, llm-docker-image-deploy, open-telemetry-ingest-docker-image-deploy, copilot-docker-image-deploy, docs-docker-image-deploy, worker-docker-image-deploy, workflow-docker-image-deploy, isolated-vm-docker-image-deploy, home-docker-image-deploy, api-reference-docker-image-deploy, test-server-docker-image-deploy, test-docker-image-deploy, probe-ingest-docker-image-deploy, server-monitor-ingest-docker-image-deploy, probe-docker-image-deploy, haraka-docker-image-deploy, dashboard-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, accounts-docker-image-deploy, otel-collector-docker-image-deploy, status-page-docker-image-deploy, nginx-docker-image-deploy, e2e-docker-image-deploy, fluent-ingest-docker-image-deploy, incoming-request-ingest-docker-image-deploy]
needs: [infrastructure-agent-deploy, publish-mcp-server, llm-docker-image-deploy, publish-terraform-provider, open-telemetry-ingest-docker-image-deploy, copilot-docker-image-deploy, docs-docker-image-deploy, worker-docker-image-deploy, workflow-docker-image-deploy, isolated-vm-docker-image-deploy, home-docker-image-deploy, api-reference-docker-image-deploy, test-server-docker-image-deploy, test-docker-image-deploy, probe-ingest-docker-image-deploy, server-monitor-ingest-docker-image-deploy, probe-docker-image-deploy, dashboard-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, accounts-docker-image-deploy, otel-collector-docker-image-deploy, status-page-docker-image-deploy, nginx-docker-image-deploy, e2e-docker-image-deploy, fluent-ingest-docker-image-deploy, incoming-request-ingest-docker-image-deploy]
env:
CI_PIPELINE_ID: ${{github.run_number}}
steps:

21
.github/workflows/test.mcp.yaml vendored Normal file
View File

@@ -0,0 +1,21 @@
name: MCP Server Test
on:
pull_request:
push:
branches-ignore:
- 'hotfix-*' # excludes hotfix branches
- 'release'
jobs:
test:
runs-on: ubuntu-latest
env:
CI_PIPELINE_ID: ${{github.run_number}}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
- run: cd Common && npm install
- run: cd MCP && npm install && npm run test

21
.gitignore vendored
View File

@@ -86,9 +86,6 @@ Backups/*.tar
.env
Haraka/dkim/keys/private_base64.txt
Haraka/dkim/keys/public_base64.txt
.eslintcache
HelmChart/Values/*.values.yaml
@@ -112,3 +109,21 @@ App/greenlock/greenlock.d/config.json
App/greenlock/greenlock.d/config.json.bak
Examples/otel-dotnet/bin/Debug/net6.0/Grpc.Core.Api.dll.txt
InfrastructureAgent/oneuptime-infrastructure-agent
# ESLint cache
.eslintcache*
# Terraform generated files
openapi.json
Terraform/**
TerraformTest/**
terraform-provider-example/**
# MCP Server
MCP/build/
MCP/.env
MCP/node_modules
Dashboard/public/sw.js

View File

@@ -1,6 +1,8 @@
{
"query": {
"name": "Hello",
// other filters
"age": {
"_type": "EqualTo",
value: 10
}
}
}

View File

@@ -0,0 +1,11 @@
{
"query": {
"labels": {
"_type": "Includes",
"value": [
"aaa00000-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"bbb00000-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
]
}
}
}

View File

@@ -65,6 +65,8 @@ CMD [ "npm", "run", "dev" ]
COPY ./APIReference /usr/src/app
# Bundle app source
RUN npm run compile
# Set permission to write logs and cache in case container run as non root
RUN chown -R 1000:1000 "/tmp/npm" && chmod -R 2777 "/tmp/npm"
#Run the app
CMD [ "npm", "start" ]
{{ end }}

View File

@@ -1,6 +1,7 @@
import AuthenticationServiceHandler from "./Service/Authentication";
import DataTypeServiceHandler from "./Service/DataType";
import ErrorServiceHandler from "./Service/Errors";
import OpenAPIServiceHandler from "./Service/OpenAPI";
import IntroductionServiceHandler from "./Service/Introduction";
import ModelServiceHandler from "./Service/Model";
import PageNotFoundServiceHandler from "./Service/PageNotFound";
@@ -65,6 +66,8 @@ const APIReferenceFeatureSet: FeatureSet = {
return ErrorServiceHandler.executeResponse(req, res);
} else if (req.params["page"] === "introduction") {
return IntroductionServiceHandler.executeResponse(req, res);
} else if (req.params["page"] === "openapi") {
return OpenAPIServiceHandler.executeResponse(req, res);
} else if (req.params["page"] === "status") {
return StatusServiceHandler.executeResponse(req, res);
} else if (req.params["page"] === "data-types") {

View File

@@ -88,6 +88,16 @@ export default class ServiceHandler {
},
);
pageData.includesCode = await LocalCache.getOrSetString(
"data-type",
"includes",
async () => {
return await LocalFile.read(
`${CodeExamplesPath}/DataTypes/Includes.md`,
);
},
);
pageData.lessThanOrNullCode = await LocalCache.getOrSetString(
"data-type",
"less-than-or-equal",

View File

@@ -77,6 +77,11 @@ export default class ServiceHandler {
continue;
}
if (tableColumns[key].hideColumnInDocumentation) {
delete tableColumns[key];
continue;
}
tableColumns[key].permissions = accessControl;
}

View File

@@ -0,0 +1,44 @@
import {
Host,
HttpProtocol,
IsBillingEnabled,
} from "Common/Server/EnvironmentConfig";
import { ViewsPath } from "../Utils/Config";
import ResourceUtil, { ModelDocumentation } from "../Utils/Resources";
import { ExpressRequest, ExpressResponse } from "Common/Server/Utils/Express";
import URL from "Common/Types/API/URL";
// Fetch a list of resources used in the application
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
export default class ServiceHandler {
// Handles the HTTP response for a given request
public static async executeResponse(
req: ExpressRequest,
res: ExpressResponse,
): Promise<void> {
let pageTitle: string = "";
let pageDescription: string = "";
// Get the 'page' parameter from the request
const page: string | undefined = req.params["page"];
const pageData: any = {
hostUrl: new URL(HttpProtocol, Host).toString(),
};
// Set the default page title and description
pageTitle = "OneUptime OpenAPI Specification";
pageDescription =
"Learn more about the OpenAPI specification for OneUptime";
// Render the response using the given view and data
return res.render(`${ViewsPath}/pages/index`, {
page: page,
resources: Resources,
pageTitle: pageTitle,
enableGoogleTagManager: IsBillingEnabled,
pageDescription: pageDescription,
pageData: pageData,
});
}
}

View File

@@ -1,17 +1,16 @@
{
"name": "@oneuptime/app",
"name": "@oneuptime/api-reference",
"version": "1.0.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@oneuptime/app",
"name": "@oneuptime/api-reference",
"version": "1.0.0",
"license": "Apache-2.0",
"dependencies": {
"Common": "file:../Common",
"ejs": "^3.1.9",
"handlebars": "^4.7.8",
"ts-node": "^10.9.1"
},
"devDependencies": {
@@ -26,8 +25,9 @@
"version": "1.0.0",
"license": "Apache-2.0",
"dependencies": {
"@asteasolutions/zod-to-openapi": "^7.3.2",
"@bull-board/express": "^5.21.4",
"@clickhouse/client": "^0.2.10",
"@clickhouse/client": "^1.10.1",
"@elastic/elasticsearch": "^8.12.1",
"@monaco-editor/react": "^4.4.6",
"@opentelemetry/api": "^1.9.0",
@@ -55,18 +55,19 @@
"@types/react-highlight": "^0.12.8",
"@types/react-syntax-highlighter": "^15.5.13",
"@types/uuid": "^8.3.4",
"@types/web-push": "^3.6.4",
"acme-client": "^5.3.0",
"airtable": "^0.12.2",
"axios": "^1.7.2",
"bullmq": "^5.3.3",
"Common": "file:../Common",
"cookie-parser": "^1.4.6",
"cookie-parser": "^1.4.7",
"cors": "^2.8.5",
"cron-parser": "^4.8.1",
"crypto-js": "^4.2.0",
"dotenv": "^16.4.4",
"ejs": "^3.1.10",
"express": "^4.19.2",
"esbuild": "^0.25.5",
"express": "^4.21.1",
"formik": "^2.4.6",
"history": "^5.3.0",
"ioredis": "^5.3.2",
@@ -74,7 +75,6 @@
"json5": "^2.2.3",
"jsonwebtoken": "^9.0.0",
"jwt-decode": "^4.0.0",
"lodash": "^4.17.21",
"marked": "^12.0.2",
"moment": "^2.30.1",
"moment-timezone": "^0.5.45",
@@ -82,6 +82,7 @@
"nodemailer": "^6.9.10",
"otpauth": "^9.3.1",
"pg": "^8.7.3",
"playwright": "^1.50.0",
"posthog-js": "^1.139.6",
"prop-types": "^15.8.1",
"qrcode": "^1.5.3",
@@ -104,6 +105,7 @@
"redis-semaphore": "^5.5.1",
"reflect-metadata": "^0.2.2",
"remark-gfm": "^3.0.1",
"slackify-markdown": "^4.4.0",
"slugify": "^1.6.5",
"socket.io": "^4.7.4",
"socket.io-client": "^4.7.5",
@@ -113,9 +115,11 @@
"twilio": "^4.22.0",
"typeorm": "^0.3.20",
"typeorm-extension": "^2.2.13",
"universal-cookie": "^4.0.4",
"universal-cookie": "^7.2.1",
"use-async-effect": "^2.2.6",
"uuid": "^8.3.2"
"uuid": "^8.3.2",
"web-push": "^3.6.7",
"zod": "^3.25.30"
},
"devDependencies": {
"@faker-js/faker": "^8.0.2",
@@ -129,7 +133,6 @@
"@types/jest": "^28.1.4",
"@types/json2csv": "^5.0.3",
"@types/jsonwebtoken": "^8.5.9",
"@types/lodash": "^4.14.202",
"@types/node": "^17.0.45",
"@types/node-cron": "^3.0.7",
"@types/nodemailer": "^6.4.7",
@@ -143,6 +146,7 @@
"jest-environment-jsdom": "^29.7.0",
"jest-mock-extended": "^3.0.5",
"react-test-renderer": "^18.2.0",
"sass": "^1.89.2",
"ts-jest": "^28.0.5"
}
},
@@ -2378,26 +2382,6 @@
"integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
"dev": true
},
"node_modules/handlebars": {
"version": "4.7.8",
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz",
"integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==",
"dependencies": {
"minimist": "^1.2.5",
"neo-async": "^2.6.2",
"source-map": "^0.6.1",
"wordwrap": "^1.0.0"
},
"bin": {
"handlebars": "bin/handlebars"
},
"engines": {
"node": ">=0.4.7"
},
"optionalDependencies": {
"uglify-js": "^3.1.4"
}
},
"node_modules/has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
@@ -3445,14 +3429,6 @@
"node": "*"
}
},
"node_modules/minimist": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/ms": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@@ -3465,11 +3441,6 @@
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
"dev": true
},
"node_modules/neo-async": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
"integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw=="
},
"node_modules/node-int64": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz",
@@ -3961,6 +3932,7 @@
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
@@ -4243,18 +4215,6 @@
"node": ">=14.17"
}
},
"node_modules/uglify-js": {
"version": "3.17.4",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz",
"integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==",
"optional": true,
"bin": {
"uglifyjs": "bin/uglifyjs"
},
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/undefsafe": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.5.tgz",
@@ -4340,11 +4300,6 @@
"node": ">= 8"
}
},
"node_modules/wordwrap": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
"integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q=="
},
"node_modules/wrap-ansi": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",

View File

@@ -32,7 +32,7 @@
<p>You can use OneUptime API Key on Request Header when you're making a request. You can use <code
class="rounded p-0.5 px-1 text-sm text-gray-500 bg-gray-100 border-2 border-gray-200">Authorization</code>
header with your API Key when you make a request.</p>
<%- include('../partials/code', {title: "Example request with API Key" , requestUrl: "" , requestType: "" , code: "curl --header \"ApiKey: {secret-api-key}\" --header \"ProjectID: {project-id}\" https://oneuptime.com/api/\<path\>" }) -%>
<%- include('../partials/code', {title: "Example request with API Key" , requestUrl: "" , requestType: "" , code: "curl --header \"ApiKey: {secret-api-key}\" https://oneuptime.com/api/\<path\>" }) -%>
<p class="text-sm">Please don't commit your OneUptime API Key to GitHub, or on any other source control
project. Please regenerate a new API Key, if your API Key is committed by mistake.</p>
</article>

View File

@@ -115,7 +115,7 @@
<dd class="font-mono text-xs text-zinc-400 ">Query</dd>
<dt class="sr-only">Description</dt>
<dd class="w-full flex-none [&amp;>:first-child]:mt-0 [&amp;>:last-child]:mb-0">
<p>Here is an example of Equal To Query</p>
<p>Here is an example of an Equal To Query</p>
</dd>
</dl>
</li>
@@ -153,7 +153,7 @@
<dd class="font-mono text-xs text-zinc-400 ">Query</dd>
<dt class="sr-only">Description</dt>
<dd class="w-full flex-none [&amp;>:first-child]:mt-0 [&amp;>:last-child]:mb-0">
<p>Here is an example of Not Equal To Query</p>
<p>Here is an example of a Not Equal To Query</p>
</dd>
</dl>
</li>
@@ -191,7 +191,7 @@
<dd class="font-mono text-xs text-zinc-400 ">Query</dd>
<dt class="sr-only">Description</dt>
<dd class="w-full flex-none [&amp;>:first-child]:mt-0 [&amp;>:last-child]:mb-0">
<p>Here is an example of is null query</p>
<p>Here is an example of an is null query</p>
</dd>
</dl>
</li>
@@ -229,7 +229,7 @@
<dd class="font-mono text-xs text-zinc-400 ">Query</dd>
<dt class="sr-only">Description</dt>
<dd class="w-full flex-none [&amp;>:first-child]:mt-0 [&amp;>:last-child]:mb-0">
<p>Here is an example of is not null query</p>
<p>Here is an example of an is not null query</p>
</dd>
</dl>
</li>
@@ -266,7 +266,7 @@
<dd class="font-mono text-xs text-zinc-400 ">Query</dd>
<dt class="sr-only">Description</dt>
<dd class="w-full flex-none [&amp;>:first-child]:mt-0 [&amp;>:last-child]:mb-0">
<p>Here is an example of greater than query</p>
<p>Here is an example of a greater than query</p>
</dd>
</dl>
</li>
@@ -304,7 +304,7 @@
<dd class="font-mono text-xs text-zinc-400 ">Query</dd>
<dt class="sr-only">Description</dt>
<dd class="w-full flex-none [&amp;>:first-child]:mt-0 [&amp;>:last-child]:mb-0">
<p>Here is an example of greater or equal than query</p>
<p>Here is an example of a greater than or equal query</p>
</dd>
</dl>
</li>
@@ -342,7 +342,7 @@
<dd class="font-mono text-xs text-zinc-400 ">Query</dd>
<dt class="sr-only">Description</dt>
<dd class="w-full flex-none [&amp;>:first-child]:mt-0 [&amp;>:last-child]:mb-0">
<p>Here is an example of less than query</p>
<p>Here is an example of a less than query</p>
</dd>
</dl>
</li>
@@ -380,7 +380,7 @@
<dd class="font-mono text-xs text-zinc-400 ">Query</dd>
<dt class="sr-only">Description</dt>
<dd class="w-full flex-none [&amp;>:first-child]:mt-0 [&amp;>:last-child]:mb-0">
<p>Here is an example of less or equal than query</p>
<p>Here is an example of a less than or equal query</p>
</dd>
</dl>
</li>
@@ -395,5 +395,44 @@
</div>
</div>
<h3 id="example-using-cursors" class="scroll-mt-24">
Inlcudes
</h3>
<div class="grid grid-cols-1 items-start gap-x-16 gap-y-10 xl:max-w-none xl:grid-cols-2">
<div class="[&amp;>:first-child]:mt-0 [&amp;>:last-child]:mb-0">
<p>
Includes will get objects that match any of the values in the array. It is used to
filter objects that have a field that matches any of the values in the array. For example, if you
want to get all objects that have a label with ID `aaa00000-aaaa-aaaa-aaaa-aaaaaaaaaaaa` or
`bbb00000-bbbb-bbbb-bbbb-bbbbbbbbbbbb`, you can use the `includes` query type.
</p>
<div class="my-6">
<ul role="list"
class="m-0 max-w-[calc(theme(maxWidth.lg)-theme(spacing.8))] list-none divide-y divide-zinc-900/5 p-0 ">
<li class="m-0 px-0 py-4 first:pt-0 last:pb-0">
<dl class="m-0 flex flex-wrap items-center gap-x-3 gap-y-2">
<dt class="sr-only">Query</dt>
<dd><code class="inline-code">query</code></dd>
<dt class="sr-only">Type</dt>
<dd class="font-mono text-xs text-zinc-400 ">Query</dd>
<dt class="sr-only">Description</dt>
<dd class="w-full flex-none [&amp;>:first-child]:mt-0 [&amp;>:last-child]:mb-0">
<p>Here is an example of a less than or equal query</p>
</dd>
</dl>
</li>
</ul>
</div>
</div>
<div class="[&amp;>:first-child]:mt-0 [&amp;>:last-child]:mb-0">
<%- include('../partials/code', {title: "Example Not EqualTo Request Body" , requestUrl: "" , requestType: "" ,
code: pageData.includesCode }) -%>
</div>
</div>
</article>
</main>

View File

@@ -0,0 +1,53 @@
<main class="py-16">
<article class="prose ">
<h1>OneUptime OpenAPI Specification</h1>
<p class="lead">In this guide, we will look at how to import and work with the OneUptime OpenAPI specification. The OpenAPI spec provides a comprehensive reference for all available API endpoints.</p>
<p>The OneUptime API follows the OpenAPI 3.0 specification, which provides a standardized way to describe REST APIs. You can import our OpenAPI spec into various tools like Swagger Editor, Postman, or other API documentation tools to explore and test our endpoints.</p>
<h2 id="importing-spec" class="scroll-mt-24">
Importing the OpenAPI Spec
</h2>
<div class="grid grid-cols-1 items-start gap-x-16 gap-y-10">
<div class="[&amp;>:first-child]:mt-0 [&amp;>:last-child]:mb-0">
<p>To import the OneUptime OpenAPI specification into Swagger Editor, follow these simple steps:</p>
<div class="my-6">
<ol class="list-decimal pl-6">
<li class="mb-2">Open <a href="https://editor.swagger.io" target="_blank" class="text-blue-600 hover:text-blue-800">editor.swagger.io</a> in your web browser</li>
<li class="mb-2">Click on <strong>File</strong> in the menu bar</li>
<li class="mb-2">Select <strong>Import URL</strong> from the dropdown menu</li>
<li class="mb-2">Enter the URL: <code class="inline-code"><%= pageData.hostUrl %>api/openapi/spec</code></li>
<li class="mb-2">Click <strong>Import</strong> to load the specification</li>
</ol>
</div>
<h2 id="spec-url" class="scroll-mt-24">
Specification URL
</h2>
<div class="my-6">
<ul role="list"
class="m-0 list-none divide-y divide-zinc-900/5 p-0 ">
<li class="m-0 px-0 py-4 first:pt-0 last:pb-0">
<dl class="m-0 flex flex-wrap items-center gap-x-3 gap-y-2">
<dt class="sr-only">Endpoint</dt>
<dd><code class="inline-code"><%= pageData.hostUrl %>api/openapi/spec</code></dd>
<dt class="sr-only">Description</dt>
<dd class="w-full flex-none [&amp;>:first-child]:mt-0 [&amp;>:last-child]:mb-0">
<p>Complete OpenAPI 3.0 specification for the OneUptime API including all endpoints, request/response schemas, and authentication methods.</p>
</dd>
</dl>
</li>
</ul>
</div>
<h2 id="benefits" class="scroll-mt-24">
Benefits of Using the OpenAPI Spec
</h2>
<div class="my-6">
<ul class="list-disc pl-6">
<li class="mb-2"><strong>Interactive Documentation:</strong> Test API endpoints directly in Swagger Editor</li>
<li class="mb-2"><strong>Code Generation:</strong> Generate client SDKs in multiple programming languages</li>
<li class="mb-2"><strong>Validation:</strong> Ensure your requests match the expected schema</li>
<li class="mb-2"><strong>Import to Tools:</strong> Use with Postman, Insomnia, or other API testing tools</li>
</ul>
</div>
</div>
</div>
</article>
</main>

View File

@@ -13,7 +13,7 @@
</h2>
<div class="grid grid-cols-1 items-start gap-x-16 gap-y-10 xl:max-w-none xl:grid-cols-2">
<div class="[&amp;>:first-child]:mt-0 [&amp;>:last-child]:mb-0">
<p>In this example, we request the list fo monitors. As a result, we get a list of three monitors and can
<p>In this example, we request the list of monitors. As a result, we get a list of three monitors and can
tell by the <code class="inline-code">count</code> attribute that we have reached the end of the
result set</p>
<h2 id="example-using-cursors" class="scroll-mt-24">

View File

@@ -146,6 +146,9 @@
with us on Slack</a></li>
<li><a class="text-sm leading-5 text-zinc-600 transition hover:text-zinc-900 "
href="/support">Support</a></li>
<li><a class="text-sm leading-5 text-zinc-600 transition hover:text-zinc-900 "
href="/reference/openapi" type="_blank">OpenAPI Spec</a></li>
<li><a class="text-sm leading-5 text-zinc-600 transition hover:text-zinc-900 "
href="https://github.com/oneuptime/oneuptime">GitHub</a></li>
</ul>
@@ -232,6 +235,10 @@
class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 "
href="/reference/errors"><span class="truncate">Errors</span></a></li>
<li class="relative" style="transform: none; transform-origin: 50% 50% 0px;"><a
class="flex justify-between gap-2 py-1 pr-3 text-sm transition pl-4 text-zinc-600 hover:text-zinc-900 "
href="/reference/openapi"><span class="truncate">OpenAPI Spec</span></a></li>
</ul>
</div>

View File

@@ -69,12 +69,11 @@ RUN npm install
# - 3003: accounts
EXPOSE 3003
RUN npm i -D webpack-cli
{{ if eq .Env.ENVIRONMENT "development" }}
RUN mkdir /usr/src/app/dev-env
RUN touch /usr/src/app/dev-env/.env
RUN npm i -D webpack-dev-server
#Run the app
CMD [ "npm", "run", "dev" ]
@@ -84,6 +83,8 @@ COPY ./Accounts /usr/src/app
# Bundle app source
RUN npm run build
# Set permission to write logs and cache in case container run as non root
RUN chown -R 1000:1000 "/tmp/npm" && chmod -R 2777 "/tmp/npm"
#Run the app
CMD [ "npm", "start" ]
{{ end }}

View File

@@ -35,7 +35,7 @@ See the section about [deployment](https://facebook.github.io/create-react-app/d
If you arent satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point youre on your own.
Instead, it will copy all the configuration files and the transitive dependencies ( Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point youre on your own.
You dont have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldnt feel obligated to use this feature. However we understand that this tool wouldnt be useful if you couldnt customize it when you are ready for it.

View File

@@ -0,0 +1,12 @@
const { createConfig, build, watch } = require('Common/UI/esbuild-config');
const config = createConfig({
serviceName: 'Accounts',
publicPath: '/accounts/dist/',
});
if (process.argv.includes('--watch')) {
watch(config, 'Accounts');
} else {
build(config, 'Accounts');
}

View File

@@ -4,13 +4,11 @@
"ignore": [
"./public/**",
"./public/dist/**",
"./dev-env/*",
"./dev-env/.env",
"./build/*",
"./build/**",
"./build/dist/*",
"./build/dist/**",
"../Common/Server/**"
],
"exec": "printenv > /usr/src/app/dev-env/.env && echo 'HOST=localhost' >> /usr/src/app/dev-env/.env && echo 'USE_HTTPS=false' >> /usr/src/app/dev-env/.env && npm run dev-build && npm run start"
"exec": "npm run dev-build && npm run start"
}

File diff suppressed because it is too large Load Diff

View File

@@ -3,9 +3,10 @@
"version": "0.1.0",
"private": false,
"scripts": {
"dev-build": "webpack build --mode=development",
"dev-build": "NODE_ENV=development node esbuild.config.js",
"dev": "npx nodemon",
"build": "webpack build --mode=production",
"build": "NODE_ENV=production node esbuild.config.js",
"analyze": "analyze=true NODE_ENV=production node esbuild.config.js",
"test": "",
"compile": "tsc",
"clear-modules": "rm -rf node_modules && rm package-lock.json && npm install",
@@ -28,16 +29,11 @@
},
"dependencies": {
"Common": "file:../Common",
"css-loader": "^6.11.0",
"dotenv": "^16.4.5",
"ejs": "^3.1.10",
"file-loader": "^6.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.23.1",
"sass-loader": "^13.3.3",
"style-loader": "^3.3.4",
"ts-loader": "^9.5.1",
"use-async-effect": "^2.2.7"
},
"devDependencies": {
@@ -46,7 +42,7 @@
"@types/react-dom": "^18.0.4",
"@types/react-router-dom": "^5.3.3",
"nodemon": "^2.0.20",
"ts-node": "^10.9.1",
"webpack": "^5.76.0"
"ts-node": "^10.9.1"
}
}

View File

@@ -1,12 +1,4 @@
import ForgotPasswordPage from "./Pages/ForgotPassword";
import LoginPage from "./Pages/Login";
import LoginWithSSO from "./Pages/LoginWithSSO";
import NotFound from "./Pages/NotFound";
import RegisterPage from "./Pages/Register";
import ResetPasswordPage from "./Pages/ResetPassword";
import VerifyEmail from "./Pages/VerifyEmail";
import Navigation from "Common/UI/Utils/Navigation";
import React, { ReactElement } from "react";
import React, { ReactElement, lazy, Suspense } from "react";
import {
Route,
Routes,
@@ -14,6 +6,38 @@ import {
useNavigate,
useParams,
} from "react-router-dom";
import Navigation from "Common/UI/Utils/Navigation";
import PageLoader from "Common/UI/Components/Loader/PageLoader";
// Lazy load page components
const ForbiddenPage: React.LazyExoticComponent<() => JSX.Element> = lazy(() => {
return import("./Pages/Forbidden");
});
const ForgotPasswordPage: React.LazyExoticComponent<() => JSX.Element> = lazy(
() => {
return import("./Pages/ForgotPassword");
},
);
const LoginPage: React.LazyExoticComponent<() => JSX.Element> = lazy(() => {
return import("./Pages/Login");
});
const LoginWithSSO: React.LazyExoticComponent<() => JSX.Element> = lazy(() => {
return import("./Pages/LoginWithSSO");
});
const NotFound: React.LazyExoticComponent<() => JSX.Element> = lazy(() => {
return import("./Pages/NotFound");
});
const RegisterPage: React.LazyExoticComponent<() => JSX.Element> = lazy(() => {
return import("./Pages/Register");
});
const ResetPasswordPage: React.LazyExoticComponent<() => JSX.Element> = lazy(
() => {
return import("./Pages/ResetPassword");
},
);
const VerifyEmail: React.LazyExoticComponent<() => JSX.Element> = lazy(() => {
return import("./Pages/VerifyEmail");
});
function App(): ReactElement {
Navigation.setNavigateHook(useNavigate());
@@ -22,24 +46,29 @@ function App(): ReactElement {
return (
<div className="m-auto h-screen">
<Routes>
<Route path="/accounts" element={<LoginPage />} />
<Route path="/accounts/login" element={<LoginPage />} />
<Route path="/accounts/sso" element={<LoginWithSSO />} />
<Route
path="/accounts/forgot-password"
element={<ForgotPasswordPage />}
/>
<Route
path="/accounts/reset-password/:token"
element={<ResetPasswordPage />}
/>
<Route path="/accounts/register" element={<RegisterPage />} />
<Route path="/accounts/verify-email/:token" element={<VerifyEmail />} />
{/* 👇️ only match this when no other routes match */}
<Route path="*" element={<NotFound />} />
</Routes>
<Suspense fallback={<PageLoader isVisible={true} />}>
<Routes>
<Route path="/accounts" element={<LoginPage />} />
<Route path="/accounts/login" element={<LoginPage />} />
<Route path="/accounts/forbidden" element={<ForbiddenPage />} />
<Route path="/accounts/sso" element={<LoginWithSSO />} />
<Route
path="/accounts/forgot-password"
element={<ForgotPasswordPage />}
/>
<Route
path="/accounts/reset-password/:token"
element={<ResetPasswordPage />}
/>
<Route path="/accounts/register" element={<RegisterPage />} />
<Route
path="/accounts/verify-email/:token"
element={<VerifyEmail />}
/>
{/* 👇️ only match this when no other routes match */}
<Route path="*" element={<NotFound />} />
</Routes>
</Suspense>
</div>
);
}

View File

@@ -0,0 +1,18 @@
import React from "react";
const ForbiddenPage: () => JSX.Element = () => {
return (
<div className="flex min-h-full flex-col justify-center py-12 sm:px-6 lg:px-8">
<div className="sm:mx-auto sm:w-full sm:max-w-md">
<h2 className="mt-6 text-center text-2xl tracking-tight text-gray-900">
Forbidden
</h2>
<p className="mt-2 text-center text-sm text-gray-600">
You do not have permission to access this page.
</p>
</div>
</div>
);
};
export default ForbiddenPage;

View File

@@ -56,6 +56,7 @@ const ForgotPassword: () => JSX.Element = () => {
title: "Email",
fieldType: FormFieldSchemaType.Email,
required: true,
disableSpellCheck: true,
},
]}
onSuccess={() => {

View File

@@ -122,6 +122,7 @@ const LoginPage: () => JSX.Element = () => {
disabled: Boolean(initialValues && initialValues["email"]),
title: "Email",
dataTestId: "email",
disableSpellCheck: true,
},
{
field: {
@@ -139,6 +140,7 @@ const LoginPage: () => JSX.Element = () => {
openLinkInNewTab: false,
},
dataTestId: "password",
disableSpellCheck: true,
},
]}
createOrUpdateApiUrl={apiUrl}

View File

@@ -196,6 +196,7 @@ const LoginPage: () => JSX.Element = () => {
required: true,
title: "Email",
dataTestId: "email",
disableSpellCheck: true,
},
]}
maxPrimaryButtonWidth={true}

View File

@@ -104,6 +104,7 @@ const RegisterPage: () => JSX.Element = () => {
disabled: Boolean(initialValues && initialValues["email"]),
title: "Email",
dataTestId: "email",
disableSpellCheck: true,
},
{
field: {
@@ -114,6 +115,7 @@ const RegisterPage: () => JSX.Element = () => {
required: true,
title: "Full Name",
dataTestId: "name",
disableSpellCheck: true,
},
];
@@ -128,6 +130,7 @@ const RegisterPage: () => JSX.Element = () => {
required: true,
title: "Company Name",
dataTestId: "companyName",
disableSpellCheck: true,
},
]);
@@ -159,6 +162,7 @@ const RegisterPage: () => JSX.Element = () => {
title: "Password",
required: true,
dataTestId: "password",
disableSpellCheck: true,
},
{
field: {
@@ -175,6 +179,7 @@ const RegisterPage: () => JSX.Element = () => {
required: true,
showEvenIfPermissionDoesNotExist: true,
dataTestId: "confirmPassword",
disableSpellCheck: true,
},
]);

View File

@@ -68,6 +68,7 @@ const RegisterPage: () => JSX.Element = () => {
title: "New Password",
required: true,
showEvenIfPermissionDoesNotExist: true,
disableSpellCheck: true,
},
{
field: {
@@ -83,6 +84,7 @@ const RegisterPage: () => JSX.Element = () => {
overrideFieldKey: "confirmPassword",
required: true,
showEvenIfPermissionDoesNotExist: true,
disableSpellCheck: true,
},
]}
createOrUpdateApiUrl={apiUrl}

View File

@@ -106,7 +106,7 @@
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script src="/accounts/dist/bundle.js"></script>
<script type="module" src="/accounts/dist/Index.js"></script>
<script>
tailwind.config = {
theme: {

View File

@@ -1,70 +0,0 @@
require("ts-loader");
require("file-loader");
require("style-loader");
require("css-loader");
require("sass-loader");
const path = require("path");
const webpack = require("webpack");
const dotenv = require("dotenv");
require('ejs');
const readEnvFile = (pathToFile) => {
const parsed = dotenv.config({ path: pathToFile }).parsed;
const env = {};
for (const key in parsed) {
env[key] = JSON.stringify(parsed[key]);
}
return env;
};
module.exports = {
entry: "./src/Index.tsx",
mode: "development",
output: {
filename: "bundle.js",
path: path.resolve(__dirname, "public", "dist"),
publicPath: "/accounts/dist/",
},
resolve: {
extensions: [".ts", ".tsx", ".js", ".jsx", ".json", ".css", ".scss"],
alias: {
react: path.resolve("./node_modules/react"),
},
},
externals: {
"react-native-sqlite-storage": "react-native-sqlite-storage",
},
plugins: [
new webpack.DefinePlugin({
process: {
env: {
...readEnvFile("/usr/src/app/dev-env/.env"),
},
},
}),
],
module: {
rules: [
{
test: /\.(ts|tsx)$/,
use: "ts-loader",
},
{
test: /\.s[ac]ss$/i,
use: ["style-loader", "css-loader", "sass-loader"],
},
{
test: /\.css$/i,
use: ["style-loader", "css-loader"],
},
{
test: /\.(jpe?g|png|gif|svg)$/i,
loader: "file-loader",
},
],
},
devtool: "eval-source-map",
};

View File

@@ -67,19 +67,20 @@ RUN npm install
# - 3158: AdminDashboard
EXPOSE 3158
RUN npm i -D webpack-cli
{{ if eq .Env.ENVIRONMENT "development" }}
#Run the app
RUN mkdir /usr/src/app/dev-env
RUN touch /usr/src/app/dev-env/.env
RUN npm i -D webpack-dev-server
CMD [ "npm", "run", "dev" ]
{{ else }}
# Copy app source
COPY ./AdminDashboard /usr/src/app
# Bundle app source
RUN npm run build
# Set permission to write logs and cache in case container run as non root
RUN chown -R 1000:1000 "/tmp/npm" && chmod -R 2777 "/tmp/npm"
#Run the app
CMD [ "npm", "start" ]
{{ end }}

View File

@@ -35,7 +35,7 @@ See the section about [deployment](https://facebook.github.io/create-react-app/d
If you arent satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point youre on your own.
Instead, it will copy all the configuration files and the transitive dependencies ( Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point youre on your own.
You dont have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldnt feel obligated to use this feature. However we understand that this tool wouldnt be useful if you couldnt customize it when you are ready for it.

View File

@@ -0,0 +1,12 @@
const { createConfig, build, watch } = require('Common/UI/esbuild-config');
const config = createConfig({
serviceName: 'AdminDashboard',
publicPath: '/admin/dist/',
});
if (process.argv.includes('--watch')) {
watch(config, 'AdminDashboard');
} else {
build(config, 'AdminDashboard');
}

View File

@@ -4,13 +4,11 @@
"ignore": [
"./public/**",
"./public/dist/**",
"./dev-env/*",
"./dev-env/.env",
"./build/*",
"./build/**",
"./build/dist/*",
"./build/dist/**",
"../Common/Server/**"
],
"exec": "printenv > /usr/src/app/dev-env/.env && echo 'HOST=localhost' >> /usr/src/app/dev-env/.env && echo 'USE_HTTPS=false' >> /usr/src/app/dev-env/.env && npm run dev-build && npm run start"
"exec": " npm run dev-build && npm run start"
}

File diff suppressed because it is too large Load Diff

View File

@@ -4,20 +4,19 @@
"private": false,
"dependencies": {
"Common": "file:../Common",
"dotenv": "^16.4.5",
"ejs": "^3.1.10",
"file-loader": "^6.2.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.23.1",
"style-loader": "^3.3.4"
"react-router-dom": "^6.23.1"
},
"scripts": {
"dev-build": "webpack build --mode=development",
"dev-build": "NODE_ENV=development node esbuild.config.js",
"dev": "npx nodemon",
"build": "webpack build --mode=production",
"build": "NODE_ENV=production node esbuild.config.js",
"analyze": "analyze=true NODE_ENV=production node esbuild.config.js",
"test": "react-app-rewired test",
"eject": "webpack eject",
"eject": "echo 'esbuild does not require eject'",
"compile": "tsc",
"clear-modules": "rm -rf node_modules && rm package-lock.json && npm install",
"start": "node --require ts-node/register Serve.ts",
@@ -42,13 +41,8 @@
"@types/react": "^18.2.38",
"@types/react-dom": "^18.0.4",
"@types/react-router-dom": "^5.3.3",
"css-loader": "^6.8.1",
"nodemon": "^2.0.20",
"react-app-rewired": "^2.2.1",
"sass": "^1.51.0",
"sass-loader": "^12.6.0",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.1",
"webpack": "^5.76.0"
"ts-node": "^10.9.1"
}
}

View File

@@ -67,7 +67,7 @@ const DashboardFooter: () => JSX.Element = () => {
return (
<>
<Footer
className="bg-white h-16 inset-x-0 bottom-0 px-8"
className="bg-white px-8"
copyright="HackerBay, Inc."
links={[
{

View File

@@ -17,7 +17,9 @@ const Logo: FunctionComponent<ComponentProps> = (
<Image
className="block h-8 w-auto"
onClick={() => {
props.onClick && props.onClick();
if (props.onClick) {
props.onClick();
}
}}
imageUrl={Route.fromString(`${OneUptimeLogo}`)}
alt={"OneUptime"}

View File

@@ -2,36 +2,33 @@ import PageMap from "../../Utils/PageMap";
import RouteMap, { RouteUtil } from "../../Utils/RouteMap";
import Route from "Common/Types/API/Route";
import IconProp from "Common/Types/Icon/IconProp";
import NavBar from "Common/UI/Components/Navbar/NavBar";
import NavBarItem from "Common/UI/Components/Navbar/NavBarItem";
import NavBar, { NavItem } from "Common/UI/Components/Navbar/NavBar";
import React, { FunctionComponent, ReactElement } from "react";
const DashboardNavbar: FunctionComponent = (): ReactElement => {
return (
<NavBar>
<NavBarItem
title="Users"
icon={IconProp.User}
route={RouteUtil.populateRouteParams(RouteMap[PageMap.USERS] as Route)}
></NavBarItem>
// Build the navigation items
const navItems: NavItem[] = [
{
id: "users-nav-bar-item",
title: "Users",
icon: IconProp.User,
route: RouteUtil.populateRouteParams(RouteMap[PageMap.USERS] as Route),
},
{
id: "projects-nav-bar-item",
title: "Projects",
icon: IconProp.Folder,
route: RouteUtil.populateRouteParams(RouteMap[PageMap.PROJECTS] as Route),
},
{
id: "settings-nav-bar-item",
title: "Settings",
icon: IconProp.Settings,
route: RouteUtil.populateRouteParams(RouteMap[PageMap.SETTINGS] as Route),
},
];
<NavBarItem
title="Projects"
icon={IconProp.Folder}
route={RouteUtil.populateRouteParams(
RouteMap[PageMap.PROJECTS] as Route,
)}
></NavBarItem>
<NavBarItem
title="Settings"
icon={IconProp.Settings}
route={RouteUtil.populateRouteParams(
RouteMap[PageMap.SETTINGS] as Route,
)}
></NavBarItem>
</NavBar>
);
return <NavBar items={navItems} />;
};
export default DashboardNavbar;

View File

@@ -16,7 +16,7 @@ const Logout: FunctionComponent = (): ReactElement => {
const logout: PromiseVoidFunction = async (): Promise<void> => {
UiAnalytics.logout();
await UserUtil.logout();
UserUtil.logout();
Navigation.navigate(ACCOUNTS_URL);
};

View File

@@ -241,6 +241,7 @@ const Projects: FunctionComponent = (): ReactElement => {
},
title: "Created At",
type: FieldType.DateTime,
hideOnMobile: true,
},
]}
userPreferencesKey="admin-projects-table"

View File

@@ -21,7 +21,7 @@ import React, { FunctionComponent, ReactElement, useEffect } from "react";
const Settings: FunctionComponent = (): ReactElement => {
const [emailServerType, setemailServerType] = React.useState<EmailServerType>(
EmailServerType.Internal,
EmailServerType.CustomSMTP,
);
const [isLoading, setIsLoading] = React.useState<boolean>(true);
@@ -43,7 +43,7 @@ const Settings: FunctionComponent = (): ReactElement => {
if (globalConfig) {
setemailServerType(
globalConfig.emailServerType || EmailServerType.Internal,
globalConfig.emailServerType || EmailServerType.CustomSMTP,
);
}
@@ -106,6 +106,7 @@ const Settings: FunctionComponent = (): ReactElement => {
title: "Admin Notification Email",
fieldType: FormFieldSchemaType.Email,
required: false,
disableSpellCheck: true,
},
]}
modelDetailProps={{
@@ -126,7 +127,7 @@ const Settings: FunctionComponent = (): ReactElement => {
/>
<CardModelDetail
name="Internal SMTP Settings"
name="Email Server Settings"
cardProps={{
title: "Email Server Settings",
description:
@@ -171,7 +172,7 @@ const Settings: FunctionComponent = (): ReactElement => {
cardProps={{
title: "Custom Email and SMTP Settings",
description:
"If you have not enabled Internal SMTP server to send emails. Please configure your SMTP server here.",
"Please configure your SMTP server here to send emails.",
}}
isEditable={true}
editButtonText="Edit SMTP Config"
@@ -199,6 +200,7 @@ const Settings: FunctionComponent = (): ReactElement => {
fieldType: FormFieldSchemaType.Hostname,
required: true,
placeholder: "smtp.server.com",
disableSpellCheck: true,
},
{
field: {
@@ -229,6 +231,7 @@ const Settings: FunctionComponent = (): ReactElement => {
fieldType: FormFieldSchemaType.Text,
required: false,
placeholder: "emailuser",
disableSpellCheck: true,
},
{
field: {
@@ -239,6 +242,7 @@ const Settings: FunctionComponent = (): ReactElement => {
fieldType: FormFieldSchemaType.EncryptedText,
required: false,
placeholder: "Password",
disableSpellCheck: true,
},
{
field: {
@@ -251,6 +255,7 @@ const Settings: FunctionComponent = (): ReactElement => {
description:
"Email used to log in to this SMTP Server. This is also the email your customers will see. ",
placeholder: "email@company.com",
disableSpellCheck: true,
},
{
field: {
@@ -263,6 +268,7 @@ const Settings: FunctionComponent = (): ReactElement => {
description:
"This is the display name your team and customers see, when they receive emails from OneUptime.",
placeholder: "Company, Inc.",
disableSpellCheck: true,
},
]}
modelDetailProps={{

View File

@@ -54,6 +54,7 @@ const Settings: FunctionComponent = (): ReactElement => {
title="Need help with setting up Global Probes?"
description="Here is a guide which will help you get set up"
link={Route.fromString("/docs/probe/custom-probe")}
hideOnMobile={true}
/>
<ModelTable<Probe>
@@ -152,7 +153,7 @@ const Settings: FunctionComponent = (): ReactElement => {
description: true,
},
title: "Description",
type: FieldType.Text,
type: FieldType.LongText,
},
]}
columns={[
@@ -173,7 +174,8 @@ const Settings: FunctionComponent = (): ReactElement => {
},
noValueMessage: "-",
title: "Description",
type: FieldType.Text,
type: FieldType.LongText,
hideOnMobile: true,
},
{
field: {
@@ -181,6 +183,7 @@ const Settings: FunctionComponent = (): ReactElement => {
},
title: "Status",
type: FieldType.Text,
getElement: (item: Probe): ReactElement => {
if (
item &&

View File

@@ -48,6 +48,7 @@ const Users: FunctionComponent = (): ReactElement => {
fieldType: FormFieldSchemaType.Email,
required: true,
placeholder: "email@company.com",
disableSpellCheck: true,
},
{
field: {
@@ -57,6 +58,7 @@ const Users: FunctionComponent = (): ReactElement => {
fieldType: FormFieldSchemaType.Password,
required: true,
placeholder: "Password",
disableSpellCheck: true,
},
{
field: {
@@ -114,6 +116,7 @@ const Users: FunctionComponent = (): ReactElement => {
},
title: "Email Verified",
type: FieldType.Boolean,
hideOnMobile: true,
},
{
field: {
@@ -121,6 +124,7 @@ const Users: FunctionComponent = (): ReactElement => {
},
title: "Created At",
type: FieldType.DateTime,
hideOnMobile: true,
},
]}
/>

View File

@@ -100,7 +100,7 @@
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script src="/admin/dist/bundle.js"></script>
<script type="module" src="/admin/dist/Index.js"></script>
<script>
tailwind.config = {
theme: {

View File

@@ -1,70 +0,0 @@
require("ts-loader");
require("file-loader");
require("style-loader");
require("css-loader");
require("sass-loader");
require('ejs');
const path = require("path");
const webpack = require("webpack");
const dotenv = require("dotenv");
const readEnvFile = (pathToFile) => {
const parsed = dotenv.config({ path: pathToFile }).parsed;
const env = {};
for (const key in parsed) {
env[key] = JSON.stringify(parsed[key]);
}
return env;
};
module.exports = {
entry: "./src/Index.tsx",
mode: "development",
output: {
filename: "bundle.js",
path: path.resolve(__dirname, "public", "dist"),
publicPath: "/admin/dist/",
},
resolve: {
extensions: [".ts", ".tsx", ".js", ".jsx", ".json", ".css", ".scss"],
alias: {
react: path.resolve("./node_modules/react"),
},
},
externals: {
"react-native-sqlite-storage": "react-native-sqlite-storage",
},
plugins: [
new webpack.DefinePlugin({
process: {
env: {
...readEnvFile("/usr/src/app/dev-env/.env"),
},
},
}),
],
module: {
rules: [
{
test: /\.(ts|tsx)$/,
use: "ts-loader",
},
{
test: /\.s[ac]ss$/i,
use: ["style-loader", "css-loader", "sass-loader"],
},
{
test: /\.css$/i,
use: ["style-loader", "css-loader"],
},
{
test: /\.(jpe?g|png|gif|svg)$/i,
loader: "file-loader",
},
],
},
devtool: "eval-source-map",
};

View File

@@ -65,6 +65,8 @@ CMD [ "npm", "run", "dev" ]
COPY ./App /usr/src/app
# Bundle app source
RUN npm run compile
# Set permission to write logs and cache in case container run as non root
RUN chown -R 1000:1000 "/tmp/npm" && chmod -R 2777 "/tmp/npm"
#Run the app
CMD [ "npm", "start" ]
{{ end }}

View File

@@ -29,6 +29,7 @@ import MonitorTest from "Common/Models/DatabaseModels/MonitorTest";
import UserEmailAPI from "Common/Server/API/UserEmailAPI";
import UserNotificationLogTimelineAPI from "Common/Server/API/UserOnCallLogTimelineAPI";
import UserSMSAPI from "Common/Server/API/UserSmsAPI";
import UserPushAPI from "Common/Server/API/UserPushAPI";
import ApiKeyPermissionService, {
Service as ApiKeyPermissionServiceType,
} from "Common/Server/Services/ApiKeyPermissionService";
@@ -576,6 +577,15 @@ import OnCallDutyPolicyTimeLogService, {
Service as OnCallDutyPolicyTimeLogServiceType,
} from "Common/Server/Services/OnCallDutyPolicyTimeLogService";
// statu spage announcement templates
import StatusPageAnnouncementTemplate from "Common/Models/DatabaseModels/StatusPageAnnouncementTemplate";
import StatusPageAnnouncementTemplateService, {
Service as StatusPageAnnouncementTemplateServiceType,
} from "Common/Server/Services/StatusPageAnnouncementTemplateService";
// Open API Spec
import OpenAPI from "Common/Server/API/OpenAPI";
const BaseAPIFeatureSet: FeatureSet = {
init: async (): Promise<void> => {
const app: ExpressApplication = Express.getExpressApp();
@@ -590,6 +600,8 @@ const BaseAPIFeatureSet: FeatureSet = {
).getRouter(),
);
app.use(`/${APP_NAME.toLocaleLowerCase()}`, OpenAPI.getRouter());
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAnalyticsAPI<MonitorLog, MonitorLogServiceType>(
@@ -606,6 +618,18 @@ const BaseAPIFeatureSet: FeatureSet = {
).getRouter(),
);
// status page announcement templates
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<
StatusPageAnnouncementTemplate,
StatusPageAnnouncementTemplateServiceType
>(
StatusPageAnnouncementTemplate,
StatusPageAnnouncementTemplateService,
).getRouter(),
);
// OnCallDutyPolicyTimeLogService
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
@@ -1585,6 +1609,7 @@ const BaseAPIFeatureSet: FeatureSet = {
);
app.use(`/${APP_NAME.toLocaleLowerCase()}`, new UserEmailAPI().getRouter());
app.use(`/${APP_NAME.toLocaleLowerCase()}`, new UserSMSAPI().getRouter());
app.use(`/${APP_NAME.toLocaleLowerCase()}`, new UserPushAPI().getRouter());
app.use(`/${APP_NAME.toLocaleLowerCase()}`, new ProbeAPI().getRouter());
app.use(

View File

@@ -1,10 +1,8 @@
import Hostname from "Common/Types/API/Hostname";
import TwilioConfig from "Common/Types/CallAndSMS/TwilioConfig";
import Email from "Common/Types/Email";
import EmailServer from "Common/Types/Email/EmailServer";
import BadDataException from "Common/Types/Exception/BadDataException";
import ObjectID from "Common/Types/ObjectID";
import Port from "Common/Types/Port";
import { AdminDashboardClientURL } from "Common/Server/EnvironmentConfig";
import GlobalConfigService from "Common/Server/Services/GlobalConfigService";
import GlobalConfig, {
@@ -12,24 +10,6 @@ import GlobalConfig, {
} from "Common/Models/DatabaseModels/GlobalConfig";
import Phone from "Common/Types/Phone";
export const InternalSmtpPassword: string =
process.env["INTERNAL_SMTP_PASSWORD"] || "";
export const InternalSmtpHost: Hostname = new Hostname(
process.env["INTERNAL_SMTP_HOST"] || "haraka",
);
export const InternalSmtpPort: Port = new Port(2525);
export const InternalSmtpSecure: boolean = false;
export const InternalSmtpEmail: Email = new Email(
process.env["INTERNAL_SMTP_EMAIL"] || "noreply@oneuptime.com",
);
export const InternalSmtpFromName: string =
process.env["INTERNAL_SMTP_FROM_NAME"] || "OneUptime";
type GetGlobalSMTPConfig = () => Promise<EmailServer | null>;
export const getGlobalSMTPConfig: GetGlobalSMTPConfig =
@@ -132,10 +112,10 @@ export const getEmailServerType: GetEmailServerTypeFunction =
});
if (!globalConfig) {
return EmailServerType.Internal;
return EmailServerType.CustomSMTP;
}
return globalConfig.emailServerType || EmailServerType.Internal;
return globalConfig.emailServerType || EmailServerType.CustomSMTP;
};
export interface SendGridConfig {

View File

@@ -1,10 +1,4 @@
import {
InternalSmtpEmail,
InternalSmtpFromName,
InternalSmtpHost,
InternalSmtpPassword,
InternalSmtpPort,
InternalSmtpSecure,
SendGridConfig,
getEmailServerType,
getGlobalSMTPConfig,
@@ -37,6 +31,98 @@ import nodemailer, { Transporter } from "nodemailer";
import Path from "path";
import * as tls from "tls";
// Connection pool for email transporters
class TransporterPool {
private static pools: Map<string, Transporter> = new Map();
private static semaphore: Map<string, number> = new Map();
private static readonly MAX_CONCURRENT_CONNECTIONS = 100;
public static getTransporter(
emailServer: EmailServer,
options: { timeout?: number | undefined },
): Transporter {
const key: string = `${emailServer.host.toString()}:${emailServer.port.toNumber()}:${emailServer.username || "noauth"}`;
if (!this.pools.has(key)) {
const transporter: Transporter = this.createTransporter(
emailServer,
options,
);
this.pools.set(key, transporter);
this.semaphore.set(key, 0);
}
return this.pools.get(key)!;
}
private static createTransporter(
emailServer: EmailServer,
options: { timeout?: number | undefined },
): Transporter {
let tlsOptions: tls.ConnectionOptions | undefined = undefined;
if (!emailServer.secure) {
tlsOptions = {
rejectUnauthorized: false,
};
}
return nodemailer.createTransport({
host: emailServer.host.toString(),
port: emailServer.port.toNumber(),
secure: emailServer.secure,
tls: tlsOptions,
auth:
emailServer.username && emailServer.password
? {
user: emailServer.username,
pass: emailServer.password,
}
: undefined,
connectionTimeout: options.timeout || 60000,
pool: true, // Enable connection pooling
maxConnections: this.MAX_CONCURRENT_CONNECTIONS,
});
}
public static async acquireConnection(
emailServer: EmailServer,
): Promise<void> {
const key: string = `${emailServer.host.toString()}:${emailServer.port.toNumber()}:${emailServer.username || "noauth"}`;
while ((this.semaphore.get(key) || 0) >= this.MAX_CONCURRENT_CONNECTIONS) {
await new Promise<void>((resolve: () => void) => {
setTimeout(resolve, 100);
});
}
this.semaphore.set(key, (this.semaphore.get(key) || 0) + 1);
}
public static releaseConnection(emailServer: EmailServer): void {
const key: string = `${emailServer.host.toString()}:${emailServer.port.toNumber()}:${emailServer.username || "noauth"}`;
const current: number = this.semaphore.get(key) || 0;
this.semaphore.set(key, Math.max(0, current - 1));
}
public static async cleanup(): Promise<void> {
const closePromises: Promise<void>[] = [];
for (const [, transporter] of this.pools) {
closePromises.push(
new Promise<void>((resolve: () => void) => {
transporter.close();
resolve();
}),
);
}
await Promise.all(closePromises);
this.pools.clear();
this.semaphore.clear();
}
}
export default class MailService {
public static isSMTPConfigValid(obj: JSONObject): boolean {
if (!obj["SMTP_USERNAME"]) {
@@ -110,19 +196,6 @@ export default class MailService {
};
}
public static getInternalEmailServer(): EmailServer {
return {
id: undefined,
username: InternalSmtpEmail.toString(),
password: InternalSmtpPassword,
host: InternalSmtpHost,
port: InternalSmtpPort,
fromEmail: InternalSmtpEmail,
fromName: InternalSmtpFromName,
secure: InternalSmtpSecure,
};
}
public static async getGlobalFromEmail(): Promise<Email> {
const emailServer: EmailServer | null = await this.getGlobalSmtpSettings();
@@ -205,30 +278,7 @@ export default class MailService {
timeout?: number | undefined;
},
): Transporter {
let tlsOptions: tls.ConnectionOptions | undefined = undefined;
if (!emailServer.secure) {
tlsOptions = {
rejectUnauthorized: false,
};
}
const privateMailer: Transporter = nodemailer.createTransport({
host: emailServer.host.toString(),
port: emailServer.port.toNumber(),
secure: emailServer.secure,
tls: tlsOptions,
auth:
emailServer.username && emailServer.password
? {
user: emailServer.username,
pass: emailServer.password,
}
: undefined,
connectionTimeout: options.timeout || undefined,
});
return privateMailer;
return TransporterPool.getTransporter(emailServer, options);
}
private static async transportMail(
@@ -242,12 +292,49 @@ export default class MailService {
const mailer: Transporter = this.createMailer(options.emailServer, {
timeout: options.timeout,
});
await mailer.sendMail({
from: `${options.emailServer.fromName.toString()} <${options.emailServer.fromEmail.toString()}>`,
to: mail.toEmail.toString(),
subject: mail.subject,
html: mail.body,
});
let lastError: any;
const maxRetries: number = 3;
// Acquire connection slot to prevent overwhelming the server
await TransporterPool.acquireConnection(options.emailServer);
try {
for (let attempt: number = 1; attempt <= maxRetries; attempt++) {
try {
await mailer.sendMail({
from: `${options.emailServer.fromName.toString()} <${options.emailServer.fromEmail.toString()}>`,
to: mail.toEmail.toString(),
subject: mail.subject,
html: mail.body,
});
return; // Success, exit the function
} catch (error) {
lastError = error;
logger.error(`Email send attempt ${attempt} failed:`);
logger.error(error);
if (attempt === maxRetries) {
break; // Don't wait after the last attempt
}
// Wait before retrying with jitter to prevent thundering herd
const baseWaitTime: number = Math.pow(2, attempt - 1) * 1000;
const jitter: number = Math.random() * 1000; // Add up to 1 second of jitter
const waitTime: number = baseWaitTime + jitter;
await new Promise<void>((resolve: (value: void) => void) => {
setTimeout(resolve, waitTime);
});
}
}
// If we reach here, all retries failed
throw lastError;
} finally {
// Always release the connection slot
TransporterPool.releaseConnection(options.emailServer);
}
}
public static async send(
@@ -434,17 +521,6 @@ export default class MailService {
options.emailServer = globalEmailServer;
}
if (
emailServerType === EmailServerType.Internal &&
(!options || !options.emailServer)
) {
if (!options) {
options = {};
}
options.emailServer = this.getInternalEmailServer();
}
if (options && options.emailServer && emailLog) {
emailLog.fromEmail = options.emailServer.fromEmail;
}
@@ -518,4 +594,8 @@ export default class MailService {
throw err;
}
}
public static async cleanup(): Promise<void> {
await TransporterPool.cleanup();
}
}

View File

@@ -0,0 +1,28 @@
{{> Start this}}
{{> Logo this}}
{{> EmailTitle title=("Your OneUptime Project Subscription is overdue") }}
{{> InfoBlock info="Here are the details: "}}
{{> DetailBoxStart this }}
{{> DetailBoxField title="Project Name:" text=projectName }}
{{> DetailBoxField title="Project ID:" text=projectId }}
{{> DetailBoxField title="Subscription Status:" text="Overdue" }}
{{> DetailBoxField title="Details:" text="Some of your invoices are unpaid. Please pay the invoices to avoid deactivation of this project." }}
{{> DetailBoxEnd this }}
{{> InfoBlock info="You can pay the outstanding invoices by clicking on the link below - "}}
{{> ButtonBlock buttonUrl=dashboardLink buttonText="View on Dashboard"}}
{{> InfoBlock info="You can also copy and paste this link:"}}
{{> InfoBlock info=dashboardLink}}
{{> InfoBlock info="You have been sent this email because you are the owner of this project."}}
{{> Footer this }}
{{> End this}}

View File

@@ -10,8 +10,6 @@
{{> DetailBoxField title="Resources Affected: " text=resourcesAffected }}
{{> DetailBoxField title="Severity: " text=incidentSeverity }}
{{> DetailBoxField title="State: " text=incidentState }}
{{> DetailBoxField title="Description: " text="" }}
{{> DetailBoxField title="" text=incidentDescription }}
{{> DetailBoxEnd this }}
{{> InfoBlock info=(concat subscriberEmailNotificationFooterText "") }}

View File

@@ -15,8 +15,6 @@
{{#if resourcesAffected}}
{{> DetailBoxField title="Resources Affected: " text=resourcesAffected }}
{{/if}}
{{> DetailBoxField title="Event Description: " text="" }}
{{> DetailBoxField title="" text=eventDescription }}
{{> DetailBoxEnd this }}
{{> InfoBlock info=(concat subscriberEmailNotificationFooterText "") }}

View File

@@ -12,6 +12,7 @@ import Realtime from "Common/Server/Utils/Realtime";
import App from "Common/Server/Utils/StartServer";
import Telemetry from "Common/Server/Utils/Telemetry";
import "ejs";
import OpenAPIUtil from "Common/Server/Utils/OpenAPI";
const APP_NAME: string = "api";
@@ -96,6 +97,9 @@ const init: PromiseVoidFunction = async (): Promise<void> => {
// Add default routes to the app
await App.addDefaultRoutes();
// Generate OpenAPI spec (this automatically saves it to cache)
OpenAPIUtil.generateOpenAPISpec();
} catch (err) {
logger.error("App Init Failed:");
logger.error(err);

21
App/package-lock.json generated
View File

@@ -35,8 +35,9 @@
"version": "1.0.0",
"license": "Apache-2.0",
"dependencies": {
"@asteasolutions/zod-to-openapi": "^7.3.2",
"@bull-board/express": "^5.21.4",
"@clickhouse/client": "^0.2.10",
"@clickhouse/client": "^1.10.1",
"@elastic/elasticsearch": "^8.12.1",
"@monaco-editor/react": "^4.4.6",
"@opentelemetry/api": "^1.9.0",
@@ -64,18 +65,19 @@
"@types/react-highlight": "^0.12.8",
"@types/react-syntax-highlighter": "^15.5.13",
"@types/uuid": "^8.3.4",
"@types/web-push": "^3.6.4",
"acme-client": "^5.3.0",
"airtable": "^0.12.2",
"axios": "^1.7.2",
"bullmq": "^5.3.3",
"Common": "file:../Common",
"cookie-parser": "^1.4.6",
"cookie-parser": "^1.4.7",
"cors": "^2.8.5",
"cron-parser": "^4.8.1",
"crypto-js": "^4.2.0",
"dotenv": "^16.4.4",
"ejs": "^3.1.10",
"express": "^4.19.2",
"esbuild": "^0.25.5",
"express": "^4.21.1",
"formik": "^2.4.6",
"history": "^5.3.0",
"ioredis": "^5.3.2",
@@ -83,7 +85,6 @@
"json5": "^2.2.3",
"jsonwebtoken": "^9.0.0",
"jwt-decode": "^4.0.0",
"lodash": "^4.17.21",
"marked": "^12.0.2",
"moment": "^2.30.1",
"moment-timezone": "^0.5.45",
@@ -91,6 +92,7 @@
"nodemailer": "^6.9.10",
"otpauth": "^9.3.1",
"pg": "^8.7.3",
"playwright": "^1.50.0",
"posthog-js": "^1.139.6",
"prop-types": "^15.8.1",
"qrcode": "^1.5.3",
@@ -113,6 +115,7 @@
"redis-semaphore": "^5.5.1",
"reflect-metadata": "^0.2.2",
"remark-gfm": "^3.0.1",
"slackify-markdown": "^4.4.0",
"slugify": "^1.6.5",
"socket.io": "^4.7.4",
"socket.io-client": "^4.7.5",
@@ -122,9 +125,11 @@
"twilio": "^4.22.0",
"typeorm": "^0.3.20",
"typeorm-extension": "^2.2.13",
"universal-cookie": "^4.0.4",
"universal-cookie": "^7.2.1",
"use-async-effect": "^2.2.6",
"uuid": "^8.3.2"
"uuid": "^8.3.2",
"web-push": "^3.6.7",
"zod": "^3.25.30"
},
"devDependencies": {
"@faker-js/faker": "^8.0.2",
@@ -138,7 +143,6 @@
"@types/jest": "^28.1.4",
"@types/json2csv": "^5.0.3",
"@types/jsonwebtoken": "^8.5.9",
"@types/lodash": "^4.14.202",
"@types/node": "^17.0.45",
"@types/node-cron": "^3.0.7",
"@types/nodemailer": "^6.4.7",
@@ -152,6 +156,7 @@
"jest-environment-jsdom": "^29.7.0",
"jest-mock-extended": "^3.0.5",
"react-test-renderer": "^18.2.0",
"sass": "^1.89.2",
"ts-jest": "^28.0.5"
}
},

View File

@@ -140,13 +140,6 @@ export default class AnalyticsBaseModel extends CommonModel {
this.crudApiPath = data.crudApiPath;
this.enableRealtimeEventsOn = data.enableRealtimeEventsOn;
this.partitionKey = data.partitionKey;
// initialize Arrays.
for (const column of this.tableColumns) {
if (column.type === TableColumnType.NestedModel) {
this.setColumnValue(column.key, []);
}
}
}
private _enableWorkflowOn: EnableWorkflowOn | undefined;

View File

@@ -76,7 +76,7 @@ export default class CommonModel {
if (column.type === TableColumnType.JSON && typeof value === "string") {
try {
value = JSONFunctions.parse(value);
} catch (e) {
} catch {
value = {};
}
}
@@ -91,7 +91,7 @@ export default class CommonModel {
if (!Array.isArray(value)) {
throw new BadDataException("Not an array");
}
} catch (e) {
} catch {
value = [];
}
}
@@ -207,19 +207,6 @@ export default class CommonModel {
return;
}
if (recordValue instanceof Array) {
if (recordValue.length > 0 && column.nestedModelType) {
json[column.key] = CommonModel.toJSONArray(
recordValue as Array<CommonModel>,
column.nestedModelType,
);
} else {
json[column.key] = recordValue;
}
return;
}
json[column.key] = recordValue;
});

View File

@@ -1,8 +0,0 @@
import AnalyticsTableColumn from "../../../Types/AnalyticsDatabase/TableColumn";
import CommonModel from "./CommonModel";
export default class NestedModel extends CommonModel {
public constructor(data: { tableColumns: Array<AnalyticsTableColumn> }) {
super(data);
}
}

View File

@@ -12,8 +12,8 @@ export default class ExceptionInstance extends AnalyticsBaseModel {
super({
tableName: "ExceptionItem",
tableEngine: AnalyticsTableEngine.MergeTree,
singularName: "Exception",
pluralName: "Exceptions",
singularName: "Exception Instance",
pluralName: "Exception Instances",
enableRealtimeEventsOn: {
create: true,
},

View File

@@ -1,59 +0,0 @@
import AnalyticsTableColumn from "../../../Types/AnalyticsDatabase/TableColumn";
import TableColumnType from "../../../Types/AnalyticsDatabase/TableColumnType";
import NestedModel from "../AnalyticsBaseModel/NestedModel";
export default class KeyValueNestedModel extends NestedModel {
public constructor() {
super({
tableColumns: [
new AnalyticsTableColumn({
key: "key",
title: "Key",
description: "Key of the attribute",
required: true,
type: TableColumnType.Text,
}),
new AnalyticsTableColumn({
key: "stringValue",
title: "String Value",
description: "Key of the attribute",
required: false,
type: TableColumnType.Text,
}),
new AnalyticsTableColumn({
key: "numberValue",
title: "Number Value",
description: "Value of the attribute",
required: false,
type: TableColumnType.Number,
}),
],
});
}
public get key(): string | undefined {
return this.getColumnValue("key");
}
public set key(v: string | undefined) {
this.setColumnValue("key", v);
}
public get stringValue(): string | undefined {
return this.getColumnValue("stringValue");
}
public set stringValue(v: string | undefined) {
this.setColumnValue("stringValue", v);
}
public get numberValue(): number | undefined {
return this.getColumnValue("numberValue");
}
public set numberValue(v: number | undefined) {
this.setColumnValue("numberValue", v);
}
}

View File

@@ -104,6 +104,7 @@ export default class AcmeCertificate extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})

View File

@@ -80,6 +80,7 @@ export default class AcmeChallenge extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})

View File

@@ -217,7 +217,7 @@ export default class Alert extends BaseModel {
type: TableColumnType.Markdown,
title: "Description",
description:
"Short description of this alert. This is in markdown and will be visible on the status page.",
"Short description of this alert. This will be visible on the status page. This is in markdown.",
})
@Column({
nullable: true,
@@ -299,6 +299,7 @@ export default class Alert extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})
@@ -570,11 +571,13 @@ export default class Alert extends BaseModel {
@TableColumn({
type: TableColumnType.ObjectID,
required: true,
isDefaultValueColumn: true,
title: "Current Alert State ID",
description: "Current Alert State ID",
})
@Column({
type: ColumnType.ObjectID,
nullable: false,
transformer: ObjectID.getDatabaseTransformer(),
})
@@ -758,12 +761,7 @@ export default class Alert extends BaseModel {
public customFields?: JSONObject = undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateAlert,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -775,10 +773,13 @@ export default class Alert extends BaseModel {
@Index()
@TableColumn({
type: TableColumnType.Boolean,
computed: true,
hideColumnInDocumentation: true,
required: true,
isDefaultValueColumn: true,
title: "Are Owners Notified Of Alert Creation?",
description: "Are owners notified of when this alert is created?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,
@@ -936,6 +937,7 @@ export default class Alert extends BaseModel {
title: "Is created automatically?",
description:
"Is this alert created by OneUptime Probe or Workers automatically (and not created manually by a user)?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,
@@ -1028,6 +1030,7 @@ export default class Alert extends BaseModel {
isDefaultValueColumn: false,
required: false,
type: TableColumnType.Number,
computed: true,
title: "Alert Number",
description: "Alert Number",
})

View File

@@ -218,7 +218,7 @@ export default class AlertCustomField extends BaseModel {
type: ColumnType.ShortText,
length: ColumnLength.ShortText,
})
public type?: CustomFieldType = undefined;
public customFieldType?: CustomFieldType = undefined;
@ColumnAccessControl({
create: [
@@ -297,6 +297,7 @@ export default class AlertCustomField extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})

View File

@@ -282,6 +282,7 @@ export default class AlertFeed extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})

View File

@@ -271,6 +271,7 @@ export default class AlertInternalNote extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})
@@ -340,12 +341,7 @@ export default class AlertInternalNote extends BaseModel {
public note?: string = undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateAlertInternalNote,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -357,10 +353,13 @@ export default class AlertInternalNote extends BaseModel {
@Index()
@TableColumn({
type: TableColumnType.Boolean,
computed: true,
hideColumnInDocumentation: true,
required: true,
isDefaultValueColumn: true,
title: "Are Owners Notified",
description: "Are owners notified of this resource ownership?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,

View File

@@ -314,6 +314,7 @@ export default class AlertNoteTemplate extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})

View File

@@ -64,6 +64,7 @@ import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
@Entity({
name: "AlertOwnerTeam",
})
@Index(["alertId", "teamId", "projectId"])
export default class AlertOwnerTeam extends BaseModel {
@ColumnAccessControl({
create: [
@@ -343,6 +344,7 @@ export default class AlertOwnerTeam extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})
@@ -406,6 +408,7 @@ export default class AlertOwnerTeam extends BaseModel {
isDefaultValueColumn: true,
title: "Are Owners Notified",
description: "Are owners notified of this resource ownership?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,

View File

@@ -63,6 +63,7 @@ import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
@Entity({
name: "AlertOwnerUser",
})
@Index(["alertId", "userId", "projectId"])
export default class AlertOwnerUser extends BaseModel {
@ColumnAccessControl({
create: [
@@ -342,6 +343,7 @@ export default class AlertOwnerUser extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})
@@ -405,6 +407,7 @@ export default class AlertOwnerUser extends BaseModel {
isDefaultValueColumn: true,
title: "Are Owners Notified",
description: "Are owners notified of this resource ownership?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,

View File

@@ -76,6 +76,7 @@ import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
@Entity({
name: "AlertSeverity",
})
@Index(["projectId", "order"])
export default class AlertSeverity extends BaseModel {
@ColumnAccessControl({
create: [
@@ -192,6 +193,7 @@ export default class AlertSeverity extends BaseModel {
required: true,
unique: true,
type: TableColumnType.Slug,
computed: true,
title: "Slug",
description: "Friendly globally unique name for your object",
})
@@ -314,6 +316,7 @@ export default class AlertSeverity extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})

View File

@@ -76,6 +76,10 @@ import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
@Entity({
name: "AlertState",
})
@Index(["projectId", "isCreatedState"])
@Index(["projectId", "isResolvedState"])
@Index(["projectId", "isAcknowledgedState"])
@Index(["projectId", "order"])
export default class AlertState extends BaseModel {
@ColumnAccessControl({
create: [
@@ -290,6 +294,7 @@ export default class AlertState extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})

View File

@@ -60,6 +60,7 @@ import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
@Entity({
name: "AlertStateTimeline",
})
@Index(["alertId", "startsAt"])
@TableMetadata({
tableName: "AlertStateTimeline",
singularName: "Alert State Timeline",
@@ -274,6 +275,7 @@ export default class AlertStateTimeline extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})
@@ -387,12 +389,7 @@ export default class AlertStateTimeline extends BaseModel {
public alertStateId?: ObjectID = undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateAlertStateTimeline,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -404,10 +401,13 @@ export default class AlertStateTimeline extends BaseModel {
@Index()
@TableColumn({
type: TableColumnType.Boolean,
computed: true,
hideColumnInDocumentation: true,
required: true,
isDefaultValueColumn: true,
title: "Are Owners Notified",
description: "Are owners notified of state change?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,

View File

@@ -201,6 +201,7 @@ export default class ApiKey extends BaseModel {
required: true,
unique: true,
type: TableColumnType.Slug,
computed: true,
title: "Slug",
description: "Friendly globally unique name for your object",
})
@@ -281,6 +282,7 @@ export default class ApiKey extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})
@@ -347,11 +349,7 @@ export default class ApiKey extends BaseModel {
public expiresAt?: Date = undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ReadProjectApiKey,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -368,6 +366,7 @@ export default class ApiKey extends BaseModel {
type: TableColumnType.ObjectID,
isDefaultValueColumn: false,
title: "API Key",
computed: true,
description: "Secret API Key",
})
@Column({

View File

@@ -291,6 +291,7 @@ export default class APIKeyPermission extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})
@@ -425,7 +426,11 @@ export default class APIKeyPermission extends BaseModel {
Permission.EditProjectApiKey,
],
})
@TableColumn({ isDefaultValueColumn: true, type: TableColumnType.Boolean })
@TableColumn({
isDefaultValueColumn: true,
type: TableColumnType.Boolean,
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,
default: false,

View File

@@ -172,6 +172,7 @@ export default class BillingInvoice extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})

View File

@@ -174,6 +174,7 @@ export default class BillingPaymentMethod extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})
@@ -234,7 +235,7 @@ export default class BillingPaymentMethod extends BaseModel {
nullable: false,
unique: false,
})
public type?: string = undefined;
public paymentMethodType?: string = undefined;
@ColumnAccessControl({
create: [],

View File

@@ -247,6 +247,7 @@ export default class CallLog extends BaseModel {
description: "Call Cost in USD Cents",
canReadOnRelationQuery: false,
isDefaultValueColumn: true,
defaultValue: 0,
})
@Column({
nullable: false,
@@ -264,6 +265,7 @@ export default class CallLog extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})

View File

@@ -289,6 +289,7 @@ export default class CopilotAction extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})

View File

@@ -250,6 +250,7 @@ export default class CopilotActionTypePriority extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})

View File

@@ -208,6 +208,7 @@ export default class CopilotCodeRepository extends BaseModel {
required: true,
unique: true,
type: TableColumnType.Slug,
computed: true,
title: "Slug",
description: "Friendly globally unique name for your object",
})
@@ -334,6 +335,7 @@ export default class CopilotCodeRepository extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})
@@ -425,12 +427,7 @@ export default class CopilotCodeRepository extends BaseModel {
public labels?: Array<Label> = undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateCopilotCodeRepository,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -449,6 +446,7 @@ export default class CopilotCodeRepository extends BaseModel {
@TableColumn({
type: TableColumnType.ObjectID,
isDefaultValueColumn: false,
computed: true,
title: "Secret Token",
description:
"Secret Token for this code repository. This is used to connect this code repository to OneUptime.",

View File

@@ -237,6 +237,7 @@ export default class CopilotPullRequest extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})

View File

@@ -188,6 +188,7 @@ export default class Dashboard extends BaseModel {
required: true,
unique: true,
type: TableColumnType.Slug,
computed: true,
title: "Slug",
description: "Friendly globally unique name for your object",
})
@@ -306,6 +307,7 @@ export default class Dashboard extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})

View File

@@ -145,6 +145,7 @@ export default class DataMigration extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})

View File

@@ -56,13 +56,15 @@ export default class DatabaseBaseModel extends BaseEntity {
title: "ID",
type: TableColumnType.ObjectID,
description: "ID of this object",
computed: true,
})
@PrimaryGeneratedColumn("uuid")
public _id?: string = undefined;
@TableColumn({
title: "Created",
title: "Created At",
type: TableColumnType.Date,
computed: true,
description: "Date and Time when the object was created.",
})
@CreateDateColumn({
@@ -71,8 +73,9 @@ export default class DatabaseBaseModel extends BaseEntity {
public createdAt?: Date = undefined;
@TableColumn({
title: "Updated",
title: "Updated At",
type: TableColumnType.Date,
computed: true,
description: "Date and Time when the object was updated.",
})
@UpdateDateColumn({
@@ -81,8 +84,9 @@ export default class DatabaseBaseModel extends BaseEntity {
public updatedAt?: Date = undefined;
@TableColumn({
title: "Deleted",
title: "Deleted At",
type: TableColumnType.Date,
computed: true,
description: "Date and Time when the object was deleted.",
})
@DeleteDateColumn({
@@ -92,8 +96,10 @@ export default class DatabaseBaseModel extends BaseEntity {
@TableColumn({
title: "Version",
type: TableColumnType.Version,
type: TableColumnType.Number,
computed: true,
description: "Object version",
hideColumnInDocumentation: true,
})
@VersionColumn()
public version?: number = undefined;
@@ -650,7 +656,13 @@ export default class DatabaseBaseModel extends BaseEntity {
json = JSONFunctions.deserialize(json);
const baseModel: T = new type();
for (const key of Object.keys(json)) {
for (let key of Object.keys(json)) {
if (key === "id") {
key = "_id";
json["_id"] = json["id"];
delete json["id"];
}
const tableColumnMetadata: TableColumnMetadata =
baseModel.getTableColumnMetadata(key);
if (tableColumnMetadata) {

View File

@@ -21,8 +21,8 @@ export default class FileModel extends BaseModel {
}
@ColumnAccessControl({
create: [Permission.CurrentUser],
read: [Permission.CurrentUser],
create: [Permission.CurrentUser, Permission.AuthenticatedRequest],
read: [Permission.CurrentUser, Permission.AuthenticatedRequest],
update: [],
})
@TableColumn({
@@ -37,8 +37,8 @@ export default class FileModel extends BaseModel {
public file?: Buffer = undefined;
@ColumnAccessControl({
create: [Permission.CurrentUser],
read: [Permission.CurrentUser],
create: [Permission.CurrentUser, Permission.AuthenticatedRequest],
read: [Permission.CurrentUser, Permission.AuthenticatedRequest],
update: [],
})
@TableColumn({
@@ -56,8 +56,8 @@ export default class FileModel extends BaseModel {
public name?: string = undefined;
@ColumnAccessControl({
create: [Permission.CurrentUser],
read: [Permission.CurrentUser],
create: [Permission.CurrentUser, Permission.AuthenticatedRequest],
read: [Permission.CurrentUser, Permission.AuthenticatedRequest],
update: [],
})
@TableColumn({
@@ -70,11 +70,11 @@ export default class FileModel extends BaseModel {
type: ColumnType.ShortText,
length: ColumnLength.ShortText,
})
public type?: MimeType = undefined;
public fileType?: MimeType = undefined;
@ColumnAccessControl({
create: [Permission.CurrentUser],
read: [Permission.CurrentUser],
create: [Permission.CurrentUser, Permission.AuthenticatedRequest],
read: [Permission.CurrentUser, Permission.AuthenticatedRequest],
update: [],
})
@TableColumn({
@@ -91,8 +91,8 @@ export default class FileModel extends BaseModel {
public slug?: string = undefined;
@ColumnAccessControl({
create: [Permission.CurrentUser],
read: [Permission.CurrentUser],
create: [Permission.CurrentUser, Permission.AuthenticatedRequest],
read: [Permission.CurrentUser, Permission.AuthenticatedRequest],
update: [],
})
@TableColumn({

View File

@@ -170,6 +170,7 @@ export default class Domain extends BaseModel {
required: true,
unique: true,
type: TableColumnType.Slug,
computed: true,
title: "Slug",
description: "Friendly globally unique name for your object",
})
@@ -257,6 +258,7 @@ export default class Domain extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})
@@ -317,6 +319,7 @@ export default class Domain extends BaseModel {
type: TableColumnType.Boolean,
title: "Verified",
description: "Is this domain verified?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,

View File

@@ -298,6 +298,7 @@ export default class EmailLog extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})

View File

@@ -125,6 +125,7 @@ export default class EmailVerificationToken extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})

View File

@@ -2,11 +2,13 @@ import FileModel from "./DatabaseBaseModel/FileModel";
import Route from "../../Types/API/Route";
import TableAccessControl from "../../Types/Database/AccessControl/TableAccessControl";
import CrudApiEndpoint from "../../Types/Database/CrudApiEndpoint";
import EnableDocumentation from "../../Types/Database/EnableDocumentation";
import TableMetadata from "../../Types/Database/TableMetadata";
import IconProp from "../../Types/Icon/IconProp";
import Permission from "../../Types/Permission";
import { Entity } from "typeorm";
@EnableDocumentation()
@TableMetadata({
tableName: "File",
singularName: "File",
@@ -19,8 +21,8 @@ import { Entity } from "typeorm";
})
@CrudApiEndpoint(new Route("/file"))
@TableAccessControl({
create: [Permission.CurrentUser],
read: [Permission.CurrentUser],
create: [Permission.CurrentUser, Permission.AuthenticatedRequest],
read: [Permission.CurrentUser, Permission.AuthenticatedRequest],
delete: [],
update: [],
})

View File

@@ -17,7 +17,6 @@ import Port from "../../Types/Port";
import { Column, Entity } from "typeorm";
export enum EmailServerType {
Internal = "Internal",
Sendgrid = "Sendgrid",
CustomSMTP = "Custom SMTP",
}
@@ -260,7 +259,7 @@ export default class GlobalConfig extends GlobalConfigModel {
nullable: true,
unique: false,
})
public twilioSecondaryPhoneNumbers?: string = undefined; // phone numbers seperated by comma
public twilioSecondaryPhoneNumbers?: string = undefined; // phone numbers separated by comma
@ColumnAccessControl({
create: [],
@@ -355,6 +354,7 @@ export default class GlobalConfig extends GlobalConfigModel {
})
@TableColumn({
type: TableColumnType.ObjectID,
computed: true,
title: "Master API Key",
description:
"This API key has root access to all the resources in all the projects on OneUptime.",

View File

@@ -61,7 +61,7 @@ export default class GreenlockCertificate extends BaseModel {
read: [],
update: [],
})
@TableColumn({ type: TableColumnType.Boolean })
@TableColumn({ type: TableColumnType.Boolean, defaultValue: false })
@Column({
type: ColumnType.Boolean,
nullable: false,
@@ -79,6 +79,7 @@ export default class GreenlockCertificate extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})

View File

@@ -80,6 +80,7 @@ export default class GreenlockChallenge extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})

View File

@@ -229,12 +229,7 @@ export default class Incident extends BaseModel {
@Index()
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateProjectIncident,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -247,6 +242,7 @@ export default class Incident extends BaseModel {
required: true,
unique: true,
type: TableColumnType.Slug,
computed: true,
title: "Slug",
description: "Friendly globally unique name for your object",
})
@@ -332,6 +328,7 @@ export default class Incident extends BaseModel {
manyToOneRelationColumn: "deletedByUserId",
type: TableColumnType.Entity,
title: "Deleted by User",
modelType: User,
description:
"Relation to User who deleted this object (if this object was deleted by a User)",
})
@@ -530,6 +527,7 @@ export default class Incident extends BaseModel {
@TableColumn({
manyToOneRelationColumn: "currentIncidentStateId",
type: TableColumnType.Entity,
computed: true,
modelType: IncidentState,
title: "Current Incident State",
description:
@@ -571,6 +569,7 @@ export default class Incident extends BaseModel {
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
isDefaultValueColumn: true,
required: true,
title: "Current Incident State ID",
description: "Current Incident State ID",
@@ -745,9 +744,12 @@ export default class Incident extends BaseModel {
})
@TableColumn({
isDefaultValueColumn: true,
computed: true,
hideColumnInDocumentation: true,
type: TableColumnType.Boolean,
title: "Are subscribers notified?",
description: "Are subscribers notified about this incident?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,
@@ -775,6 +777,7 @@ export default class Incident extends BaseModel {
type: TableColumnType.Boolean,
title: "Should subscribers be notified?",
description: "Should subscribers be notified about this incident?",
defaultValue: true,
})
@Column({
type: ColumnType.Boolean,
@@ -817,12 +820,7 @@ export default class Incident extends BaseModel {
public customFields?: JSONObject = undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateProjectIncident,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -834,10 +832,13 @@ export default class Incident extends BaseModel {
@Index()
@TableColumn({
type: TableColumnType.Boolean,
computed: true,
hideColumnInDocumentation: true,
required: true,
isDefaultValueColumn: true,
title: "Are Owners Notified Of Resource Creation?",
description: "Are owners notified of when this resource is created?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,
@@ -1025,6 +1026,7 @@ export default class Incident extends BaseModel {
title: "Is created automatically?",
description:
"Is this incident created by OneUptime Probe or Workers automatically (and not created manually by a user)?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,
@@ -1099,12 +1101,7 @@ export default class Incident extends BaseModel {
public telemetryQuery?: TelemetryQuery = undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateProjectIncident,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -1120,6 +1117,7 @@ export default class Incident extends BaseModel {
type: TableColumnType.Number,
title: "Incident Number",
description: "Incident Number",
computed: true,
})
@Column({
type: ColumnType.Number,
@@ -1171,6 +1169,7 @@ export default class Incident extends BaseModel {
type: TableColumnType.Boolean,
title: "Should be visible on status page?",
description: "Should this incident be visible on the status page?",
defaultValue: true,
})
@Column({
type: ColumnType.Boolean,

Some files were not shown because too many files have changed in this diff Show More