Compare commits

...

892 Commits

Author SHA1 Message Date
Simon Larsen
7c17328ee3 feat: Add debug logging for SCIM API requests in ServiceProviderConfig, Users, Individual User, and User management endpoints 2025-09-01 18:52:02 +01:00
Simon Larsen
3eeb2a9eca feat: Enhance SCIM user update functionality to support user creation and improved error handling 2025-09-01 16:55:34 +01:00
Simon Larsen
51fa5705b1 feat: Add SCIMUser and StatusPageSCIMUser models with migration and indexing 2025-09-01 16:38:47 +01:00
Simon Larsen
6f952d0a5b feat: Implement SCIM external ID support with user mapping and enhanced API functionality 2025-09-01 16:34:16 +01:00
Simon Larsen
ade98cf1ed feat: Add StatusPageSCIMUser model with access control and relationships to related entities 2025-09-01 16:21:37 +01:00
Simon Larsen
a65e480bb6 feat: Add SCIMUserService and StatusPageSCIMUserService classes extending DatabaseService 2025-09-01 16:20:19 +01:00
Simon Larsen
c777a935c3 feat: Implement SCIM user mapping functionality and enhance user lookup methods 2025-09-01 16:20:06 +01:00
Nawaz Dhandala
8ec9d2a930 feat: Add type annotations for proxy-related variables in ProxyConfig and monitors 2025-09-01 14:58:33 +01:00
Nawaz Dhandala
224c225789 Merge branch 'master' of https://github.com/OneUptime/oneuptime 2025-09-01 14:53:33 +01:00
Simon Larsen
85dae7a307 feat: Add proxy configuration options for probes in values.yaml and update README and probe.yaml 2025-09-01 14:53:24 +01:00
Nawaz Dhandala
332a479c22 feat: Improve proxy configuration handling and logging in monitors 2025-09-01 14:50:52 +01:00
Simon Larsen
d708fbbb52 feat: Add proxy configuration examples to Custom Probe documentation and component 2025-09-01 14:49:40 +01:00
Simon Larsen
03bceb959e feat: Enhance proxy support in SSL and Synthetic Monitors to prefer HTTPS, fallback to HTTP 2025-09-01 14:47:01 +01:00
Simon Larsen
efa411206e feat: Update SSL and Synthetic Monitors to use HTTPS proxy configuration 2025-09-01 14:41:57 +01:00
Simon Larsen
27fd99f2e8 feat: Update proxy configuration to support separate HTTP and HTTPS proxy URLs 2025-09-01 14:40:54 +01:00
Simon Larsen
07361bfeb7 feat: Enhance SyntheticMonitor with proxy support in browser launch options 2025-09-01 14:07:15 +01:00
Simon Larsen
bc8a5be0fa feat: Add proxy support for CustomCodeMonitor and SyntheticMonitor with logging 2025-09-01 14:00:55 +01:00
Simon Larsen
518768078a feat: Implement proxy configuration for HTTP requests and add ProxyConfig utility 2025-09-01 13:56:29 +01:00
Simon Larsen
86e95f99ff feat: Add PROXY_URL configuration option for probe and update example env file 2025-09-01 12:52:50 +01:00
Simon Larsen
ea48f56097 feat: Add custom styles for code blocks in blog posts 2025-09-01 12:43:03 +01:00
Nawaz Dhandala
b8b9dd859a Refactor migration files for consistency and readability; update BillingService and ProjectService for improved code clarity; enhance Countries interface formatting; standardize string quotes in various components; fix minor formatting issues in Settings and SendAnnouncementCreatedNotification. 2025-08-27 14:50:48 +01:00
Simon Larsen
d28c14ef24 feat: Update projectId reference in status page notification logic 2025-08-27 14:49:33 +01:00
Simon Larsen
670bec2a12 feat: Validate projectId and statusPageId in getStatusPageLinkInDashboard method 2025-08-27 14:48:40 +01:00
Simon Larsen
aff24845a8 feat: Add financeAccountingEmail handling in updateCustomerBusinessDetails method 2025-08-27 14:26:59 +01:00
Simon Larsen
f280e97c1b feat: Add migration for financeAccountingEmail field in Project model 2025-08-27 14:14:02 +01:00
Simon Larsen
62facf62dd feat: Add financeAccountingEmail field to Project model and update billing settings 2025-08-27 14:12:16 +01:00
Simon Larsen
db0387d81a feat: Update placeholder condition to include empty string check 2025-08-27 14:06:33 +01:00
Simon Larsen
5c4b19ab3d feat: Update nodemon configurations to improve performance and debugging options 2025-08-27 13:41:05 +01:00
Simon Larsen
463755fa4d This will be synced to Stripe and appear on future invoices. 2025-08-27 13:40:26 +01:00
Simon Larsen
85888572de feat: Update subscriber notification statuses to 'Success' for existing records in Incident and related tables 2025-08-27 13:20:07 +01:00
Simon Larsen
475bb25b2d feat: Add businessDetailsCountry field to Project migration and update index 2025-08-27 13:14:40 +01:00
Simon Larsen
badd200aed feat: Add country selection dropdown for billing details and implement country options 2025-08-27 13:14:01 +01:00
Simon Larsen
b40d87cbc9 feat: Add business details country field to Project model and update billing services to handle country code 2025-08-27 13:05:54 +01:00
Simon Larsen
36d0066b3a refactor: Simplify migration by removing unnecessary constraints and columns from Project and GlobalConfig tables 2025-08-27 13:03:01 +01:00
Simon Larsen
a49a0b2cba fix: Ensure blog post cards maintain full height for consistent layout 2025-08-27 12:48:41 +01:00
Simon Larsen
bada97d474 feat: Enhance customer address handling in Stripe by mapping business details to structured address fields 2025-08-27 12:42:17 +01:00
Simon Larsen
a1699f2d55 feat: Add business details field to Project model and update Stripe customer details 2025-08-27 12:37:09 +01:00
Simon Larsen
a11e054291 feat: Add custom link rendering with Tailwind styles and external link handling 2025-08-27 11:19:20 +01:00
Simon Larsen
47cf7ba763 fix: Increase timeout for SSL provisioning and delete old data jobs to accommodate longer processing times 2025-08-27 10:16:35 +01:00
Nawaz Dhandala
4e0dfb3664 fix: Simplify BadDataException handling for disabled and missing monitors in ingestion processes 2025-08-27 10:12:13 +01:00
Simon Larsen
250cb9e547 fix: Gracefully handle expected BadDataException cases for disabled and missing monitors in probe ingestion 2025-08-27 10:10:59 +01:00
Simon Larsen
541257e3c6 fix: Handle expected BadDataException cases for disabled and missing monitors in server monitor ingestion 2025-08-27 10:10:23 +01:00
Simon Larsen
ed43686736 fix: Centralize "Monitor disabled" message and improve error handling for disabled monitors 2025-08-27 10:09:26 +01:00
Simon Larsen
9ca45f23e3 fix: Replace hardcoded "Monitor not found" messages with centralized exception messages 2025-08-27 09:58:34 +01:00
Simon Larsen
e3573a9b77 fix: Refactor monitor not found error handling to use centralized exception messages 2025-08-27 09:55:19 +01:00
Simon Larsen
c9e78044e6 fix: Improve error handling in incoming request ingestion worker to handle disabled monitors gracefully 2025-08-27 09:48:54 +01:00
Nawaz Dhandala
813581dec5 fix: Add return type to logoutUser method and specify type for route in navigateToLoginPage method 2025-08-26 21:39:35 +01:00
Nawaz Dhandala
e528decf73 fix: Refactor QueueWorker options handling; improve logoutUser method formatting and navigation logic in StatusPageUtil 2025-08-26 21:36:56 +01:00
Simon Larsen
42ef41ede8 fix: Enhance QueueWorker options with lock duration and max stalled count; improve telemetry processing with yielding to avoid stall detection 2025-08-26 21:32:38 +01:00
Simon Larsen
af26472db4 fix: Simplify email validation logic and improve user lookup in SCIM user operations 2025-08-26 21:24:39 +01:00
Simon Larsen
44b5c8b668 fix: Enhance email validation and logging in SCIM user operations 2025-08-26 20:47:50 +01:00
Simon Larsen
d821b88ed7 fix: Update Docker image tags and labels for multiple services in release workflow 2025-08-26 18:52:15 +01:00
Simon Larsen
1df43e21ff fix: Refactor logoutUser method and enhance navigation logging in StatusPageUtil 2025-08-26 18:37:49 +01:00
Simon Larsen
76ca6ee7e1 fix: Add missing continuation for APP_VERSION build argument in multiple Docker image deploy jobs 2025-08-26 18:25:32 +01:00
Simon Larsen
dac731a57b refactor: Remove unused mock for ProjectUserService in TeamMemberService tests 2025-08-26 16:56:52 +01:00
Simon Larsen
0f4b248598 fix: Add missing context for Docker image build in nginx deployment 2025-08-26 16:53:25 +01:00
Simon Larsen
b2c14e0380 fix: Add missing build context for multiple Docker image deploy jobs 2025-08-26 16:51:51 +01:00
Simon Larsen
3ab9705bbe fix: Allow deletion of teams in Users component by setting isDeleteable to true 2025-08-26 16:34:19 +01:00
Nawaz Dhandala
40812c8749 refactor: Clean up whitespace in TeamMemberService and SCIM files; update description formatting in Users component 2025-08-26 15:59:22 +01:00
Simon Larsen
45ae1501f2 refactor: Replace ProjectUser with TeamMember in SCIM query for team members 2025-08-26 15:55:23 +01:00
Simon Larsen
13d9f19606 refactor: Remove ProjectUserService calls to streamline TeamMemberService operations 2025-08-26 15:52:28 +01:00
Simon Larsen
ad3221310a refactor: Remove ProjectUser model and associated service to streamline user management 2025-08-26 15:51:06 +01:00
Simon Larsen
659042fcfb fix: Update isCreateable property to false for Teams component 2025-08-26 14:43:54 +01:00
Simon Larsen
d65b9c7b29 feat: Refactor Teams component to use TeamMember model and update filtering logic 2025-08-26 14:42:14 +01:00
Simon Larsen
dc77206e6f feat: Add debug logging for SCIM team operations to track user additions 2025-08-26 14:25:31 +01:00
Nawaz Dhandala
9c1910d3f1 refactor: Remove unnecessary context argument from Docker build commands in workflows 2025-08-26 14:09:31 +01:00
Nawaz Dhandala
afe8f8e6f4 refactor: Implement retry mechanism for account and isolated VM compilation steps in workflows 2025-08-26 13:15:54 +01:00
Nawaz Dhandala
015bd0f870 refactor: Implement retry mechanism for Docker image builds in multiple workflows 2025-08-26 13:12:18 +01:00
Nawaz Dhandala
383c145186 refactor: Integrate retry mechanism for Docker image builds in workflows 2025-08-26 13:06:55 +01:00
Simon Larsen
f155795e6b fix: Remove single quotes from changelog delimiter for correct output formatting 2025-08-26 11:56:22 +01:00
Nawaz Dhandala
757f5b5721 refactor: Improve type annotations for better clarity in error handling 2025-08-26 11:42:15 +01:00
Nawaz Dhandala
694215df06 refactor: Improve code formatting for better readability in multiple files 2025-08-26 11:40:01 +01:00
Nawaz Dhandala
0eb6022f1d Merge branch 'master' of https://github.com/OneUptime/oneuptime 2025-08-26 11:38:10 +01:00
Nawaz Dhandala
3109006828 refactor: Replace regex literals with RegExp constructor for improved clarity in MarkdownViewer and StringUtils 2025-08-26 11:38:08 +01:00
Simon Larsen
272695bd11 feat: Enhance error handling and logging in processMetricsAsync and processTracesAsync methods for improved robustness 2025-08-26 11:36:47 +01:00
Simon Larsen
330e3bc106 fix: Correct syntax error in JavaScript expression example for incoming request monitors 2025-08-26 11:26:01 +01:00
Nawaz Dhandala
c7876bf3a3 refactor: Improve regex pattern for fact extraction and enhance code formatting in OtelIngestService 2025-08-26 11:22:36 +01:00
Simon Larsen
345ada5404 feat: Enhance error handling and logging in processLogsAsync method for improved telemetry data ingestion 2025-08-26 11:16:32 +01:00
Simon Larsen
4f97b1b460 feat: Enhance image loading and layout stability across blog views 2025-08-25 10:46:19 +01:00
Nawaz Dhandala
e35ef1809f refactor: Improve code formatting and consistency across Microsoft Teams integration files 2025-08-21 14:45:34 +01:00
Simon Larsen
c2926f3542 feat: Implement structured MessageCard creation from markdown for Microsoft Teams
- Added a method to build a structured MessageCard from markdown input, enhancing message formatting for Teams.
- Extracted title, facts, and actions from markdown to improve rendering in Teams notifications.
2025-08-21 14:43:13 +01:00
Simon Larsen
9495b4bd47 feat: Add Microsoft Teams incoming webhook option to subscriber settings
- Introduced a new property for Microsoft Teams incoming webhook URL in the StatusPageSubscriberService.
- Enhanced subscriber configuration to support Microsoft Teams notifications.
2025-08-21 14:25:49 +01:00
Simon Larsen
ad3f36fdf5 refactor: Simplify Slack and Microsoft Teams notification handling in StatusPageSubscriberService
- Removed try-catch blocks for sending notifications and replaced them with promise chaining for better readability.
- Added logging for successful notification sends and error handling directly in the promise catch.
2025-08-21 14:11:06 +01:00
Simon Larsen
f2221b0a40 feat: Implement Microsoft Teams webhook validation and notification in StatusPage subscriber service
- Added validation for Microsoft Teams incoming webhook URL during subscriber setup.
- Implemented notification sending to Microsoft Teams channel upon successful subscription.
- Updated SideMenu components to reflect the new naming convention for Microsoft Teams subscribers.
2025-08-21 14:04:20 +01:00
Simon Larsen
62fbc1f4be feat: Enhance Microsoft Teams subscriber validation and handling in StatusPage API
- Added validation to ensure Microsoft Teams subscribers are only processed if enabled.
- Updated error messages to include Microsoft Teams workspace name requirements.
- Implemented handling for Microsoft Teams incoming webhook URL and workspace name in subscriber setup.
2025-08-21 13:52:35 +01:00
Simon Larsen
054a2bc8f5 feat: Enable Microsoft Teams subscribers in StatusPage API 2025-08-21 13:49:28 +01:00
Simon Larsen
896787109c feat: Add Microsoft Teams subscriber option to Email, Slack, and SMS subscription pages 2025-08-21 13:47:13 +01:00
Simon Larsen
3a55fcc872 feat: Update microsoftTeamsIncomingWebhookUrl column type to text and add migration 2025-08-21 13:27:44 +01:00
Simon Larsen
2945a48d05 feat: Update microsoftTeamsWorkspaceName column type to VeryLongText and add migration 2025-08-21 13:15:44 +01:00
Simon Larsen
da3a7ddb2e feat: Add migration for Microsoft Teams subscriber functionality in StatusPage 2025-08-21 12:57:16 +01:00
Simon Larsen
04a0bfedaa fix: Make Microsoft Teams subscriber prop required in SideMenu component 2025-08-21 12:17:00 +01:00
Simon Larsen
fa5c7b1e73 feat: Add Microsoft Teams subscriber functionality
- Implemented Microsoft Teams subscribers in the dashboard side menu.
- Created Microsoft Teams subscriber settings page with toggle options.
- Added routes for Microsoft Teams subscribers in the routing configuration.
- Updated page map and route map to include Microsoft Teams subscriber paths.
- Enhanced the app state management to handle Microsoft Teams subscription settings.
- Integrated Microsoft Teams notification sending in the announcement and incident jobs.
- Developed Microsoft Teams subscription management and creation forms.
- Added UI components for managing Microsoft Teams subscribers in the status page.
2025-08-21 12:09:53 +01:00
Simon Larsen
a1c2918cd7 feat: Update homepage heading for improved clarity and emphasis on monitoring capabilities 2025-08-21 10:24:49 +01:00
Simon Larsen
91b11b12c1 fix: Update canonical links for blog posts and remove redundant canonical tags in head partials 2025-08-21 10:15:52 +01:00
Simon Larsen
778a34d631 feat: Implement fallback to commit messages in changelog if empty 2025-08-20 09:17:53 +01:00
Simon Larsen
6dbd838ca4 refactor: Remove mobile redirect script from homepage for cleaner code 2025-08-19 22:23:20 +01:00
Simon Larsen
e09634dc6f feat: Enhance blog listing with featured post display and improved layout 2025-08-19 22:21:12 +01:00
Simon Larsen
af60715de2 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-08-19 22:11:14 +01:00
Simon Larsen
3b4c54876e feat: Update default page size for blog pagination from 50 to 24 for improved performance 2025-08-19 22:11:12 +01:00
Nawaz Dhandala
e357100e46 refactor: Remove redundant dynamic section checks from sitemap tests 2025-08-19 20:43:08 +01:00
Simon Larsen
7f3a50076d feat: Add reference section check to sitemap tests for improved coverage 2025-08-19 14:25:37 +01:00
Simon Larsen
9d182b6d55 feat: Add additional static paths to sitemap generation for improved coverage 2025-08-19 14:25:16 +01:00
Simon Larsen
33fce0b53c feat: Implement caching for home URL retrieval to improve performance 2025-08-19 14:15:47 +01:00
Nawaz Dhandala
3db8419349 refactor: Simplify error handling in BlogPostUtil by removing unused error variables 2025-08-19 13:50:35 +01:00
Nawaz Dhandala
dfc324b099 refactor: Improve code formatting and readability in Markdown and BlogPost utilities 2025-08-19 12:58:17 +01:00
Simon Larsen
36521ef37c feat: Update blog post listing to improve layout and add Open Source Commitment section 2025-08-19 12:55:09 +01:00
Simon Larsen
a6f336340e feat: Implement pagination and tag filtering for blog posts 2025-08-19 12:40:51 +01:00
Simon Larsen
c36f782192 feat: Refactor blog post listing and tags display for improved layout and user experience 2025-08-19 12:34:23 +01:00
Simon Larsen
5219f1cfc0 feat: Remove unused imports and the getNameOfGitHubUser function from BlogPostUtil class 2025-08-19 12:29:27 +01:00
Simon Larsen
7f84d50baa feat: Add optional bio field for authors and update blog post template to display it 2025-08-19 12:28:12 +01:00
Simon Larsen
cd2ce3f1a8 feat: Add a newline for improved readability in BlogPostUtil class 2025-08-19 12:15:23 +01:00
Simon Larsen
01b0e01ca8 feat: Implement caching for blog metadata and improve author resolution without GitHub API calls 2025-08-19 12:07:33 +01:00
Simon Larsen
73dc6bb5db feat: Remove social media image display from blog post template 2025-08-19 11:55:38 +01:00
Simon Larsen
ab7fc1c244 feat: Enhance Markdown renderer with improved code block styling and add support for horizontal rules, emphasis, and strikethrough 2025-08-19 11:50:48 +01:00
Simon Larsen
3927bea29c feat: Enhance Markdown rendering with improved list, table, and inline code support; update tag display styling for better visual consistency 2025-08-19 11:47:21 +01:00
Simon Larsen
6060d66c2b feat: Revamp blog post layout with enhanced styling, author details, and reading time estimation 2025-08-19 11:37:10 +01:00
Nawaz Dhandala
9f4869b05f test: Enhance sitemap tests to validate presence of dynamic sections 2025-08-19 10:07:11 +01:00
Nawaz Dhandala
17bdfee012 refactor: Simplify regex usage in sitemap tests and improve middleware formatting 2025-08-19 10:05:59 +01:00
Simon Larsen
4988b9fc7a feat: Refactor mobile menu implementation for improved accessibility and usability 2025-08-19 10:04:20 +01:00
Simon Larsen
9edc6b9f18 feat: Enhance mobile navigation and improve header styling for better accessibility 2025-08-19 09:58:03 +01:00
Simon Larsen
525e19faa6 feat: Improve tab accessibility and keyboard navigation with semantic identifiers 2025-08-19 09:49:23 +01:00
Simon Larsen
588e8976d2 feat: Add middleware to inject home URL for canonical links and update canonical tag in head-basic.ejs 2025-08-19 09:47:59 +01:00
Simon Larsen
d5e28e98fb Merge branch 'master' of github.com:OneUptime/oneuptime 2025-08-19 09:39:45 +01:00
Simon Larsen
0e84bc9c40 feat: Enhance accessibility and keyboard navigation for product tabs 2025-08-19 09:39:42 +01:00
Nawaz Dhandala
39e8b1da6b refactor: Enhance type annotations and improve code readability in sitemap tests 2025-08-18 13:47:35 +01:00
Nawaz Dhandala
66c4badd94 refactor: Improve formatting of product pages check in sitemap tests 2025-08-18 13:41:01 +01:00
Simon Larsen
a245fabc34 feat: Add end-to-end tests for sitemap loading and validation 2025-08-18 13:39:19 +01:00
Nawaz Dhandala
fa9fce2774 refactor: Improve type annotations and error handling in various modules 2025-08-18 12:59:17 +01:00
Nawaz Dhandala
a256f4be54 Refactor logging statements for improved readability and consistency across services
- Updated logging statements in Sitemap.ts to enhance code clarity.
- Reformatted logger.info calls in IncomingRequestIngest, OpenTelemetryIngest, Probe, ProbeIngest, and ServerMonitorIngest to use multi-line formatting for better readability.
- Adjusted import statements in Probe to follow a consistent multi-line format.
2025-08-18 12:48:23 +01:00
Simon Larsen
4869172648 feat: Ensure home URL is prioritized in sitemap XML generation 2025-08-18 12:46:45 +01:00
Simon Larsen
1abd323b00 feat: Refactor sitemap generation and clean up unused imports 2025-08-18 12:45:06 +01:00
Simon Larsen
fa196a55cd feat: Update XML builder import and fix attribute assignment in URL set creation 2025-08-18 12:32:57 +01:00
Simon Larsen
29b4417aca feat: Update robots.txt to remove disallowed paths and simplify access 2025-08-18 12:31:57 +01:00
Simon Larsen
29c0d7e7e9 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-08-16 15:04:23 +01:00
Simon Larsen
bfbe2437c0 feat: Add concurrency logging for various ingest services 2025-08-16 15:04:10 +01:00
Nawaz Dhandala
ca0e082daf refactor: Simplify mock setup for ProjectUserService in TeamMemberService tests 2025-08-15 19:06:41 +01:00
Nawaz Dhandala
1987b1c42e refactor: Add type annotations for domain and verificationText variables in DNS tests 2025-08-15 16:31:23 +01:00
Nawaz Dhandala
38be6edec3 feat: Improve DNS error handling with user-friendly messages and enhance tests for TXT and CNAME record verification 2025-08-15 16:29:41 +01:00
Simon Larsen
b80dda6d1a feat: Enhance DNS error handling with user-friendly messages and add tests for TXT and CNAME record verification 2025-08-15 16:23:56 +01:00
Simon Larsen
f65b2711ca feat: Change Repeat Policy Times column type from Boolean to Number 2025-08-15 11:49:57 +01:00
Simon Larsen
151c3d8c52 feat: Update logging scripts in package.json to include follow-logs command and adjust logs command 2025-08-15 11:48:16 +01:00
Simon Larsen
f17ae36dce docs: Update TerraformBuild.md to clarify restrictions on editing API key and oneuptime_url variables 2025-08-15 11:45:31 +01:00
Simon Larsen
777c6948ad feat: Add Terraform provider generation and installation instructions 2025-08-15 11:42:03 +01:00
Simon Larsen
1c6f9adbcb Merge branch 'release' of github.com:OneUptime/oneuptime into release 2025-08-14 13:52:14 +01:00
Simon Larsen
6d1b3f8568 Merge branch 'master' into release 2025-08-14 13:52:00 +01:00
Simon Larsen
11526816d1 feat: Add onCallScheduleId to UserNotificationRuleService and UserOnCallLogService for enhanced tracking 2025-08-14 13:44:45 +01:00
Nawaz Dhandala
bf190b6a32 refactor: Clean up code formatting and improve readability across multiple services and components 2025-08-14 13:10:43 +01:00
Simon Larsen
4736ea8227 feat: Refine extractSayMessagesFromCallRequest to focus on main messages for call summary 2025-08-14 12:59:38 +01:00
Simon Larsen
2cb4281fc3 feat: Update viewPageRoute in ExecutionLogsTable to use RouteUtil for dynamic route population 2025-08-14 12:47:16 +01:00
Simon Larsen
505ed980c3 feat: Improve sayMessage extraction from onInputCallRequest in CallService 2025-08-14 12:44:47 +01:00
Simon Larsen
a0b77c94b0 feat: Enhance message extraction in CallService to include onInputCallRequest messages 2025-08-14 12:37:46 +01:00
Simon Larsen
bb996ddaa2 feat: Add OnCall-related fields to notification services for enhanced tracking 2025-08-14 12:26:51 +01:00
Simon Larsen
a2f8e49bc1 feat: Enhance channel retrieval in Slack and MicrosoftTeams with error handling and fallback mechanism 2025-08-14 11:38:37 +01:00
Simon Larsen
4d6086b7fd feat: Enhance modal display in PushLogsTable with Markdown support for better formatting 2025-08-14 11:26:20 +01:00
Simon Larsen
f84a1db36a refactor: Improve modal text handling in CallLogsTable and remove unused Device Type column in PushLogsTable 2025-08-14 11:21:20 +01:00
Simon Larsen
3aa4214e54 fix: Update condition for rendering placeholder in Detail component for better null handling 2025-08-14 11:12:53 +01:00
Simon Larsen
2fb8341f9c feat: Add default value for actionType in WorkspaceNotificationLog for improved tracking 2025-08-13 21:10:09 +01:00
Simon Larsen
888d18d0a3 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-08-13 21:01:53 +01:00
Simon Larsen
7f8270fac1 refactor: Add actionType to log in send message functionality for better tracking 2025-08-13 21:01:46 +01:00
Simon Larsen
318c1516cd Merge pull request #1981 from OneUptime/master
Release
2025-08-13 19:50:22 +01:00
Nawaz Dhandala
0343dcca93 refactor: Improve mail sending logic in UserService for better readability and consistency 2025-08-13 19:50:05 +01:00
Simon Larsen
7728e38029 refactor: Rename messageSummary to message in WorkspaceNotificationLog and related services for consistency 2025-08-13 19:49:36 +01:00
Simon Larsen
83a0efcbb9 refactor: Remove length restriction on joined strings in WorkspaceNotificationRuleService for improved readability 2025-08-13 19:42:17 +01:00
Simon Larsen
577ba9436e refactor: Simplify return logic in Service class and remove unnecessary TypeScript ignore comment in StatusPagesRoutes 2025-08-13 19:41:37 +01:00
Simon Larsen
a521f42417 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-08-13 19:38:06 +01:00
Simon Larsen
1002616ab3 refactor: Remove redundant userId parameter from service calls for cleaner code 2025-08-13 19:38:02 +01:00
Nawaz Dhandala
13adbd2443 refactor: Update MigrationName1755109893911 for consistent formatting and include in index 2025-08-13 19:36:34 +01:00
Simon Larsen
12b82252f1 refactor: Remove unnecessary await from CallService.makeCall in UserNotificationRuleService and UserNotificationSettingService for improved performance 2025-08-13 19:35:43 +01:00
Simon Larsen
bdb9cb9b9a Merge branch 'master' of github.com:OneUptime/oneuptime 2025-08-13 19:32:27 +01:00
Simon Larsen
c5e19db669 refactor: Add deviceName column to PushNotificationLog and update default actionType in WorkspaceNotificationLog for improved tracking 2025-08-13 19:32:23 +01:00
Nawaz Dhandala
345bdf80e1 refactor: Update device handling in PushNotification to support new devices format and improve error handling 2025-08-13 19:29:55 +01:00
Nawaz Dhandala
c4bf5e5001 refactor: Enhance device handling in PushNotification and improve type safety in PushNotificationService and PushLogsTable 2025-08-13 19:25:27 +01:00
Nawaz Dhandala
a3685b3698 refactor: Update push notification handling to use devices array with optional device names for improved clarity 2025-08-13 19:20:27 +01:00
Nawaz Dhandala
388f6e3530 refactor: Add deviceName field to PushNotificationLog and update PushLogsTable for improved device tracking 2025-08-13 19:09:32 +01:00
Nawaz Dhandala
0493dabb93 refactor: Remove unnecessary whitespace in makeCall method for improved code consistency 2025-08-13 18:57:10 +01:00
Simon Larsen
2383b2d352 refactor: Replace userBelongsToTeamId with teamId in CallService, UserNotificationRuleService, and UserNotificationSettingService for consistency 2025-08-13 18:56:21 +01:00
Simon Larsen
c526c0e320 refactor: Replace userBelongsToTeamId and overridedByUserId with teamId in notification services for consistency 2025-08-13 18:45:42 +01:00
Nawaz Dhandala
7d607608b3 refactor: Enhance user display handling in notification log tables for improved clarity 2025-08-13 18:18:27 +01:00
Nawaz Dhandala
abece559ea refactor: Simplify onClick handlers in CallLogsTable and EmailLogsTable for improved readability 2025-08-13 18:09:46 +01:00
Simon Larsen
f9b0c499ed refactor: Simplify props in CallLogsTable, EmailLogsTable, PushLogsTable, SmsLogsTable, and WorkspaceLogsTable for improved readability and maintainability 2025-08-13 18:07:26 +01:00
Nawaz Dhandala
38594f5198 refactor: Align query prop indentation in PushLogsTable, SmsLogsTable, and WorkspaceLogsTable for consistency 2025-08-13 18:00:41 +01:00
Simon Larsen
8f08ec42c7 refactor: Update query prop type to use Query<BaseModel> for improved type safety in log tables 2025-08-13 17:59:59 +01:00
Simon Larsen
8c697149e3 refactor: Remove unused log components (CallLog, EmailLog, PushLog, SmsLog) 2025-08-13 17:57:56 +01:00
Simon Larsen
2ff3dee440 refactor: Remove CallLog, EmailLog, and SmsLog components to streamline dashboard settings 2025-08-13 17:52:07 +01:00
Nawaz Dhandala
c0e8193614 refactor: Update NotificationLogsTabs to use typed Query object for improved type safety 2025-08-13 17:42:14 +01:00
Nawaz Dhandala
c1d06fdae5 refactor: Simplify component formatting in NotificationLogsTabs and related pages 2025-08-13 17:40:33 +01:00
Simon Larsen
00ed20ea68 fix: Update import path for NotificationLogs component in ScheduledMaintenanceEventsRoutes 2025-08-13 17:40:02 +01:00
Simon Larsen
db93cc8841 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-08-13 17:37:41 +01:00
Simon Larsen
374e8ecb4c refactor: Update NotificationLogsTabs to use query object for improved flexibility 2025-08-13 17:37:14 +01:00
Nawaz Dhandala
9ac17850a6 refactor: Simplify MailService sendMail calls and improve formatting in Notification components 2025-08-13 17:34:58 +01:00
Simon Larsen
a38d75b8f0 Refactor Notification Logs: Consolidate Tabs into NotificationLogsTabs Component
- Removed individual log components for Email, SMS, Call, Push, and Workspace from various pages.
- Replaced existing tab implementations with a unified NotificationLogsTabs component.
- Updated pages for Incidents, OnCallDuty, ScheduledMaintenanceEvents, StatusPages, and Settings to use the new NotificationLogsTabs.
- The NotificationLogsTabs component dynamically generates tabs based on the provided singular name and query key.
2025-08-13 17:32:47 +01:00
Simon Larsen
1bfdf90bca fix: Remove unnecessary userId parameter from signup request handling 2025-08-13 17:30:33 +01:00
Simon Larsen
49e3db9442 fix: Update icon in SideMenu components from List to Bell for improved clarity 2025-08-13 17:19:18 +01:00
Simon Larsen
83ab7030a4 fix: Update icon for SideMenuItem to improve visual consistency 2025-08-13 17:18:18 +01:00
Simon Larsen
76abf62917 feat: Add on-call policy related fields to notification services and API endpoints 2025-08-13 17:13:04 +01:00
Simon Larsen
a5c2f19846 fix: Remove unnecessary userId parameter from signup response handling 2025-08-13 15:59:01 +01:00
Simon Larsen
d37e783aeb fix: Remove unnecessary userId parameter from signup request handling 2025-08-13 15:58:17 +01:00
Simon Larsen
657ea0ec09 refactor: Update default messages in notification log tables to specify project context 2025-08-13 15:56:27 +01:00
Simon Larsen
e59f7a0a7f refactor: Update action type values in WorkspaceNotificationLog and related services for consistency 2025-08-13 15:55:02 +01:00
Nawaz Dhandala
35fc80de1e refactor: Rename "Initiated by" to "User" in notification log tables for consistency 2025-08-13 15:21:49 +01:00
Nawaz Dhandala
5e2dea40a3 refactor: Adjust formatting in Tabs component for improved readability 2025-08-13 15:18:30 +01:00
Nawaz Dhandala
a66f92e0b9 refactor: Simplify TabElement class assignment and clean up Tabs component structure 2025-08-13 15:16:58 +01:00
Nawaz Dhandala
a2ce7c9433 refactor: Remove unnecessary blank line before SettingsWorkspaceLog component 2025-08-13 15:02:49 +01:00
Nawaz Dhandala
eab1dc4b1b refactor: Replace SettingsWorkspaceLog component with direct import of WorkspaceLogsTable and remove unused WorkspaceLog file 2025-08-13 15:01:23 +01:00
Nawaz Dhandala
6939c70ed8 feat: Add actionType to WorkspaceNotificationLog and update OnCallDutyPolicyScheduleLayer defaults in migration 2025-08-13 14:58:11 +01:00
Simon Larsen
cce0dc8a45 feat: Add migration to include actionType in WorkspaceNotificationLog and update OnCallDutyPolicyScheduleLayer defaults 2025-08-13 14:53:05 +01:00
Simon Larsen
ec51d7b574 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-08-13 14:38:16 +01:00
Simon Larsen
d4129cfa8e fix: Correct permission assignment for creating incident state timelines 2025-08-13 14:38:12 +01:00
Nawaz Dhandala
1ee7c092d3 Refactor Workspace Notification Log Service and related components
- Added missing commas in migration index for consistency.
- Cleaned up whitespace in WorkspaceNotificationLogService for better readability.
- Updated logChannelCreated and logUserInvited methods to improve code clarity.
- Enhanced button press logging in Slack actions for better error handling.
- Standardized formatting in ScheduledMaintenance and Incident Slack actions.
- Improved code structure in UptimeUtil for better readability.
- Refactored Notification components in Dashboard for consistent formatting.
- Updated WorkspaceLog component to include color typing for action types.
2025-08-13 14:30:51 +01:00
Simon Larsen
daf3b13e00 refactor: Remove unused resource association logic from user invitation process 2025-08-13 14:27:09 +01:00
Simon Larsen
5035319cc6 feat: Add action type column to WorkspaceLogsTable for improved visibility 2025-08-13 14:23:17 +01:00
Simon Larsen
3d53889d1e feat: Refactor notification log components to simplify structure and improve readability 2025-08-13 14:22:19 +01:00
Simon Larsen
65b610ebbb feat: Enhance WorkspaceLog with action type display and filtering options 2025-08-13 14:09:49 +01:00
Simon Larsen
30d1b43178 feat: Add WorkspaceNotificationActionType enum for notification actions 2025-08-13 14:08:35 +01:00
Simon Larsen
d0645f5dc2 feat: Add on-call duty policy fields and constraints to log tables 2025-08-13 13:42:31 +01:00
Simon Larsen
2274c14098 feat: Add On-Call Duty Policy and Schedule Notification Logs
- Enhanced PushNotificationLog, SmsLog, and WorkspaceNotificationLog models to include relationships with OnCallDutyPolicy, OnCallDutyPolicyEscalationRule, OnCallDutyPolicySchedule, and Team.
- Introduced new NotificationLogs components for OnCallDutyPolicy and OnCallDutySchedule, allowing users to view logs for Email, SMS, Call, Push, and Workspace notifications.
- Updated SideMenu components to include links to the new Notification Logs pages for both OnCallDutyPolicy and OnCallDutySchedule.
- Added routes and page mappings for the new Notification Logs views in OnCallDutyRoutes and PageMap.
2025-08-13 13:40:32 +01:00
Simon Larsen
d1b4d3867a feat: Enhance event overlap checks for today's events in DayUptimeGraph and UptimeUtil 2025-08-13 13:18:08 +01:00
Simon Larsen
04d4712c81 feat: Add Notification Logs section and related components for scheduled maintenance events 2025-08-13 12:58:42 +01:00
Nawaz Dhandala
9c2d2b658b refactor: Simplify event overlap check for today's events in DayUptimeGraph 2025-08-13 12:37:00 +01:00
Nawaz Dhandala
fdb1444dc8 fix: Specify type for loop index in push log creation for clarity 2025-08-13 12:24:55 +01:00
Nawaz Dhandala
39f724b77f fix: Make 'name' property public in MigrationName class for consistency 2025-08-13 12:24:08 +01:00
Nawaz Dhandala
dbfa153209 feat: Add userId tracking to email notifications and enhance logging across services 2025-08-13 12:23:45 +01:00
Simon Larsen
1c8739237f feat: Add userId tracking to email notifications across various services 2025-08-13 12:13:19 +01:00
Simon Larsen
26cdaacf6b feat: Add AlertDescription lazy import and route for alert view description 2025-08-13 11:55:28 +01:00
Simon Larsen
bbc8f0c680 feat: Add userId field to various services for enhanced tracking and logging 2025-08-12 21:54:51 +01:00
Simon Larsen
61dd8e9202 feat: Add userId field to notification logs and services for tracking user actions 2025-08-12 21:33:29 +01:00
Simon Larsen
6e17832239 feat: Enhance PushNotificationService with detailed logging and error handling 2025-08-12 21:00:30 +01:00
Simon Larsen
6460827c4c refactor: Remove Thread ID column from WorkspaceLogsTable 2025-08-12 20:40:22 +01:00
Simon Larsen
7bfd810b73 feat: Integrate MarkdownViewer for modal description in WorkspaceLogsTable 2025-08-12 19:46:18 +01:00
Simon Larsen
8b17217778 refactor: Remove redundant error logging for missing threads in workspace notification service 2025-08-12 19:44:24 +01:00
Simon Larsen
19a86e9683 fix: Change type of elk variable to any in ServiceDependencyGraph component 2025-08-12 19:23:10 +01:00
Simon Larsen
d2fd46db50 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-08-12 17:39:52 +01:00
Simon Larsen
26cfbd07cb feat: Add server names hash tuning options to nginx configuration 2025-08-12 17:39:47 +01:00
Nawaz Dhandala
33992984e2 fix: Correct indentation for metrics endpoint exposure in WorkersFeatureSet 2025-08-12 17:38:38 +01:00
Nawaz Dhandala
e295c19b19 feat: Implement KEDA autoscaling for worker service with metrics endpoint 2025-08-12 17:37:13 +01:00
Nawaz Dhandala
51d42c8436 feat: Update no items message in Notification Logs tables to include pluralization 2025-08-12 14:57:25 +01:00
Nawaz Dhandala
50f16d0fdc Refactor Notification Logs Tables and Related Components
- Updated EmailLogsTable, PushLogsTable, and SmsLogsTable components for improved readability and consistency in code formatting.
- Enhanced the structure of props in various components to maintain uniformity.
- Refactored the return statements in several components to use consistent formatting.
- Cleaned up unnecessary whitespace and improved the organization of imports across multiple files.
- Adjusted the breadcrumb and route mapping for better clarity and maintainability.
2025-08-11 16:48:29 +01:00
Nawaz Dhandala
726ab4d7c0 Merge branch 'master' of https://github.com/OneUptime/oneuptime 2025-08-11 16:47:55 +01:00
Nawaz Dhandala
1461dd0164 feat: Add source and target positions to nodes in ServiceDependencyGraph 2025-08-11 16:47:54 +01:00
Simon Larsen
5ce1a782b3 refactor: Remove 'Subject' column from EmailLogsTable component 2025-08-11 14:41:59 +01:00
Simon Larsen
741eaec1d3 feat: Add modal functionality to Notification Logs tables for viewing details 2025-08-11 14:38:35 +01:00
Simon Larsen
2d8c931641 refactor: Standardize formatting in EmailLogsTable component 2025-08-11 14:26:05 +01:00
Simon Larsen
4db479958b refactor: Remove unused imports and simplify ServiceCatalogPage component 2025-08-11 14:26:00 +01:00
Simon Larsen
8c825f1498 refactor: Update imports in ServiceDependencyGraph and clean up AnnouncementView component 2025-08-11 14:10:48 +01:00
Simon Larsen
25426992be feat: Add route for deleting announcement view in Status Pages 2025-08-11 14:01:25 +01:00
Simon Larsen
861a72d194 feat: Enhance Notification Logs tables with singular and plural naming support 2025-08-11 13:54:54 +01:00
Simon Larsen
0857cebcfc Refactor Notification Logs: Replace ModelTable with dedicated components for Call, Email, Push, SMS, and Workspace logs
- Introduced new components: CallLogsTable, EmailLogsTable, PushLogsTable, SmsLogsTable, and WorkspaceLogsTable.
- Updated NotificationLogsSms, NotificationLogsEmail, NotificationLogsCall, NotificationLogsPush, and NotificationLogsWorkspace to utilize the new components.
- Removed redundant column and filter definitions from the individual log pages, centralizing them in the new table components.
- Enhanced code readability and maintainability by separating concerns and reducing duplication.
2025-08-11 13:28:50 +01:00
Nawaz Dhandala
975af2c22a Merge branch 'master' of https://github.com/OneUptime/oneuptime 2025-08-11 13:16:02 +01:00
Nawaz Dhandala
98d15f91b0 feat: Integrate ELK for layout management in ServiceDependencyGraph and add typings for elkjs 2025-08-11 13:15:59 +01:00
Simon Larsen
6d55b59a21 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-08-11 12:47:35 +01:00
Simon Larsen
8a27651d84 feat: Add Notification Logs section and related components for Status Pages 2025-08-11 12:45:05 +01:00
Nawaz Dhandala
6a35dffcb5 feat: Update ServiceDependencyGraph to enhance edge styling and add read-only view styles 2025-08-11 12:34:49 +01:00
Nawaz Dhandala
1e4c46bb3f feat: Enhance ServiceDependencyGraph with luminance-based text color and update SideMenu icon 2025-08-11 12:33:11 +01:00
Simon Larsen
fe44c0fde4 feat: Add migration for WorkspaceNotificationLog table and related constraints 2025-08-11 12:09:54 +01:00
Nawaz Dhandala
089f612ec4 refactor: Improve code formatting and consistency across various components and routes 2025-08-11 12:01:59 +01:00
Simon Larsen
8dbd9e7430 Merge pull request #1982 from OneUptime/service-catalog-dependency
feat: Implement Service Catalog Dependency Graph and associated layou…
2025-08-11 11:58:53 +01:00
Simon Larsen
66eb9eede0 feat: Update notification log routes and components for consistency across Alerts, Incidents, Settings, and Status Pages 2025-08-11 11:57:02 +01:00
Nawaz Dhandala
e8db6fcb7f feat: Implement Service Catalog Dependency Graph and associated layout components 2025-08-11 11:47:08 +01:00
Simon Larsen
d9e7f44590 feat: Consolidate notification logs into unified components across Alerts, Incidents, Settings, and Status Pages 2025-08-10 15:20:14 +01:00
Simon Larsen
b7df0a7d05 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-08-10 14:51:25 +01:00
Nawaz Dhandala
4101954862 refactor: Enhance type definitions and improve message summary functions in WorkspaceNotificationRuleService 2025-08-10 14:51:09 +01:00
Nawaz Dhandala
d68e4737e7 refactor: Improve code formatting and readability across multiple components 2025-08-10 14:46:44 +01:00
Nawaz Dhandala
bfb80388a0 Merge branch 'master' of https://github.com/OneUptime/oneuptime 2025-08-10 14:45:52 +01:00
Nawaz Dhandala
1beb96345b feat: Add Workspace Logs functionality across various pages
- Introduced Workspace Logs link in the SideMenu for Alerts, Incidents, Settings, and Status Pages.
- Created new routes for viewing Workspace Logs in Alerts, Incidents, Settings, and Status Pages.
- Added WorkspaceNotificationLog model to handle logs related to messages sent to Slack and Microsoft Teams.
- Implemented WorkspaceNotificationLogService for managing log entries.
- Developed UI components for displaying Workspace Logs in Alerts, Incidents, Settings, and Status Pages.
- Added filtering options for Workspace Logs based on status and workspace type.
2025-08-10 14:45:50 +01:00
Simon Larsen
1eb2af737d feat: Add routes for viewing alert, incident, and announcement logs 2025-08-10 14:28:00 +01:00
Simon Larsen
18f756a29b Merge branch 'master' of github.com:OneUptime/oneuptime 2025-08-10 14:21:36 +01:00
Simon Larsen
002f98720c feat: Add route for Push Logs settings page 2025-08-10 14:21:32 +01:00
Nawaz Dhandala
fdf5aacc2b Refactor notification log components for improved readability and consistency
- Updated AlertPushLogs, AlertSmsLogs, IncidentCallLogs, IncidentSmsLogs, IncidentEmailLogs, and related components to enhance code formatting and structure.
- Improved the layout of column definitions and filter options for better readability.
- Ensured consistent use of object destructuring and formatting across components.
- Added missing line breaks and indentation for clarity.
- Updated query and cardProps formatting for consistency across components.
2025-08-10 13:28:44 +01:00
Simon Larsen
574cad6806 feat: Add migration for PushNotificationLog table and related constraints 2025-08-10 13:27:28 +01:00
Simon Larsen
34c4ae947b feat: Add Push Notification Logs functionality
- Introduced PushNotificationLog model to track push notifications sent to users.
- Added permissions for reading push logs in the Permission enum.
- Updated various side menus to include links to Push Logs in Alerts, Incidents, and Settings.
- Created routes for viewing Push Logs in Alerts, Incidents, and Status Pages.
- Implemented UI components for displaying Push Logs in respective pages.
- Added filtering and column configuration for Push Logs tables.
- Integrated PushStatus enum to manage the status of push notifications.
- Implemented PushNotificationLogService for database interactions related to push logs.
2025-08-10 13:25:53 +01:00
Simon Larsen
8d9fc46506 feat: Add migration for new fields and constraints in CallLog, EmailLog, and SmsLog 2025-08-09 22:50:27 +01:00
Simon Larsen
c41fbefdcb feat: Add status page announcement logs to Call, Email, and SMS logs
- Enhanced CallLog, EmailLog, and SmsLog models to include relationships with StatusPageAnnouncement.
- Updated CallService, MailService, and SmsService to handle statusPageAnnouncementId.
- Introduced AnnouncementViewLayout and AnnouncementSideMenu for better navigation.
- Created dedicated components for viewing Email, SMS, and Call logs related to announcements.
- Added routes for viewing logs and deleting announcements.
- Implemented filtering and display of logs in the UI.
2025-08-09 22:47:24 +01:00
Simon Larsen
3e47051233 Add notification logs for alerts and incidents
- Implemented Email, SMS, and Call logs for alerts in the dashboard.
- Created corresponding components for viewing logs: AlertEmailLogs, AlertSmsLogs, AlertCallLogs.
- Added routes for accessing alert notification logs.
- Enhanced the SideMenu to include links to notification logs for alerts.
- Implemented Email, SMS, and Call logs for incidents in the dashboard.
- Created corresponding components for viewing logs: IncidentEmailLogs, IncidentSmsLogs, IncidentCallLogs.
- Added routes for accessing incident notification logs.
- Enhanced the SideMenu to include links to notification logs for incidents.
- Updated various services to include statusPageId and incidentId where necessary for better tracking.
2025-08-09 21:09:57 +01:00
Simon Larsen
8219f44708 fix: Adjust job removal counts in Queue class to manage Redis bloat more effectively 2025-08-08 22:05:54 +01:00
Simon Larsen
59e6505aa3 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-08-08 22:03:46 +01:00
Simon Larsen
1f971b932a feat: Implement initial cleanup for legacy jobs in Queue class to manage memory and prevent Redis bloat 2025-08-08 22:03:43 +01:00
Nawaz Dhandala
d0e12ae86f fix: Adjust indentation for improved readability in Config and Routes files 2025-08-08 21:56:35 +01:00
Simon Larsen
cd11a450cd feat: Introduce configurable concurrency settings for ingest workers in environment variables 2025-08-08 21:52:49 +01:00
Simon Larsen
c0259fc041 feat: Add concurrency setting for OpenTelemetry Ingest worker and update related configurations 2025-08-08 21:21:53 +01:00
Simon Larsen
db1f5a29bb fix: Update notification handling to mark announcements and public notes as Skipped when no related entities are found 2025-08-08 19:17:55 +01:00
Simon Larsen
a9ecaf2dc8 fix: Update incident handling to mark subscriber notifications as Skipped when no monitors are attached 2025-08-08 19:14:52 +01:00
Nawaz Dhandala
138aad596a Refactor logging statements for improved readability and consistency across worker jobs; ensure all debug messages are formatted uniformly. Update migration index to include trailing comma for consistency. Simplify route initialization in Workers feature set. 2025-08-08 18:53:40 +01:00
Simon Larsen
2577b339aa fix: Reorder route initialization to ensure worker routes are registered before default catch-alls 2025-08-08 18:44:09 +01:00
Simon Larsen
80e7731cca fix: Remove ClusterKeyAuthorization middleware from inspector route 2025-08-08 18:13:03 +01:00
Simon Larsen
9da7b258f9 feat: Add migration to rename subscriber notification fields and update database schema 2025-08-08 17:48:07 +01:00
Simon Larsen
0ec3b1aa39 fix: Remove obsolete migration files and update index to reflect changes 2025-08-08 17:42:27 +01:00
Simon Larsen
7a9bb22813 fix: Add UpdateSubscriberNotificationStatusToEnum migration for subscriber notification status updates 2025-08-08 17:34:12 +01:00
Simon Larsen
92550ac7d6 fix: Remove unnecessary createdAt condition in subscriber notification jobs and add debug logging for better traceability 2025-08-08 16:56:47 +01:00
Nawaz Dhandala
101df5b9b7 fix: Refactor error message in StatusPageDelete for better readability and clarity 2025-08-08 15:17:54 +01:00
Simon Larsen
c3d7672935 fix: Remove unnecessary NOT NULL constraint on subscriberNotificationStatusOnIncidentCreated in Incident table migration 2025-08-08 15:08:03 +01:00
Simon Larsen
859c6378af fix: Update Dockerfile to use apt-get for installing bash and curl 2025-08-08 14:05:51 +01:00
Simon Larsen
620979eab2 fix: Correct typo in notification status message 2025-08-08 13:37:52 +01:00
Simon Larsen
0aa1c51efa fix: Update error message in StatusPageDelete to clarify environment variable setup for Docker and Helm 2025-08-08 13:37:13 +01:00
Simon Larsen
1985e9fc25 fix: Update error message in StatusPageDelete to include environment variable requirement for custom domains 2025-08-08 13:35:27 +01:00
Simon Larsen
ba4093838b fix: Add type assertion for categoryColors in ChartLegend to ensure correct type usage 2025-08-07 22:31:54 +01:00
Nawaz Dhandala
4bd7902afe fix: Refactor ResourceGenerator to improve type annotations and code clarity 2025-08-07 22:05:47 +01:00
Simon Larsen
5c300ed513 feat: Enhance update method to conditionally include fields based on change detection 2025-08-07 22:03:21 +01:00
Simon Larsen
c4a50e853c feat: Add logging for unauthorized update attempts in ColumnPermissions 2025-08-07 21:29:13 +01:00
Simon Larsen
20c1f13876 fix: Exclude computed fields from default empty list assignment in ResourceGenerator 2025-08-07 21:22:48 +01:00
Simon Larsen
09426ed6be Merge branch 'master' of github.com:OneUptime/oneuptime 2025-08-07 21:11:42 +01:00
Nawaz Dhandala
675a031ee6 fix: Correct return type of getYAxisDomain function to match expected output 2025-08-07 21:02:59 +01:00
Simon Larsen
92986ac1f8 feat: Add isDefaultValueColumn flag to Downtime Monitor Statuses field in StatusPage model 2025-08-07 17:38:07 +01:00
Simon Larsen
2b95d608dc fix: Remove redundant build command for darwin arm architecture 2025-08-07 16:55:43 +01:00
Nawaz Dhandala
2696071933 fix: Correct formatting in ProjectSSO and UserNotificationSetting models; update conditional logic in DatabaseService 2025-08-07 16:46:14 +01:00
Nawaz Dhandala
684a61b599 feat: Add default values for boolean fields in various database models 2025-08-07 16:45:33 +01:00
Nawaz Dhandala
633a89161e Merge branch 'master' of https://github.com/OneUptime/oneuptime 2025-08-07 15:03:02 +01:00
Nawaz Dhandala
fd24781783 refactor: Optimize onBarClick and shape rendering logic in BarChart component 2025-08-07 15:03:00 +01:00
Simon Larsen
903b13d515 feat: Handle null values for required fields in data processing 2025-08-07 14:48:01 +01:00
Simon Larsen
58a128a05e Merge branch 'master' of github.com:OneUptime/oneuptime 2025-08-07 14:45:51 +01:00
Simon Larsen
ec1d567813 feat: Set default values for status page configuration options 2025-08-07 14:45:48 +01:00
Nawaz Dhandala
0a53161eac refactor: Improve type annotations and code consistency across various components 2025-08-07 14:31:13 +01:00
Nawaz Dhandala
83b91af708 Refactor code for consistency and readability across various components
- Updated import statements for better formatting in multiple files.
- Added semicolons for consistency in BarChart and SparkChart components.
- Improved code readability by using braces for single-line if statements in various functions.
- Enhanced the structure of return statements for clarity in SubscriberNotificationStatus and other components.
- Refactored map functions to use explicit return statements for better readability.
- Cleaned up whitespace and formatting in multiple files for a more uniform code style.
2025-08-07 13:55:08 +01:00
Simon Larsen
3fefee8725 feat: Enhance notification status handling and improve UI components 2025-08-07 13:49:53 +01:00
Simon Larsen
9b2cc7d377 feat: Update create permissions for Incident and Scheduled Maintenance models 2025-08-07 12:52:00 +01:00
Simon Larsen
1fb71ed2e3 feat: Implement subscriber notification status handling across multiple services 2025-08-07 12:46:40 +01:00
Simon Larsen
94a5abdb31 feat: Add SparkChart component with Area, Line, and Bar chart implementations 2025-08-07 11:52:44 +01:00
Simon Larsen
73f4559943 feat: Refactor BarChart component for improved type safety and event handling 2025-08-07 11:47:59 +01:00
Simon Larsen
9c3c6ee4e9 feat: Add BarChart component for enhanced data visualization 2025-08-07 11:29:19 +01:00
Simon Larsen
56743214a0 feat: Update button style in SubscriberNotificationStatus for improved UI consistency 2025-08-07 11:29:14 +01:00
Simon Larsen
9136c6d40e feat: Update color imports in SubscriberNotificationStatus for consistent branding 2025-08-07 11:23:46 +01:00
Simon Larsen
920a9baee9 feat: Update ConfirmModal behavior in SubscriberNotificationStatus for improved user interaction 2025-08-07 11:20:23 +01:00
Simon Larsen
1c4aad2d81 feat: Add SubscriberNotificationStatus component to IncidentViewStateTimeline and ScheduledMaintenanceDelete for enhanced notification display 2025-08-07 11:17:34 +01:00
Simon Larsen
8a4644922a feat: Add textColor prop to IconText component and update SubscriberNotificationStatus to utilize it 2025-08-07 11:04:20 +01:00
Simon Larsen
c3f4b7d3d4 feat: Enhance SubscriberNotificationStatus component with IconText and ConfirmModal for improved status display and user interaction 2025-08-07 10:54:10 +01:00
Simon Larsen
6f7c0814ee feat: Implement IconText component and refactor CheckboxViewer to use it 2025-08-07 10:49:21 +01:00
Nawaz Dhandala
77cd3fc4c0 refactor: Enhance type definitions for handleResendNotification and getNotificationStatusInfo across components 2025-08-06 16:02:57 +01:00
Nawaz Dhandala
e7cbc3d739 Refactor notification status assignments and improve code readability in incident and scheduled maintenance notification jobs
- Updated subscriber notification status assignments for better readability by breaking long lines.
- Added handling for non-visible scheduled maintenance events to set status to Skipped.
- Improved error handling and logging for scheduled maintenance public notes and state timelines.
- Ensured consistent formatting and structure across notification jobs for clarity and maintainability.
2025-08-06 15:41:28 +01:00
Simon Larsen
6d14ea19b9 feat: Add subscriberNotificationStatusMessage to selectMoreFields in multiple components 2025-08-06 14:47:13 +01:00
Simon Larsen
1290d3b946 fix: Remove unnecessary className from subscriberNotificationStatusMessage in PublicNote component 2025-08-06 14:29:51 +01:00
Simon Larsen
c0c58546d0 feat: Integrate Tooltip for subscriberNotificationStatusMessage in SubscriberNotificationStatus component 2025-08-06 14:17:37 +01:00
Simon Larsen
6c5ef10606 feat: Update migration files to rename subscriberNotificationFailedReason to subscriberNotificationStatusMessage and adjust imports 2025-08-06 14:05:26 +01:00
Simon Larsen
ec4c6ff7c5 feat: Rename subscriberNotificationFailedReason to subscriberNotificationStatusMessage across models and update related components 2025-08-06 14:04:06 +01:00
Simon Larsen
616e6e43ab feat: Update access control permissions for Incident, Scheduled Maintenance, and related models 2025-08-06 13:03:55 +01:00
Simon Larsen
aa08cd904b feat: Update SCIMPage to use Route for documentation link instead of URL 2025-08-06 12:34:21 +01:00
Simon Larsen
fef1c1055c feat: Integrate SubscriberNotificationStatus component in Incident and Scheduled Maintenance views, replacing checkbox logic 2025-08-06 12:31:14 +01:00
Simon Larsen
22e33809f9 feat: Remove style prop from SubscriberNotificationStatus component usage across various views 2025-08-06 11:39:59 +01:00
Simon Larsen
eb8324a3c2 feat: Replace NotificationStatusPill with SubscriberNotificationStatus component across various views 2025-08-06 11:25:35 +01:00
Simon Larsen
fa6dedc9a1 feat: Add resend notification functionality to NotificationStatusPill and related components 2025-08-06 11:24:20 +01:00
Simon Larsen
099cd807bf feat: Remove unused notification status fields and components from Announcements, Incidents, and Scheduled Maintenance tables 2025-08-06 10:58:15 +01:00
Simon Larsen
5d0b010fc4 feat: Remove unused StatusPageSCIM from AllModelTypes 2025-08-05 21:56:55 +01:00
Simon Larsen
1fc421f92a feat: Refactor notification status handling with NotificationStatusPill component 2025-08-05 21:31:08 +01:00
Simon Larsen
14a14e2341 feat: Add .claude/settings.local.json to .gitignore 2025-08-05 21:09:10 +01:00
Simon Larsen
ab23cca264 feat: Remove unused ActionButtonSchema import from multiple components 2025-08-05 20:42:06 +01:00
Simon Larsen
678a961fb9 feat: Add migration for updating subscriber notification status to the migration index 2025-08-05 18:35:49 +01:00
Simon Larsen
c2e458f035 feat: Rename notification failure reason columns for consistency and update types to text 2025-08-05 18:35:14 +01:00
Simon Larsen
4daf17dc8c feat: Add SCIM documentation for automated user provisioning and deprovisioning 2025-08-05 18:04:59 +01:00
Simon Larsen
842aa4b88d feat: Rename notification failure reason fields to subscriberNotificationFailedReason for consistency across incident and scheduled maintenance jobs 2025-08-05 18:03:33 +01:00
Simon Larsen
fd51142693 feat: Update notification failure reason fields to subscriberNotificationFailedReason and change type to VeryLongText 2025-08-05 17:57:17 +01:00
Simon Larsen
e0ddf80aa6 feat: Add migration for updating subscriber notification status and handling failure reasons in Incident and ScheduledMaintenance tables 2025-08-05 17:53:06 +01:00
Simon Larsen
e8d55164c6 feat: Update notification handling for subscribers across various jobs
- Introduced a new enum `StatusPageSubscriberNotificationStatus` to manage notification statuses (Skipped, Pending, InProgress, Success, Failed).
- Updated `SendNotificationToSubscribers` jobs for Announcements, Incidents, Scheduled Maintenance, and Public Notes to utilize the new notification status system.
- Added logic to mark notifications as Skipped if they should not be sent, and to update the status to InProgress when notifications are being processed.
- Implemented success and failure handling for notifications, updating the respective status and logging errors as needed.
- Modified database schema to replace old boolean notification flags with the new enum-based status fields, ensuring backward compatibility with existing records.
- Added migration script to handle the transition of existing records to the new notification status system.
2025-08-05 17:49:28 +01:00
Nawaz Dhandala
5cd8795e7a refactor: Clean up code formatting and improve readability in SCIM and StatusPageSCIM files 2025-08-05 12:49:04 +01:00
Simon Larsen
aebf7a4f2e feat: Remove Groups Endpoint display and enhance user identifier information in SCIM settings 2025-08-05 12:48:10 +01:00
Simon Larsen
3ef093eee1 feat: Add password generation for private users and update SideMenu icon 2025-08-05 12:46:09 +01:00
Simon Larsen
b4c530a6a5 feat: Update SCIM links and enhance HiddenText component for copy functionality 2025-08-05 12:37:34 +01:00
Simon Larsen
166228cad5 feat: Enhance SCIM configuration handling and update UI elements 2025-08-05 12:28:48 +01:00
Simon Larsen
1eb95c71fe feat: Add StatusPageSCIM API integration to BaseAPIFeatureSet 2025-08-05 12:16:24 +01:00
Simon Larsen
56f33f256b feat: Increase concurrency limit for ingest job processing to improve throughput 2025-08-05 11:13:49 +01:00
Simon Larsen
42afd164b7 feat: Increase concurrency limit for telemetry job processing to improve performance 2025-08-05 11:11:12 +01:00
Nawaz Dhandala
0796166a55 fix: Correct syntax errors in navigation group array in Nav.ts 2025-08-05 11:07:45 +01:00
Nawaz Dhandala
170bfa8515 refactor: Improve code formatting and consistency across SCIM-related files 2025-08-05 11:03:00 +01:00
Simon Larsen
2f517d8dcc feat: Update SCIM documentation URLs to use environment configuration 2025-08-05 11:00:18 +01:00
Simon Larsen
cb5c4dce45 feat: Add SCIM API documentation for user provisioning and deprovisioning 2025-08-05 10:52:57 +01:00
Simon Larsen
d9abeda60d feat: Refactor SCIM utility functions for improved modularity and logging 2025-08-05 10:33:38 +01:00
Simon Larsen
15c4c89310 feat: Add StatusPageSCIM model and related database migration
- Implemented StatusPageSCIM model with necessary fields and access controls.
- Created migration script to set up StatusPageSCIM table in the database.
- Developed StatusPageSCIMService for handling SCIM configurations, including bearer token generation.
- Added SCIM management page in the dashboard with functionalities for creating, editing, and resetting bearer tokens.
2025-08-05 10:07:24 +01:00
Simon Larsen
8c1d5652f4 feat: Change button style type for resetting bearer token to outline 2025-08-04 22:14:31 +01:00
Nawaz Dhandala
fbf87cf8d4 refactor: Add type annotations to formatUserForSCIM and resetBearerToken functions for improved type safety 2025-08-04 22:10:06 +01:00
Nawaz Dhandala
1c12ad94dd fix: Add type annotations for improved type safety in SCIM and Metrics modules 2025-08-04 22:07:10 +01:00
Nawaz Dhandala
aa09bab7c9 Refactor SCIM migrations and models; update formatting and improve readability
- Added missing comma in AllModelTypes array in Index.ts.
- Refactored MigrationName1754304193228 to improve query formatting and readability.
- Refactored MigrationName1754315774827 for consistency in formatting.
- Updated migration index file to include new migration.
- Standardized string quotes in Queue.ts for consistency.
- Cleaned up SCIMAuthorization.ts by removing unnecessary whitespace and improving log formatting.
- Refactored StartServer.ts to standardize content-type header handling.
- Improved formatting in SCIM.tsx for better readability and consistency.
- Refactored Metrics.ts to standardize queueSize extraction and type checking.
- Enhanced Probe.ts logging for clarity and consistency.
2025-08-04 21:36:11 +01:00
Simon Larsen
f7d1975ab0 feat: Add debug logging for parsing names from SCIM users 2025-08-04 21:35:30 +01:00
Simon Larsen
99c9a591cb feat: Refactor SCIM user handling to improve name parsing and team operations 2025-08-04 21:29:16 +01:00
Simon Larsen
c956d01789 feat: Enhance user name handling in SCIM responses by parsing full names into given and family names 2025-08-04 21:22:01 +01:00
Simon Larsen
17c829869b feat: Implement user activation handling by adding users to configured teams 2025-08-04 21:18:03 +01:00
Simon Larsen
d65e91a912 feat: Enhance SCIM user update logging and handle user deactivation by removing from teams 2025-08-04 21:17:28 +01:00
Simon Larsen
39710ba9b0 feat: Enhance SCIM user update and delete logging, and improve team removal logic 2025-08-04 21:12:49 +01:00
Simon Larsen
8c70a4dfae feat: Update SCIM user handling to improve pagination and remove duplicates 2025-08-04 18:00:20 +01:00
Simon Larsen
ff99055594 feat: Refactor SCIM endpoints to enhance logging and improve user query handling 2025-08-04 17:44:23 +01:00
Simon Larsen
f01cc2fd71 feat: Enhance logging for SCIM requests and responses across various endpoints 2025-08-04 17:34:28 +01:00
Simon Larsen
49b43593b1 feat: Add middleware to handle SCIM content type before JSON parsing 2025-08-04 17:25:01 +01:00
Simon Larsen
e293ffd0eb feat: Remove isEnabled column from ProjectSCIM and update related services and migrations 2025-08-04 14:58:25 +01:00
Simon Larsen
b62a5e7722 feat: Add functionality to reset Bearer Token with confirmation modals 2025-08-04 14:47:45 +01:00
Simon Larsen
8f8ba0abb8 feat: Enhance SCIM middleware logging and update SCIM page state management 2025-08-04 13:01:09 +01:00
Simon Larsen
5525556b54 feat: Rename ProjectScima to ProjectSCIM and update imports 2025-08-04 12:28:09 +01:00
Simon Larsen
669066b70a feat: Implement ProjectSCIM model and SCIM page functionality 2025-08-04 12:27:48 +01:00
Simon Larsen
76d2abed08 fix: Update SCIM endpoint URLs to include versioning 2025-08-04 12:01:50 +01:00
Simon Larsen
a6c18b3f21 fix: Remove HTTP_PROTOCOL from SCIM endpoint URLs in SCIMPage component 2025-08-04 12:01:24 +01:00
Simon Larsen
955ea7bc31 feat: Restore ProjectSCIM service with bearer token generation logic 2025-08-04 11:58:18 +01:00
Simon Larsen
45719d4656 feat: Reintroduce ProjectSCIM service with bearer token generation logic 2025-08-04 11:58:07 +01:00
Simon Larsen
796c94a261 fix: Correct import casing for ProjectSCIM across multiple files 2025-08-04 11:46:56 +01:00
Simon Larsen
d2fe822cb7 feat: Integrate ProjectSCIM model and service into the Base API feature set 2025-08-04 11:44:02 +01:00
Simon Larsen
289a369eab feat: Add migration for ProjectSCIM and ProjectScimTeam tables with foreign key constraints 2025-08-04 11:43:44 +01:00
Simon Larsen
6f07e3e119 feat: Update SCIM API endpoints to include versioning in the URL 2025-08-04 11:19:17 +01:00
Simon Larsen
8cdc1e9faf feat: Add SCIM API endpoints and middleware for user management and configuration 2025-08-04 11:09:52 +01:00
Simon Larsen
d4609a84ef feat: Implement Project SCIM service with bearer token generation 2025-08-04 10:15:34 +01:00
Simon Larsen
eb4a91a598 feat: Add SCIM settings page and routing to the dashboard 2025-08-04 10:14:47 +01:00
Simon Larsen
5bea404d6c feat: Add SCIM API integration to Identity feature set 2025-08-04 10:13:44 +01:00
Simon Larsen
df3f8b6a74 feat: Add optional stackTrace field to job data structures for enhanced error tracking 2025-08-03 12:59:51 +01:00
Simon Larsen
0c9d2c821a feat: Add advanced horizontal pod autoscaler configuration for improved scaling behavior 2025-08-02 13:05:05 +01:00
Simon Larsen
ba49aaf0c3 fix: Skip probe offline email notifications when billing is enabled 2025-08-02 12:36:50 +01:00
Simon Larsen
6ea5ad7fe8 fix: Update nextPingAt calculation to use a 2-minute offset for improved timing accuracy 2025-08-02 11:42:01 +01:00
Simon Larsen
962866d109 fix: Improve queue size extraction and handling in metrics endpoint 2025-08-01 20:58:58 +01:00
Simon Larsen
115216561c feat: Add ports configuration for OneUptime probe service 2025-08-01 20:36:30 +01:00
Simon Larsen
f709c90cc4 fix: Update probe port handling in KEDA ScaledObjects for improved configuration 2025-08-01 20:21:41 +01:00
Simon Larsen
d7f01b0189 fix: Update default port value in probe template for better configuration handling 2025-08-01 20:19:31 +01:00
Simon Larsen
c3eaa8995c fix ports 2025-08-01 20:19:10 +01:00
Simon Larsen
53b482b9f3 refactor: Update Helm templates to use new port structure in values.yaml 2025-08-01 20:13:30 +01:00
Simon Larsen
d52670f39c refactor: Update Helm templates to use new port structure in values.yaml 2025-08-01 18:22:05 +01:00
Simon Larsen
fdc1332b9e Merge branch 'master' of github.com:OneUptime/oneuptime 2025-08-01 16:17:09 +01:00
Simon Larsen
a937416663 fix: Update autoscaler condition to prevent conflicts with KEDA configuration 2025-08-01 16:17:05 +01:00
Nawaz Dhandala
546d41da81 fix: Clean up formatting and ensure consistent return structure in metrics endpoints 2025-08-01 16:13:05 +01:00
Simon Larsen
c4c6793b29 feat: Implement KEDA autoscaling configuration for probes and add metrics endpoints 2025-08-01 15:38:04 +01:00
Simon Larsen
c894b112e6 fix: Await monitorResource call to ensure proper error handling in incoming request processing 2025-08-01 14:34:17 +01:00
Simon Larsen
304baf1bb4 fix: Await monitorResource call to ensure proper error handling in probe response processing 2025-08-01 14:33:17 +01:00
Simon Larsen
9adea6b1ba feat: Remove Helm annotations for post-install and post-upgrade hooks from templates 2025-08-01 14:01:04 +01:00
Simon Larsen
5498521e02 feat: Add Helm annotations for post-install and post-upgrade hooks 2025-08-01 13:47:52 +01:00
Simon Larsen
9e97c6ddbc feat: Update autoscaler conditions for fluent-ingest, incoming-request-ingest, probe-ingest, and server-monitor-ingest templates 2025-08-01 13:23:39 +01:00
Nawaz Dhandala
63272e09f8 refactor: Simplify function parameter formatting and improve readability in various files 2025-08-01 10:45:55 +01:00
Simon Larsen
327c28afdc feat: Implement fluent ingest worker for processing queue jobs 2025-08-01 10:34:17 +01:00
Simon Larsen
896020b93b feat: Add KEDA autoscaling configuration for various ingests
- Introduced KEDA autoscaling configuration in values.yaml for probeIngest, fluentIngest, incomingRequestIngest, and serverMonitorIngest.
- Added endpoints for queue statistics, size, and failed jobs in IncomingRequestIngest and ProbeIngest APIs.
- Implemented asynchronous processing of incoming requests and probes using job queues.
- Created Metrics API for KEDA metrics integration in IncomingRequestIngest, ProbeIngest, and ServerMonitorIngest.
- Refactored IncomingRequest and Probe APIs to utilize queue services for processing.
- Added job processing logic for incoming requests and probes in respective job files.
- Implemented queue service classes for managing job addition and retrieval of queue statistics.
2025-08-01 10:29:02 +01:00
Simon Larsen
15a68472b0 feat: comment out ClusterKeyAuthorization import for KEDA debugging 2025-07-31 21:23:41 +01:00
Simon Larsen
0210480d97 feat: remove Prometheus metrics endpoint for KEDA debugging 2025-07-31 21:22:04 +01:00
Simon Larsen
72fdc06687 feat: temporarily disable authentication middleware for KEDA debugging in metrics endpoint 2025-07-31 20:52:10 +01:00
Simon Larsen
3710b81b9a feat: add replica count support for deployments in Helm templates 2025-07-31 20:03:25 +01:00
Simon Larsen
9fcb3dc2e0 feat: update cluster key handling for KEDA compatibility in authorization middleware and Helm chart 2025-07-31 19:50:25 +01:00
Simon Larsen
43e2ccf51a feat: improve secret handling in Helm chart for upgrade scenarios 2025-07-31 19:29:07 +01:00
Nawaz Dhandala
48c3d8603a fix: format code for better readability and consistency in MonitorResource and Metrics 2025-07-31 12:57:39 +01:00
Simon Larsen
9cfc912161 feat: enhance response messages for incoming request checks with time difference 2025-07-31 12:56:06 +01:00
Simon Larsen
29e3ee57ab feat: add metrics-api endpoint for queue size retrieval in KEDA autoscaling 2025-07-31 12:44:48 +01:00
Simon Larsen
be7e849822 feat: add KEDA ScaledObjects for OpenTelemetry Ingest with configurable metrics 2025-07-31 12:34:43 +01:00
Simon Larsen
59d76b601a feat: add KEDA autoscaling support for OpenTelemetry Ingest with configurable metrics 2025-07-31 12:18:57 +01:00
Simon Larsen
b77ef336b8 feat: add replica count configuration for multiple deployments in Helm templates 2025-07-31 11:47:03 +01:00
Nawaz Dhandala
7df21fe8e5 refactor: add type annotations for pagination parameters in OTelIngest 2025-07-30 22:42:24 +01:00
Nawaz Dhandala
f39e1943c7 refactor: improve code formatting and readability in Queue and TelemetryQueueService 2025-07-30 22:40:45 +01:00
Simon Larsen
966a903646 feat: implement pagination for retrieving failed jobs from the queue 2025-07-30 22:39:58 +01:00
Simon Larsen
1d9d37c6d1 refactor: optimize queue size and stats calculations by using count methods 2025-07-30 22:37:46 +01:00
Simon Larsen
7edcc4dbce feat: add endpoint to retrieve failed jobs from the queue 2025-07-30 22:37:08 +01:00
Simon Larsen
0939294d22 Refactor code structure for improved readability and maintainability 2025-07-30 19:45:46 +01:00
Simon Larsen
dbcbfe5f79 refactor: simplify telemetry processing worker initialization and remove unused export 2025-07-30 19:25:52 +01:00
Simon Larsen
a638972817 feat: update @oneuptime/common dependency in test-release workflow 2025-07-30 16:44:05 +01:00
Simon Larsen
37c6310465 feat: update @oneuptime/common to version 7.0.4800 and adjust workflow dependencies 2025-07-30 16:42:39 +01:00
Nawaz Dhandala
a7d38389fd style: improve formatting and consistency in Prometheus metrics generation 2025-07-30 16:30:26 +01:00
Nawaz Dhandala
2f55336db7 Merge branch 'master' of https://github.com/OneUptime/oneuptime 2025-07-30 16:29:25 +01:00
Nawaz Dhandala
f99a15b95b refactor: enhance type annotations for better clarity in queue processing methods 2025-07-30 16:28:53 +01:00
Simon Larsen
de5bff2ffe feat: add Prometheus metrics endpoint for telemetry queue monitoring 2025-07-30 16:26:38 +01:00
Nawaz Dhandala
cef2764499 style: format code for better readability and consistency across multiple files 2025-07-30 16:22:26 +01:00
Simon Larsen
a7014ac3ff fix: update projectId handling to ensure proper ObjectID conversion in telemetry processing 2025-07-30 16:12:19 +01:00
Simon Larsen
fa31dc670c feat: implement telemetry ingestion processing with queue integration 2025-07-30 15:37:08 +01:00
Simon Larsen
4c2a12cf31 feat: add queue stats and size endpoints with authorization middleware 2025-07-30 15:34:51 +01:00
Simon Larsen
b4115e1529 feat: initialize telemetry processing worker with logging for better monitoring 2025-07-30 15:30:23 +01:00
Simon Larsen
3883790c50 feat: add getQueueSize and getQueueStats methods to Queue class for improved queue monitoring 2025-07-30 15:29:53 +01:00
Simon Larsen
1702558d73 chore: update package-lock.json files to add @types/web-push and web-push dependencies
- Added "@types/web-push": "^3.6.4" to multiple package-lock.json files.
- Added "web-push": "^3.6.7" to multiple package-lock.json files.
- Removed "lodash" and "@types/lodash" from multiple package-lock.json files.
2025-07-30 15:21:03 +01:00
Simon Larsen
cacdbff50e Implement feature X to enhance user experience and optimize performance 2025-07-30 13:58:46 +01:00
Nawaz Dhandala
0bc6b432a2 refactor: Update getNestedValue function signature for improved type safety in Detail and TableRow components 2025-07-30 13:57:23 +01:00
Simon Larsen
eaa09d4a13 refactor: Replace lodash get with custom nested value helper in Detail and TableRow components 2025-07-30 13:52:30 +01:00
Simon Larsen
08c85dd31c refactor: Remove lodash and its type definitions from package dependencies 2025-07-30 12:48:19 +01:00
Nawaz Dhandala
42e82b6fb7 refactor: Clean up whitespace in various components for improved readability 2025-07-30 12:08:53 +01:00
Simon Larsen
463a20f342 feat: Add ingestedAt timestamp to ProbeMonitorResponse and update ingestion logic 2025-07-30 12:08:21 +01:00
Simon Larsen
1b8a7e3261 chore: Add sw.js to .gitignore to prevent tracking of service worker file 2025-07-30 11:23:26 +01:00
Simon Larsen
8b27dd1f26 refactor: Remove deprecated service worker implementation from Dashboard 2025-07-30 11:23:09 +01:00
Simon Larsen
17c72f65e3 refactor: Update service worker template and generated version information for Dashboard 2025-07-30 11:22:29 +01:00
Simon Larsen
5eee900fd3 feat: Implement service worker generation script and update build process for Dashboard 2025-07-30 11:18:55 +01:00
Simon Larsen
0a6cdd11af refactor: Simplify esbuild configuration by disabling minification and removing build version generation 2025-07-30 10:47:23 +01:00
Simon Larsen
8514b6b82e refactor: Enhance PWA service worker with caching strategies and update notifications 2025-07-30 10:45:18 +01:00
Simon Larsen
dfa8f6cd24 refactor: Remove unused LocalStorage import and update status page ID handling in DashboardMasterPage 2025-07-30 10:41:19 +01:00
Simon Larsen
61614227e1 refactor: Update dependency version for @oneuptime/common to allow any version 2025-07-30 10:01:46 +01:00
Simon Larsen
f3d20eb544 refactor: Add spacing before nav element in Pagination component for improved layout 2025-07-29 13:47:33 +01:00
Simon Larsen
a11ff57fda refactor: Clean up layout in Pagination component with improved mobile navigation and added comments for clarity 2025-07-29 13:46:23 +01:00
Simon Larsen
deb635bc80 refactor: Remove unnecessary height style from Modal component for improved responsiveness 2025-07-29 11:25:26 +01:00
Simon Larsen
c707830811 refactor: Adjust margin for label in ProbePicker component for better alignment 2025-07-29 11:20:28 +01:00
Nawaz Dhandala
24ada68d1e refactor: Replace lodash Dictionary import with local Dictionary type in multiple files 2025-07-29 11:12:37 +01:00
Nawaz Dhandala
ca23234ba9 refactor: Update import statement for Dictionary in Route.ts 2025-07-29 11:10:22 +01:00
Nawaz Dhandala
ea40a955e9 refactor: Enhance Slack notification structure for balance refill in NotificationService 2025-07-29 11:07:56 +01:00
Nawaz Dhandala
a46ee07d70 refactor: Format imports and improve error logging in NotificationService 2025-07-29 11:07:10 +01:00
Simon Larsen
5c5bab408d refactor: Simplify Terraform examples by removing unused monitor configurations and variables 2025-07-29 11:02:57 +01:00
Simon Larsen
540d632baf feat: Add Slack notification for balance refill in NotificationService 2025-07-28 12:03:40 +01:00
Simon Larsen
74718017ad refactor: Update jest.config.json for module name mapping and transform ignore patterns 2025-07-25 16:03:01 +01:00
Simon Larsen
d16897db1b refactor: update dependencies in package.json
- Replaced "Common" dependency with "@oneuptime/common" version 7.0.4773.
- Maintained existing versions for "dotenv" and "ts-node".
2025-07-25 15:38:07 +01:00
Simon Larsen
be3fc6f077 refactor: Update monitorTask type from PromiseVoidFunction to Promise<void> for consistency 2025-07-25 14:37:52 +01:00
Nawaz Dhandala
b7b577517c refactor: Improve type safety by defining PromiseVoidFunction for monitorTask in CheckOnlineStatus 2025-07-25 14:34:04 +01:00
Simon Larsen
ccf7a96e43 refactor: Streamline monitor processing logic in CheckOnlineStatus for improved error handling and parallel execution 2025-07-25 14:26:54 +01:00
Simon Larsen
892f3c052a feat: Add timeNow property to ServerMonitorResponse and update related logic in ServerMonitorCriteria and CheckOnlineStatus 2025-07-25 14:25:01 +01:00
Simon Larsen
00833a06f4 fix: Update time calculation in CheckOnlineStatus to use three minutes ago 2025-07-25 14:20:32 +01:00
Simon Larsen
472adf610a refactor: Update comment to clarify SSL monitor check in MonitorResourceUtil 2025-07-25 14:14:12 +01:00
Nawaz Dhandala
976c36de9a feat: Add migration for new default values and indexes in OnCallDutyPolicyScheduleLayer 2025-07-25 13:50:08 +01:00
Simon Larsen
6026c9c9af refactor: Remove unused import for ProbeApiIngestResponse in ServerMonitor.ts 2025-07-25 13:49:34 +01:00
Simon Larsen
791aa1421b feat: Optimize server monitor response handling by returning early and streamlining processing 2025-07-25 13:49:14 +01:00
Simon Larsen
79dbc94f82 feat: Add log viewing instructions and improve error logging in agent 2025-07-25 13:42:25 +01:00
Simon Larsen
ded41fc7ec feat: Enhance logging functionality with log file path configuration and log directory management 2025-07-25 13:38:23 +01:00
Simon Larsen
581c374745 refactor: Remove PWA install prompt to streamline user experience 2025-07-25 13:31:26 +01:00
Simon Larsen
64c0c8b4cb haraka delete 2025-07-25 09:07:09 +01:00
Simon Larsen
7d2241ba98 feat: Add indexes to improve query performance across multiple database models 2025-07-24 20:02:23 +01:00
Nawaz Dhandala
30bada5b7a feat: Add additional performance indexes and update migration index list 2025-07-24 18:40:40 +01:00
Simon Larsen
61bfb37747 Merge branch 'release' of github.com:OneUptime/oneuptime into release 2025-07-24 18:39:42 +01:00
Simon Larsen
4686aa941a feat: Add performance indexes to improve query efficiency across multiple database models 2025-07-24 18:39:04 +01:00
Nawaz Dhandala
3c065c76b0 feat: Add missing indexes for improved query performance in IncidentStateTimeline and MonitorProbe 2025-07-24 18:26:03 +01:00
Simon Larsen
5dccd03ed4 refactor: Remove ProcessMetrics job to streamline monitor metric handling 2025-07-24 18:16:32 +01:00
Simon Larsen
a395a95997 feat: Add composite indexes for efficient querying in IncidentStateTimeline, MonitorProbe, and MonitorStatusTimeline 2025-07-24 18:16:06 +01:00
Nawaz Dhandala
89082b1232 refactor: Improve error handling and type definitions in core operations across multiple services 2025-07-24 17:42:38 +01:00
Nawaz Dhandala
7cb33de450 refactor: Enhance error handling and type definitions in core operations for AlertService and IncidentService 2025-07-24 17:34:46 +01:00
Nawaz Dhandala
353ac875fb refactor: Simplify promise handling and error logging in service operations 2025-07-24 17:25:54 +01:00
Simon Larsen
d6560fdb32 feat: Refactor incident creation to execute core operations asynchronously 2025-07-24 17:23:53 +01:00
Simon Larsen
5115e21a7a feat: Refactor scheduled maintenance creation to execute core operations asynchronously 2025-07-24 17:17:52 +01:00
Simon Larsen
0e6119ddce feat: Execute owner assignment asynchronously in StatusPageService 2025-07-24 17:14:46 +01:00
Simon Larsen
b842a49cfb feat: Refactor monitor creation to run core operations in parallel, deferring workspace operations 2025-07-24 16:42:29 +01:00
Nawaz Dhandala
9737e50467 refactor: Clean up whitespace and improve code formatting in migration and service files 2025-07-24 16:00:49 +01:00
Simon Larsen
91beb6091d feat: Optimize monitor creation by parallelizing workspace, billing, and probe operations 2025-07-24 15:56:35 +01:00
Simon Larsen
68e610aa9f fix: Disable workflow operations for MetricType entity 2025-07-24 15:25:04 +01:00
Simon Larsen
d673ef3a01 feat: Enhance memory management and error handling in telemetry ingestion processes 2025-07-24 15:22:29 +01:00
Simon Larsen
6dff8f07bf feat: Update deviceToken column type to VeryLongText and add migration for changes 2025-07-24 08:54:03 +01:00
Simon Larsen
4ca836c91f fix: Remove OPENTELEMETRY_EXPORTER_OTLP_HEADERS from environment variables in multiple Helm templates 2025-07-24 08:30:51 +01:00
Simon Larsen
d59ba73993 fix: Set current time for log entries without timeUnixNano 2025-07-23 21:08:24 +01:00
Simon Larsen
e878855b31 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-07-23 13:43:56 +01:00
Simon Larsen
8f95ae65f6 feat: Add disableAutoscaler option for various services in Helm templates and values 2025-07-23 13:42:53 +01:00
Nawaz Dhandala
995b93f525 fix: Remove unnecessary blank line in root route handler 2025-07-22 14:21:56 +01:00
Simon Larsen
fc3c11b12d Merge branch 'master' of github.com:OneUptime/oneuptime 2025-07-22 13:57:00 +01:00
Simon Larsen
d0ce225b66 fix: Update request parameter to ignore unused variable in root route handler 2025-07-22 13:56:24 +01:00
Nawaz Dhandala
b486b59598 fix: Correct syntax in navigation group definition and clean up route file 2025-07-22 12:54:04 +01:00
Simon Larsen
4d7135fb11 refactor: Remove mobile detection and redirection logic from routes for PWA 2025-07-22 12:52:35 +01:00
Simon Larsen
0c4464ed87 Add comprehensive FAQ and troubleshooting documentation for OneUptime PWA across all platforms
- Created a new FAQ and troubleshooting guide for OneUptime Mobile and Desktop Apps, covering general questions, installation issues, notification problems, and security considerations.
- Added detailed installation guides for iOS, Linux, macOS, and Windows, including step-by-step instructions and troubleshooting tips.
- Included platform-specific issues and solutions to enhance user experience and support.
2025-07-22 12:48:50 +01:00
Simon Larsen
d705ea6896 fix: Update shortcut names to include "OneUptime" for clarity in manifest files 2025-07-22 12:07:44 +01:00
Simon Larsen
ac146df9e8 refactor: Remove caching and offline functionality from service workers for PWA 2025-07-22 12:01:43 +01:00
Simon Larsen
3ce7d54eef fix: Update theme color to black across multiple files for consistency 2025-07-22 11:53:16 +01:00
Simon Larsen
418c89c15b Merge branch 'master' into pwa 2025-07-22 11:47:57 +01:00
Simon Larsen
80144814d1 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-07-22 10:05:43 +01:00
Simon Larsen
f3223e397b fix: Correct capitalization in help text for OneUptime URL flag 2025-07-22 10:03:44 +01:00
Nawaz Dhandala
fce5e18fba style: Format class name for better readability 2025-07-22 09:57:15 +01:00
Nawaz Dhandala
cdd60c1d6b Refactor StatusPage and related services to enhance code readability and maintainability
- Updated StatusPage model to improve formatting.
- Modified migration script for adding enableCustomSubscriberEmailNotificationFooterText to ensure backward compatibility.
- Adjusted Index.ts to include the new migration.
- Refactored StatusPageService methods for better readability and consistency.
- Cleaned up Push component by removing unnecessary whitespace.
- Improved SubscriberSettings component by enhancing formatting and readability.
- Refactored OtelIngestService to streamline log, metric, and trace processing logic.
- Enhanced incident and scheduled event detail components for better type handling and readability.
2025-07-22 09:56:01 +01:00
Simon Larsen
cb35a0d420 feat: Implement asynchronous processing for logs, metrics, and traces with immediate response 2025-07-22 09:51:15 +01:00
Simon Larsen
b198d4d87d feat: Refactor email footer settings for subscriber notifications 2025-07-22 08:31:33 +01:00
Simon Larsen
285a5355a7 feat(PWA): Enhance PWA support with service worker, mobile redirection, and manifest updates
- Implemented service worker registration for PWA functionality on both home and dashboard.
- Added mobile detection to redirect mobile users to the dashboard for a better experience.
- Updated manifest.json with improved app details, shortcuts, and caching strategies.
- Enhanced offline experience with a custom offline page and improved caching strategies in the service worker.
- Added proper headers for manifest and service worker in Nginx configuration.
- Included iOS splash screens and Microsoft tiles for better platform integration.
- Improved meta tags for better PWA compliance and user experience.
2025-07-22 08:26:36 +01:00
Simon Larsen
777093d2e1 feat: Add support for custom subscriber email notification footer text 2025-07-21 22:23:31 +01:00
Simon Larsen
0444b09ad5 feat: Update sorting logic to prioritize 'startsAt' date for incidents and scheduled events 2025-07-21 21:56:08 +01:00
Simon Larsen
7be9c4b1e7 fix: Improve error handling and display in push notification registration 2025-07-21 21:23:20 +01:00
Simon Larsen
79910b6c0b feat: Add VAPID key validation for push notifications registration 2025-07-21 20:37:05 +01:00
Simon Larsen
0686dea83c Merge pull request #1968 from dmizelle/dmizelle/terraform-arm64-targets
chore(ci): [terraform] Add Missing arm64 Targets
2025-07-21 20:11:52 +01:00
Devon Mizelle
e1e27c4e94 chore(ci): [terraform] Add Missing arm64 Targets
A previous commit added `arm` targets, which is 32-bit ARM. We also need
`arm64` targets (64-bit ARM.)

