Compare commits

..

441 Commits

Author SHA1 Message Date
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
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
635 changed files with 38224 additions and 36741 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

@@ -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

@@ -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
@@ -1703,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:
@@ -1756,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:

View File

@@ -82,7 +82,119 @@ jobs:
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 }}"
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
@@ -1035,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
@@ -1657,7 +1708,7 @@ jobs:
test-helm-chart:
runs-on: ubuntu-latest
needs: [infrastructure-agent-deploy, 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, 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

13
.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
@@ -121,4 +118,12 @@ openapi.json
Terraform/**
terraform-provider-example/**
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

@@ -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

@@ -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

@@ -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

@@ -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

@@ -83,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

@@ -59,6 +59,7 @@
"@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",
@@ -78,7 +79,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",
@@ -122,6 +122,7 @@
"universal-cookie": "^7.2.1",
"use-async-effect": "^2.2.6",
"uuid": "^8.3.2",
"web-push": "^3.6.7",
"zod": "^3.25.30"
},
"devDependencies": {
@@ -136,7 +137,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",

View File

@@ -79,6 +79,8 @@ CMD [ "npm", "run", "dev" ]
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

@@ -58,6 +58,7 @@
"@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",
@@ -77,7 +78,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",
@@ -121,6 +121,7 @@
"universal-cookie": "^7.2.1",
"use-async-effect": "^2.2.6",
"uuid": "^8.3.2",
"web-push": "^3.6.7",
"zod": "^3.25.30"
},
"devDependencies": {
@@ -135,7 +136,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",

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

@@ -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

@@ -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,
);
}
@@ -127,7 +127,7 @@ const Settings: FunctionComponent = (): ReactElement => {
/>
<CardModelDetail
name="Internal SMTP Settings"
name="Email Server Settings"
cardProps={{
title: "Email Server Settings",
description:
@@ -172,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"

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>
@@ -174,6 +175,7 @@ const Settings: FunctionComponent = (): ReactElement => {
noValueMessage: "-",
title: "Description",
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

@@ -116,6 +116,7 @@ const Users: FunctionComponent = (): ReactElement => {
},
title: "Email Verified",
type: FieldType.Boolean,
hideOnMobile: true,
},
{
field: {
@@ -123,6 +124,7 @@ const Users: FunctionComponent = (): ReactElement => {
},
title: "Created At",
type: FieldType.DateTime,
hideOnMobile: true,
},
]}
/>

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";
@@ -1608,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();
}
}

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

@@ -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

@@ -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

@@ -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)",
})

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,6 +56,7 @@ export default class DatabaseBaseModel extends BaseEntity {
title: "ID",
type: TableColumnType.ObjectID,
description: "ID of this object",
computed: true,
})
@PrimaryGeneratedColumn("uuid")
public _id?: string = undefined;
@@ -63,6 +64,7 @@ export default class DatabaseBaseModel extends BaseEntity {
@TableColumn({
title: "Created At",
type: TableColumnType.Date,
computed: true,
description: "Date and Time when the object was created.",
})
@CreateDateColumn({
@@ -73,6 +75,7 @@ export default class DatabaseBaseModel extends BaseEntity {
@TableColumn({
title: "Updated At",
type: TableColumnType.Date,
computed: true,
description: "Date and Time when the object was updated.",
})
@UpdateDateColumn({
@@ -83,6 +86,7 @@ export default class DatabaseBaseModel extends BaseEntity {
@TableColumn({
title: "Deleted At",
type: TableColumnType.Date,
computed: true,
description: "Date and Time when the object was deleted.",
})
@DeleteDateColumn({
@@ -93,6 +97,7 @@ export default class DatabaseBaseModel extends BaseEntity {
@TableColumn({
title: "Version",
type: TableColumnType.Number,
computed: true,
description: "Object version",
hideColumnInDocumentation: true,
})
@@ -651,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({
@@ -73,8 +73,8 @@ export default class FileModel extends BaseModel {
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,

View File

@@ -297,6 +297,7 @@ export default class IncidentCustomField 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 IncidentFeed 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 IncidentInternalNote 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 IncidentInternalNote extends BaseModel {
public note?: string = undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateIncidentInternalNote,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -357,10 +353,13 @@ export default class IncidentInternalNote 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 IncidentNoteTemplate 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: "IncidentOwnerTeam",
})
@Index(["incidentId", "teamId", "projectId"])
export default class IncidentOwnerTeam extends BaseModel {
@ColumnAccessControl({
create: [
@@ -343,6 +344,7 @@ export default class IncidentOwnerTeam 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)",
})
@@ -385,12 +387,7 @@ export default class IncidentOwnerTeam extends BaseModel {
public deletedByUserId?: ObjectID = undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateIncidentOwnerTeam,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -402,10 +399,13 @@ export default class IncidentOwnerTeam 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

@@ -63,6 +63,7 @@ import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
@Entity({
name: "IncidentOwnerUser",
})
@Index(["incidentId", "userId", "projectId"])
export default class IncidentOwnerUser extends BaseModel {
@ColumnAccessControl({
create: [
@@ -342,6 +343,7 @@ export default class IncidentOwnerUser 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 IncidentOwnerUser extends BaseModel {
isDefaultValueColumn: true,
title: "Are Owners Notified",
description: "Are owners notified of this resource ownership?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,

View File

@@ -271,6 +271,7 @@ export default class IncidentPublicNote 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)",
})
@@ -351,9 +352,12 @@ export default class IncidentPublicNote extends BaseModel {
})
@TableColumn({
isDefaultValueColumn: true,
computed: true,
hideColumnInDocumentation: true,
type: TableColumnType.Boolean,
title: "Are subscribers notified?",
description: "Are subscribers notified about this note?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,
@@ -381,6 +385,7 @@ export default class IncidentPublicNote extends BaseModel {
type: TableColumnType.Boolean,
title: "Should subscribers be notified?",
description: "Should subscribers be notified about this note?",
defaultValue: true,
})
@Column({
type: ColumnType.Boolean,
@@ -390,12 +395,7 @@ export default class IncidentPublicNote extends BaseModel {
undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateIncidentPublicNote,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -407,10 +407,13 @@ export default class IncidentPublicNote 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

@@ -76,6 +76,7 @@ import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
@Entity({
name: "IncidentSeverity",
})
@Index(["projectId", "order"])
export default class IncidentSeverity extends BaseModel {
@ColumnAccessControl({
create: [
@@ -192,6 +193,7 @@ export default class IncidentSeverity 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 IncidentSeverity 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,9 @@ import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
@Entity({
name: "IncidentState",
})
@Index(["projectId", "isCreatedState"])
@Index(["projectId", "isResolvedState"])
@Index(["projectId", "order"])
export default class IncidentState extends BaseModel {
@ColumnAccessControl({
create: [
@@ -192,6 +195,7 @@ export default class IncidentState extends BaseModel {
required: true,
unique: true,
type: TableColumnType.Slug,
computed: true,
title: "Slug",
description: "Friendly globally unique name for your object",
})
@@ -314,6 +318,7 @@ export default class IncidentState 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

@@ -24,6 +24,8 @@ import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
@EnableDocumentation()
@CanAccessIfCanReadOn("incident")
@TenantColumn("projectId")
@Index(["incidentId", "startsAt"]) // Composite index for efficient incident timeline queries
@Index(["incidentId", "projectId", "startsAt"]) // Alternative composite index including project
@TableAccessControl({
create: [
Permission.ProjectOwner,
@@ -60,6 +62,7 @@ import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
@Entity({
name: "IncidentStateTimeline",
})
@Index(["incidentId", "startsAt"])
@TableMetadata({
tableName: "IncidentStateTimeline",
singularName: "Incident State Timeline",
@@ -274,6 +277,7 @@ export default class IncidentStateTimeline 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 +391,7 @@ export default class IncidentStateTimeline extends BaseModel {
public incidentStateId?: ObjectID = undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateIncidentStateTimeline,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -403,9 +402,12 @@ export default class IncidentStateTimeline extends BaseModel {
})
@TableColumn({
isDefaultValueColumn: true,
computed: true,
hideColumnInDocumentation: true,
type: TableColumnType.Boolean,
title: "Are subscribers notified?",
description: "Are subscribers notified about this incident state change?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,
@@ -441,12 +443,7 @@ export default class IncidentStateTimeline extends BaseModel {
public shouldStatusPageSubscribersBeNotified?: boolean = undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateIncidentStateTimeline,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -458,6 +455,8 @@ export default class IncidentStateTimeline extends BaseModel {
@Index()
@TableColumn({
type: TableColumnType.Boolean,
computed: true,
hideColumnInDocumentation: true,
required: true,
isDefaultValueColumn: true,
title: "Are Owners Notified",

View File

@@ -295,12 +295,7 @@ export default class IncidentTemplate extends BaseModel {
@Index()
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateIncidentTemplate,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -313,6 +308,7 @@ export default class IncidentTemplate extends BaseModel {
required: true,
unique: true,
type: TableColumnType.Slug,
computed: true,
title: "Slug",
description: "Friendly globally unique name for your object",
})
@@ -398,6 +394,7 @@ export default class IncidentTemplate 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

@@ -345,6 +345,7 @@ export default class IncidentTemplateOwnerTeam 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 +388,7 @@ export default class IncidentTemplateOwnerTeam extends BaseModel {
public deletedByUserId?: ObjectID = undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateIncidentTemplateOwnerTeam,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -404,10 +400,13 @@ export default class IncidentTemplateOwnerTeam 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

@@ -354,6 +354,7 @@ export default class IncidentTemplateOwnerUser 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)",
})
@@ -397,12 +398,7 @@ export default class IncidentTemplateOwnerUser extends BaseModel {
public deletedByUserId?: ObjectID = undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateIncidentTemplateOwnerUser,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -415,10 +411,13 @@ export default class IncidentTemplateOwnerUser 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

@@ -126,6 +126,7 @@ import User from "./User";
import UserCall from "./UserCall";
// Notification Methods
import UserEmail from "./UserEmail";
import UserPush from "./UserPush";
// User Notification Rules
import UserNotificationRule from "./UserNotificationRule";
import UserNotificationSetting from "./UserNotificationSetting";
@@ -294,6 +295,7 @@ const AllModelTypes: Array<{
UserEmail,
UserSms,
UserCall,
UserPush,
UserNotificationRule,
UserOnCallLog,

View File

@@ -186,6 +186,7 @@ export default class Label extends AccessControlModel {
required: true,
unique: true,
type: TableColumnType.Slug,
computed: true,
title: "Slug",
description: "Friendly globally unique name for your object",
})
@@ -304,6 +305,7 @@ export default class Label extends AccessControlModel {
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

@@ -57,10 +57,10 @@ import TelemetryService from "./TelemetryService";
],
})
@EnableWorkflow({
create: true,
delete: true,
update: true,
read: true,
create: false,
delete: false,
update: false,
read: false,
})
@CrudApiEndpoint(new Route("/metric-type"))
@SlugifyColumn("name", "slug")
@@ -359,6 +359,7 @@ export default class MetricType 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

@@ -221,12 +221,7 @@ export default class Monitor extends BaseModel {
@Index()
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateProjectMonitor,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -239,6 +234,7 @@ export default class Monitor extends BaseModel {
required: true,
unique: true,
type: TableColumnType.Slug,
computed: true,
title: "Slug",
description: "Friendly globally unique name for your object",
})
@@ -324,6 +320,7 @@ export default class Monitor 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)",
})
@@ -480,7 +477,7 @@ export default class Monitor extends BaseModel {
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateProjectMonitor,
Permission.CreateProjectIncident,
],
read: [
Permission.ProjectOwner,
@@ -499,6 +496,7 @@ export default class Monitor extends BaseModel {
@TableColumn({
type: TableColumnType.ObjectID,
required: true,
isDefaultValueColumn: true,
title: "Current Monitor Status ID",
description: "Whats the current status ID of this monitor?",
canReadOnRelationQuery: true,
@@ -611,12 +609,7 @@ export default class Monitor extends BaseModel {
public customFields?: JSONObject = undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateProjectMonitor,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -628,10 +621,13 @@ export default class Monitor 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,
@@ -667,6 +663,7 @@ export default class Monitor extends BaseModel {
isDefaultValueColumn: true,
title: "Disable Monitoring",
description: "Disable active monitoring for this resource?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,
@@ -784,6 +781,7 @@ export default class Monitor extends BaseModel {
title: "Disable Monitoring because of Ongoing Scheduled Maintenance Event",
description:
"Disable Monitoring because of Ongoing Scheduled Maintenance Event",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,
@@ -811,6 +809,7 @@ export default class Monitor extends BaseModel {
title: "Disable Monitoring because of Manual Incident",
description:
"Disable Monitoring because of Incident which is creeated manually by user.",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,
@@ -850,12 +849,7 @@ export default class Monitor extends BaseModel {
public serverMonitorRequestReceivedAt?: Date = undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateProjectMonitor,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -874,6 +868,7 @@ export default class Monitor extends BaseModel {
type: TableColumnType.ObjectID,
required: false,
isDefaultValueColumn: false,
computed: true,
title: "Server Monitor Secret Key",
description:
"This field is for Server Monitor only. Secret Key to authenticate the request.",
@@ -886,12 +881,7 @@ export default class Monitor extends BaseModel {
public serverMonitorSecretKey?: ObjectID = undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateProjectMonitor,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -910,6 +900,7 @@ export default class Monitor extends BaseModel {
type: TableColumnType.ObjectID,
required: false,
isDefaultValueColumn: false,
computed: true,
title: "Incoming Request Secret Key",
description:
"This field is for Incoming Request Monitor only. Secret Key to authenticate the request.",
@@ -993,6 +984,7 @@ export default class Monitor extends BaseModel {
title: "All Probes Disconnected From This Monitor",
description:
"All Probes Disconnected From This Monitor. Is this monitor not being monitored?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,
@@ -1017,6 +1009,7 @@ export default class Monitor extends BaseModel {
title: "No Probe Enabled On This Monitor",
description:
"No Probe Enabled On This Monitor. Is this monitor not being monitored?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,

View File

@@ -297,6 +297,7 @@ export default class MonitorCustomField 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

@@ -276,6 +276,7 @@ export default class MonitorFeed 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

@@ -222,12 +222,7 @@ export default class MonitorGroup extends BaseModel {
@Index()
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateMonitorGroup,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -240,6 +235,7 @@ export default class MonitorGroup extends BaseModel {
required: true,
unique: true,
type: TableColumnType.Slug,
computed: true,
title: "Slug",
description: "Friendly globally unique name for your object",
})
@@ -325,6 +321,7 @@ export default class MonitorGroup 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

@@ -353,6 +353,7 @@ export default class MonitorGroupOwnerTeam 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)",
})
@@ -395,12 +396,7 @@ export default class MonitorGroupOwnerTeam extends BaseModel {
public deletedByUserId?: ObjectID = undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateMonitorGroupOwnerTeam,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -412,10 +408,13 @@ export default class MonitorGroupOwnerTeam 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

@@ -352,6 +352,7 @@ export default class MonitorGroupOwnerUser 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)",
})
@@ -394,12 +395,7 @@ export default class MonitorGroupOwnerUser extends BaseModel {
public deletedByUserId?: ObjectID = undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateMonitorGroupOwnerUser,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -411,10 +407,13 @@ export default class MonitorGroupOwnerUser 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

@@ -348,6 +348,7 @@ export default class MonitorGroupResource 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

@@ -72,6 +72,7 @@ import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
@Entity({
name: "MonitorOwnerTeam",
})
@Index(["monitorId", "teamId", "projectId"])
export default class MonitorOwnerTeam extends BaseModel {
@ColumnAccessControl({
create: [
@@ -351,6 +352,7 @@ export default class MonitorOwnerTeam 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)",
})
@@ -414,6 +416,7 @@ export default class MonitorOwnerTeam extends BaseModel {
isDefaultValueColumn: true,
title: "Are Owners Notified",
description: "Are owners notified of this resource ownership?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,

View File

@@ -71,6 +71,7 @@ import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
@Entity({
name: "MonitorOwnerUser",
})
@Index(["monitorId", "userId", "projectId"])
export default class MonitorOwnerUser extends BaseModel {
@ColumnAccessControl({
create: [
@@ -350,6 +351,7 @@ export default class MonitorOwnerUser 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)",
})
@@ -413,6 +415,7 @@ export default class MonitorOwnerUser extends BaseModel {
isDefaultValueColumn: true,
title: "Are Owners Notified",
description: "Are owners notified of this resource ownership?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,

View File

@@ -24,6 +24,8 @@ export type MonitorStepProbeResponse = Dictionary<ProbeMonitorResponse>;
@EnableDocumentation()
@TenantColumn("projectId")
@Index(["monitorId", "probeId"]) // Composite index for efficient monitor-probe relationship queries
@Index(["monitorId", "projectId"]) // Alternative index for monitor queries within project
@TableAccessControl({
create: [
Permission.ProjectOwner,
@@ -376,6 +378,7 @@ export default class MonitorProbe 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)",
})
@@ -440,6 +443,7 @@ export default class MonitorProbe extends BaseModel {
isDefaultValueColumn: true,
required: true,
type: TableColumnType.Boolean,
defaultValue: true,
})
@Column({
type: ColumnType.Boolean,

View File

@@ -359,6 +359,7 @@ export default class MonitorSecret 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,8 @@ import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
@Entity({
name: "MonitorStatus",
})
@Index(["projectId", "isOperationalState"])
@Index(["projectId", "isOfflineState"])
export default class MonitorStatus extends BaseModel {
@ColumnAccessControl({
create: [
@@ -192,6 +194,7 @@ export default class MonitorStatus extends BaseModel {
required: true,
unique: true,
type: TableColumnType.Slug,
computed: true,
title: "Slug",
description: "Friendly globally unique name for your object",
})
@@ -314,6 +317,7 @@ export default class MonitorStatus 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)",
})
@@ -418,6 +422,7 @@ export default class MonitorStatus extends BaseModel {
canReadOnRelationQuery: true,
title: "Is Operational State",
description: "Is this monitor in operational state?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,

View File

@@ -25,6 +25,8 @@ import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
@EnableDocumentation()
@CanAccessIfCanReadOn("monitor")
@TenantColumn("projectId")
@Index(["monitorId", "projectId", "startsAt"]) // Composite index for efficient timeline queries
@Index(["monitorId", "startsAt"]) // Alternative index for monitor-specific timeline queries
@TableAccessControl({
create: [
Permission.ProjectOwner,
@@ -62,6 +64,7 @@ import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
@Entity({
name: "MonitorStatusTimeline",
})
@Index(["monitorId", "startsAt"])
@TableMetadata({
tableName: "MonitorStatusTimeline",
singularName: "Monitor Status Event",
@@ -276,6 +279,7 @@ export default class MonitorStatusTimeline 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)",
})
@@ -389,12 +393,7 @@ export default class MonitorStatusTimeline extends BaseModel {
public monitorStatusId?: ObjectID = undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateMonitorStatusTimeline,
],
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
@@ -406,10 +405,13 @@ export default class MonitorStatusTimeline extends BaseModel {
@Index()
@TableColumn({
type: TableColumnType.Boolean,
computed: true,
hideColumnInDocumentation: true,
required: true,
isDefaultValueColumn: true,
title: "Are Owners Notified",
description: "Are owners notified of status change?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,

View File

@@ -210,6 +210,7 @@ export default class MonitorTest 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)",
})
@@ -468,6 +469,7 @@ export default class MonitorTest extends BaseModel {
isDefaultValueColumn: false,
required: true,
type: TableColumnType.Boolean,
defaultValue: true,
})
@Column({
type: ColumnType.Boolean,

View File

@@ -276,6 +276,7 @@ export default class OnCallDutyPolicy extends BaseModel {
type: TableColumnType.Slug,
title: "Slug",
description: "Friendly globally unique name for your object",
computed: true,
})
@Column({
nullable: false,
@@ -359,6 +360,7 @@ export default class OnCallDutyPolicy 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)",
})
@@ -421,6 +423,7 @@ export default class OnCallDutyPolicy extends BaseModel {
type: TableColumnType.Boolean,
title: "Repeat Policy If No One Acknowledges",
description: "Repeat the policy if no one acknowledges the alert",
defaultValue: false,
})
@Column({
nullable: false,
@@ -457,6 +460,7 @@ export default class OnCallDutyPolicy extends BaseModel {
title: "Repeat Policy Times If No One Acknowledges",
description:
"Repeat the policy X number of times if no one acknowledges the alert",
defaultValue: 0,
})
@Column({
nullable: false,

View File

@@ -297,6 +297,7 @@ export default class OnCallDutyPolicyCustomField 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

@@ -335,6 +335,7 @@ export default class OnCallDutyPolicyEscalationRule 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

@@ -401,6 +401,7 @@ export default class OnCallDutyPolicyEscalationRuleSchedule 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

@@ -400,6 +400,7 @@ export default class OnCallDutyPolicyEscalationRuleTeam 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

@@ -53,7 +53,7 @@ import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
@TableMetadata({
tableName: "OnCallDutyPolicyEscalationRuleUser",
singularName: "User's On-Call Duty Escalation Rule",
pluralName: "User's On-Call Duty Esdcalation Rules",
pluralName: "User's On-Call Duty Escalation Rules",
icon: IconProp.Call,
tableDescription:
"Manage on-call duty escalation rule for the on-call policy.",
@@ -399,6 +399,7 @@ export default class OnCallDutyPolicyEscalationRuleUser 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

@@ -493,6 +493,7 @@ export default class OnCallDutyPolicyExecutionLog 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)",
})
@@ -847,6 +848,7 @@ export default class OnCallDutyPolicyExecutionLog extends BaseModel {
canReadOnRelationQuery: true,
title: "On-Call Policy Execution Repeat Count",
description: "How many times did we execute this on-call policy?",
defaultValue: 1,
})
@Column({
type: ColumnType.Number,

View File

@@ -51,6 +51,9 @@ import Alert from "./Alert";
@Entity({
name: "OnCallDutyPolicyExecutionLogTimeline",
})
@Index(["onCallDutyPolicyExecutionLogId", "createdAt"])
@Index(["projectId", "createdAt"])
@Index(["alertSentToUserId", "projectId"])
@TableMetadata({
tableName: "OnCallDutyPolicyExecutionLogTimeline",
singularName: "On-Call Duty Execution Log Timeline",
@@ -701,6 +704,7 @@ export default class OnCallDutyPolicyExecutionLogTimeline 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 OnCallDutyPolicyFeed 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)",
})

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