This commit also adds `arm`/`arm64` for other `GOOS` targets.
2025-07-21 15:08:33 -04:00
Simon Larsen
6fe14fbed3 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-07-21 16:52:00 +01:00
Simon Larsen
9ef248f71e chore: Remove outdated PUSH_NOTIFICATIONS.md documentation file 2025-07-21 16:51:55 +01:00
Nawaz Dhandala
e243a76dab refactor: Simplify modal close and submit handlers in Push component 2025-07-21 16:51:20 +01:00
Nawaz Dhandala
71466089a4 refactor: Improve type annotations and error handling across multiple files 2025-07-21 16:45:33 +01:00
Simon Larsen
31e6172af4 Merge pull request #1967 from dmizelle/dmizelle/terraform-darwin-arm-build-target
chore(ci): [terraform] Add darwin/arm Build Target
2025-07-21 16:29:46 +01:00
Devon Mizelle
7a228f76e4 chore(ci): [terraform] Add darwin/arm Build Target
The Terraform provider wasn't releasing with a `darwin/arm` target, so
you couldn't use it on Apple Silicon Macs. This adds that target to the
build process.
2025-07-21 11:25:07 -04:00
Nawaz Dhandala
40d473d195 Refactor push notification message creation for improved readability
- Updated the formatting of push notification message creation across multiple services to enhance code clarity and maintainability.
- Adjusted the structure of function calls to align parameters vertically, making it easier to read and understand.
- Ensured consistent use of line breaks and indentation for better code style adherence.
2025-07-21 16:21:20 +01:00
Simon Larsen
f2f5b757eb feat: Enhance push notification handling by updating user on call log timeline status and adding userOnCallLogTimelineId option 2025-07-21 16:18:28 +01:00
Simon Larsen
1d4d93ceec refactor: Update alert and incident view links to use service methods for improved accuracy 2025-07-21 16:05:03 +01:00
Simon Larsen
40819562f7 feat: Add userPushId to UserOnCallLogTimeline and related migration 2025-07-21 15:57:09 +01:00
Simon Larsen
066ad4a52d refactor: Enhance logging for web push notification results and payload details 2025-07-21 15:47:45 +01:00
Simon Larsen
a109ae33e0 refactor: Update push notification creation to use parameter objects for improved clarity and maintainability 2025-07-21 15:33:28 +01:00
Simon Larsen
19ac60d8db fix tests 2025-07-21 15:15:58 +01:00
Simon Larsen
7557103cc0 refactor: Update notification methods to use parameter objects for improved readability 2025-07-21 15:01:32 +01:00
Simon Larsen
d1bd8c09d1 feat: Add push notification messages for various alert and incident events 2025-07-21 14:57:12 +01:00
Simon Larsen
861c1782fc feat: Remove lastUsedAt column from UserPush table and update related migrations 2025-07-17 19:06:05 +01:00
Simon Larsen
f937749c7e feat: Replace hardcoded limit with LIMIT_PER_PROJECT constant in sendPushNotificationToUser method 2025-07-17 18:51:35 +01:00
Simon Larsen
6752ba8b63 feat: Add toggle option for push notification alerts in user settings 2025-07-17 18:28:01 +01:00
Simon Larsen
dce9f2fe78 Add new PNG image for OneUptime dashboard 2025-07-17 18:21:14 +01:00
Simon Larsen
d18c3af5ac feat: Update PushNotificationUtil properties to public for improved accessibility in PushNotificationService 2025-07-17 18:16:08 +01:00
Simon Larsen
d48f864512 feat: Refactor push notification creation in OnCallDutyPolicy services to utilize PushNotificationUtil for improved consistency and maintainability 2025-07-17 18:14:34 +01:00
Simon Larsen
0976b2700c add img 2025-07-17 18:08:38 +01:00
Simon Larsen
58990d9991 feat: Update VAPID_PRIVATE_KEY definition in Helm template; remove duplicate entry and ensure correct placement 2025-07-17 18:02:41 +01:00
Simon Larsen
934b08d643 feat: Refactor push notification handling by utilizing PushNotificationUtil for consistency and maintainability 2025-07-17 17:59:19 +01:00
Simon Larsen
b832613fb2 feat: Refactor error handling in Push component; remove duplicate device modal and update error display 2025-07-17 17:11:38 +01:00
Simon Larsen
3faa2fe302 feat: Remove visibility condition for verified user push notifications in Push component 2025-07-17 17:09:30 +01:00
Simon Larsen
a1fe600863 feat: Update device name placeholder in Push component to suggest browser names 2025-07-17 17:00:31 +01:00
Simon Larsen
74af666d70 feat: Remove unused fields from device registration form in Push component 2025-07-17 16:58:43 +01:00
Simon Larsen
4707b4b4dd feat: Improve device registration by adding browser name detection and updating device name handling 2025-07-17 16:58:24 +01:00
Simon Larsen
78d34542b6 feat: Enhance device registration flow in UserPushAPI and Push component; add handling for duplicate device registrations 2025-07-17 15:59:27 +01:00
Simon Larsen
141280ad0e feat: Integrate push notification handling in UserNotificationRuleService; add userPush support in Alert and Incident on-call rules 2025-07-17 15:36:56 +01:00
Simon Larsen
92f978df20 feat: Add success modal for test notification in Push component; enhance user feedback on notification delivery 2025-07-17 14:41:09 +01:00
Simon Larsen
e3db66734f feat: Enhance logging in PushNotificationService and Service Worker; add detailed logs for push notifications and installation events 2025-07-17 14:33:59 +01:00
Simon Larsen
618dcbdcce feat: Improve logging and error handling in PushNotificationService and Service Worker; remove Logger from Cookie and LocalStorage classes 2025-07-17 14:06:17 +01:00
Simon Larsen
af66709363 feat: Enhance push notification logging and add web-push dependencies 2025-07-16 20:48:12 +01:00
Simon Larsen
5ebe067efd feat: Update device type handling in test notification for web push 2025-07-16 20:39:57 +01:00
Simon Larsen
a59c98d7e6 feat: Add VAPID configuration for web push notifications in EnvironmentConfig and update PushNotificationService 2025-07-16 20:28:39 +01:00
Simon Larsen
5ff1d15b36 feat: Add VAPID configuration for web push notifications 2025-07-16 20:19:37 +01:00
Simon Larsen
f4cdefc4f9 feat: Update service worker registration path for push notifications 2025-07-16 20:00:13 +01:00
Simon Larsen
8b11be85bf feat: Refactor device registration flow for push notifications 2025-07-16 19:57:45 +01:00
Simon Larsen
6e2416910e feat: Add push notification support for on-call policy changes and probe status updates 2025-07-16 19:02:13 +01:00
Simon Larsen
0cd0e174bf feat: Add UserPush table and related migrations for push notification support 2025-07-16 15:53:17 +01:00
Simon Larsen
b7153ed283 feat: Add migration for MigrationName1752659054949 to schema migrations 2025-07-16 10:47:52 +01:00
Simon Larsen
34718f6fa7 feat: Add UserPush model and related database migrations for push notifications 2025-07-16 10:47:24 +01:00
Simon Larsen
ed69c5de39 feat: Restrict push notification support to web devices only 2025-07-16 10:39:55 +01:00
Simon Larsen
5f9f741b82 feat: Implement push notification system for OneUptime
- Added UserPushAPI for managing device registrations and notifications.
- Created PushNotificationService for sending notifications via Web Push and Firebase.
- Developed UserPushService for CRUD operations on user push devices.
- Introduced PushNotificationUtil for generating notification messages.
- Defined PushNotificationMessage and PushNotificationRequest types for structured data.
- Integrated service worker (sw.js) for handling push notifications in the browser.
- Built React component (Push.tsx) for user interface to manage push notifications.
- Documented implementation details and usage in PUSH_NOTIFICATIONS.md.
- Added support for device registration, verification, and test notifications.
- Enhanced security features including user-scoped access and device verification.
2025-07-15 21:39:00 +01:00
Nawaz Dhandala
a427a82327 style: Clean up whitespace in TableBody and TableRow components for improved readability 2025-07-15 20:06:52 +01:00
Simon Larsen
6244ff4ebc style: Update Button and Page components for improved responsive layout 2025-07-15 18:36:08 +01:00
Simon Larsen
9007ed5ddc feat: Implement responsive design for Table component with mobile view support 2025-07-14 23:23:36 +01:00
Simon Larsen
108d1fdfcc style: Enhance ChartGroup component layout for improved spacing and responsive description visibility 2025-07-14 21:08:23 +01:00
Simon Larsen
7678cc9d77 style: Update Card and StartAndEndDate components for improved layout and responsiveness 2025-07-14 21:03:12 +01:00
Nawaz Dhandala
708ea2c977 style: Add responsive visibility classes to date buttons for improved layout 2025-07-14 19:22:46 +01:00
Nawaz Dhandala
0ebfb294ff fix: Update model type validation to use lowercase values for consistency 2025-07-14 19:13:33 +01:00
Nawaz Dhandala
d6d61a61fd style: Adjust formatting for improved readability in HeaderAlert and Modal components 2025-07-14 19:11:56 +01:00
Simon Larsen
46a0e54771 fix: Update Modal and ModalFooter components for improved layout and responsiveness 2025-07-14 19:11:22 +01:00
Simon Larsen
71807da876 feat: Enhance HeaderAlert and Header components to utilize suffix prop for improved title display 2025-07-14 19:05:28 +01:00
Simon Larsen
d7b45106d8 feat: Add suffix prop to HeaderAlert for additional text display 2025-07-14 18:54:59 +01:00
Nawaz Dhandala
1a39c2f6c5 refactor: Improve type annotations and enhance readability in SideMenu component 2025-07-14 16:04:08 +01:00
Nawaz Dhandala
7b2041f6a4 style: Clean up code formatting and remove unnecessary whitespace in various components 2025-07-14 15:43:31 +01:00
Simon Larsen
31cfba9ab8 fix: Update subscriber email notification footer text to include page title if available 2025-07-14 14:56:25 +01:00
Simon Larsen
1ead9679c3 fix: Update Banner component to correctly hide on mobile screens 2025-07-11 11:35:21 +01:00
Simon Larsen
01be21d0ed feat: Add hideOnMobile property to various components for improved mobile responsiveness 2025-07-11 11:34:27 +01:00
Simon Larsen
c8986fb314 fix: Add hideOnMobile property to AnnouncementTable fields for improved mobile responsiveness 2025-07-11 11:23:42 +01:00
Simon Larsen
951fcbe474 fix: Add hideOnMobile property to various fields for improved mobile responsiveness 2025-07-11 11:19:40 +01:00
Simon Larsen
7483ff2c2f fix: Ensure title div is hidden on smaller screens for better responsiveness 2025-07-11 10:14:37 +01:00
Simon Larsen
14fc484e37 Refactor SideMenu components to use sections array for improved structure and readability across multiple pages
- Updated DashboardSideMenu in MonitorGroup, OnCallDuty, ScheduledMaintenanceEvents, Settings, StatusPages, Telemetry, UserSettings, and Workflow to utilize a sections array for SideMenu rendering.
- Removed individual SideMenuItem and SideMenuSection imports, consolidating imports to a single SideMenu component with SideMenuSectionProps.
- Enhanced code maintainability and consistency by standardizing the SideMenu structure across different pages.
2025-07-11 10:13:24 +01:00
Simon Larsen
bd2da4358b fix: Adjust column classes for PageLoader in responsive layout 2025-07-10 17:15:55 +01:00
Nawaz Dhandala
78d43e1a1c fix: Clean up formatting and improve readability in DataType and MailService classes 2025-07-10 16:21:44 +01:00
Simon Larsen
a84a6a0c55 fix: Refactor Modal and ModalFooter components for improved layout and responsiveness 2025-07-10 15:41:06 +01:00
Simon Larsen
66343e6920 fix: Increase maximum concurrent connections in TransporterPool to improve email transport performance 2025-07-10 15:19:55 +01:00
Simon Larsen
6a7a8ad8d9 fix: Simplify connection pooling options by removing unnecessary rate limiting parameters 2025-07-10 15:14:56 +01:00
Simon Larsen
b8faa692cb feat: Implement connection pooling for email transporters to optimize performance and resource management 2025-07-10 15:13:13 +01:00
Simon Larsen
ca99f452ac feat: Enhance Subscriber Settings with Email, SMS, and Slack configurations 2025-07-10 14:34:20 +01:00
Simon Larsen
cd8d851366 fix: Update Includes example values and enhance description for clarity 2025-07-10 14:26:25 +01:00
Simon Larsen
16bed1861c Merge branch 'master' of github.com:OneUptime/oneuptime 2025-07-10 14:14:39 +01:00
Simon Larsen
c0909c68c8 feat: Add 'includes' functionality with documentation and example usage 2025-07-10 14:14:36 +01:00
Nawaz Dhandala
97654f61a2 fix: Add type annotations for improved type safety in various components 2025-07-10 12:50:13 +01:00
Nawaz Dhandala
faa4d8372c Refactor components for improved readability and consistency
- Updated Pagination component to enhance formatting and readability.
- Refactored TableHeader and TableRow components for better clarity and structure.
- Cleaned up NavBar component by organizing imports and improving formatting.
- Enhanced ApiMonitor, PortMonitor, SslMonitor, and WebsiteMonitor classes for better error handling.
- Improved StatusPage components by refining layout and event handling.
- Adjusted Page component for consistent prop spreading and formatting.
2025-07-10 12:19:22 +01:00
Simon Larsen
da4741fcf4 fix: Enhance Modal component layout for improved responsiveness and usability 2025-07-10 12:15:31 +01:00
Simon Larsen
3c420b2114 fix: Implement responsive behavior in Detail and ListRow components to filter fields based on mobile view 2025-07-10 12:08:54 +01:00
Simon Larsen
9c5a649157 fix: Add hideOnMobile property to Field, Column, and related components for responsive behavior 2025-07-10 11:58:02 +01:00
Simon Larsen
4908e9cd1d fix: Add hideOnMobile property to ActionButtonSchema and implement responsive behavior in ListRow, Item, and TableRow components 2025-07-10 11:46:18 +01:00
Simon Larsen
f552115fd5 fix: Refactor Modal component for improved layout and responsiveness 2025-07-10 11:08:32 +01:00
Simon Larsen
a96fc24562 fix: Update FeedItem component to ensure more text button has a fitting width 2025-07-09 18:18:03 +01:00
Simon Larsen
a54d44df01 fix: Update BasicForm component to hide form steps on small screens 2025-07-09 17:04:03 +01:00
Simon Larsen
7afa17cd8d fix: Enhance Modal component layout for better responsiveness and structure 2025-07-09 17:01:59 +01:00
Simon Larsen
2d15d85310 fix: Update Modal component styles for improved responsiveness and layout 2025-07-09 16:57:50 +01:00
Simon Larsen
1a577cf406 fix: Implement retry logic for sending emails with exponential backoff 2025-07-09 16:52:48 +01:00
Simon Larsen
3869725742 fix: Update Breadcrumbs component to ensure proper visibility on medium and larger screens 2025-07-09 16:49:32 +01:00
Simon Larsen
2b286e76f1 fix: Update Pagination component to ensure item count visibility on all screen sizes 2025-07-09 16:49:13 +01:00
Simon Larsen
3a791cec3b fix: Remove unnecessary padding from mobile navigation component 2025-07-09 15:32:46 +01:00
Simon Larsen
0e4557dba7 fix: Update Pagination component to improve visibility of item count on larger screens 2025-07-09 15:32:39 +01:00
Simon Larsen
c594d390cb fix: Refactor DashboardNavbar to use NavItem structure and improve menu handling 2025-07-09 15:24:15 +01:00
Simon Larsen
8a66434af9 fix: Refactor Button component styles for improved readability and consistency 2025-07-09 14:55:43 +01:00
Simon Larsen
c8ddba76f7 fix: Enhance DashboardNavbar with mobile support and additional navigation items 2025-07-09 14:29:39 +01:00
Simon Larsen
4831ed0535 fix: Update Button and Card components for improved responsive layout and styling 2025-07-09 14:09:17 +01:00
Simon Larsen
7e4f1d6b55 fix: Remove unnecessary positioning styles from Footer component for improved layout 2025-07-09 13:57:07 +01:00
Simon Larsen
1a254ee8cc fix: Remove fixed height from Footer component for flexible layout 2025-07-09 13:54:46 +01:00
Simon Larsen
429a1497ec fix: Update Footer component className to use min-h-16 for consistent height 2025-07-09 13:52:37 +01:00
Simon Larsen
e9bff64ea1 fix: Improve layout and styling of Card component buttons and right elements 2025-07-09 13:48:15 +01:00
Simon Larsen
603f803dd5 fix: Refactor API key and project ID validation logic in middleware 2025-07-09 13:40:16 +01:00
Simon Larsen
0df55c0b6f Merge branch 'master' into release 2025-07-09 10:10:03 +01:00
Simon Larsen
a22e42cf8d Merge pull request #1942 from zzukin/set-permission-on-tmp-npm
Set permission to write logs and cache on /tmp/npm in case container run as non root
2025-07-08 18:28:32 +01:00
Simon Larsen
2e8340ee76 Merge pull request #1961 from OneUptime/master
Release
2025-07-08 18:27:47 +01:00
Simon Larsen
72429923ed Merge pull request #1960 from OneUptime/mobile-responsive
Mobile responsive
2025-07-08 17:52:12 +01:00
Simon Larsen
ca5eccfe83 feat: Add Bars3 icon to IconProp enum and update NavBar to use Bars3 for mobile toggle 2025-07-08 17:41:36 +01:00
Simon Larsen
3b4f3e5f1e feat: Update NavBarItem component styles for mobile responsiveness 2025-07-08 17:38:51 +01:00
Simon Larsen
0a65c72b80 feat: Add responsive design to EventHistoryDayList component for better mobile experience 2025-07-08 17:29:20 +01:00
Simon Larsen
42a468720f feat: Update MonitorOverview component to improve responsiveness for larger screens 2025-07-08 17:06:39 +01:00
Simon Larsen
267bbad661 feat: Improve responsive design across multiple components for better mobile experience 2025-07-08 16:59:43 +01:00
Simon Larsen
6542bf7564 feat: Add projectId and _id fields to alert, incident, and scheduled maintenance selections in note services 2025-07-07 21:47:56 +01:00
Simon Larsen
ec746ba507 feat: Enhance SSLMonitor getCertificate method with retry logic and error logging 2025-07-04 09:03:10 +01:00
Simon Larsen
5aacfd05a9 feat: Add disableAutoscaler option to probe configuration in values.yaml 2025-07-02 21:44:43 +01:00
Simon Larsen
2840a3560b feat: Enhance error handling in PortMonitor to return null for AggregateError 2025-07-02 14:51:44 +01:00
Simon Larsen
0f688350dc fix: Update error handling in PingMonitor to check for AggregateError directly 2025-07-02 09:15:55 +01:00
Simon Larsen
39b572da3f feat: Update error handling in monitors to use getFriendlyErrorMessage for AggregateError 2025-07-02 09:09:58 +01:00
Nawaz Dhandala
5423293fbc refactor: Enhance type safety and readability in test files by adding explicit types and improving variable declarations 2025-07-02 09:08:01 +01:00
Nawaz Dhandala
009ef21d16 refactor: Clean up code formatting and improve readability in test files and monitor classes 2025-07-01 21:06:05 +01:00
Simon Larsen
793a33f873 feat: Improve error handling and logging in OneUptimeApiService and related tests 2025-07-01 21:02:32 +01:00
Simon Larsen
bafbf3fc01 Merge branch 'master' of github.com:OneUptime/oneuptime 2025-07-01 20:00:36 +01:00
Simon Larsen
4586b27039 feat: Add handling for AggregateError in multiple monitor classes to improve error response 2025-07-01 20:00:33 +01:00
Nawaz Dhandala
9f65f31d6c Add comprehensive tests for MCP functionality and logging
- Implement integration tests for MCP server operations including create, read, update, delete, list, and count functionalities.
- Add error response formatting tests to handle various scenarios such as not found and empty lists.
- Create tests for MCPLogger to ensure proper logging behavior, including message formatting and log level filtering.
- Develop mock tests to validate mock function behavior and error handling.
- Introduce tests for OneUptimeApiService to verify service initialization, operation validation, error handling, and request data building.
- Add type validation tests for OneUptimeOperation and ModelType enums, ensuring type safety and compatibility with JSON schema structures.
2025-07-01 18:44:35 +01:00
Nawaz Dhandala
5a9d351d39 fix: Add missing commas in API class method signatures for consistency 2025-07-01 15:12:15 +01:00
Simon Larsen
6dc432b7f3 feat: Enhance error handling in API class to support AggregateError messages 2025-07-01 15:02:06 +01:00
Simon Larsen
1e04f37727 fix: Update npm install command to include all dependencies and ensure dev dependencies are removed after build 2025-07-01 12:17:52 +01:00
Simon Larsen
be34930cd5 fix: Ensure creation of /usr/src directory with parent directories in Dockerfile 2025-07-01 11:59:56 +01:00
Simon Larsen
c8b053d17c feat: Remove unused 'node-fetch' dependency from package.json 2025-07-01 11:30:47 +01:00
Simon Larsen
ced4d0446c feat: Remove DynamicToolGenerator test file as it is no longer needed 2025-07-01 11:27:26 +01:00
Nawaz Dhandala
357f76ae5b refactor: Simplify loop variable usage in DynamicToolGenerator tests and fix model instantiation in tool generation test 2025-07-01 09:47:38 +01:00
Nawaz Dhandala
7f11735f79 refactor: Clean up console logging in Index.ts and improve structure in DynamicToolGenerator tests 2025-07-01 09:45:22 +01:00
Nawaz Dhandala
4ad1918b1d refactor: Add type annotations for improved type safety and clarity in various files 2025-07-01 09:33:08 +01:00
Nawaz Dhandala
122b0d6be7 Refactor DynamicToolGenerator tests and utility functions for improved readability and consistency
- Enhanced test cases in DynamicToolGenerator.test.ts for better logging and structure.
- Updated OneUptimeOperation.ts to maintain consistent formatting.
- Refactored DynamicToolGenerator.ts for improved code clarity and organization, including consistent use of commas and spacing.
- Improved sanitization and JSON schema generation methods for better handling of OpenAPI metadata.
- Cleaned up description handling in DynamicToolGenerator to ensure proper formatting.
- Adjusted server.test.ts for consistent quotation marks and improved readability.
2025-06-30 23:27:57 +01:00
Nawaz Dhandala
3116100f1a feat: Remove test-logger.ts as it is no longer needed for MCP Logger testing 2025-06-30 23:18:35 +01:00
Simon Larsen
38194331e6 feat: Update JSON key handling in DatabaseBaseModel to convert 'id' to '_id' and remove the original 'id' key 2025-06-30 23:14:19 +01:00
Simon Larsen
d6ebd65417 feat: Update key handling in DatabaseBaseModel to convert 'id' to '_id' during record creation 2025-06-30 23:01:30 +01:00
Simon Larsen
4c467d0e3b feat: Replace 'removeValue' with 'delete' for id property in DatabaseBaseModel 2025-06-30 22:45:09 +01:00
Simon Larsen
49efec2a77 feat: Add support for converting 'id' to '_id' in DatabaseBaseModel and update DatabaseService for consistency 2025-06-30 22:44:49 +01:00
Simon Larsen
d73b6c6205 feat: Enhance item handling in DatabaseService to support new object structure 2025-06-30 22:27:44 +01:00
Simon Larsen
8db9c69e1e feat: Add modelType User to deletedByUserId relations across multiple database models
- Updated PromoCode, Reseller, ResellerPlan, ScheduledMaintenance, ScheduledMaintenanceCustomField, ScheduledMaintenanceFeed, ScheduledMaintenanceInternalNote, ScheduledMaintenanceNoteTemplate, ScheduledMaintenanceOwnerTeam, ScheduledMaintenanceOwnerUser, ScheduledMaintenancePublicNote, ScheduledMaintenanceState, ScheduledMaintenanceStateTimeline, ScheduledMaintenanceTemplate, ScheduledMaintenanceTemplateOwnerTeam, ScheduledMaintenanceTemplateOwnerUser, ServiceCatalog, ServiceCatalogDependency, ServiceCatalogMonitor, ServiceCatalogOwnerTeam, ServiceCatalogOwnerUser, ServiceCatalogTelemetryService, ServiceCopilotCodeRepository, ShortLink, SmsLog, StatusPage, StatusPageAnnouncement, StatusPageAnnouncementTemplate, StatusPageCustomField, StatusPageDomain, StatusPageFooterLink, StatusPageGroup, StatusPageHeaderLink, StatusPageHistoryChartBarColorRule, StatusPageOwnerTeam, StatusPageOwnerUser, StatusPagePrivateUser, StatusPageResource, StatusPageSso, StatusPageSubscriber, TableView, Team, TeamMember, TeamPermission, TelemetryException, TelemetryIngestionKey, TelemetryService, TelemetryUsageBilling, User, UserCall, UserEmail, UserNotificationRule, UserNotificationSetting, UserOnCallLog, UserOnCallLogTimeline, UserSMS, UserTwoFactorAuth, Workflow, WorkflowLog, WorkflowVariable, WorkspaceNotificationRule, WorkspaceProjectAuthToken, WorkspaceSetting, WorkspaceUserAuthToken to include modelType User for deletedByUserId relations.
- Updated OneUptimeApiService to exclude additional keys from update operations.
2025-06-30 22:11:21 +01:00
Simon Larsen
00e50f023f chore: Update DynamicToolGenerator for improved code organization and readability 2025-06-30 21:58:56 +01:00
Simon Larsen
f4db88e874 feat: Enhance OpenAPI metadata handling for array types in DynamicToolGenerator 2025-06-30 21:47:03 +01:00
Simon Larsen
255149e3d5 feat: Add EqualTo support in QueryUtil for enhanced query functionality 2025-06-30 21:21:06 +01:00
Simon Larsen
f1b4a396ec feat: Implement EqualTo class and related tests for comparison functionality 2025-06-30 21:19:24 +01:00
Simon Larsen
82b62d32fd refactor: Remove MCP Server Verification workflow from GitHub Actions 2025-06-30 20:58:56 +01:00
Simon Larsen
161b80c19a feat: Add initial GitHub Actions workflow for MCP Server Test 2025-06-30 20:58:32 +01:00
Simon Larsen
ff58beb50e refactor: Enhance cleanDescription method to remove permission information and improve description sanitization 2025-06-30 20:51:50 +01:00
Simon Larsen
63236366ee refactor: Improve comments in sanitizeToolName method for better clarity on string transformations 2025-06-30 20:42:51 +01:00
Simon Larsen
cbdc3186af refactor: Update User model to hide certain columns in documentation for cleaner API output 2025-06-30 20:34:39 +01:00
Simon Larsen
ab0936067c refactor: Remove disableOpenApiSchema option from schema generation methods for cleaner implementation 2025-06-30 20:08:30 +01:00
Simon Larsen
24c083cdb8 refactor: Add disableOpenApiSchema option to schema generation methods for conditional OpenAPI schema application 2025-06-30 19:18:52 +01:00
Simon Larsen
6ce945ac2c fix docs for mcp 2025-06-30 18:20:07 +01:00
Simon Larsen
1c9e9b37d3 refactor: Remove unused select schema from tool generation and enhance pagination descriptions 2025-06-30 16:36:55 +01:00
Simon Larsen
83c740d8cb refactor: Improve data handling in OneUptimeApiService for create and update operations 2025-06-30 14:58:32 +01:00
Simon Larsen
84819c73ff refactor: Mark database columns as computed for improved metadata handling 2025-06-30 13:44:57 +01:00
Simon Larsen
ce166f2f35 refactor: Update JSON Schema generation to disallow additional properties for stricter validation 2025-06-30 13:15:58 +01:00
Nico Aymet (nikuzz)
11b54365f0 Merge branch 'OneUptime:master' into set-permission-on-tmp-npm 2025-06-30 12:53:13 +01:00
Simon Larsen
432debc014 refactor: Update JSON Schema generation to allow additional properties for improved flexibility 2025-06-27 21:55:17 +01:00
Simon Larsen
d9f87c4103 refactor: Enhance request data generation and logging for OneUptimeApiService 2025-06-27 21:39:46 +01:00
Simon Larsen
680e33ba43 refactor: Update executeOperation method to use tableName instead of modelName for improved clarity 2025-06-27 21:20:22 +01:00
Simon Larsen
22162425fb refactor: Update API operation methods to use direct URL creation for improved route handling 2025-06-27 21:00:47 +01:00
Simon Larsen
93d935d117 refactor: Update buildApiRoute method to use Route.fromString for absolute route creation 2025-06-27 20:52:56 +01:00
Simon Larsen
48d9964c70 refactor: Change API initialization base route from '/api' to '/' to prevent route accumulation 2025-06-27 20:47:52 +01:00
Simon Larsen
d2921e3516 refactor: Update API initialization to use the correct base route for OneUptimeApiService 2025-06-27 20:46:58 +01:00
Simon Larsen
5c7e5a1eda refactor: Simplify API route initialization and enhance route building logic in OneUptimeApiService 2025-06-27 20:46:29 +01:00
Simon Larsen
f62a01594d refactor: Replace logger with MCPLogger for improved logging compliance and add MCPLogger class for stderr logging 2025-06-27 16:47:45 +01:00
Simon Larsen
99de9fbd3d refactor: Update secondTLDs list in Domain class for improved domain validation 2025-06-27 16:39:26 +01:00
Simon Larsen
7a0f31e10a refactor: Update MCP tool names to use a consistent prefix format 2025-06-27 16:38:57 +01:00
Simon Larsen
22cee30cdb refactor: Implement sanitizeToolName method to ensure valid MCP tool names and update tool name generation accordingly 2025-06-27 16:26:51 +01:00
Simon Larsen
5524d9d147 refactor: Rename bin command from 'oneuptime-mcp-server' to 'oneuptime-mcp' in package.json 2025-06-27 16:18:40 +01:00
Simon Larsen
9fb4f00460 docs: Add optional link command for global CLI usage in README; remove postinstall script from package.json 2025-06-27 16:18:18 +01:00
Simon Larsen
7e761cc6dd refactor: Update executable script path in package.json and set correct permissions for Index.ts 2025-06-27 15:56:45 +01:00
Simon Larsen
bcfbed0249 refactor: Update OneUptimeApiService to handle Count and Read operations correctly; adjust request data structure for Create and Update operations 2025-06-27 15:08:26 +01:00
Simon Larsen
208c7406f9 refactor: Improve base route handling and add support for Count operation in OneUptimeApiService 2025-06-27 14:58:59 +01:00
Simon Larsen
2a41fec3cd refactor: Update base route for API initialization and change authorization header to APIKey 2025-06-27 14:51:52 +01:00
Simon Larsen
73ea4bbb7c refactor: Implement Zod to JSON Schema conversion for MCP tools; enhance schema generation for database and analytics models 2025-06-27 14:32:33 +01:00
Simon Larsen
1b657b4758 refactor: Add MCP compilation job to GitHub Actions workflow; ensure proper environment setup and dependencies 2025-06-27 14:23:44 +01:00
Simon Larsen
7027739a81 refactor: Enforce required API key in OneUptimeApiConfig and initialize method; improve error handling for missing API key 2025-06-27 14:21:21 +01:00
Simon Larsen
3491869196 refactor: Update API service configuration to conditionally include apiKey; improve parameter handling in executeOperation and generateToolsForDatabaseModel methods 2025-06-27 14:18:46 +01:00
Simon Larsen
f6e106fb65 refactor: Update API service configuration to use bracket notation for environment variables; remove unused variables from imports 2025-06-27 14:17:17 +01:00
Simon Larsen
fd96b0f287 refactor: Remove unused APP_NAME constant from MCP server initialization 2025-06-27 14:15:05 +01:00
Simon Larsen
04ee339d58 refactor: Simplify environment configuration by removing hostname, protocol, and base route; update API service to use URL 2025-06-27 14:06:32 +01:00
Simon Larsen
2a74183de5 Refactor code structure for improved readability and maintainability 2025-06-27 14:02:59 +01:00
Simon Larsen
747d46eb83 refactor: Remove MCP server generation and publishing scripts from package.json 2025-06-27 13:07:57 +01:00
Simon Larsen
00b0be251e refactor: Rename MCP server generation to verification and update related steps 2025-06-27 13:05:47 +01:00
Simon Larsen
1cc057d256 refactor: Update .gitignore to include MCP Server build and environment files 2025-06-27 13:05:26 +01:00
Simon Larsen
907d3308d5 refactor: Update Dockerfile and package.json for MCP Server structure and build process 2025-06-27 13:05:20 +01:00
Simon Larsen
1e254e32fd feat: Implement MCP Hello World Server with basic tools and configuration 2025-06-27 12:56:38 +01:00
Simon Larsen
f2de3cc8a8 refactor: remove OpenAPIParser, StringUtils, and Types modules
- Deleted OpenAPIParser.ts, StringUtils.ts, and Types.ts as part of the refactoring process.
- Removed associated methods and interfaces that were no longer needed.
- Cleaned up the MCP server generation script and README documentation to reflect these changes.
- Updated the publish script to streamline the publishing process.
2025-06-27 12:52:26 +01:00
Simon Larsen
e6c33c8e6d feat: Add parameter validation for required inputs in MCPService methods 2025-06-26 21:51:32 +01:00
Simon Larsen
74c42ab0fe feat: Enhance MCPServerGenerator with path parameter extraction and request data handling 2025-06-26 21:21:52 +01:00
Simon Larsen
31434d7eb3 chore: update package dependencies across multiple modules
- Added new dependencies including @asteasolutions/zod-to-openapi, @bull-board/express, and @clickhouse/client (updated to version 1.10.1) in IsolatedVM, Nginx, OpenTelemetryIngest, Probe, ProbeIngest, ServerMonitorIngest, TestServer, Worker, and Workflow.
- Updated existing dependencies such as axios, express, and nodemailer to their latest versions.
- Removed unnecessary dependencies and cleaned up package-lock files.
- Updated devDependencies to include @testing-library packages and jest-related packages for improved testing capabilities.
- Renamed package names for ServerMonitorIngest and Worker to reflect their purpose more accurately.
2025-06-26 20:42:01 +01:00
Simon Larsen
9b9d6cf6a8 fix: Update OneUptime URL in configuration and README for clarity 2025-06-26 20:31:58 +01:00
Simon Larsen
abb793b2ae fix: Ensure root node_modules are removed before processing subdirectories 2025-06-26 20:17:55 +01:00
Simon Larsen
3119b8cfc2 feat: Add scripts for cleaning and installing node modules 2025-06-26 20:15:16 +01:00
Simon Larsen
eed5ce6ec9 fix: Improve handling of computed fields and attribute types in ResourceGenerator 2025-06-26 20:12:10 +01:00
Simon Larsen
46558d4a77 fix: Add non-null assertions for schema properties in OpenAPIParser to improve type safety 2025-06-26 20:07:34 +01:00
Simon Larsen
cef6638b2c fix: Update job dependencies in release workflows to include publish-mcp-server 2025-06-26 20:03:04 +01:00
Simon Larsen
031750d573 feat: Update build and test scripts for improved efficiency and clarity 2025-06-26 20:01:34 +01:00
Simon Larsen
4287632371 fix: Correct spelling and grammatical errors across multiple files 2025-06-26 15:16:07 +01:00
Nawaz Dhandala
5c464ae137 refactor: Add type annotations for improved type safety across multiple files 2025-06-26 14:24:15 +01:00
Nawaz Dhandala
cf6ee298cc Refactor and clean up code formatting across multiple files
- Improved code formatting in AnnouncementsTable.tsx for better readability.
- Simplified description formatting in AnnouncementView.tsx.
- Adjusted lazy loading syntax in StatusPagesRoutes.tsx for consistency.
- Enhanced script formatting in MCPServerGenerator.ts for better clarity.
- Streamlined error handling and response parsing in OpenAPIParser.ts.
- Refined resource generation logic in ResourceGenerator.ts for improved maintainability.
- Updated comments and structure in GenerateMCPServer.ts for better understanding.
- General code cleanup and formatting adjustments across various files to adhere to style guidelines.
2025-06-26 13:51:11 +01:00
Simon Larsen
8718e58dcb feat: Enhance npm authentication setup in release workflow and verify package before publishing 2025-06-26 13:32:14 +01:00
Simon Larsen
df4bc5ce12 feat: Capture OpenAPI format information and preserve original values for binary fields in resource generation 2025-06-26 12:34:10 +01:00
Simon Larsen
fccfb5b026 feat: Update SVG path for improved icon representation in enterprise-ready section 2025-06-26 12:33:36 +01:00
Simon Larsen
793de2623a feat: Add new features to enterprise-ready section including 5000+ integrations and full API access 2025-06-26 12:15:14 +01:00
Simon Larsen
05f2096e3e feat: Refactor Base64 handling for file columns in DatabaseService to convert strings to buffers 2025-06-26 11:46:18 +01:00
Simon Larsen
d291cdad26 feat: Enhance Base64 handling in Text utility and update DatabaseService for MIME type extraction 2025-06-26 11:10:31 +01:00
Simon Larsen
84fef8e48f feat: Add MCP Server documentation and navigation links 2025-06-26 09:00:05 +01:00
Simon Larsen
de62d40d6e feat: Remove publish MCP server workflow from GitHub Actions 2025-06-26 08:41:43 +01:00
Simon Larsen
98bf1ef155 feat: Add publish MCP server workflow to release and test workflows 2025-06-26 08:40:19 +01:00
Simon Larsen
4939305c08 feat: Add base64 string conversion for file columns in DatabaseService 2025-06-25 21:56:11 +01:00
Simon Larsen
cd77106939 erge branch 'master' into release 2025-06-25 21:42:02 +01:00
Simon Larsen
678a2ac498 Merge branch 'master' into release 2025-06-25 21:40:57 +01:00
Simon Larsen
0b3765594f feat: Add EnableDocumentation decorator to File model for improved documentation generation 2025-06-25 18:33:50 +01:00
Simon Larsen
9f77e8d82d feat: Update access control in FileModel to include AuthenticatedRequest permission 2025-06-25 18:26:51 +01:00
Simon Larsen
78fca73b8a feat: Update File access control to include AuthenticatedRequest permission 2025-06-25 18:24:13 +01:00
Simon Larsen
82e2bc75bf feat: Add spacing div in AnnouncementView for improved layout 2025-06-25 17:30:28 +01:00
Simon Larsen
85de170031 feat: Add AnnouncementView component and update routing for viewing announcements 2025-06-25 17:28:27 +01:00
Simon Larsen
338a2dc2cc refactor: Rename MCP-Generated directory to MCP and update related references in scripts and documentation 2025-06-25 17:09:27 +01:00
Simon Larsen
d400271f3c refactor: Remove MCPServerGenerator class and related methods for code cleanup 2025-06-25 16:56:59 +01:00
Simon Larsen
8c735e1500 fix: Update API key example in README for clarity and consistency 2025-06-25 16:56:26 +01:00
Simon Larsen
d4b0ac7b9c feat: Update README and MCPServerGenerator for consistent directory usage and improved API key example 2025-06-25 16:56:10 +01:00
Simon Larsen
8edcdd37e3 feat: Update MCP package configuration and add server generator
- Enhanced package.json with detailed description, keywords, and repository information.
- Updated scripts for building and starting the server.
- Added new dependencies for axios and dotenv.
- Modified tsconfig.json for improved TypeScript settings.
- Introduced MCPServerGenerator class to automate server file generation.
- Implemented methods to generate essential files: package.json, Index.ts, MCPService, APIClient, configuration utilities, README, tsconfig, nodemon config, and Dockerfile.
- Ensured proper error handling and environment variable validation in the generated code.
2025-06-25 16:53:24 +01:00
Simon Larsen
ed65a477e4 feat: Rename MCP-Generated directory to MCP for consistency across workflows and scripts 2025-06-25 16:51:30 +01:00
Simon Larsen
98e3386d22 feat: Implement OpenAPI Parser and MCP Server Generator
- Added OpenAPIParser class for parsing OpenAPI specifications and extracting MCP tools.
- Introduced StringUtils class for string manipulation utilities.
- Defined TypeScript interfaces for OpenAPI operations, parameters, and schemas.
- Created GenerateMCPServer script to orchestrate the generation of the MCP server from OpenAPI spec.
- Developed README.md for comprehensive documentation on usage and features of the MCP server.
- Implemented publish-mcp-server.sh script for automating the publishing process to NPM and GitHub.
- Established a structured output directory for generated MCP server files, including configuration and documentation.
2025-06-25 16:47:23 +01:00
Simon Larsen
c2b4f1d117 Remove MCP package.json and tsconfig.json files as part of project restructuring 2025-06-25 16:19:17 +01:00
Simon Larsen
fe879d86ce feat: Update linting commands to use npx eslint with increased memory limit and caching 2025-06-24 21:45:10 +01:00
Simon Larsen
9e63a4cbf5 feat: Enhance lint-batches.sh with configurable options for cache, memory, format, timeout, and batch size 2025-06-24 21:25:44 +01:00
Simon Larsen
6c5ba10a52 feat: Remove ESLint configuration file to streamline linting process 2025-06-24 20:46:09 +01:00
Simon Larsen
9c9751c2c7 feat: Remove ignore rule for TerraformProvider in ESLint configuration to address linting issues 2025-06-24 20:31:21 +01:00
Simon Larsen
1b70517463 feat: Refactor DataSourceGenerator, DocumentationGenerator, OpenAPIParser, ResourceGenerator, and StringUtils for improved readability and maintainability 2025-06-24 20:16:45 +01:00
Simon Larsen
38f79900cc feat: Enhance multi-platform build process and improve error messages for provider generation 2025-06-24 20:03:02 +01:00
Simon Larsen
9fc8d679d8 feat: Enhance ModelSchema to combine column and permissions descriptions for improved schema clarity 2025-06-24 18:43:13 +01:00
Simon Larsen
83838da879 feat: Enhance DataSourceGenerator and OpenAPIParser to support dynamic imports and identify read operations for GET and POST methods 2025-06-24 18:37:11 +01:00
Simon Larsen
4e6e7cf354 feat: Replace linting commands with a new script to handle batch linting and prevent memory issues 2025-06-24 18:23:34 +01:00
Simon Larsen
dfc4e2e7f8 feat: Update access control and add computed properties for various models to enhance notification handling 2025-06-24 18:13:49 +01:00
Simon Larsen
8f9c463d85 feat: Enhance OpenAPIParser and ResourceGenerator to support optional and computed fields in schema handling 2025-06-24 15:20:04 +01:00
Simon Larsen
82af0bee58 feat: Update Alert, Incident, and Monitor models to include isDefaultValueColumn and enhance access control permissions 2025-06-24 15:07:50 +01:00
Simon Larsen
babf818963 feat: Enhance ModelSchema to mark computed fields as readOnly and update create/update operations handling 2025-06-24 15:03:05 +01:00
Simon Larsen
b4477e04ef feat: Update Incident, Monitor, and ScheduledMaintenance models to use isDefaultValueColumn for state ID fields 2025-06-24 14:54:54 +01:00
Simon Larsen
f0457df102 feat: Add computed property to various database models for enhanced data handling 2025-06-24 14:53:56 +01:00
Simon Larsen
73a1997f4c feat: Skip computed fields for create operations in ModelSchema to enhance data handling 2025-06-24 14:23:32 +01:00
Simon Larsen
e4e7b7c7d8 feat: Update Incident and Monitor models to include computed properties and simplify access control 2025-06-24 14:08:54 +01:00
Simon Larsen
aa7bd3140c feat: Add computed property to various database models for enhanced data handling 2025-06-24 14:02:56 +01:00
Simon Larsen
095ad5dbf4 feat: Add computed property support in TableColumnMetadata and update related permissions logic 2025-06-24 13:47:53 +01:00
Simon Larsen
f8c8f26cab feat: Enhance response handling for list and object types in ResourceGenerator 2025-06-24 13:29:57 +01:00
Simon Larsen
a923b0f885 refactor: Update default value handling to consider both create and update schemas in ResourceGenerator 2025-06-24 13:18:38 +01:00
Simon Larsen
d352610ca7 refactor: Remove unused onBeforeUpdate method from MonitorService 2025-06-24 13:01:31 +01:00
Simon Larsen
23c57a1483 feat: Add support for complex objects in OpenAPIParser and ResourceGenerator 2025-06-24 12:52:00 +01:00
Simon Larsen
d3106e4ac8 refactor: Enhance resource schema handling by adding support for default values and list types in ResourceGenerator 2025-06-24 12:17:47 +01:00
Simon Larsen
a0acf8cac2 feat: Add operationSchemas to TerraformResource and implement schema generation for CRUD operations in OpenAPIParser 2025-06-24 11:53:18 +01:00
Simon Larsen
b29df21b4d refactor: Enhance OpenAPI schema handling by incorporating default values in ModelSchema and ResourceGenerator 2025-06-24 11:21:47 +01:00
Simon Larsen
e1f52ebd26 refactor: Implement helper function to add default values to OpenAPI schema in AnalyticsModelSchema and ModelSchema 2025-06-23 18:29:06 +01:00
Simon Larsen
0248ae5ec6 Add default values for boolean fields across various database models
- Set defaultValue to false for boolean fields in Monitor, MonitorGroupOwnerTeam, MonitorGroupOwnerUser, MonitorOwnerTeam, MonitorOwnerUser, MonitorProbe, MonitorStatus, MonitorStatusTimeline, MonitorTest, OnCallDutyPolicy, OnCallDutyPolicyExecutionLog, OnCallDutyPolicyOwnerTeam, OnCallDutyPolicyOwnerUser, Probe, ProbeOwnerTeam, ProbeOwnerUser, Project, ProjectSmtpConfig, ProjectSso, PromoCode, ScheduledMaintenance, ScheduledMaintenanceInternalNote, ScheduledMaintenanceOwnerTeam, ScheduledMaintenanceOwnerUser, ScheduledMaintenancePublicNote, ScheduledMaintenanceStateTimeline, ScheduledMaintenanceTemplate, ServiceCopilotCodeRepository, SmsLog, StatusPage, StatusPageAnnouncement, StatusPageAnnouncementTemplate, StatusPageDomain, StatusPageGroup, StatusPageOwnerTeam, StatusPageOwnerUser, StatusPagePrivateUser, StatusPageResource, StatusPageSso, StatusPageSubscriber, TeamMember, TeamPermission, TelemetryException, User, UserEmail, UserNotificationSetting, UserSMS, UserTwoFactorAuth, Workflow, WorkflowVariable.
- Set defaultValue to true for specific boolean fields in MonitorProbe, MonitorTest, OnCallDutyPolicy, ScheduledMaintenance, StatusPage, and StatusPageResource.
- Adjusted default values for various fields to ensure consistent behavior across the application.
2025-06-23 18:16:18 +01:00
Simon Larsen
064ff68147 refactor: Add JSONObject type to defaultValue in TableColumnMetadata interface 2025-06-23 16:31:19 +01:00
Simon Larsen
5794e40fd1 docs: Update contributing guidelines to clarify repository status and forking instructions 2025-06-23 15:52:45 +01:00
Simon Larsen
51faf12723 refactor: Enhance OpenAPI example handling in DocumentationGenerator and OpenAPIParser 2025-06-23 15:50:06 +01:00
Simon Larsen
1c658651ac refactor: Change provider parameter from "host" to "oneuptime_url" for clarity and consistency 2025-06-23 15:42:28 +01:00
Simon Larsen
482c6d3e0b refactor: Improve toSnakeCase method to handle consecutive uppercase letters and camelCase conversion 2025-06-23 15:41:01 +01:00
Simon Larsen
441ab82acf refactor: Update documentation to mark api_key as required for authentication 2025-06-23 15:27:14 +01:00
Simon Larsen
7d18b81ea5 refactor: Update api_key to be required for authentication in DocumentationGenerator and ProviderGenerator 2025-06-23 15:20:29 +01:00
Simon Larsen
a8c3ca5f01 refactor: Change provider parameter from "host" to "oneuptime_url" for clarity and consistency 2025-06-23 15:18:49 +01:00
Simon Larsen
1d57657b72 refactor: Make "Project ID" optional in ModelSchema when derived from API key 2025-06-23 14:55:35 +01:00
Simon Larsen
a4bb6744f4 refactor: Add isDefaultValueColumn property to Current Monitor Status ID in Monitor model 2025-06-23 14:41:33 +01:00
Simon Larsen
4d3ef70765 refactor: Adjust logic for handling optional columns in ModelSchema 2025-06-23 14:40:25 +01:00
Simon Larsen
6f71a67adf refactor: Update example values and adjust optionality for default value columns in ModelSchema 2025-06-23 14:37:09 +01:00
Simon Larsen
a701f5eff0 refactor: Improve code formatting for better readability in DataSourceGenerator, ResourceGenerator, and StringUtils 2025-06-23 14:22:20 +01:00
Simon Larsen
7f7f3cf62b refactor: Add --test-release flag to publish-terraform-provider command 2025-06-20 22:06:36 +01:00
Simon Larsen
2f4d51b833 refactor: Remove Terraform configuration and provider files from TerraformTest 2025-06-20 22:05:12 +01:00
Simon Larsen
c09369c351 refactor: Add TerraformTest directory to .gitignore 2025-06-20 22:04:22 +01:00
Simon Larsen
aeb3d93a1f refactor: Update authentication error message to include API key requirement 2025-06-20 21:59:38 +01:00
Simon Larsen
24803362cb refactor: Enhance publish script for OneUptime Terraform Provider with improved argument parsing, validation, and error handling 2025-06-20 21:28:19 +01:00
Simon Larsen
1dcd3664c7 refactor: Add PostWithSelect method and update resource handling for API calls 2025-06-20 17:34:22 +01:00
Simon Larsen
3e51f3542b refactor: Update path for get item endpoint in OpenAPIUtil to include '/get-item' 2025-06-20 16:50:29 +01:00
Simon Larsen
f8d80b59ac refactor: Add createdByUserId and deletedByUserId to computed fields check in OpenAPIParser 2025-06-20 16:41:24 +01:00
Simon Larsen
36f6561b2c refactor: Enhance response value handling in generateResponseSetter method 2025-06-20 15:55:06 +01:00
Simon Larsen
5ed9b8ec24 refactor: Improve handling of Terraform map and response data in ResourceGenerator 2025-06-20 15:49:02 +01:00
Simon Larsen
672caa8c0a refactor: Change authorization header from Bearer token to APIKey in DoRequest method 2025-06-20 14:40:46 +01:00
Simon Larsen
46e7d9aca6 refactor: Preserve original OpenAPI parameter and property names in ResourceGenerator and OpenAPIParser 2025-06-20 14:38:24 +01:00
Simon Larsen
aa617ec0ba refactor: Enhance handling of Terraform map and list types in ResourceGenerator 2025-06-20 14:33:49 +01:00
Simon Larsen
aaa8d13526 refactor: Exclude Entity columns while retaining EntityArray columns in ModelSchema 2025-06-20 14:15:32 +01:00
Simon Larsen
b055a999e3 refactor: Clarify logic for making fields optional in ModelSchema 2025-06-20 14:00:12 +01:00
Simon Larsen
3c7426ffac refactor: Sanitize attribute names in DataSourceGenerator and ResourceGenerator to avoid reserved keywords 2025-06-20 13:50:49 +01:00
Simon Larsen
09a8d89106 refactor: Update API host URL in README and scripts for consistency 2025-06-20 12:35:30 +01:00
Simon Larsen
3e8273ce55 refactor: Improve code formatting and readability in OpenAPIParser and StringUtils 2025-06-20 12:17:02 +01:00
Simon Larsen
7f08319da2 refactor: Enhance type annotations for methods and variables in OpenAPIParser, ResourceGenerator, StringUtils, and TerraformProviderGenerator 2025-06-20 00:09:33 +01:00
Simon Larsen
9f8c88ec91 refactor: Improve code formatting and readability across multiple generator files 2025-06-20 00:02:47 +01:00
Simon Larsen
571858aad5 refactor: Enhance type annotations and access modifiers across the Terraform provider codebase
- Updated constructors and methods in various classes to use public access modifiers for better clarity.
- Added explicit type annotations for variables and function return types to improve type safety and readability.
- Refactored the DocumentationGenerator, FileGenerator, GoCodeGenerator, GoModuleGenerator, OpenAPIParser, ProviderGenerator, ResourceGenerator, StringUtils, TerraformProviderGenerator, and GenerateProvider scripts.
- Removed deprecated Index.ts file related to Terraform provider generation.
2025-06-19 23:57:50 +01:00
Simon Larsen
6c6612fde9 refactor: Improve readability and consistency in example generation and resource imports 2025-06-19 23:45:00 +01:00
Simon Larsen
30dd60f01f feat: Add example generation for resource documentation and enhance schema handling 2025-06-19 23:32:39 +01:00
Simon Larsen
f9372928fd refactor: Enhance handling of map and list types in resource generation, adding comments for future implementation 2025-06-19 21:35:42 +01:00
Simon Larsen
0475f1cbea refactor: Update import determination logic based on actual usage and resource operations 2025-06-19 21:25:18 +01:00
Simon Larsen
461b64eb56 Refactor code for improved readability and consistency
- Updated formatting in DocumentationGenerator.ts for better readability.
- Enhanced writeFileInDir method in FileGenerator.ts with consistent formatting.
- Refactored GoCodeGenerator.ts for improved code structure and readability.
- Improved error handling and formatting in OpenAPIParser.ts.
- Enhanced ProviderGenerator.ts with consistent formatting for file writing.
- Refactored ResourceGenerator.ts for improved readability and consistency.
- Updated StringUtils.ts for better formatting and readability.
- Improved TerraformProviderGenerator.ts with consistent formatting.
- Refactored GenerateProvider.ts for better error handling and readability.
- Updated Index.ts for improved formatting and consistency.
2025-06-19 21:05:06 +01:00
Simon Larsen
22d326bf6f feat: Implement dynamic example generation for model schemas and enhance schema descriptions 2025-06-19 20:54:39 +01:00
Simon Larsen
e8b0d76bf0 refactor: Enhance schema handling for unknown column types and improve descriptions in ModelSchema 2025-06-19 20:39:17 +01:00
Simon Larsen
37c8ab5405 refactor: Remove debug logging from schema processing in OpenAPIParser 2025-06-19 19:51:26 +01:00
Simon Larsen
f73a964916 feat: Add build and installation script generation for Terraform provider 2025-06-19 19:50:32 +01:00
Simon Larsen
d9412b6c0c refactor: Improve operation type determination and schema extraction in OpenAPIParser 2025-06-19 19:46:49 +01:00
Simon Larsen
eed38eed8d refactor: Update host configuration to remove '/api' path and clarify documentation 2025-06-19 19:14:04 +01:00
Simon Larsen
fdfabe080c refactor: Enhance toSnakeCase method to replace multiple underscores with a single underscore 2025-06-19 19:07:50 +01:00
Simon Larsen
8b41779fa2 refactor: Update provider configuration to use default host and remove unused authentication fields 2025-06-19 19:03:33 +01:00
Simon Larsen
1ef5894325 feat: Implement Terraform Provider Generator with OpenAPI integration
- Added StringUtils class for string manipulation and formatting.
- Created TerraformProviderGenerator class to handle provider generation.
- Defined TypeScript interfaces for Terraform provider configuration and OpenAPI specifications.
- Developed GenerateProvider script to orchestrate the provider generation process.
- Added README documentation for the Terraform provider generator.
- Implemented installation script for local provider installation.
- Created publish script for preparing and publishing the provider to Terraform Registry.
2025-06-19 18:55:46 +01:00
Simon Larsen
aec4878948 refactor: remove unused select schema references in OpenAPIUtil 2025-06-19 18:31:36 +01:00
Simon Larsen
f28dd9468f refactor: remove unused select schema reference in OpenAPIUtil 2025-06-19 18:29:31 +01:00
Simon Larsen
ba3d665e19 refactor: remove unused select schema reference in create API spec 2025-06-19 18:28:42 +01:00
Simon Larsen
035e9273d9 Refactor: Remove old Terraform provider implementation and scripts
- Deleted main.go and provider.go files as part of the provider refactor.
- Removed publish-terraform-provider.sh script, which was responsible for publishing the provider to the Terraform Registry.
- Eliminated validate-generation.sh script used for local validation of the provider generation process.
- Introduced new Index.ts file to initiate the Terraform provider generation process from the OpenAPI specification.
- Updated the generation process to ensure a clean slate by removing any existing Terraform directory before generating new files.
2025-06-19 17:58:39 +01:00
Simon Larsen
849e06ec35 feat: implement type conflict resolution in TypeConflictResolver 2025-06-19 17:39:26 +01:00
Simon Larsen
9e1cc85c09 refactor: improve resource and data source handling in GeneratorConfig 2025-06-19 17:22:23 +01:00
Simon Larsen
04ce633338 refactor: simplify response schema registration in OpenAPIUtil 2025-06-19 17:17:29 +01:00
Simon Larsen
a04c561ad5 fix: add missing newline for better readability in GenerateProvider.ts 2025-06-19 16:05:52 +01:00
Simon Larsen
f221b2b4ff feat: add response schemas for list, create, get, update, and analytics operations in OpenAPIUtil 2025-06-19 15:33:39 +01:00
Simon Larsen
4ab7b09661 fix: correct function call for provider initialization in main.go 2025-06-19 14:32:23 +01:00
Simon Larsen
523b842e57 fix: ensure error is thrown after failed Go module initialization and tidy command 2025-06-19 14:27:19 +01:00
Simon Larsen
023fe0b742 fix: correct import statement for provider package in main.go 2025-06-19 14:26:32 +01:00
Simon Larsen
e06085a16a feat: implement initial provider structure and functionality for OneUptime Terraform provider 2025-06-19 14:19:25 +01:00
Simon Larsen
e074b38e3d fix: correct path references in Go module initialization and main.go file reading 2025-06-19 13:38:23 +01:00
Simon Larsen
3d6a61ddc1 feat: add Go module setup and main entry point for Terraform provider generation 2025-06-19 13:28:00 +01:00
Simon Larsen
f3dc3e976e refactor: format output path for Terraform provider generation for improved readability 2025-06-19 13:18:54 +01:00
Simon Larsen
f556cf1174 fix: update output path for Terraform provider generation to include full provider name 2025-06-18 17:11:27 +01:00
Simon Larsen
6b7a102b9a refactor: replace <span> with <div> for monitor status elements to improve structure 2025-06-18 14:50:19 +01:00
Simon Larsen
a7d672263a refactor: rename 'type' to 'fileType' in various components for consistency and clarity 2025-06-18 14:47:18 +01:00
Simon Larsen
3ebc19fb78 refactor: rename 'type' columns to 'fileType', 'paymentMethodType', and 'customFieldType' in migration files for clarity; update related code references 2025-06-18 13:48:54 +01:00
Simon Larsen
7c509791f4 fix: update fieldType references to use customFieldType for consistency in CustomFieldsDetail component 2025-06-18 13:43:13 +01:00
Simon Larsen
5225fdde0d feat: add migration to rename 'type' columns to improve clarity in database schema 2025-06-18 13:41:31 +01:00
Simon Larsen
8a57fdbac7 refactor: rename 'type' to 'customFieldType' and 'paymentMethodType' in various models and components for clarity 2025-06-18 13:40:15 +01:00
Simon Larsen
77e097bf5f feat: implement ProviderCodeSpecGenerator for generating provider code specifications 2025-06-18 12:04:49 +01:00
Simon Larsen
b13f1d03c0 fix: remove Go module setup from provider generation process and add scaffolding for framework output directory 2025-06-18 11:15:01 +01:00
Simon Larsen
9af40e0efb feat: enhance provider.go generation with dynamic resource and data source implementations 2025-06-17 20:55:22 +01:00
Simon Larsen
eceeffec2e fix: remove unnecessary terraform block from example configuration 2025-06-17 20:44:14 +01:00
Simon Larsen
f057710abf fix: update get_provider_version function to return a default version for testing 2025-06-17 20:34:31 +01:00
Simon Larsen
bdf21e3598 chore: remove local installation script for OneUptime Terraform provider 2025-06-17 20:32:47 +01:00
Simon Larsen
55a40d80d5 fix: update .gitignore to include Terraform provider files and modify install script to use --force option 2025-06-17 20:31:05 +01:00
Simon Larsen
70cd4e7a46 feat: Add OneUptime Terraform Provider Publisher script
- Implemented a comprehensive bash script to automate the publishing process of the OneUptime Terraform provider to the Terraform Registry.
- Included functionalities for version specification, testing mode, dependency installation, provider generation, GitHub repository interaction, release creation, and asset uploading.
- Added error handling, prerequisite validation, and detailed logging for better user experience.
- Integrated GPG signing for release assets and SHA256 checksum generation.
- Provided usage instructions and examples for ease of use.
2025-06-17 20:28:24 +01:00
Simon Larsen
301cf0611d feat: add local installation script and update README for Terraform provider 2025-06-17 20:14:05 +01:00
Simon Larsen
16fd822f4f fix: update GPG private key reference in Terraform provider workflow 2025-06-17 12:26:00 +01:00
Simon Larsen
100bfbe5db fix: enhance GPG signing process with key validation and debugging output 2025-06-17 12:00:42 +01:00
Simon Larsen
e420e44bee fix: add GPG key import and export steps in Terraform provider publishing process 2025-06-17 11:34:42 +01:00
Simon Larsen
18b5323bc2 fix: add asset existence check and deletion before uploading in release process 2025-06-17 11:24:17 +01:00
Simon Larsen
cb002e25f9 fix: remove GPG key import and export steps from Terraform provider publishing process 2025-06-17 11:12:01 +01:00
Simon Larsen
19a0cfd3fd fix: add GPG key import and export steps in Terraform provider generation workflow 2025-06-17 11:06:26 +01:00
Simon Larsen
3b6a746d41 fix: streamline GPG key handling in SHASUMS signing process 2025-06-17 11:00:04 +01:00
Simon Larsen
f27090dc4f fix: improve GPG key import error handling and output for better debugging 2025-06-17 10:50:41 +01:00
Simon Larsen
2b68ec3d1b fix: enhance GPG key import process by using a temporary file and improving status messages 2025-06-17 10:44:18 +01:00
Simon Larsen
02e3d1138e fix: update Terraform provider publish command to use quotes for better handling of secrets 2025-06-17 10:32:08 +01:00
Simon Larsen
fdb2823fda fix: streamline GPG key handling in Terraform provider publish workflow 2025-06-17 10:27:29 +01:00
Simon Larsen
0ed160f68f fix: streamline GPG key handling and enhance publish script options for Terraform provider 2025-06-17 10:20:42 +01:00
Simon Larsen
66f6952ad9 fix: remove fallback for GPG private key in release workflow 2025-06-17 10:11:16 +01:00
Simon Larsen
d08387d4c8 fix: improve GPG key import process with enhanced error handling and automation 2025-06-17 09:59:12 +01:00
Simon Larsen
78835f8fb4 fix: enhance GPG signing process with improved error handling and automation 2025-06-17 09:48:14 +01:00
Simon Larsen
ae9af32768 fix: update GitHub release title and name format to simplify versioning 2025-06-17 09:42:13 +01:00
Simon Larsen
16de3a0380 fix: include signature files in release asset creation and upload process 2025-06-17 09:39:55 +01:00
Simon Larsen
5196fc1385 fix: enhance GPG signing process with validation and improved error handling 2025-06-16 23:14:37 +01:00
Simon Larsen
964afb0a1d fix: streamline provider generation by removing redundant validations and enhancing zip archive creation 2025-06-16 23:05:03 +01:00
Simon Larsen
c5b382c122 fix: replace multi-platform build process with verification of existing builds 2025-06-16 22:47:46 +01:00
Simon Larsen
e74fddfe75 fix: update build command in publish script to use variable for ldflags 2025-06-16 22:44:28 +01:00
Simon Larsen
2ef6698f1b fix: update publish script to validate provider framework directory and adjust paths for Go operations 2025-06-16 22:31:27 +01:00
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
875 changed files with 64324 additions and 41323 deletions

View File

@@ -23,7 +23,11 @@ jobs:
# build image for accounts service
- name: build docker image
run: sudo docker build -f ./Accounts/Dockerfile .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./Accounts/Dockerfile .
docker-build-isolated-vm:
runs-on: ubuntu-latest
@@ -38,7 +42,11 @@ jobs:
# build image for accounts service
- name: build docker image
run: sudo docker build -f ./IsolatedVM/Dockerfile .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./IsolatedVM/Dockerfile .
docker-build-home:
runs-on: ubuntu-latest
@@ -53,7 +61,11 @@ jobs:
# build image for accounts service
- name: build docker image
run: sudo docker build -f ./Home/Dockerfile .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./Home/Dockerfile .
docker-build-worker:
runs-on: ubuntu-latest
@@ -68,7 +80,11 @@ jobs:
# build image for accounts service
- name: build docker image
run: sudo docker build -f ./Worker/Dockerfile .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./Worker/Dockerfile .
docker-build-workflow:
runs-on: ubuntu-latest
@@ -83,7 +99,11 @@ jobs:
# build image for accounts service
- name: build docker image
run: sudo docker build -f ./Workflow/Dockerfile .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./Workflow/Dockerfile .
docker-build-api-reference:
runs-on: ubuntu-latest
@@ -98,7 +118,11 @@ jobs:
# build image for accounts service
- name: build docker image
run: sudo docker build -f ./APIReference/Dockerfile .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./APIReference/Dockerfile .
docker-build-docs:
runs-on: ubuntu-latest
@@ -113,7 +137,11 @@ jobs:
# build image for accounts service
- name: build docker image
run: sudo docker build -f ./Docs/Dockerfile .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./Docs/Dockerfile .
docker-build-otel-collector:
@@ -129,7 +157,11 @@ jobs:
# build image for accounts service
- name: build docker image
run: sudo docker build -f ./OTelCollector/Dockerfile .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./OTelCollector/Dockerfile .
docker-build-app:
runs-on: ubuntu-latest
@@ -145,7 +177,11 @@ jobs:
# build image for accounts service
- name: build docker image
run: sudo docker build -f ./App/Dockerfile .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./App/Dockerfile .
docker-build-copilot:
@@ -161,7 +197,11 @@ jobs:
# build image for accounts service
- name: build docker image
run: sudo docker build -f ./Copilot/Dockerfile .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./Copilot/Dockerfile .
docker-build-e2e:
runs-on: ubuntu-latest
@@ -177,7 +217,11 @@ jobs:
# build image for accounts service
- name: build docker image
run: sudo docker build -f ./E2E/Dockerfile .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./E2E/Dockerfile .
docker-build-admin-dashboard:
runs-on: ubuntu-latest
@@ -192,7 +236,11 @@ jobs:
# build image for home
- name: build docker image
run: sudo docker build -f ./AdminDashboard/Dockerfile .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./AdminDashboard/Dockerfile .
docker-build-dashboard:
runs-on: ubuntu-latest
@@ -207,23 +255,11 @@ jobs:
# build image for home
- 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 .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./Dashboard/Dockerfile .
docker-build-probe:
runs-on: ubuntu-latest
@@ -238,7 +274,11 @@ jobs:
# build image probe api
- name: build docker image
run: sudo docker build -f ./Probe/Dockerfile .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./Probe/Dockerfile .
docker-build-probe-ingest:
runs-on: ubuntu-latest
@@ -253,7 +293,11 @@ jobs:
# build image probe api
- name: build docker image
run: sudo docker build -f ./ProbeIngest/Dockerfile .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./ProbeIngest/Dockerfile .
docker-build-server-monitor-ingest:
runs-on: ubuntu-latest
@@ -268,7 +312,11 @@ jobs:
# build image probe api
- name: build docker image
run: sudo docker build -f ./ServerMonitorIngest/Dockerfile .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./ServerMonitorIngest/Dockerfile .
docker-build-open-telemetry-ingest:
runs-on: ubuntu-latest
@@ -283,7 +331,11 @@ jobs:
# build image probe api
- name: build docker image
run: sudo docker build -f ./OpenTelemetryIngest/Dockerfile .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./OpenTelemetryIngest/Dockerfile .
docker-build-incoming-request-ingest:
runs-on: ubuntu-latest
@@ -298,7 +350,11 @@ jobs:
# build image probe api
- name: build docker image
run: sudo docker build -f ./IncomingRequestIngest/Dockerfile .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./IncomingRequestIngest/Dockerfile .
docker-build-fluent-ingest:
runs-on: ubuntu-latest
@@ -313,7 +369,11 @@ jobs:
# build image probe api
- name: build docker image
run: sudo docker build -f ./FluentIngest/Dockerfile .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./FluentIngest/Dockerfile .
docker-build-status-page:
runs-on: ubuntu-latest
@@ -328,7 +388,11 @@ jobs:
# build image for home
- name: build docker image
run: sudo docker build -f ./StatusPage/Dockerfile .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./StatusPage/Dockerfile .
docker-build-test-server:
runs-on: ubuntu-latest
@@ -343,4 +407,8 @@ jobs:
# build image for mail service
- name: build docker image
run: sudo docker build -f ./TestServer/Dockerfile .
uses: nick-fields/retry@v3
with:
timeout_minutes: 45
max_attempts: 3
command: sudo docker build -f ./TestServer/Dockerfile .

View File

@@ -20,7 +20,12 @@ jobs:
with:
node-version: latest
- run: cd Common && npm install
- run: cd Accounts && npm install && npm run compile && npm run dep-check
- name: Compile Accounts
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd Accounts && npm install && npm run compile && npm run dep-check
compile-isolated-vm:
runs-on: ubuntu-latest
@@ -32,7 +37,12 @@ jobs:
with:
node-version: latest
- run: cd Common && npm install
- run: cd IsolatedVM && npm install && npm run compile && npm run dep-check
- name: Compile IsolatedVM
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd IsolatedVM && npm install && npm run compile && npm run dep-check
compile-common:
runs-on: ubuntu-latest
@@ -43,7 +53,12 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: latest
- run: cd Common && npm install && npm run compile && npm run dep-check
- name: Compile Common
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd Common && npm install && npm run compile && npm run dep-check
compile-app:
runs-on: ubuntu-latest
@@ -55,7 +70,12 @@ jobs:
with:
node-version: latest
- run: cd Common && npm install
- run: cd App && npm install && npm run compile && npm run dep-check
- name: Compile App
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd App && npm install && npm run compile && npm run dep-check
compile-home:
runs-on: ubuntu-latest
@@ -67,7 +87,12 @@ jobs:
with:
node-version: latest
- run: cd Common && npm install
- run: cd Home && npm install && npm run compile && npm run dep-check
- name: Compile Home
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd Home && npm install && npm run compile && npm run dep-check
compile-worker:
runs-on: ubuntu-latest
@@ -79,7 +104,12 @@ jobs:
with:
node-version: latest
- run: cd Common && npm install
- run: cd Worker && npm install && npm run compile && npm run dep-check
- name: Compile Worker
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd Worker && npm install && npm run compile && npm run dep-check
compile-workflow:
runs-on: ubuntu-latest
@@ -91,7 +121,12 @@ jobs:
with:
node-version: latest
- run: cd Common && npm install
- run: cd Workflow && npm install && npm run compile && npm run dep-check
- name: Compile Workflow
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd Workflow && npm install && npm run compile && npm run dep-check
compile-api-reference:
runs-on: ubuntu-latest
@@ -103,7 +138,12 @@ jobs:
with:
node-version: latest
- run: cd Common && npm install
- run: cd APIReference && npm install && npm run compile && npm run dep-check
- name: Compile API Reference
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd APIReference && npm install && npm run compile && npm run dep-check
compile-docs-reference:
runs-on: ubuntu-latest
@@ -115,7 +155,12 @@ jobs:
with:
node-version: latest
- run: cd Common && npm install
- run: cd Docs && npm install && npm run compile && npm run dep-check
- name: Compile Docs Reference
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd Docs && npm install && npm run compile && npm run dep-check
compile-copilot:
runs-on: ubuntu-latest
@@ -127,7 +172,12 @@ jobs:
with:
node-version: latest
- run: cd Common && npm install
- run: cd Copilot && npm install && npm run compile && npm run dep-check
- name: Compile Copilot
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd Copilot && npm install && npm run compile && npm run dep-check
compile-nginx:
runs-on: ubuntu-latest
@@ -140,7 +190,12 @@ jobs:
node-version: latest
- run: cd Common && npm install
- run: cd Nginx && npm install && npm run compile && npm run dep-check
- name: Compile Nginx
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd Nginx && npm install && npm run compile && npm run dep-check
compile-infrastructure-agent:
runs-on: ubuntu-latest
@@ -150,7 +205,12 @@ jobs:
- uses: actions/checkout@v4
# Setup Go
- uses: actions/setup-go@v5
- run: cd InfrastructureAgent && go build .
- name: Compile Infrastructure Agent
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd InfrastructureAgent && go build .
compile-admin-dashboard:
@@ -164,7 +224,12 @@ jobs:
node-version: latest
- run: cd Common && npm install
- run: cd AdminDashboard && npm install && npm run compile && npm run dep-check
- name: Compile Admin Dashboard
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd AdminDashboard && npm install && npm run compile && npm run dep-check
compile-dashboard:
runs-on: ubuntu-latest
@@ -177,7 +242,12 @@ jobs:
node-version: latest
- run: cd Common && npm install
- run: cd Dashboard && npm install && npm run compile && npm run dep-check
- name: Compile Dashboard
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd Dashboard && npm install && npm run compile && npm run dep-check
compile-e2e:
@@ -191,7 +261,12 @@ jobs:
node-version: latest
- run: sudo apt-get update
- run: cd Common && npm install
- run: cd E2E && npm install && npm run compile && npm run dep-check
- name: Compile E2E
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd E2E && npm install && npm run compile && npm run dep-check
compile-probe:
runs-on: ubuntu-latest
@@ -203,7 +278,12 @@ jobs:
with:
node-version: latest
- run: cd Common && npm install
- run: cd Probe && npm install && npm run compile && npm run dep-check
- name: Compile Probe
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd Probe && npm install && npm run compile && npm run dep-check
compile-probe-ingest:
runs-on: ubuntu-latest
@@ -215,7 +295,12 @@ jobs:
with:
node-version: latest
- run: cd Common && npm install
- run: cd ProbeIngest && npm install && npm run compile && npm run dep-check
- name: Compile Probe Ingest
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd ProbeIngest && npm install && npm run compile && npm run dep-check
compile-server-monitor-ingest:
runs-on: ubuntu-latest
@@ -227,7 +312,12 @@ jobs:
with:
node-version: latest
- run: cd Common && npm install
- run: cd ServerMonitorIngest && npm install && npm run compile && npm run dep-check
- name: Compile Server Monitor Ingest
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd ServerMonitorIngest && npm install && npm run compile && npm run dep-check
compile-open-telemetry-ingest:
runs-on: ubuntu-latest
@@ -239,7 +329,12 @@ jobs:
with:
node-version: latest
- run: cd Common && npm install
- run: cd OpenTelemetryIngest && npm install && npm run compile && npm run dep-check
- name: Compile Open Telemetry Ingest
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd OpenTelemetryIngest && npm install && npm run compile && npm run dep-check
compile-incoming-request-ingest:
@@ -252,7 +347,12 @@ jobs:
with:
node-version: latest
- run: cd Common && npm install
- run: cd IncomingRequestIngest && npm install && npm run compile && npm run dep-check
- name: Compile Incoming Request Ingest
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd IncomingRequestIngest && npm install && npm run compile && npm run dep-check
compile-fluent-ingest:
runs-on: ubuntu-latest
@@ -264,7 +364,12 @@ jobs:
with:
node-version: latest
- run: cd Common && npm install
- run: cd FluentIngest && npm install && npm run compile && npm run dep-check
- name: Compile Fluent Ingest
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd FluentIngest && npm install && npm run compile && npm run dep-check
compile-status-page:
@@ -278,7 +383,12 @@ jobs:
node-version: latest
- run: cd Common && npm install
- run: cd StatusPage && npm install && npm run compile && npm run dep-check
- name: Compile Status Page
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd StatusPage && npm install && npm run compile && npm run dep-check
compile-test-server:
runs-on: ubuntu-latest
@@ -290,4 +400,26 @@ jobs:
with:
node-version: latest
- run: cd Common && npm install
- run: cd TestServer && npm install && npm run compile && npm run dep-check
- name: Compile Test Server
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: 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
- name: Compile MCP
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: cd MCP && npm install && npm run compile && npm run dep-check

File diff suppressed because it is too large Load Diff

View File

@@ -77,17 +77,21 @@ jobs:
ls -la "$PROVIDER_DIR" || true
- name: Test Go build
run: |
PROVIDER_DIR="./Terraform"
if [ -d "$PROVIDER_DIR" ] && [ -f "$PROVIDER_DIR/go.mod" ]; then
cd "$PROVIDER_DIR"
echo "🔨 Testing Go build..."
go mod tidy
go build -v ./...
echo "✅ Go build successful"
else
echo "⚠️ Cannot test build - missing go.mod or provider directory"
fi
uses: nick-fields/retry@v3
with:
timeout_minutes: 30
max_attempts: 3
command: |
PROVIDER_DIR="./Terraform"
if [ -d "$PROVIDER_DIR" ] && [ -f "$PROVIDER_DIR/go.mod" ]; then
cd "$PROVIDER_DIR"
echo "🔨 Testing Go build..."
go mod tidy
go build -v ./...
echo "✅ Go build successful"
else
echo "⚠️ Cannot test build - missing go.mod or provider directory"
fi
- name: Upload Terraform provider as artifact
uses: actions/upload-artifact@v4

File diff suppressed because it is too large Load Diff

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

16
.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
@@ -119,4 +116,15 @@ InfrastructureAgent/oneuptime-infrastructure-agent
# Terraform generated files
openapi.json
Terraform/**
Terraform/**
TerraformTest/**
terraform-provider-example/**
# MCP Server
MCP/build/
MCP/.env
MCP/node_modules
Dashboard/public/sw.js
.claude/settings.local.json

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

@@ -4,5 +4,7 @@
"ignore": [
"greenlock.d/*"
],
"exec": "node --inspect=0.0.0.0:9229 --require ts-node/register Index.ts"
"watchOptions": {"useFsEvents": false, "interval": 500},
"env": {"TS_NODE_TRANSPILE_ONLY": "1", "TS_NODE_FILES": "false"},
"exec": "node --inspect=0.0.0.0:9229 -r ts-node/register/transpile-only Index.ts"
}

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

@@ -135,7 +135,6 @@
<link rel="apple-touch-icon-precomposed" href="/img/ou-wb.svg">
<link rel="icon" href="/img/ou-wb.svg">
<link rel="image_src" type="image/png" href="/img/hou-wb.svg">
<link rel="canonical" href="/">
<link rel="manifest" href="/manifest.json">
<meta property="og:title" content="OneUptime - One Complete Observability platform.">
<meta property="og:url" content="https://oneuptime.com">

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";
@@ -281,6 +282,9 @@ import ShortLinkService, {
import SmsLogService, {
Service as SmsLogServiceType,
} from "Common/Server/Services/SmsLogService";
import PushNotificationLogService, {
Service as PushNotificationLogServiceType,
} from "Common/Server/Services/PushNotificationLogService";
import SpanService, {
SpanService as SpanServiceType,
} from "Common/Server/Services/SpanService";
@@ -378,6 +382,8 @@ import Span from "Common/Models/AnalyticsModels/Span";
import ApiKey from "Common/Models/DatabaseModels/ApiKey";
import ApiKeyPermission from "Common/Models/DatabaseModels/ApiKeyPermission";
import CallLog from "Common/Models/DatabaseModels/CallLog";
import PushNotificationLog from "Common/Models/DatabaseModels/PushNotificationLog";
import WorkspaceNotificationLog from "Common/Models/DatabaseModels/WorkspaceNotificationLog";
import Domain from "Common/Models/DatabaseModels/Domain";
import EmailLog from "Common/Models/DatabaseModels/EmailLog";
import EmailVerificationToken from "Common/Models/DatabaseModels/EmailVerificationToken";
@@ -479,6 +485,9 @@ import TelemetryAttribute from "Common/Models/AnalyticsModels/TelemetryAttribute
import ExceptionInstance from "Common/Models/AnalyticsModels/ExceptionInstance";
import TelemetyException from "Common/Models/DatabaseModels/TelemetryException";
import CopilotActionTypePriority from "Common/Models/DatabaseModels/CopilotActionTypePriority";
import WorkspaceNotificationLogService, {
Service as WorkspaceNotificationLogServiceType,
} from "Common/Server/Services/WorkspaceNotificationLogService";
// scheduled maintenance template
import ScheduledMaintenanceTemplate from "Common/Models/DatabaseModels/ScheduledMaintenanceTemplate";
@@ -529,11 +538,6 @@ import WorkspaceSettingService, {
Service as WorkspaceSettingServiceType,
} from "Common/Server/Services/WorkspaceSettingService";
import ProjectUser from "Common/Models/DatabaseModels/ProjectUser";
import ProjectUserService, {
Service as ProjectUserServiceType,
} from "Common/Server/Services/ProjectUserService";
import MonitorFeed from "Common/Models/DatabaseModels/MonitorFeed";
import MonitorFeedService, {
Service as MonitorFeedServiceType,
@@ -582,6 +586,18 @@ import StatusPageAnnouncementTemplateService, {
Service as StatusPageAnnouncementTemplateServiceType,
} from "Common/Server/Services/StatusPageAnnouncementTemplateService";
// ProjectSCIM
import ProjectSCIM from "Common/Models/DatabaseModels/ProjectSCIM";
import ProjectSCIMService, {
Service as ProjectSCIMServiceType,
} from "Common/Server/Services/ProjectSCIMService";
// StatusPageSCIM
import StatusPageSCIM from "Common/Models/DatabaseModels/StatusPageSCIM";
import StatusPageSCIMService, {
Service as StatusPageSCIMServiceType,
} from "Common/Server/Services/StatusPageSCIMService";
// Open API Spec
import OpenAPI from "Common/Server/API/OpenAPI";
@@ -617,6 +633,24 @@ const BaseAPIFeatureSet: FeatureSet = {
).getRouter(),
);
// Project SCIM
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<ProjectSCIM, ProjectSCIMServiceType>(
ProjectSCIM,
ProjectSCIMService,
).getRouter(),
);
// Status Page SCIM
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<StatusPageSCIM, StatusPageSCIMServiceType>(
StatusPageSCIM,
StatusPageSCIMService,
).getRouter(),
);
// status page announcement templates
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
@@ -697,14 +731,6 @@ const BaseAPIFeatureSet: FeatureSet = {
).getRouter(),
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<ProjectUser, ProjectUserServiceType>(
ProjectUser,
ProjectUserService,
).getRouter(),
);
//service provider setting
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
@@ -1500,6 +1526,22 @@ const BaseAPIFeatureSet: FeatureSet = {
new BaseAPI<SmsLog, SmsLogServiceType>(SmsLog, SmsLogService).getRouter(),
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<PushNotificationLog, PushNotificationLogServiceType>(
PushNotificationLog,
PushNotificationLogService,
).getRouter(),
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<
WorkspaceNotificationLog,
WorkspaceNotificationLogServiceType
>(WorkspaceNotificationLog, WorkspaceNotificationLogService).getRouter(),
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<EmailLog, EmailLogServiceType>(
@@ -1608,6 +1650,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(

File diff suppressed because it is too large Load Diff

View File

@@ -168,6 +168,7 @@ router.post(
},
{
projectId: statusPage.projectId!,
statusPageId: statusPage.id!,
},
).catch((err: Error) => {
logger.error(err);
@@ -306,6 +307,7 @@ router.post(
},
{
projectId: statusPage.projectId!,
statusPageId: statusPage.id!,
},
).catch((err: Error) => {
logger.error(err);

View File

@@ -0,0 +1,996 @@
import SCIMMiddleware from "Common/Server/Middleware/SCIMAuthorization";
import StatusPagePrivateUserService from "Common/Server/Services/StatusPagePrivateUserService";
import StatusPageSCIMUserService from "Common/Server/Services/StatusPageSCIMUserService";
import Express, {
ExpressRequest,
ExpressResponse,
ExpressRouter,
OneUptimeRequest,
} from "Common/Server/Utils/Express";
import Response from "Common/Server/Utils/Response";
import logger from "Common/Server/Utils/Logger";
import ObjectID from "Common/Types/ObjectID";
import Email from "Common/Types/Email";
import { JSONObject } from "Common/Types/JSON";
import StatusPagePrivateUser from "Common/Models/DatabaseModels/StatusPagePrivateUser";
import StatusPageSCIM from "Common/Models/DatabaseModels/StatusPageSCIM";
import StatusPageSCIMUser from "Common/Models/DatabaseModels/StatusPageSCIMUser";
import BadRequestException from "Common/Types/Exception/BadRequestException";
import NotFoundException from "Common/Types/Exception/NotFoundException";
import LIMIT_MAX from "Common/Types/Database/LimitMax";
import {
parseNameFromSCIM,
formatUserForSCIM,
generateServiceProviderConfig,
generateUsersListResponse,
parseSCIMQueryParams,
logSCIMOperation,
extractEmailFromSCIM,
extractExternalIdFromSCIM,
isUserNameEmail,
} from "../Utils/SCIMUtils";
import Text from "Common/Types/Text";
import HashedString from "Common/Types/HashedString";
const router: ExpressRouter = Express.getRouter();
// Helper function to find user by external ID or email
const findUserByExternalIdOrEmail: (
userName: string,
statusPageId: ObjectID,
projectId: ObjectID,
scimConfigId: ObjectID,
) => Promise<StatusPagePrivateUser | null> = async (
userName: string,
statusPageId: ObjectID,
projectId: ObjectID,
scimConfigId: ObjectID,
): Promise<StatusPagePrivateUser | null> => {
// First check if userName is an external ID (not an email)
if (!isUserNameEmail(userName)) {
logSCIMOperation(
"User lookup",
"status-page",
scimConfigId.toString(),
`Looking for external ID: ${userName}`,
);
// Look up by external ID
const scimUser: StatusPageSCIMUser | null = await StatusPageSCIMUserService.findOneBy({
query: {
externalId: userName,
statusPageId: statusPageId,
projectId: projectId,
scimConfigId: scimConfigId,
},
select: {
statusPagePrivateUserId: true,
statusPagePrivateUser: {
_id: true,
email: true,
createdAt: true,
updatedAt: true,
},
},
props: { isRoot: true },
});
if (scimUser && scimUser.statusPagePrivateUser) {
logSCIMOperation(
"User lookup",
"status-page",
scimConfigId.toString(),
`Found user by external ID: ${scimUser.statusPagePrivateUser.id}`,
);
return scimUser.statusPagePrivateUser;
}
}
// Fall back to email lookup
try {
logSCIMOperation(
"User lookup",
"status-page",
scimConfigId.toString(),
`Looking for email: ${userName}`,
);
const user: StatusPagePrivateUser | null = await StatusPagePrivateUserService.findOneBy({
query: {
email: new Email(userName),
statusPageId: statusPageId,
},
select: {
_id: true,
email: true,
createdAt: true,
updatedAt: true,
},
props: { isRoot: true },
});
if (user) {
logSCIMOperation(
"User lookup",
"status-page",
scimConfigId.toString(),
`Found user by email: ${user.id}`,
);
}
return user;
} catch (error) {
// If email validation fails, userName is likely an external ID but no mapping exists
logSCIMOperation(
"User lookup",
"status-page",
scimConfigId.toString(),
`Email validation failed for: ${userName}, treating as external ID with no mapping`,
);
return null;
}
};
// Helper function to create or update SCIM user mapping
const createOrUpdateSCIMUserMapping: (
user: StatusPagePrivateUser,
externalId: string,
statusPageId: ObjectID,
projectId: ObjectID,
scimConfigId: ObjectID,
) => Promise<void> = async (
user: StatusPagePrivateUser,
externalId: string,
statusPageId: ObjectID,
projectId: ObjectID,
scimConfigId: ObjectID,
): Promise<void> => {
// Check if mapping already exists
const existingMapping: StatusPageSCIMUser | null = await StatusPageSCIMUserService.findOneBy({
query: {
statusPagePrivateUserId: user.id!,
statusPageId: statusPageId,
projectId: projectId,
scimConfigId: scimConfigId,
},
select: { _id: true, externalId: true },
props: { isRoot: true },
});
if (existingMapping) {
// Update existing mapping if external ID changed
if (existingMapping.externalId !== externalId) {
await StatusPageSCIMUserService.updateOneById({
id: existingMapping.id!,
data: { externalId: externalId },
props: { isRoot: true },
});
logSCIMOperation(
"SCIM mapping",
"status-page",
scimConfigId.toString(),
`Updated external ID mapping for user ${user.id} from ${existingMapping.externalId} to ${externalId}`,
);
}
} else {
// Create new mapping
const scimUser: StatusPageSCIMUser = new StatusPageSCIMUser();
scimUser.statusPageId = statusPageId;
scimUser.projectId = projectId;
scimUser.scimConfigId = scimConfigId;
scimUser.statusPagePrivateUserId = user.id!;
scimUser.externalId = externalId;
await StatusPageSCIMUserService.create({
data: scimUser,
props: { isRoot: true },
});
logSCIMOperation(
"SCIM mapping",
"status-page",
scimConfigId.toString(),
`Created external ID mapping for user ${user.id} with external ID ${externalId}`,
);
}
};
// Helper function to resolve user ID (could be internal ID or external ID)
const resolveUserId: (
userIdParam: string,
statusPageId: ObjectID,
projectId: ObjectID,
scimConfigId: ObjectID,
) => Promise<ObjectID | null> = async (
userIdParam: string,
statusPageId: ObjectID,
projectId: ObjectID,
scimConfigId: ObjectID,
): Promise<ObjectID | null> => {
// First try to parse as ObjectID (internal user ID)
try {
const objectId: ObjectID = new ObjectID(userIdParam);
// Verify this user exists in the status page
const statusPageUser: StatusPagePrivateUser | null = await StatusPagePrivateUserService.findOneBy({
query: {
_id: objectId,
statusPageId: statusPageId,
},
select: { _id: true },
props: { isRoot: true },
});
if (statusPageUser) {
return objectId;
}
} catch (error) {
// Not a valid ObjectID, continue to external ID lookup
}
// Try to find by external ID
const scimUser: StatusPageSCIMUser | null = await StatusPageSCIMUserService.findOneBy({
query: {
externalId: userIdParam,
statusPageId: statusPageId,
projectId: projectId,
scimConfigId: scimConfigId,
},
select: { statusPagePrivateUserId: true },
props: { isRoot: true },
});
if (scimUser && scimUser.statusPagePrivateUserId) {
return scimUser.statusPagePrivateUserId;
}
return null;
};
// Helper function to get external ID for a user
const getExternalIdForUser: (
userId: ObjectID,
statusPageId: ObjectID,
projectId: ObjectID,
scimConfigId: ObjectID,
) => Promise<string | null> = async (
userId: ObjectID,
statusPageId: ObjectID,
projectId: ObjectID,
scimConfigId: ObjectID,
): Promise<string | null> => {
const scimUser: StatusPageSCIMUser | null = await StatusPageSCIMUserService.findOneBy({
query: {
statusPagePrivateUserId: userId,
statusPageId: statusPageId,
projectId: projectId,
scimConfigId: scimConfigId,
},
select: { externalId: true },
props: { isRoot: true },
});
return scimUser?.externalId || null;
};
// SCIM Service Provider Configuration - GET /status-page-scim/v2/ServiceProviderConfig
router.get(
"/status-page-scim/v2/:statusPageScimId/ServiceProviderConfig",
SCIMMiddleware.isAuthorizedSCIMRequest,
async (req: ExpressRequest, res: ExpressResponse): Promise<void> => {
try {
logger.debug(
`🔗 STATUS PAGE SCIM API HIT: GET ServiceProviderConfig - statusPageScimId: ${req.params["statusPageScimId"]}`,
);
logSCIMOperation(
"ServiceProviderConfig",
"status-page",
req.params["statusPageScimId"]!,
);
const serviceProviderConfig: JSONObject = generateServiceProviderConfig(
req,
req.params["statusPageScimId"]!,
"status-page",
);
return Response.sendJsonObjectResponse(req, res, serviceProviderConfig);
} catch (err) {
logger.error(err);
return Response.sendErrorResponse(req, res, err as BadRequestException);
}
},
);
// Status Page Users endpoint - GET /status-page-scim/v2/Users
router.get(
"/status-page-scim/v2/:statusPageScimId/Users",
SCIMMiddleware.isAuthorizedSCIMRequest,
async (req: ExpressRequest, res: ExpressResponse): Promise<void> => {
try {
logger.debug(
`🔗 STATUS PAGE SCIM API HIT: GET Users List - statusPageScimId: ${req.params["statusPageScimId"]}, query: ${JSON.stringify(req.query)}`,
);
logger.debug(
`Status Page SCIM Users list request for statusPageScimId: ${req.params["statusPageScimId"]}`,
);
const oneuptimeRequest: OneUptimeRequest = req as OneUptimeRequest;
const bearerData: JSONObject =
oneuptimeRequest.bearerTokenData as JSONObject;
const statusPageId: ObjectID = bearerData["statusPageId"] as ObjectID;
const projectId: ObjectID = bearerData["projectId"] as ObjectID;
const scimConfig: StatusPageSCIM = bearerData["scimConfig"] as StatusPageSCIM;
// Parse query parameters
const { startIndex, count } = parseSCIMQueryParams(req);
const filter: string = req.query["filter"] as string;
logSCIMOperation(
"Users list",
"status-page",
req.params["statusPageScimId"]!,
`statusPageId: ${statusPageId}, startIndex: ${startIndex}, count: ${count}, filter: ${filter || "none"}`,
);
let users: Array<StatusPagePrivateUser> = [];
// Handle SCIM filter for userName
if (filter) {
const emailMatch: RegExpMatchArray | null = filter.match(
/userName eq "([^"]+)"/i,
);
if (emailMatch) {
const userName: string = emailMatch[1]!;
logSCIMOperation(
"Users list",
"status-page",
req.params["statusPageScimId"]!,
`filter by userName: ${userName}`,
);
if (userName) {
const user: StatusPagePrivateUser | null = await findUserByExternalIdOrEmail(
userName,
statusPageId,
projectId,
scimConfig.id!,
);
if (user) {
users = [user];
logSCIMOperation(
"Users list",
"status-page",
req.params["statusPageScimId"]!,
`found user with id: ${user.id}`,
);
} else {
logSCIMOperation(
"Users list",
"status-page",
req.params["statusPageScimId"]!,
`user not found for userName: ${userName}`,
);
users = [];
}
}
}
} else {
// Get all private users for this status page
users = await StatusPagePrivateUserService.findBy({
query: {
statusPageId: statusPageId,
},
select: {
_id: true,
email: true,
createdAt: true,
updatedAt: true,
},
skip: 0,
limit: LIMIT_MAX,
props: { isRoot: true },
});
}
logger.debug(
`Status Page SCIM Users - found ${users.length} users`,
);
// Format users for SCIM with external IDs
const formattedUsers: Array<JSONObject> = [];
for (const user of users) {
// Get external ID for this user if it exists
const externalId: string | null = await getExternalIdForUser(
user.id!,
statusPageId,
projectId,
scimConfig.id!,
);
const userFormatted: JSONObject = formatUserForSCIM(
user,
req,
req.params["statusPageScimId"]!,
"status-page",
externalId,
);
formattedUsers.push(userFormatted);
}
// Paginate the results
const paginatedUsers: Array<JSONObject> = formattedUsers.slice(
(startIndex - 1) * count,
startIndex * count,
);
logger.debug(
`Status Page SCIM Users response prepared with ${formattedUsers.length} users`,
);
return Response.sendJsonObjectResponse(
req,
res,
generateUsersListResponse(paginatedUsers, startIndex, formattedUsers.length),
);
} catch (err) {
logger.error(err);
return Response.sendErrorResponse(req, res, err as BadRequestException);
}
},
);
// Get Individual Status Page User - GET /status-page-scim/v2/Users/{id}
router.get(
"/status-page-scim/v2/:statusPageScimId/Users/:userId",
SCIMMiddleware.isAuthorizedSCIMRequest,
async (req: ExpressRequest, res: ExpressResponse): Promise<void> => {
try {
logger.debug(
`🔗 STATUS PAGE SCIM API HIT: GET Individual User - statusPageScimId: ${req.params["statusPageScimId"]}, userId: ${req.params["userId"]}`,
);
logger.debug(
`Status Page SCIM Get individual user request for userId: ${req.params["userId"]}, statusPageScimId: ${req.params["statusPageScimId"]}`,
);
const oneuptimeRequest: OneUptimeRequest = req as OneUptimeRequest;
const bearerData: JSONObject =
oneuptimeRequest.bearerTokenData as JSONObject;
const statusPageId: ObjectID = bearerData["statusPageId"] as ObjectID;
const projectId: ObjectID = bearerData["projectId"] as ObjectID;
const scimConfig: StatusPageSCIM = bearerData["scimConfig"] as StatusPageSCIM;
const userIdParam: string = req.params["userId"]!;
logger.debug(
`Status Page SCIM Get user - statusPageId: ${statusPageId}, userIdParam: ${userIdParam}`,
);
if (!userIdParam) {
throw new BadRequestException("User ID is required");
}
// Resolve user ID (could be internal ID or external ID)
const userId: ObjectID | null = await resolveUserId(
userIdParam,
statusPageId,
projectId,
scimConfig.id!,
);
if (!userId) {
logger.debug(
`Status Page SCIM Get user - could not resolve user ID for param: ${userIdParam}`,
);
throw new NotFoundException(
"User not found or not part of this status page",
);
}
// Check if user exists and belongs to this status page
const statusPageUser: StatusPagePrivateUser | null =
await StatusPagePrivateUserService.findOneBy({
query: {
statusPageId: statusPageId,
_id: userId,
},
select: {
_id: true,
email: true,
createdAt: true,
updatedAt: true,
},
props: { isRoot: true },
});
if (!statusPageUser) {
logger.debug(
`Status Page SCIM Get user - user not found for resolved userId: ${userId}`,
);
throw new NotFoundException(
"User not found or not part of this status page",
);
}
// Get external ID for this user if it exists
const externalId: string | null = await getExternalIdForUser(
statusPageUser.id!,
statusPageId,
projectId,
scimConfig.id!,
);
const user: JSONObject = formatUserForSCIM(
statusPageUser,
req,
req.params["statusPageScimId"]!,
"status-page",
externalId,
);
logger.debug(
`Status Page SCIM Get user - returning user with id: ${statusPageUser.id}`,
);
return Response.sendJsonObjectResponse(req, res, user);
} catch (err) {
logger.error(err);
return Response.sendErrorResponse(req, res, err as BadRequestException);
}
},
);
// Create Status Page User - POST /status-page-scim/v2/Users
router.post(
"/status-page-scim/v2/:statusPageScimId/Users",
SCIMMiddleware.isAuthorizedSCIMRequest,
async (req: ExpressRequest, res: ExpressResponse): Promise<void> => {
try {
logger.debug(
`🔗 STATUS PAGE SCIM API HIT: POST Create User - statusPageScimId: ${req.params["statusPageScimId"]}`,
);
logger.debug(
`Status Page SCIM Create user request for statusPageScimId: ${req.params["statusPageScimId"]}`,
);
const oneuptimeRequest: OneUptimeRequest = req as OneUptimeRequest;
const bearerData: JSONObject =
oneuptimeRequest.bearerTokenData as JSONObject;
const statusPageId: ObjectID = bearerData["statusPageId"] as ObjectID;
const projectId: ObjectID = bearerData["projectId"] as ObjectID;
const scimConfig: StatusPageSCIM = bearerData[
"scimConfig"
] as StatusPageSCIM;
if (!scimConfig.autoProvisionUsers) {
throw new BadRequestException(
"Auto-provisioning is disabled for this status page",
);
}
const scimUser: JSONObject = req.body;
const userName: string = extractEmailFromSCIM(scimUser);
const externalId: string | null = extractExternalIdFromSCIM(scimUser);
const name: string = parseNameFromSCIM(scimUser);
logger.debug(
`Status Page SCIM Create user - statusPageId: ${statusPageId}`,
);
logger.debug(
`Request body for Status Page SCIM Create user: ${JSON.stringify(scimUser, null, 2)}`,
);
logger.debug(`Status Page SCIM Create user - userName: ${userName}, externalId: ${externalId}, name: ${name}`);
// Extract email from emails array if userName is not an email
let email: string = "";
if (isUserNameEmail(userName)) {
email = userName;
} else {
// Look for email in the emails array
const emailsArray: JSONObject[] = scimUser["emails"] as JSONObject[];
if (emailsArray && emailsArray.length > 0) {
email = emailsArray[0]?.["value"] as string;
}
}
if (!email && !externalId) {
throw new BadRequestException(
"Either a valid email address or external ID is required",
);
}
// Check if user already exists (by external ID first, then email)
let user: StatusPagePrivateUser | null = null;
if (externalId) {
user = await findUserByExternalIdOrEmail(
externalId,
statusPageId,
projectId,
scimConfig.id!,
);
}
if (!user && email) {
try {
user = await StatusPagePrivateUserService.findOneBy({
query: {
email: new Email(email),
statusPageId: statusPageId,
},
select: {
_id: true,
email: true,
createdAt: true,
updatedAt: true,
},
props: { isRoot: true },
});
} catch (error) {
// Email validation failed, continue without email lookup
logger.debug(`Status Page SCIM Create user - email validation failed for: ${email}`);
}
}
// Create user if doesn't exist
if (!user) {
if (!email) {
throw new BadRequestException(
"A valid email address is required to create a new user",
);
}
logger.debug(
`Status Page SCIM Create user - creating new user with email: ${email}`,
);
const privateUser: StatusPagePrivateUser = new StatusPagePrivateUser();
privateUser.statusPageId = statusPageId;
privateUser.email = new Email(email);
privateUser.password = new HashedString(Text.generateRandomText(32));
privateUser.projectId = projectId;
// Create new status page private user
user = await StatusPagePrivateUserService.create({
data: privateUser as any,
props: { isRoot: true },
});
} else {
logger.debug(
`Status Page SCIM Create user - user already exists with id: ${user.id}`,
);
}
// Create or update SCIM user mapping if we have an external ID
if (externalId && user.id) {
await createOrUpdateSCIMUserMapping(
user,
externalId,
statusPageId,
projectId,
scimConfig.id!,
);
}
const createdUser: JSONObject = formatUserForSCIM(
user,
req,
req.params["statusPageScimId"]!,
"status-page",
externalId,
);
logger.debug(
`Status Page SCIM Create user - returning created user with id: ${user.id}`,
);
res.status(201);
return Response.sendJsonObjectResponse(req, res, createdUser);
} catch (err) {
logger.error(err);
return Response.sendErrorResponse(req, res, err as BadRequestException);
}
},
);
// Update Status Page User - PUT /status-page-scim/v2/Users/{id}
router.put(
"/status-page-scim/v2/:statusPageScimId/Users/:userId",
SCIMMiddleware.isAuthorizedSCIMRequest,
async (req: ExpressRequest, res: ExpressResponse): Promise<void> => {
try {
logger.debug(
`🔗 STATUS PAGE SCIM API HIT: PUT Update User - statusPageScimId: ${req.params["statusPageScimId"]}, userId: ${req.params["userId"]}`,
);
logger.debug(
`Status Page SCIM Update user request for userId: ${req.params["userId"]}, statusPageScimId: ${req.params["statusPageScimId"]}`,
);
const oneuptimeRequest: OneUptimeRequest = req as OneUptimeRequest;
const bearerData: JSONObject =
oneuptimeRequest.bearerTokenData as JSONObject;
const statusPageId: ObjectID = bearerData["statusPageId"] as ObjectID;
const projectId: ObjectID = bearerData["projectId"] as ObjectID;
const scimConfig: StatusPageSCIM = bearerData["scimConfig"] as StatusPageSCIM;
const userIdParam: string = req.params["userId"]!;
const scimUser: JSONObject = req.body;
logger.debug(
`Status Page SCIM Update user - statusPageId: ${statusPageId}, userIdParam: ${userIdParam}`,
);
logger.debug(
`Request body for Status Page SCIM Update user: ${JSON.stringify(scimUser, null, 2)}`,
);
if (!userIdParam) {
throw new BadRequestException("User ID is required");
}
// Resolve user ID (could be internal ID or external ID)
const userId: ObjectID | null = await resolveUserId(
userIdParam,
statusPageId,
projectId,
scimConfig.id!,
);
if (!userId) {
logger.debug(
`Status Page SCIM Update user - could not resolve user ID for param: ${userIdParam}`,
);
throw new NotFoundException(
"User not found or not part of this status page",
);
}
// Check if user exists and belongs to this status page
const statusPageUser: StatusPagePrivateUser | null =
await StatusPagePrivateUserService.findOneBy({
query: {
statusPageId: statusPageId,
_id: userId,
},
select: {
_id: true,
email: true,
createdAt: true,
updatedAt: true,
},
props: { isRoot: true },
});
if (!statusPageUser) {
logger.debug(
`Status Page SCIM Update user - user not found for resolved userId: ${userId}`,
);
throw new NotFoundException(
"User not found or not part of this status page",
);
}
// Update user information
const userName: string = extractEmailFromSCIM(scimUser);
const externalId: string | null = extractExternalIdFromSCIM(scimUser);
const active: boolean = scimUser["active"] as boolean;
logger.debug(
`Status Page SCIM Update user - userName: ${userName}, externalId: ${externalId}, active: ${active}`,
);
// Extract email from emails array if userName is not an email
let email: string = "";
if (isUserNameEmail(userName)) {
email = userName;
} else {
// Look for email in the emails array
const emailsArray: JSONObject[] = scimUser["emails"] as JSONObject[];
if (emailsArray && emailsArray.length > 0) {
email = emailsArray[0]?.["value"] as string;
}
}
// Create or update SCIM user mapping if we have an external ID
if (externalId) {
await createOrUpdateSCIMUserMapping(
statusPageUser,
externalId,
statusPageId,
projectId,
scimConfig.id!,
);
}
// Handle user deactivation by deleting from status page
if (active === false) {
logger.debug(
`Status Page SCIM Update user - user marked as inactive, removing from status page`,
);
if (scimConfig.autoDeprovisionUsers) {
await StatusPagePrivateUserService.deleteOneById({
id: userId,
props: { isRoot: true },
});
logger.debug(
`Status Page SCIM Update user - user removed from status page`,
);
// Return empty response for deleted user
res.status(204);
return Response.sendJsonObjectResponse(req, res, {
message: "User deprovisioned",
});
}
}
// Update email if provided and changed
if (email && email !== statusPageUser.email?.toString()) {
logger.debug(
`Status Page SCIM Update user - updating email from ${statusPageUser.email?.toString()} to ${email}`,
);
await StatusPagePrivateUserService.updateOneById({
id: userId,
data: { email: new Email(email) },
props: { isRoot: true },
});
// Fetch updated user
const updatedUser: StatusPagePrivateUser | null = await StatusPagePrivateUserService.findOneById({
id: userId,
select: {
_id: true,
email: true,
createdAt: true,
updatedAt: true,
},
props: { isRoot: true },
});
if (updatedUser) {
const userExternalId: string | null = await getExternalIdForUser(
updatedUser.id!,
statusPageId,
projectId,
scimConfig.id!,
);
const user: JSONObject = formatUserForSCIM(
updatedUser,
req,
req.params["statusPageScimId"]!,
"status-page",
userExternalId,
);
return Response.sendJsonObjectResponse(req, res, user);
}
}
logger.debug(
`Status Page SCIM Update user - no updates made, returning existing user`,
);
// If no updates were made, return the existing user
const userExternalId: string | null = await getExternalIdForUser(
statusPageUser.id!,
statusPageId,
projectId,
scimConfig.id!,
);
const user: JSONObject = formatUserForSCIM(
statusPageUser,
req,
req.params["statusPageScimId"]!,
"status-page",
userExternalId,
);
return Response.sendJsonObjectResponse(req, res, user);
} catch (err) {
logger.error(err);
return Response.sendErrorResponse(req, res, err as BadRequestException);
}
},
);
// Delete Status Page User - DELETE /status-page-scim/v2/Users/{id}
router.delete(
"/status-page-scim/v2/:statusPageScimId/Users/:userId",
SCIMMiddleware.isAuthorizedSCIMRequest,
async (req: ExpressRequest, res: ExpressResponse): Promise<void> => {
try {
logger.debug(
`🔗 STATUS PAGE SCIM API HIT: DELETE User - statusPageScimId: ${req.params["statusPageScimId"]}, userId: ${req.params["userId"]}`,
);
logger.debug(
`Status Page SCIM Delete user request for userId: ${req.params["userId"]}, statusPageScimId: ${req.params["statusPageScimId"]}`,
);
const oneuptimeRequest: OneUptimeRequest = req as OneUptimeRequest;
const bearerData: JSONObject =
oneuptimeRequest.bearerTokenData as JSONObject;
const statusPageId: ObjectID = bearerData["statusPageId"] as ObjectID;
const projectId: ObjectID = bearerData["projectId"] as ObjectID;
const scimConfig: StatusPageSCIM = bearerData["scimConfig"] as StatusPageSCIM;
const userIdParam: string = req.params["userId"]!;
if (!scimConfig.autoDeprovisionUsers) {
throw new BadRequestException(
"Auto-deprovisioning is disabled for this status page",
);
}
logger.debug(
`Status Page SCIM Delete user - statusPageId: ${statusPageId}, userIdParam: ${userIdParam}`,
);
if (!userIdParam) {
throw new BadRequestException("User ID is required");
}
// Resolve user ID (could be internal ID or external ID)
const userId: ObjectID | null = await resolveUserId(
userIdParam,
statusPageId,
projectId,
scimConfig.id!,
);
if (!userId) {
logger.debug(
`Status Page SCIM Delete user - could not resolve user ID for param: ${userIdParam}`,
);
throw new NotFoundException("User not found");
}
// Check if user exists and belongs to this status page
const statusPageUser: StatusPagePrivateUser | null =
await StatusPagePrivateUserService.findOneBy({
query: {
statusPageId: statusPageId,
_id: userId,
},
select: {
_id: true,
},
props: { isRoot: true },
});
if (!statusPageUser) {
logger.debug(
`Status Page SCIM Delete user - user not found for resolved userId: ${userId}`,
);
// SCIM spec says to return 404 for non-existent resources
throw new NotFoundException("User not found");
}
// Delete the user from status page
await StatusPagePrivateUserService.deleteOneById({
id: userId,
props: { isRoot: true },
});
logger.debug(
`Status Page SCIM Delete user - user deleted successfully for userId: ${userId}`,
);
// Return 204 No Content for successful deletion
res.status(204);
return Response.sendEmptySuccessResponse(req, res);
} catch (err) {
logger.error(err);
return Response.sendErrorResponse(req, res, err as BadRequestException);
}
},
);
export default router;

View File

@@ -1,8 +1,10 @@
import AuthenticationAPI from "./API/Authentication";
import ResellerAPI from "./API/Reseller";
import SsoAPI from "./API/SSO";
import SCIMAPI from "./API/SCIM";
import StatusPageAuthenticationAPI from "./API/StatusPageAuthentication";
import StatusPageSsoAPI from "./API/StatusPageSSO";
import StatusPageSCIMAPI from "./API/StatusPageSCIM";
import FeatureSet from "Common/Server/Types/FeatureSet";
import Express, { ExpressApplication } from "Common/Server/Utils/Express";
import "ejs";
@@ -19,6 +21,10 @@ const IdentityFeatureSet: FeatureSet = {
app.use([`/${APP_NAME}`, "/"], SsoAPI);
app.use([`/${APP_NAME}`, "/"], SCIMAPI);
app.use([`/${APP_NAME}`, "/"], StatusPageSCIMAPI);
app.use([`/${APP_NAME}`, "/"], StatusPageSsoAPI);
app.use(

View File

@@ -0,0 +1,301 @@
import { ExpressRequest } from "Common/Server/Utils/Express";
import logger from "Common/Server/Utils/Logger";
import { JSONObject } from "Common/Types/JSON";
import Email from "Common/Types/Email";
import Name from "Common/Types/Name";
import ObjectID from "Common/Types/ObjectID";
/**
* Shared SCIM utility functions for both Project SCIM and Status Page SCIM
*/
// Base interface for SCIM user-like objects - compatible with User model
export interface SCIMUser {
id?: ObjectID | null;
email?: Email;
name?: Name | string;
createdAt?: Date;
updatedAt?: Date;
}
/**
* Parse name information from SCIM user payload
*/
export const parseNameFromSCIM: (scimUser: JSONObject) => string = (
scimUser: JSONObject,
): string => {
logger.debug(
`SCIM - Parsing name from SCIM user: ${JSON.stringify(scimUser, null, 2)}`,
);
const givenName: string =
((scimUser["name"] as JSONObject)?.["givenName"] as string) || "";
const familyName: string =
((scimUser["name"] as JSONObject)?.["familyName"] as string) || "";
const formattedName: string = (scimUser["name"] as JSONObject)?.[
"formatted"
] as string;
// Construct full name: prefer formatted, then combine given+family, then fallback to displayName
if (formattedName) {
return formattedName;
} else if (givenName || familyName) {
return `${givenName} ${familyName}`.trim();
} else if (scimUser["displayName"]) {
return scimUser["displayName"] as string;
}
return "";
};
/**
* Parse full name into SCIM name format
*/
export const parseNameToSCIMFormat: (fullName: string) => {
givenName: string;
familyName: string;
formatted: string;
} = (
fullName: string,
): { givenName: string; familyName: string; formatted: string } => {
const nameParts: string[] = fullName.trim().split(/\s+/);
const givenName: string = nameParts[0] || "";
const familyName: string = nameParts.slice(1).join(" ") || "";
return {
givenName,
familyName,
formatted: fullName,
};
};
/**
* Format user object for SCIM response
*/
export const formatUserForSCIM: (
user: SCIMUser,
req: ExpressRequest,
scimId: string,
scimType: "project" | "status-page",
externalId?: string | null,
) => JSONObject = (
user: SCIMUser,
req: ExpressRequest,
scimId: string,
scimType: "project" | "status-page",
externalId?: string | null,
): JSONObject => {
const baseUrl: string = `${req.protocol}://${req.get("host")}`;
const userName: string = externalId || user.email?.toString() || "";
const email: string = user.email?.toString() || "";
const fullName: string =
user.name?.toString() || email.split("@")[0] || "Unknown User";
const nameData: { givenName: string; familyName: string; formatted: string } =
parseNameToSCIMFormat(fullName);
// Determine the correct endpoint path based on SCIM type
const endpointPath: string =
scimType === "project"
? `/scim/v2/${scimId}/Users/${user.id?.toString()}`
: `/status-page-scim/v2/${scimId}/Users/${user.id?.toString()}`;
return {
schemas: ["urn:ietf:params:scim:schemas:core:2.0:User"],
id: user.id?.toString(),
userName: userName,
displayName: nameData.formatted,
name: {
formatted: nameData.formatted,
familyName: nameData.familyName,
givenName: nameData.givenName,
},
emails: [
{
value: email,
type: "work",
primary: true,
},
],
active: true,
meta: {
resourceType: "User",
created: user.createdAt?.toISOString(),
lastModified: user.updatedAt?.toISOString(),
location: `${baseUrl}${endpointPath}`,
},
};
};
/**
* Extract email from SCIM user payload
*/
export const extractEmailFromSCIM: (scimUser: JSONObject) => string = (
scimUser: JSONObject,
): string => {
return (
(scimUser["userName"] as string) ||
((scimUser["emails"] as JSONObject[])?.[0]?.["value"] as string) ||
""
);
};
/**
* Extract external ID from SCIM user payload (for non-email userNames)
*/
export const extractExternalIdFromSCIM: (scimUser: JSONObject) => string | null = (
scimUser: JSONObject,
): string | null => {
const userName: string = scimUser["userName"] as string;
if (!userName) {
return null;
}
// Check if userName is not an email - if it's not a valid email format, treat it as external ID
const emailRegex: RegExp = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (!emailRegex.test(userName)) {
return userName;
}
return null;
};
/**
* Check if a userName field contains an email or external ID
*/
export const isUserNameEmail: (userName: string) => boolean = (
userName: string,
): boolean => {
if (!userName) {
return false;
}
const emailRegex: RegExp = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
return emailRegex.test(userName);
};
/**
* Extract active status from SCIM user payload
*/
export const extractActiveFromSCIM: (scimUser: JSONObject) => boolean = (
scimUser: JSONObject,
): boolean => {
return scimUser["active"] !== false; // Default to true if not specified
};
/**
* Generate SCIM ServiceProviderConfig response
*/
export const generateServiceProviderConfig: (
req: ExpressRequest,
scimId: string,
scimType: "project" | "status-page",
documentationUrl?: string,
) => JSONObject = (
req: ExpressRequest,
scimId: string,
scimType: "project" | "status-page",
documentationUrl: string = "https://oneuptime.com/docs/identity/scim",
): JSONObject => {
const baseUrl: string = `${req.protocol}://${req.get("host")}`;
const endpointPath: string =
scimType === "project"
? `/scim/v2/${scimId}`
: `/status-page-scim/v2/${scimId}`;
return {
schemas: ["urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig"],
documentationUri: documentationUrl,
patch: {
supported: true,
},
bulk: {
supported: true,
maxOperations: 1000,
maxPayloadSize: 1048576,
},
filter: {
supported: true,
maxResults: 200,
},
changePassword: {
supported: false,
},
sort: {
supported: true,
},
etag: {
supported: false,
},
authenticationSchemes: [
{
type: "httpbearer",
name: "HTTP Bearer",
description: "Authentication scheme using HTTP Bearer Token",
primary: true,
},
],
meta: {
location: `${baseUrl}${endpointPath}/ServiceProviderConfig`,
resourceType: "ServiceProviderConfig",
created: "2023-01-01T00:00:00Z",
lastModified: "2023-01-01T00:00:00Z",
},
};
};
/**
* Generate SCIM ListResponse for users
*/
export const generateUsersListResponse: (
users: JSONObject[],
startIndex: number,
totalResults: number,
) => JSONObject = (
users: JSONObject[],
startIndex: number,
totalResults: number,
): JSONObject => {
return {
schemas: ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
totalResults: totalResults,
startIndex: startIndex,
itemsPerPage: users.length,
Resources: users,
};
};
/**
* Parse query parameters for SCIM list requests
*/
export const parseSCIMQueryParams: (req: ExpressRequest) => {
startIndex: number;
count: number;
} = (req: ExpressRequest): { startIndex: number; count: number } => {
const startIndex: number = parseInt(req.query["startIndex"] as string) || 1;
const count: number = Math.min(
parseInt(req.query["count"] as string) || 100,
200, // SCIM recommended max
);
return { startIndex, count };
};
/**
* Log SCIM operation with consistent format
*/
export const logSCIMOperation: (
operation: string,
scimType: "project" | "status-page",
scimId: string,
details?: string,
) => void = (
operation: string,
scimType: "project" | "status-page",
scimId: string,
details?: string,
): void => {
const logPrefix: string =
scimType === "project" ? "Project SCIM" : "Status Page SCIM";
const message: string = `${logPrefix} ${operation} - scimId: ${scimId}${details ? `, ${details}` : ""}`;
logger.debug(message);
};

View File

@@ -67,7 +67,6 @@
<link rel="apple-touch-icon-precomposed" href="/img/ou-wb.svg">
<link rel="icon" href="/img/ou-wb.svg">
<link rel="image_src" type="image/png" href="/img/hou-wb.svg">
<link rel="canonical" href="/">
<link rel="manifest" href="/manifest.json">
<meta property="og:title" content="OneUptime - One Complete Observability platform.">
<meta property="og:url" content="https://oneuptime.com">

View File

@@ -31,6 +31,22 @@ router.post(
userOnCallLogTimelineId:
(body["userOnCallLogTimelineId"] as ObjectID) || undefined,
customTwilioConfig: body["customTwilioConfig"] as any,
incidentId: (body["incidentId"] as ObjectID) || undefined,
alertId: (body["alertId"] as ObjectID) || undefined,
scheduledMaintenanceId:
(body["scheduledMaintenanceId"] as ObjectID) || undefined,
statusPageId: (body["statusPageId"] as ObjectID) || undefined,
statusPageAnnouncementId:
(body["statusPageAnnouncementId"] as ObjectID) || undefined,
userId: (body["userId"] as ObjectID) || undefined,
onCallPolicyId: (body["onCallPolicyId"] as ObjectID) || undefined,
onCallPolicyEscalationRuleId:
(body["onCallPolicyEscalationRuleId"] as ObjectID) || undefined,
onCallDutyPolicyExecutionLogTimelineId:
(body["onCallDutyPolicyExecutionLogTimelineId"] as ObjectID) ||
undefined,
onCallScheduleId: (body["onCallScheduleId"] as ObjectID) || undefined,
teamId: (body["teamId"] as ObjectID) || undefined,
});
return Response.sendEmptySuccessResponse(req, res);

View File

@@ -43,6 +43,43 @@ router.post(
emailServer: mailServer,
userOnCallLogTimelineId:
(body["userOnCallLogTimelineId"] as ObjectID) || undefined,
incidentId: body["incidentId"]
? new ObjectID(body["incidentId"].toString())
: undefined,
alertId: body["alertId"]
? new ObjectID(body["alertId"].toString())
: undefined,
scheduledMaintenanceId: body["scheduledMaintenanceId"]
? new ObjectID(body["scheduledMaintenanceId"].toString())
: undefined,
statusPageId: body["statusPageId"]
? new ObjectID(body["statusPageId"].toString())
: undefined,
statusPageAnnouncementId: body["statusPageAnnouncementId"]
? new ObjectID(body["statusPageAnnouncementId"].toString())
: undefined,
userId: body["userId"]
? new ObjectID(body["userId"].toString())
: undefined,
onCallPolicyId: body["onCallPolicyId"]
? new ObjectID(body["onCallPolicyId"].toString())
: undefined,
onCallPolicyEscalationRuleId: body["onCallPolicyEscalationRuleId"]
? new ObjectID(body["onCallPolicyEscalationRuleId"].toString())
: undefined,
onCallDutyPolicyExecutionLogTimelineId: body[
"onCallDutyPolicyExecutionLogTimelineId"
]
? new ObjectID(
body["onCallDutyPolicyExecutionLogTimelineId"].toString(),
)
: undefined,
onCallScheduleId: body["onCallScheduleId"]
? new ObjectID(body["onCallScheduleId"].toString())
: undefined,
teamId: body["teamId"]
? new ObjectID(body["teamId"].toString())
: undefined,
});
return Response.sendEmptySuccessResponse(req, res);

View File

@@ -0,0 +1,65 @@
import PushService from "../Services/PushNotificationService";
import ClusterKeyAuthorization from "Common/Server/Middleware/ClusterKeyAuthorization";
import ObjectID from "Common/Types/ObjectID";
import Express, {
ExpressRequest,
ExpressResponse,
ExpressRouter,
} from "Common/Server/Utils/Express";
import Response from "Common/Server/Utils/Response";
import { JSONObject } from "Common/Types/JSON";
import JSONFunctions from "Common/Types/JSONFunctions";
const router: ExpressRouter = Express.getRouter();
router.post(
"/send",
ClusterKeyAuthorization.isAuthorizedServiceMiddleware,
async (req: ExpressRequest, res: ExpressResponse) => {
const body: JSONObject = JSONFunctions.deserialize(req.body);
// Support both new devices format and legacy deviceTokens/deviceNames format
let devices: Array<{ token: string; name?: string }> = [];
if (body["devices"]) {
// New format: devices as array of objects
devices = body["devices"] as Array<{ token: string; name?: string }>;
} else {
throw new Error("Invalid request format: 'devices' array is required.");
}
await PushService.send(
{
devices,
deviceType: (body["deviceType"] as any) || "web",
message: body["message"] as any,
},
{
projectId: (body["projectId"] as ObjectID) || undefined,
isSensitive: (body["isSensitive"] as boolean) || false,
userOnCallLogTimelineId:
(body["userOnCallLogTimelineId"] as ObjectID) || undefined,
incidentId: (body["incidentId"] as ObjectID) || undefined,
alertId: (body["alertId"] as ObjectID) || undefined,
scheduledMaintenanceId:
(body["scheduledMaintenanceId"] as ObjectID) || undefined,
statusPageId: (body["statusPageId"] as ObjectID) || undefined,
statusPageAnnouncementId:
(body["statusPageAnnouncementId"] as ObjectID) || undefined,
userId: (body["userId"] as ObjectID) || undefined,
onCallPolicyId: (body["onCallPolicyId"] as ObjectID) || undefined,
onCallPolicyEscalationRuleId:
(body["onCallPolicyEscalationRuleId"] as ObjectID) || undefined,
onCallDutyPolicyExecutionLogTimelineId:
(body["onCallDutyPolicyExecutionLogTimelineId"] as ObjectID) ||
undefined,
onCallScheduleId: (body["onCallScheduleId"] as ObjectID) || undefined,
teamId: (body["teamId"] as ObjectID) || undefined,
},
);
return Response.sendEmptySuccessResponse(req, res);
},
);
export default router;

View File

@@ -30,6 +30,22 @@ router.post(
userOnCallLogTimelineId:
(body["userOnCallLogTimelineId"] as ObjectID) || undefined,
customTwilioConfig: body["customTwilioConfig"] as any,
incidentId: (body["incidentId"] as ObjectID) || undefined,
alertId: (body["alertId"] as ObjectID) || undefined,
scheduledMaintenanceId:
(body["scheduledMaintenanceId"] as ObjectID) || undefined,
statusPageId: (body["statusPageId"] as ObjectID) || undefined,
statusPageAnnouncementId:
(body["statusPageAnnouncementId"] as ObjectID) || undefined,
userId: (body["userId"] as ObjectID) || undefined,
onCallPolicyId: (body["onCallPolicyId"] as ObjectID) || undefined,
onCallPolicyEscalationRuleId:
(body["onCallPolicyEscalationRuleId"] as ObjectID) || undefined,
onCallDutyPolicyExecutionLogTimelineId:
(body["onCallDutyPolicyExecutionLogTimelineId"] as ObjectID) ||
undefined,
onCallScheduleId: (body["onCallScheduleId"] as ObjectID) || undefined,
teamId: (body["teamId"] as ObjectID) || undefined,
});
return Response.sendEmptySuccessResponse(req, res);

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

@@ -2,6 +2,7 @@ import CallAPI from "./API/Call";
// API
import MailAPI from "./API/Mail";
import SmsAPI from "./API/SMS";
import PushNotificationAPI from "./API/PushNotification";
import SMTPConfigAPI from "./API/SMTPConfig";
import "./Utils/Handlebars";
import FeatureSet from "Common/Server/Types/FeatureSet";
@@ -15,6 +16,7 @@ const NotificationFeatureSet: FeatureSet = {
app.use([`/${APP_NAME}/email`, "/email"], MailAPI);
app.use([`/${APP_NAME}/sms`, "/sms"], SmsAPI);
app.use([`/${APP_NAME}/push`, "/push"], PushNotificationAPI);
app.use([`/${APP_NAME}/call`, "/call"], CallAPI);
app.use([`/${APP_NAME}/smtp-config`, "/smtp-config"], SMTPConfigAPI);
},

View File

@@ -28,6 +28,36 @@ import Twilio from "twilio";
import { CallInstance } from "twilio/lib/rest/api/v2010/account/call";
import Phone from "Common/Types/Phone";
/**
* Extracts the main sayMessage values from a CallRequest's data array for call summary.
* Excludes acknowledgment responses, error messages, and other system messages.
* @param callRequest The call request containing data array with various objects
* @returns A string containing main call content messages separated by newlines
*/
function extractSayMessagesFromCallRequest(callRequest: CallRequest): string {
const sayMessages: string[] = [];
if (callRequest.data && Array.isArray(callRequest.data)) {
for (const item of callRequest.data) {
// Check if the item is a Say object with sayMessage
if ((item as Say).sayMessage) {
sayMessages.push((item as Say).sayMessage);
}
// Check if the item is a GatherInput with introMessage
if ((item as GatherInput).introMessage) {
sayMessages.push((item as GatherInput).introMessage);
}
// NOTE: Excluding noInputMessage and onInputCallRequest messages from summary
// as they contain system responses like "Good bye", "Invalid input", "You have acknowledged"
// which should not be included in the call summary according to user requirements
}
}
return sayMessages.length > 0
? sayMessages.join(" ")
: "No message content found";
}
export default class CallService {
public static async makeCall(
callRequest: CallRequest,
@@ -36,6 +66,18 @@ export default class CallService {
isSensitive?: boolean; // if true, message will not be logged
userOnCallLogTimelineId?: ObjectID | undefined; // user notification log timeline id
customTwilioConfig?: TwilioConfig | undefined;
incidentId?: ObjectID | undefined;
alertId?: ObjectID | undefined;
scheduledMaintenanceId?: ObjectID | undefined;
statusPageId?: ObjectID | undefined;
statusPageAnnouncementId?: ObjectID | undefined;
userId?: ObjectID | undefined;
// On-call policy related fields
onCallPolicyId?: ObjectID | undefined;
onCallPolicyEscalationRuleId?: ObjectID | undefined;
onCallDutyPolicyExecutionLogTimelineId?: ObjectID | undefined;
onCallScheduleId?: ObjectID | undefined;
teamId?: ObjectID | undefined;
},
): Promise<void> {
let callError: Error | null = null;
@@ -82,14 +124,58 @@ export default class CallService {
callLog.fromNumber = fromNumber;
callLog.callData =
options && options.isSensitive
? { message: "This call is sensitive and is not logged" }
: JSON.parse(JSON.stringify(callRequest));
? ({ message: "This call is sensitive and is not logged" } as any)
: ({
message: extractSayMessagesFromCallRequest(callRequest),
} as any);
callLog.callCostInUSDCents = 0;
if (options.projectId) {
callLog.projectId = options.projectId;
}
if (options.incidentId) {
callLog.incidentId = options.incidentId;
}
if (options.alertId) {
callLog.alertId = options.alertId;
}
if (options.scheduledMaintenanceId) {
callLog.scheduledMaintenanceId = options.scheduledMaintenanceId;
}
if (options.statusPageId) {
callLog.statusPageId = options.statusPageId;
}
if (options.statusPageAnnouncementId) {
callLog.statusPageAnnouncementId = options.statusPageAnnouncementId;
}
if (options.userId) {
callLog.userId = options.userId;
}
if (options.teamId) {
callLog.teamId = options.teamId;
}
// Set OnCall-related fields
if (options.onCallPolicyId) {
callLog.onCallDutyPolicyId = options.onCallPolicyId;
}
if (options.onCallPolicyEscalationRuleId) {
callLog.onCallDutyPolicyEscalationRuleId =
options.onCallPolicyEscalationRuleId;
}
if (options.onCallScheduleId) {
callLog.onCallDutyPolicyScheduleId = options.onCallScheduleId;
}
let project: Project | null = null;
// make sure project has enough balance.

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(
@@ -258,6 +345,18 @@ export default class MailService {
emailServer?: EmailServer | undefined;
userOnCallLogTimelineId?: ObjectID | undefined;
timeout?: number | undefined;
incidentId?: ObjectID | undefined;
alertId?: ObjectID | undefined;
scheduledMaintenanceId?: ObjectID | undefined;
statusPageId?: ObjectID | undefined;
statusPageAnnouncementId?: ObjectID | undefined;
userId?: ObjectID | undefined;
// On-call policy related fields
onCallPolicyId?: ObjectID | undefined;
onCallPolicyEscalationRuleId?: ObjectID | undefined;
onCallDutyPolicyExecutionLogTimelineId?: ObjectID | undefined;
onCallScheduleId?: ObjectID | undefined;
teamId?: ObjectID | undefined;
}
| undefined,
): Promise<void> {
@@ -272,6 +371,48 @@ export default class MailService {
if (options.emailServer?.id) {
emailLog.projectSmtpConfigId = options.emailServer?.id;
}
if (options.incidentId) {
emailLog.incidentId = options.incidentId;
}
if (options.alertId) {
emailLog.alertId = options.alertId;
}
if (options.scheduledMaintenanceId) {
emailLog.scheduledMaintenanceId = options.scheduledMaintenanceId;
}
if (options.statusPageId) {
emailLog.statusPageId = options.statusPageId;
}
if (options.statusPageAnnouncementId) {
emailLog.statusPageAnnouncementId = options.statusPageAnnouncementId;
}
if (options.userId) {
emailLog.userId = options.userId;
}
if (options.teamId) {
emailLog.teamId = options.teamId;
}
// Set OnCall-related fields
if (options.onCallPolicyId) {
emailLog.onCallDutyPolicyId = options.onCallPolicyId;
}
if (options.onCallPolicyEscalationRuleId) {
emailLog.onCallDutyPolicyEscalationRuleId =
options.onCallPolicyEscalationRuleId;
}
if (options.onCallScheduleId) {
emailLog.onCallDutyPolicyScheduleId = options.onCallScheduleId;
}
}
// default vars.
@@ -434,17 +575,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 +648,8 @@ export default class MailService {
throw err;
}
}
public static async cleanup(): Promise<void> {
await TransporterPool.cleanup();
}
}

View File

@@ -0,0 +1,44 @@
import PushNotificationRequest from "Common/Types/PushNotification/PushNotificationRequest";
import ObjectID from "Common/Types/ObjectID";
import PushNotificationServiceCommon from "Common/Server/Services/PushNotificationService";
export default class PushNotificationService {
public static async send(
request: PushNotificationRequest,
options: {
projectId?: ObjectID | undefined;
isSensitive?: boolean;
userOnCallLogTimelineId?: ObjectID | undefined;
incidentId?: ObjectID | undefined;
alertId?: ObjectID | undefined;
scheduledMaintenanceId?: ObjectID | undefined;
statusPageId?: ObjectID | undefined;
statusPageAnnouncementId?: ObjectID | undefined;
userId?: ObjectID | undefined;
onCallPolicyId?: ObjectID | undefined;
onCallPolicyEscalationRuleId?: ObjectID | undefined;
onCallDutyPolicyExecutionLogTimelineId?: ObjectID | undefined;
onCallScheduleId?: ObjectID | undefined;
teamId?: ObjectID | undefined;
} = {},
): Promise<void> {
// Delegate to Common service which now handles logging and timeline updates
await PushNotificationServiceCommon.sendPushNotification(request, {
projectId: options.projectId,
isSensitive: Boolean(options.isSensitive),
userOnCallLogTimelineId: options.userOnCallLogTimelineId,
incidentId: options.incidentId,
alertId: options.alertId,
scheduledMaintenanceId: options.scheduledMaintenanceId,
statusPageId: options.statusPageId,
statusPageAnnouncementId: options.statusPageAnnouncementId,
userId: options.userId,
onCallPolicyId: options.onCallPolicyId,
onCallPolicyEscalationRuleId: options.onCallPolicyEscalationRuleId,
onCallDutyPolicyExecutionLogTimelineId:
options.onCallDutyPolicyExecutionLogTimelineId,
onCallScheduleId: options.onCallScheduleId,
teamId: options.teamId,
});
}
}

View File

@@ -31,6 +31,18 @@ export default class SmsService {
customTwilioConfig?: TwilioConfig | undefined;
isSensitive?: boolean; // if true, message will not be logged
userOnCallLogTimelineId?: ObjectID | undefined;
incidentId?: ObjectID | undefined;
alertId?: ObjectID | undefined;
scheduledMaintenanceId?: ObjectID | undefined;
statusPageId?: ObjectID | undefined;
statusPageAnnouncementId?: ObjectID | undefined;
userId?: ObjectID | undefined;
// On-call policy related fields
onCallPolicyId?: ObjectID | undefined;
onCallPolicyEscalationRuleId?: ObjectID | undefined;
onCallDutyPolicyExecutionLogTimelineId?: ObjectID | undefined;
onCallScheduleId?: ObjectID | undefined;
teamId?: ObjectID | undefined;
},
): Promise<void> {
let smsError: Error | null = null;
@@ -71,6 +83,48 @@ export default class SmsService {
smsLog.projectId = options.projectId;
}
if (options.incidentId) {
smsLog.incidentId = options.incidentId;
}
if (options.alertId) {
smsLog.alertId = options.alertId;
}
if (options.scheduledMaintenanceId) {
smsLog.scheduledMaintenanceId = options.scheduledMaintenanceId;
}
if (options.statusPageId) {
smsLog.statusPageId = options.statusPageId;
}
if (options.statusPageAnnouncementId) {
smsLog.statusPageAnnouncementId = options.statusPageAnnouncementId;
}
if (options.userId) {
smsLog.userId = options.userId;
}
if (options.teamId) {
smsLog.teamId = options.teamId;
}
// Set OnCall-related fields
if (options.onCallPolicyId) {
smsLog.onCallDutyPolicyId = options.onCallPolicyId;
}
if (options.onCallPolicyEscalationRuleId) {
smsLog.onCallDutyPolicyEscalationRuleId =
options.onCallPolicyEscalationRuleId;
}
if (options.onCallScheduleId) {
smsLog.onCallDutyPolicyScheduleId = options.onCallScheduleId;
}
const twilioConfig: TwilioConfig | null =
options.customTwilioConfig || (await getTwilioConfig());

View File

@@ -4,5 +4,13 @@
"ignore": [
"greenlock.d/*"
],
"exec": "node --inspect=0.0.0.0:9229 --require ts-node/register Index.ts"
"watchOptions": {
"useFsEvents": false,
"interval": 500
},
"env": {
"TS_NODE_TRANSPILE_ONLY": "1",
"TS_NODE_FILES": "false"
},
"exec": "node --inspect=0.0.0.0:9229 -r ts-node/register/transpile-only Index.ts"
}

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,5 +1,14 @@
import Project from "./Project";
import Incident from "./Incident";
import Alert from "./Alert";
import ScheduledMaintenance from "./ScheduledMaintenance";
import StatusPage from "./StatusPage";
import StatusPageAnnouncement from "./StatusPageAnnouncement";
import User from "./User";
import OnCallDutyPolicy from "./OnCallDutyPolicy";
import OnCallDutyPolicyEscalationRule from "./OnCallDutyPolicyEscalationRule";
import OnCallDutyPolicySchedule from "./OnCallDutyPolicySchedule";
import Team from "./Team";
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
import Route from "../../Types/API/Route";
import CallStatus from "../../Types/Call/CallStatus";
@@ -247,6 +256,7 @@ export default class CallLog extends BaseModel {
description: "Call Cost in USD Cents",
canReadOnRelationQuery: false,
isDefaultValueColumn: true,
defaultValue: 0,
})
@Column({
nullable: false,
@@ -255,6 +265,575 @@ export default class CallLog extends BaseModel {
})
public callCostInUSDCents?: number = undefined;
// Relations to resources that triggered this Call (nullable)
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadCallLog,
],
update: [],
})
@TableColumn({
manyToOneRelationColumn: "incidentId",
type: TableColumnType.Entity,
modelType: Incident,
title: "Incident",
description: "Incident associated with this Call (if any)",
})
@ManyToOne(
() => {
return Incident;
},
{
eager: false,
nullable: true,
onDelete: "CASCADE",
orphanedRowAction: "nullify",
},
)
@JoinColumn({ name: "incidentId" })
public incident?: Incident = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadCallLog,
],
update: [],
})
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
required: false,
canReadOnRelationQuery: true,
title: "Incident ID",
description: "ID of Incident associated with this Call (if any)",
})
@Column({
type: ColumnType.ObjectID,
nullable: true,
transformer: ObjectID.getDatabaseTransformer(),
})
public incidentId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadCallLog,
],
update: [],
})
@TableColumn({
manyToOneRelationColumn: "userId",
type: TableColumnType.Entity,
modelType: User,
title: "User",
description: "User who initiated this Call (if any)",
})
@ManyToOne(
() => {
return User;
},
{
eager: false,
nullable: true,
onDelete: "CASCADE",
orphanedRowAction: "nullify",
},
)
@JoinColumn({ name: "userId" })
public user?: User = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadCallLog,
],
update: [],
})
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
required: false,
canReadOnRelationQuery: true,
title: "User ID",
description: "ID of User who initiated this Call (if any)",
})
@Column({
type: ColumnType.ObjectID,
nullable: true,
transformer: ObjectID.getDatabaseTransformer(),
})
public userId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadCallLog,
],
update: [],
})
@TableColumn({
manyToOneRelationColumn: "alertId",
type: TableColumnType.Entity,
modelType: Alert,
title: "Alert",
description: "Alert associated with this Call (if any)",
})
@ManyToOne(
() => {
return Alert;
},
{
eager: false,
nullable: true,
onDelete: "CASCADE",
orphanedRowAction: "nullify",
},
)
@JoinColumn({ name: "alertId" })
public alert?: Alert = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadCallLog,
],
update: [],
})
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
required: false,
canReadOnRelationQuery: true,
title: "Alert ID",
description: "ID of Alert associated with this Call (if any)",
})
@Column({
type: ColumnType.ObjectID,
nullable: true,
transformer: ObjectID.getDatabaseTransformer(),
})
public alertId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadCallLog,
],
update: [],
})
@TableColumn({
manyToOneRelationColumn: "scheduledMaintenanceId",
type: TableColumnType.Entity,
modelType: ScheduledMaintenance,
title: "Scheduled Maintenance",
description: "Scheduled Maintenance associated with this Call (if any)",
})
@ManyToOne(
() => {
return ScheduledMaintenance;
},
{
eager: false,
nullable: true,
onDelete: "CASCADE",
orphanedRowAction: "nullify",
},
)
@JoinColumn({ name: "scheduledMaintenanceId" })
public scheduledMaintenance?: ScheduledMaintenance = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadCallLog,
],
update: [],
})
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
required: false,
canReadOnRelationQuery: true,
title: "Scheduled Maintenance ID",
description:
"ID of Scheduled Maintenance associated with this Call (if any)",
})
@Column({
type: ColumnType.ObjectID,
nullable: true,
transformer: ObjectID.getDatabaseTransformer(),
})
public scheduledMaintenanceId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadCallLog,
],
update: [],
})
@TableColumn({
manyToOneRelationColumn: "statusPageId",
type: TableColumnType.Entity,
modelType: StatusPage,
title: "Status Page",
description: "Status Page associated with this Call (if any)",
})
@ManyToOne(
() => {
return StatusPage;
},
{
eager: false,
nullable: true,
onDelete: "CASCADE",
orphanedRowAction: "nullify",
},
)
@JoinColumn({ name: "statusPageId" })
public statusPage?: StatusPage = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadCallLog,
],
update: [],
})
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
required: false,
canReadOnRelationQuery: true,
title: "Status Page ID",
description: "ID of Status Page associated with this Call (if any)",
})
@Column({
type: ColumnType.ObjectID,
nullable: true,
transformer: ObjectID.getDatabaseTransformer(),
})
public statusPageId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadCallLog,
],
update: [],
})
@TableColumn({
manyToOneRelationColumn: "statusPageAnnouncementId",
type: TableColumnType.Entity,
modelType: StatusPageAnnouncement,
title: "Status Page Announcement",
description: "Status Page Announcement associated with this Call (if any)",
})
@ManyToOne(
() => {
return StatusPageAnnouncement;
},
{
eager: false,
nullable: true,
onDelete: "CASCADE",
orphanedRowAction: "nullify",
},
)
@JoinColumn({ name: "statusPageAnnouncementId" })
public statusPageAnnouncement?: StatusPageAnnouncement = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadCallLog,
],
update: [],
})
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
required: false,
canReadOnRelationQuery: true,
title: "Status Page Announcement ID",
description:
"ID of Status Page Announcement associated with this Call (if any)",
})
@Column({
type: ColumnType.ObjectID,
nullable: true,
transformer: ObjectID.getDatabaseTransformer(),
})
public statusPageAnnouncementId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadCallLog,
],
update: [],
})
@TableColumn({
manyToOneRelationColumn: "onCallDutyPolicyId",
type: TableColumnType.Entity,
modelType: OnCallDutyPolicy,
title: "On-Call Duty Policy",
description: "On-Call Duty Policy associated with this Call (if any)",
})
@ManyToOne(
() => {
return OnCallDutyPolicy;
},
{
eager: false,
nullable: true,
onDelete: "CASCADE",
orphanedRowAction: "nullify",
},
)
@JoinColumn({ name: "onCallDutyPolicyId" })
public onCallDutyPolicy?: OnCallDutyPolicy = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadCallLog,
],
update: [],
})
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
required: false,
canReadOnRelationQuery: true,
title: "On-Call Duty Policy ID",
description: "ID of On-Call Duty Policy associated with this Call (if any)",
})
@Column({
type: ColumnType.ObjectID,
nullable: true,
transformer: ObjectID.getDatabaseTransformer(),
})
public onCallDutyPolicyId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadCallLog,
],
update: [],
})
@TableColumn({
manyToOneRelationColumn: "onCallDutyPolicyEscalationRuleId",
type: TableColumnType.Entity,
modelType: OnCallDutyPolicyEscalationRule,
title: "On-Call Duty Policy Escalation Rule",
description:
"On-Call Duty Policy Escalation Rule associated with this Call (if any)",
})
@ManyToOne(
() => {
return OnCallDutyPolicyEscalationRule;
},
{
eager: false,
nullable: true,
onDelete: "CASCADE",
orphanedRowAction: "nullify",
},
)
@JoinColumn({ name: "onCallDutyPolicyEscalationRuleId" })
public onCallDutyPolicyEscalationRule?: OnCallDutyPolicyEscalationRule =
undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadCallLog,
],
update: [],
})
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
required: false,
canReadOnRelationQuery: true,
title: "On-Call Duty Policy Escalation Rule ID",
description:
"ID of On-Call Duty Policy Escalation Rule associated with this Call (if any)",
})
@Column({
type: ColumnType.ObjectID,
nullable: true,
transformer: ObjectID.getDatabaseTransformer(),
})
public onCallDutyPolicyEscalationRuleId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadCallLog,
],
update: [],
})
@TableColumn({
manyToOneRelationColumn: "onCallDutyPolicyScheduleId",
type: TableColumnType.Entity,
modelType: OnCallDutyPolicySchedule,
title: "On-Call Duty Policy Schedule",
description:
"On-Call Duty Policy Schedule associated with this Call (if any)",
})
@ManyToOne(
() => {
return OnCallDutyPolicySchedule;
},
{
eager: false,
nullable: true,
onDelete: "CASCADE",
orphanedRowAction: "nullify",
},
)
@JoinColumn({ name: "onCallDutyPolicyScheduleId" })
public onCallDutyPolicySchedule?: OnCallDutyPolicySchedule = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadCallLog,
],
update: [],
})
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
required: false,
canReadOnRelationQuery: true,
title: "On-Call Duty Policy Schedule ID",
description:
"ID of On-Call Duty Policy Schedule associated with this Call (if any)",
})
@Column({
type: ColumnType.ObjectID,
nullable: true,
transformer: ObjectID.getDatabaseTransformer(),
})
public onCallDutyPolicyScheduleId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadCallLog,
],
update: [],
})
@TableColumn({
manyToOneRelationColumn: "teamId",
type: TableColumnType.Entity,
modelType: Team,
title: "Team",
description: "Team associated with this Call (if any)",
})
@ManyToOne(
() => {
return Team;
},
{
eager: false,
nullable: true,
onDelete: "CASCADE",
orphanedRowAction: "nullify",
},
)
@JoinColumn({ name: "teamId" })
public team?: Team = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadCallLog,
],
update: [],
})
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
required: false,
canReadOnRelationQuery: true,
title: "Team ID",
description: "ID of Team associated with this Call (if any)",
})
@Column({
type: ColumnType.ObjectID,
nullable: true,
transformer: ObjectID.getDatabaseTransformer(),
})
public teamId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
read: [],
@@ -264,6 +843,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)",
})
@@ -728,6 +729,7 @@ export default class CopilotAction extends BaseModel {
type: TableColumnType.Boolean,
title: "Is Priority",
description: "Is Priority",
defaultValue: false,
})
@Column({
nullable: false,

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({
@@ -70,11 +70,11 @@ export default class FileModel extends BaseModel {
type: ColumnType.ShortText,
length: ColumnLength.ShortText,
})
public type?: MimeType = undefined;
public fileType?: MimeType = undefined;
@ColumnAccessControl({
create: [Permission.CurrentUser],
read: [Permission.CurrentUser],
create: [Permission.CurrentUser, Permission.AuthenticatedRequest],
read: [Permission.CurrentUser, Permission.AuthenticatedRequest],
update: [],
})
@TableColumn({
@@ -91,8 +91,8 @@ export default class FileModel extends BaseModel {
public slug?: string = undefined;
@ColumnAccessControl({
create: [Permission.CurrentUser],
read: [Permission.CurrentUser],
create: [Permission.CurrentUser, Permission.AuthenticatedRequest],
read: [Permission.CurrentUser, Permission.AuthenticatedRequest],
update: [],
})
@TableColumn({

View File

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

View File

@@ -1,6 +1,15 @@
import Project from "./Project";
import Incident from "./Incident";
import Alert from "./Alert";
import ScheduledMaintenance from "./ScheduledMaintenance";
import StatusPage from "./StatusPage";
import ProjectSmtpConfig from "./ProjectSmtpConfig";
import StatusPageAnnouncement from "./StatusPageAnnouncement";
import User from "./User";
import OnCallDutyPolicy from "./OnCallDutyPolicy";
import OnCallDutyPolicyEscalationRule from "./OnCallDutyPolicyEscalationRule";
import OnCallDutyPolicySchedule from "./OnCallDutyPolicySchedule";
import Team from "./Team";
import BaseModel from "./DatabaseBaseModel/DatabaseBaseModel";
import Route from "../../Types/API/Route";
import ColumnAccessControl from "../../Types/Database/AccessControl/ColumnAccessControl";
@@ -289,6 +298,576 @@ export default class EmailLog extends BaseModel {
})
public projectSmtpConfigId?: ObjectID = undefined;
// Relations to resources that triggered this email (nullable)
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadEmailLog,
],
update: [],
})
@TableColumn({
manyToOneRelationColumn: "incidentId",
type: TableColumnType.Entity,
modelType: Incident,
title: "Incident",
description: "Incident associated with this email (if any)",
})
@ManyToOne(
() => {
return Incident;
},
{
eager: false,
nullable: true,
onDelete: "CASCADE",
orphanedRowAction: "nullify",
},
)
@JoinColumn({ name: "incidentId" })
public incident?: Incident = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadEmailLog,
],
update: [],
})
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
required: false,
canReadOnRelationQuery: true,
title: "Incident ID",
description: "ID of Incident associated with this email (if any)",
})
@Column({
type: ColumnType.ObjectID,
nullable: true,
transformer: ObjectID.getDatabaseTransformer(),
})
public incidentId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadEmailLog,
],
update: [],
})
@TableColumn({
manyToOneRelationColumn: "userId",
type: TableColumnType.Entity,
modelType: User,
title: "User",
description: "User who initiated this email (if any)",
})
@ManyToOne(
() => {
return User;
},
{
eager: false,
nullable: true,
onDelete: "CASCADE",
orphanedRowAction: "nullify",
},
)
@JoinColumn({ name: "userId" })
public user?: User = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadEmailLog,
],
update: [],
})
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
required: false,
canReadOnRelationQuery: true,
title: "User ID",
description: "ID of User who initiated this email (if any)",
})
@Column({
type: ColumnType.ObjectID,
nullable: true,
transformer: ObjectID.getDatabaseTransformer(),
})
public userId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadEmailLog,
],
update: [],
})
@TableColumn({
manyToOneRelationColumn: "alertId",
type: TableColumnType.Entity,
modelType: Alert,
title: "Alert",
description: "Alert associated with this email (if any)",
})
@ManyToOne(
() => {
return Alert;
},
{
eager: false,
nullable: true,
onDelete: "CASCADE",
orphanedRowAction: "nullify",
},
)
@JoinColumn({ name: "alertId" })
public alert?: Alert = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadEmailLog,
],
update: [],
})
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
required: false,
canReadOnRelationQuery: true,
title: "Alert ID",
description: "ID of Alert associated with this email (if any)",
})
@Column({
type: ColumnType.ObjectID,
nullable: true,
transformer: ObjectID.getDatabaseTransformer(),
})
public alertId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadEmailLog,
],
update: [],
})
@TableColumn({
manyToOneRelationColumn: "scheduledMaintenanceId",
type: TableColumnType.Entity,
modelType: ScheduledMaintenance,
title: "Scheduled Maintenance",
description: "Scheduled Maintenance associated with this email (if any)",
})
@ManyToOne(
() => {
return ScheduledMaintenance;
},
{
eager: false,
nullable: true,
onDelete: "CASCADE",
orphanedRowAction: "nullify",
},
)
@JoinColumn({ name: "scheduledMaintenanceId" })
public scheduledMaintenance?: ScheduledMaintenance = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadEmailLog,
],
update: [],
})
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
required: false,
canReadOnRelationQuery: true,
title: "Scheduled Maintenance ID",
description:
"ID of Scheduled Maintenance associated with this email (if any)",
})
@Column({
type: ColumnType.ObjectID,
nullable: true,
transformer: ObjectID.getDatabaseTransformer(),
})
public scheduledMaintenanceId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadEmailLog,
],
update: [],
})
@TableColumn({
manyToOneRelationColumn: "statusPageId",
type: TableColumnType.Entity,
modelType: StatusPage,
title: "Status Page",
description: "Status Page associated with this email (if any)",
})
@ManyToOne(
() => {
return StatusPage;
},
{
eager: false,
nullable: true,
onDelete: "CASCADE",
orphanedRowAction: "nullify",
},
)
@JoinColumn({ name: "statusPageId" })
public statusPage?: StatusPage = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadEmailLog,
],
update: [],
})
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
required: false,
canReadOnRelationQuery: true,
title: "Status Page ID",
description: "ID of Status Page associated with this email (if any)",
})
@Column({
type: ColumnType.ObjectID,
nullable: true,
transformer: ObjectID.getDatabaseTransformer(),
})
public statusPageId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadEmailLog,
],
update: [],
})
@TableColumn({
manyToOneRelationColumn: "statusPageAnnouncementId",
type: TableColumnType.Entity,
modelType: StatusPageAnnouncement,
title: "Status Page Announcement",
description: "Status Page Announcement associated with this email (if any)",
})
@ManyToOne(
() => {
return StatusPageAnnouncement;
},
{
eager: false,
nullable: true,
onDelete: "CASCADE",
orphanedRowAction: "nullify",
},
)
@JoinColumn({ name: "statusPageAnnouncementId" })
public statusPageAnnouncement?: StatusPageAnnouncement = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadEmailLog,
],
update: [],
})
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
required: false,
canReadOnRelationQuery: true,
title: "Status Page Announcement ID",
description:
"ID of Status Page Announcement associated with this email (if any)",
})
@Column({
type: ColumnType.ObjectID,
nullable: true,
transformer: ObjectID.getDatabaseTransformer(),
})
public statusPageAnnouncementId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadEmailLog,
],
update: [],
})
@TableColumn({
manyToOneRelationColumn: "onCallDutyPolicyId",
type: TableColumnType.Entity,
modelType: OnCallDutyPolicy,
title: "On-Call Duty Policy",
description: "On-Call Duty Policy associated with this email (if any)",
})
@ManyToOne(
() => {
return OnCallDutyPolicy;
},
{
eager: false,
nullable: true,
onDelete: "CASCADE",
orphanedRowAction: "nullify",
},
)
@JoinColumn({ name: "onCallDutyPolicyId" })
public onCallDutyPolicy?: OnCallDutyPolicy = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadEmailLog,
],
update: [],
})
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
required: false,
canReadOnRelationQuery: true,
title: "On-Call Duty Policy ID",
description:
"ID of On-Call Duty Policy associated with this email (if any)",
})
@Column({
type: ColumnType.ObjectID,
nullable: true,
transformer: ObjectID.getDatabaseTransformer(),
})
public onCallDutyPolicyId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadEmailLog,
],
update: [],
})
@TableColumn({
manyToOneRelationColumn: "onCallDutyPolicyEscalationRuleId",
type: TableColumnType.Entity,
modelType: OnCallDutyPolicyEscalationRule,
title: "On-Call Duty Policy Escalation Rule",
description:
"On-Call Duty Policy Escalation Rule associated with this email (if any)",
})
@ManyToOne(
() => {
return OnCallDutyPolicyEscalationRule;
},
{
eager: false,
nullable: true,
onDelete: "CASCADE",
orphanedRowAction: "nullify",
},
)
@JoinColumn({ name: "onCallDutyPolicyEscalationRuleId" })
public onCallDutyPolicyEscalationRule?: OnCallDutyPolicyEscalationRule =
undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadEmailLog,
],
update: [],
})
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
required: false,
canReadOnRelationQuery: true,
title: "On-Call Duty Policy Escalation Rule ID",
description:
"ID of On-Call Duty Policy Escalation Rule associated with this email (if any)",
})
@Column({
type: ColumnType.ObjectID,
nullable: true,
transformer: ObjectID.getDatabaseTransformer(),
})
public onCallDutyPolicyEscalationRuleId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadEmailLog,
],
update: [],
})
@TableColumn({
manyToOneRelationColumn: "onCallDutyPolicyScheduleId",
type: TableColumnType.Entity,
modelType: OnCallDutyPolicySchedule,
title: "On-Call Duty Policy Schedule",
description:
"On-Call Duty Policy Schedule associated with this email (if any)",
})
@ManyToOne(
() => {
return OnCallDutyPolicySchedule;
},
{
eager: false,
nullable: true,
onDelete: "CASCADE",
orphanedRowAction: "nullify",
},
)
@JoinColumn({ name: "onCallDutyPolicyScheduleId" })
public onCallDutyPolicySchedule?: OnCallDutyPolicySchedule = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadEmailLog,
],
update: [],
})
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
required: false,
canReadOnRelationQuery: true,
title: "On-Call Duty Policy Schedule ID",
description:
"ID of On-Call Duty Policy Schedule associated with this email (if any)",
})
@Column({
type: ColumnType.ObjectID,
nullable: true,
transformer: ObjectID.getDatabaseTransformer(),
})
public onCallDutyPolicyScheduleId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadEmailLog,
],
update: [],
})
@TableColumn({
manyToOneRelationColumn: "teamId",
type: TableColumnType.Entity,
modelType: Team,
title: "Team",
description: "Team associated with this email (if any)",
})
@ManyToOne(
() => {
return Team;
},
{
eager: false,
nullable: true,
onDelete: "CASCADE",
orphanedRowAction: "nullify",
},
)
@JoinColumn({ name: "teamId" })
public team?: Team = undefined;
@ColumnAccessControl({
create: [],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadEmailLog,
],
update: [],
})
@Index()
@TableColumn({
type: TableColumnType.ObjectID,
required: false,
canReadOnRelationQuery: true,
title: "Team ID",
description: "ID of Team associated with this email (if any)",
})
@Column({
type: ColumnType.ObjectID,
nullable: true,
transformer: ObjectID.getDatabaseTransformer(),
})
public teamId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
read: [],
@@ -298,6 +877,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",
}
@@ -49,6 +48,7 @@ export default class GlobalConfig extends GlobalConfigModel {
type: TableColumnType.Boolean,
title: "Disable Signup",
description: "Should we disable new user sign up to this server?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,
@@ -260,7 +260,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: [],
@@ -339,6 +339,7 @@ export default class GlobalConfig extends GlobalConfigModel {
type: TableColumnType.Boolean,
title: "Is Master API Key Enabled",
description: "Is Master API Key Enabled?",
defaultValue: false,
})
@Column({
type: ColumnType.Boolean,
@@ -355,6 +356,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

@@ -27,6 +27,7 @@ import IconProp from "../../Types/Icon/IconProp";
import { JSONObject } from "../../Types/JSON";
import ObjectID from "../../Types/ObjectID";
import Permission from "../../Types/Permission";
import StatusPageSubscriberNotificationStatus from "../../Types/StatusPage/StatusPageSubscriberNotificationStatus";
import {
Column,
Entity,
@@ -229,12 +230,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 +243,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 +329,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 +528,7 @@ export default class Incident extends BaseModel {
@TableColumn({
manyToOneRelationColumn: "currentIncidentStateId",
type: TableColumnType.Entity,
computed: true,
modelType: IncidentState,
title: "Current Incident State",
description:
@@ -571,6 +570,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",
@@ -734,26 +734,74 @@ export default class Incident extends BaseModel {
public changeMonitorStatusToId?: ObjectID = undefined;
@ColumnAccessControl({
create: [],
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateProjectIncident,
],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadProjectIncident,
],
update: [],
update: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.EditProjectIncident,
],
})
@TableColumn({
isDefaultValueColumn: true,
type: TableColumnType.Boolean,
title: "Are subscribers notified?",
description: "Are subscribers notified about this incident?",
computed: true,
hideColumnInDocumentation: true,
type: TableColumnType.ShortText,
title: "Subscriber Notification Status",
description:
"Status of notification sent to subscribers about this incident",
defaultValue: StatusPageSubscriberNotificationStatus.Pending,
})
@Column({
type: ColumnType.Boolean,
default: false,
type: ColumnType.ShortText,
default: StatusPageSubscriberNotificationStatus.Pending,
})
public isStatusPageSubscribersNotifiedOnIncidentCreated?: boolean = undefined;
public subscriberNotificationStatusOnIncidentCreated?: StatusPageSubscriberNotificationStatus =
undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateProjectIncident,
],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadProjectIncident,
],
update: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.EditProjectIncident,
],
})
@TableColumn({
type: TableColumnType.VeryLongText,
title: "Notification Status Message",
description:
"Status message for subscriber notifications - includes success messages, failure reasons, or skip reasons",
required: false,
})
@Column({
type: ColumnType.VeryLongText,
nullable: true,
})
public subscriberNotificationStatusMessage?: string = undefined;
@ColumnAccessControl({
create: [
@@ -775,6 +823,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 +866,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 +878,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 +1072,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 +1147,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 +1163,7 @@ export default class Incident extends BaseModel {
type: TableColumnType.Number,
title: "Incident Number",
description: "Incident Number",
computed: true,
})
@Column({
type: ColumnType.Number,
@@ -1171,6 +1215,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

@@ -218,7 +218,7 @@ export default class IncidentCustomField extends BaseModel {
type: ColumnType.ShortText,
length: ColumnLength.ShortText,
})
public type?: CustomFieldType = undefined;
public customFieldType?: CustomFieldType = undefined;
@ColumnAccessControl({
create: [
@@ -297,6 +297,7 @@ export default class 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

@@ -17,6 +17,7 @@ import TenantColumn from "../../Types/Database/TenantColumn";
import IconProp from "../../Types/Icon/IconProp";
import ObjectID from "../../Types/ObjectID";
import Permission from "../../Types/Permission";
import StatusPageSubscriberNotificationStatus from "../../Types/StatusPage/StatusPageSubscriberNotificationStatus";
import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
@EnableDocumentation()
@@ -271,6 +272,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)",
})
@@ -340,26 +342,73 @@ export default class IncidentPublicNote extends BaseModel {
public note?: string = undefined;
@ColumnAccessControl({
create: [],
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateIncidentPublicNote,
],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadIncidentPublicNote,
],
update: [],
update: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.EditIncidentPublicNote,
],
})
@TableColumn({
isDefaultValueColumn: true,
type: TableColumnType.Boolean,
title: "Are subscribers notified?",
description: "Are subscribers notified about this note?",
computed: true,
hideColumnInDocumentation: true,
type: TableColumnType.ShortText,
title: "Subscriber Notification Status",
description: "Status of notification sent to subscribers about this note",
defaultValue: StatusPageSubscriberNotificationStatus.Pending,
})
@Column({
type: ColumnType.Boolean,
default: false,
type: ColumnType.ShortText,
default: StatusPageSubscriberNotificationStatus.Pending,
})
public isStatusPageSubscribersNotifiedOnNoteCreated?: boolean = undefined;
public subscriberNotificationStatusOnNoteCreated?: StatusPageSubscriberNotificationStatus =
undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateIncidentPublicNote,
],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadIncidentPublicNote,
],
update: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.EditIncidentPublicNote,
],
})
@TableColumn({
type: TableColumnType.VeryLongText,
title: "Notification Status Message",
description:
"Status message for subscriber notifications - includes success messages, failure reasons, or skip reasons",
required: false,
})
@Column({
type: ColumnType.VeryLongText,
nullable: true,
})
public subscriberNotificationStatusMessage?: string = undefined;
@ColumnAccessControl({
create: [
@@ -381,6 +430,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 +440,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 +452,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

@@ -19,11 +19,14 @@ import IconProp from "../../Types/Icon/IconProp";
import { JSONObject } from "../../Types/JSON";
import ObjectID from "../../Types/ObjectID";
import Permission from "../../Types/Permission";
import StatusPageSubscriberNotificationStatus from "../../Types/StatusPage/StatusPageSubscriberNotificationStatus";
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 +63,7 @@ import { Column, Entity, Index, JoinColumn, ManyToOne } from "typeorm";
@Entity({
name: "IncidentStateTimeline",
})
@Index(["incidentId", "startsAt"])
@TableMetadata({
tableName: "IncidentStateTimeline",
singularName: "Incident State Timeline",
@@ -274,6 +278,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)",
})
@@ -399,19 +404,62 @@ export default class IncidentStateTimeline extends BaseModel {
Permission.ProjectMember,
Permission.ReadIncidentStateTimeline,
],
update: [],
update: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.EditIncidentStateTimeline,
],
})
@TableColumn({
isDefaultValueColumn: true,
type: TableColumnType.Boolean,
title: "Are subscribers notified?",
description: "Are subscribers notified about this incident state change?",
computed: true,
hideColumnInDocumentation: true,
type: TableColumnType.ShortText,
title: "Subscriber Notification Status",
description:
"Status of notification sent to subscribers about this incident state change",
defaultValue: StatusPageSubscriberNotificationStatus.Pending,
})
@Column({
type: ColumnType.Boolean,
default: false,
type: ColumnType.ShortText,
default: StatusPageSubscriberNotificationStatus.Pending,
})
public isStatusPageSubscribersNotified?: boolean = undefined;
public subscriberNotificationStatus?: StatusPageSubscriberNotificationStatus =
undefined;
@ColumnAccessControl({
create: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.CreateIncidentStateTimeline,
],
read: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.ReadIncidentStateTimeline,
],
update: [
Permission.ProjectOwner,
Permission.ProjectAdmin,
Permission.ProjectMember,
Permission.EditIncidentStateTimeline,
],
})
@TableColumn({
type: TableColumnType.VeryLongText,
title: "Notification Status Message",
description:
"Status message for subscriber notifications - includes success messages, failure reasons, or skip reasons",
required: false,
})
@Column({
type: ColumnType.VeryLongText,
nullable: true,
})
public subscriberNotificationStatusMessage?: string = undefined;
@ColumnAccessControl({
create: [
@@ -433,6 +481,7 @@ export default class IncidentStateTimeline extends BaseModel {
type: TableColumnType.Boolean,
title: "Should subscribers be notified?",
description: "Should subscribers be notified about this state change?",
defaultValue: true,
})
@Column({
type: ColumnType.Boolean,
@@ -441,12 +490,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,10 +502,13 @@ export default class IncidentStateTimeline 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

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

@@ -100,6 +100,8 @@ import ServiceCopilotCodeRepository from "./ServiceCopilotCodeRepository";
import ShortLink from "./ShortLink";
// SMS
import SmsLog from "./SmsLog";
import PushNotificationLog from "./PushNotificationLog";
import WorkspaceNotificationLog from "./WorkspaceNotificationLog";
// Status Page
import StatusPage from "./StatusPage";
import StatusPageAnnouncement from "./StatusPageAnnouncement";
@@ -114,6 +116,7 @@ import StatusPageOwnerTeam from "./StatusPageOwnerTeam";
import StatusPageOwnerUser from "./StatusPageOwnerUser";
import StatusPagePrivateUser from "./StatusPagePrivateUser";
import StatusPageResource from "./StatusPageResource";
import StatusPageSCIM from "./StatusPageSCIM";
import StatusPageSSO from "./StatusPageSso";
import StatusPageSubscriber from "./StatusPageSubscriber";
// Team
@@ -126,6 +129,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";
@@ -174,10 +178,13 @@ import WorkspaceUserAuthToken from "./WorkspaceUserAuthToken";
import WorkspaceProjectAuthToken from "./WorkspaceProjectAuthToken";
import WorkspaceSetting from "./WorkspaceSetting";
import WorkspaceNotificationRule from "./WorkspaceNotificationRule";
import ProjectUser from "./ProjectUser";
import OnCallDutyPolicyUserOverride from "./OnCallDutyPolicyUserOverride";
import MonitorFeed from "./MonitorFeed";
import MetricType from "./MetricType";
import ProjectSCIM from "./ProjectSCIM";
import SCIMUser from "./SCIMUser";
import StatusPageSCIMUser from "./StatusPageSCIMUser";
const AllModelTypes: Array<{
new (): BaseModel;
@@ -275,6 +282,7 @@ const AllModelTypes: Array<{
ProjectSSO,
StatusPageSSO,
StatusPageSCIM,
MonitorProbe,
@@ -288,12 +296,15 @@ const AllModelTypes: Array<{
StatusPageOwnerUser,
SmsLog,
PushNotificationLog,
WorkspaceNotificationLog,
CallLog,
EmailLog,
UserEmail,
UserSms,
UserCall,
UserPush,
UserNotificationRule,
UserOnCallLog,
@@ -371,13 +382,16 @@ const AllModelTypes: Array<{
WorkspaceSetting,
WorkspaceNotificationRule,
ProjectUser,
MonitorFeed,
MetricType,
OnCallDutyPolicyTimeLog,
ProjectSCIM,
SCIMUser,
StatusPageSCIMUser
];
const modelTypeMap: { [key: string]: { new (): BaseModel } } = {};

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

@@ -218,7 +218,7 @@ export default class MonitorCustomField extends BaseModel {
type: ColumnType.ShortText,
length: ColumnLength.ShortText,
})
public type?: CustomFieldType = undefined;
public customFieldType?: CustomFieldType = undefined;
@ColumnAccessControl({
create: [
@@ -297,6 +297,7 @@ export default class 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,

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