Compare commits

...

572 Commits

Author SHA1 Message Date
Simon Larsen
e9bdbb3414 refactor: Update Postgres configuration in Helm chart
This code change updates the Postgres configuration in the Helm chart to support both internal and external Postgres databases. It adds the necessary environment variables and secrets blocks to handle the external Postgres database configuration. This enhancement allows users to easily switch between using an internal or external Postgres database when deploying the Helm chart.
2024-06-05 10:05:45 +01:00
Simon Larsen
3b65d1f4d6 refactor: Update Postgres configuration in Helm chart
This code change updates the Postgres configuration in the Helm chart to support both internal and external Postgres databases. It adds the `applicationName` property to the `dataSourceOptions` object in `PostgresConfig.ts` to set the application name to 'oneuptime'. Additionally, it adds new blocks in `secrets.yaml` to handle secrets for the external Postgres database, including the password and SSL options. This enhancement allows users to easily switch between using an internal or external Postgres database when deploying the Helm chart.
2024-06-05 09:28:10 +01:00
Simon Larsen
ed0f92f480 refactor: Update Postgres configuration in Helm chart
This code change updates the Postgres configuration in the Helm chart to support both internal and external Postgres databases. The `DATABASE_NAME` environment variable is renamed from `DATABASE_DATABASE` to improve clarity. Additionally, a new block for configuring SSL options for the external Postgres database is added. This enhancement allows users to easily switch between using an internal or external Postgres database when deploying the Helm chart.
2024-06-04 22:51:53 +01:00
Simon Larsen
6cc0f9deaf refactor: Update Postgres configuration in Helm chart
This code change updates the Postgres configuration in the Helm chart to support both internal and external Postgres databases. The `DATABASE_HOST`, `DATABASE_PORT`, `DATABASE_USERNAME`, `DATABASE_PASSWORD`, and `DATABASE_DATABASE` environment variables are now conditionally set based on the `postgresql.enabled` flag in the `values.yaml` file. If `postgresql.enabled` is `true`, the values are set to the internal Postgres service details. Otherwise, they are set to the corresponding values from the `externalPostgres` configuration. This enhancement allows users to easily switch between using an internal or external Postgres database when deploying the Helm chart.
2024-06-04 21:44:17 +01:00
Simon Larsen
06be3d2f58 ```text
refactor: Enable external Postgres support in Helm chart

This code change modifies the Helm chart to enable support for using an external Postgres database. The `postgresql.enabled` flag in the `values.yaml` file is set to `true` to indicate that an external Postgres database will be used. This enhancement allows users to configure the Helm chart to connect to an existing Postgres database instead of deploying a new one.
2024-06-04 21:42:17 +01:00
Simon Larsen
da8045271f Merge branch 'master' of github.com:OneUptime/oneuptime 2024-06-04 21:31:17 +01:00
Simon Larsen
cfc45efadf chore: Update Docker login action to v2.2.0 2024-06-04 21:31:15 +01:00
Simon Larsen
6b92440c74 Merge pull request #1457 from OneUptime/snyk-upgrade-ec107bb76f5f3418659be75ddc87b6bd
[Snyk] Upgrade @nivo/line from 0.86.0 to 0.87.0
2024-06-04 21:30:51 +01:00
Simon Larsen
c2d3123263 Merge pull request #1456 from OneUptime/snyk-upgrade-f550bab384e19de47906237ddf6f8910
[Snyk] Upgrade react-router-dom from 6.23.0 to 6.23.1
2024-06-04 21:30:40 +01:00
Simon Larsen
3a277db0d5 chore: Update Docker login action to v2.2.0
This code change updates the Docker login action to version 2.2.0 in the build.yml file. The new version provides improved functionality and security for logging in to Docker Hub. This chore ensures that the latest stable version of the Docker login action is used in the build process.
2024-06-04 21:29:22 +01:00
Simon Larsen
f084058b67 feat: Add error message component to BasicFormModal
This code change adds the ErrorMessage component to the BasicFormModal component in BasicFormModal.tsx. The ErrorMessage component is rendered when the props.error value is truthy, displaying the error message to the user. This enhancement improves the user experience by providing clear feedback when an error occurs during form submission.
2024-06-04 21:17:10 +01:00
Simon Larsen
9dbe33bfcc refactor: Add doNotShowWhenEditing flag to form fields
This code change adds the `doNotShowWhenEditing` flag to the form fields in the `ModelTable` component. When set to `true`, this flag prevents certain fields from being shown in the form when it is in edit mode. This improvement provides better control over which fields are displayed in the form during editing, enhancing the user experience and reducing clutter.
2024-06-04 21:01:36 +01:00
Simon Larsen
085e1a5d76 ```text
refactor: Update DatabaseService encrypt method to handle PartialEntity

This code change updates the `encrypt` method in the `DatabaseService` class to handle `PartialEntity` as an input parameter. Previously, the method only accepted `TBaseModel` as the input type. This improvement allows for encrypting both complete entities and partial entities, providing more flexibility in data encryption.
2024-06-04 20:41:23 +01:00
Simon Larsen
9a3fa080ea refactor: Update MonitorSecret model permissions
This code change updates the permissions for the MonitorSecret model in MonitorSecret.ts. The update includes adding the Permission.EditMonitorSecret permission to the update operation, allowing project owners, project admins, and users with the EditMonitorSecret permission to update MonitorSecret records. This improvement provides better control over who can modify MonitorSecrets and ensures that only authorized users can make changes to sensitive information.
2024-06-04 20:33:35 +01:00
Simon Larsen
db3d1e90f2 refactor: Remove unused Permission.ProjectMember from Label model
This code change removes the unused Permission.ProjectMember from the Label model in Label.ts. The Permission.ProjectMember was mistakenly included in the create, read, update, and delete arrays, but it is not required for these operations. Removing the unused permission improves code clarity and reduces potential confusion.
2024-06-04 20:31:15 +01:00
Simon Larsen
c02d8d8d8c Merge branch 'master' of github.com:OneUptime/oneuptime 2024-06-04 20:21:54 +01:00
Simon Larsen
1fad1d7c29 refactor: Update TableRow component to align top in Table
This code change updates the TableRow component in the Table module to align the content at the top of the table cells. The classNames "align-top" are added to the relevant table cells to achieve this alignment. This improvement ensures consistent vertical alignment of content in the table rows.
2024-06-04 20:21:51 +01:00
snyk-bot
ef610e104a fix: upgrade @nivo/line from 0.86.0 to 0.87.0
Snyk has created this PR to upgrade @nivo/line from 0.86.0 to 0.87.0.

See this package in npm:
@nivo/line

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-06-04 17:45:55 +00:00
snyk-bot
8f7bec00d4 fix: upgrade react-router-dom from 6.23.0 to 6.23.1
Snyk has created this PR to upgrade react-router-dom from 6.23.0 to 6.23.1.

See this package in npm:
react-router-dom

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-06-04 17:45:49 +00:00
Simon Larsen
ae2a70eb64 Merge pull request #1455 from OneUptime/snyk-upgrade-454393c152713d89bbfd42d5ff28384a
[Snyk] Upgrade react-router-dom from 6.23.0 to 6.23.1
2024-06-04 12:00:54 +01:00
snyk-bot
e56e6a7f8d fix: upgrade react-router-dom from 6.23.0 to 6.23.1
Snyk has created this PR to upgrade react-router-dom from 6.23.0 to 6.23.1.

See this package in npm:
react-router-dom

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/11bb5528-45f9-473c-a635-dc097fd03b3c?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-06-04 05:13:42 +00:00
Simon Larsen
1141d47df7 Merge pull request #1452 from OneUptime/snyk-upgrade-b6c3fc62e0b59f937a4fb3dfd69a2be9
[Snyk] Upgrade react-router-dom from 6.23.0 to 6.23.1
2024-06-04 00:08:03 +01:00
Simon Larsen
9dea2c3bdd Merge pull request #1454 from OneUptime/snyk-upgrade-b79fc44de9934f0f4d9d7f32c5c1fb97
[Snyk] Upgrade @nivo/core from 0.86.0 to 0.87.0
2024-06-04 00:07:51 +01:00
Simon Larsen
9b465badda refactor: Update AnalyticsDatabaseService to handle group by count
This code change updates the AnalyticsDatabaseService to handle the count operation when a group by clause is used. Previously, the count operation would return the total number of rows, but now it correctly counts the number of groups. This improvement ensures accurate counting when grouping data in the analytics database.
2024-06-04 00:05:40 +01:00
Simon Larsen
073f84fe00 refactor: Update secrets.yaml to dynamically generate probe secrets
This code change updates the secrets.yaml file to dynamically generate probe secrets based on the values provided in the $.Values.probes object. If a probe secret already exists, it is used. Otherwise, a new random 32-character alphanumeric string is generated and encoded. This improvement ensures that probe secrets are properly managed and provides better security for sensitive information.
2024-06-03 23:46:04 +01:00
Simon Larsen
c6850f5a0b refactor: Add TableBillingAccessControl to MonitorSecret model
This code change adds the TableBillingAccessControl decorator to the MonitorSecret model in MonitorSecret.ts. The decorator sets the access control permissions for creating, reading, updating, and deleting MonitorSecret records to the Growth subscription plan. This improvement ensures that only users with the Growth plan can perform these actions on MonitorSecrets, providing better control over access to sensitive information.
2024-06-03 23:40:39 +01:00
Simon Larsen
636de9cd57 feat: Add banner with video link for MonitorSecrets page
The code change adds a banner component to the MonitorSecrets page. The banner displays a title, description, and a link to a video tutorial on how to use monitor secrets to store sensitive information. This enhancement provides users with a quick resource to learn about using monitor secrets effectively.
2024-06-03 20:26:39 +01:00
Simon Larsen
79ace6d183 erge branch 'release' 2024-06-03 13:37:43 +01:00
Simon Larsen
366b195152 refactor: Update environment variable setup in test-setup.sh
This code change updates the environment variable setup in the test-setup.sh script. The sed command is used to modify the config.env file, setting the NODE_ENV to 'test' and BILLING_ENABLED to 'true'. Additionally, the DATABASE_HOST is set to 'localhost', DATABASE_PORT to '5400', REDIS_HOST to 'localhost', REDIS_PORT to '6379', REDIS_DB to '0', and REDIS_USERNAME to 'default'. This improvement ensures that the test environment is properly configured with the correct values for testing.
2024-06-03 13:37:23 +01:00
Simon Larsen
bc687bdcdd add tag name 2024-06-03 13:27:08 +01:00
Simon Larsen
bc205a8686 fix infra release 2024-06-03 13:09:48 +01:00
Simon Larsen
e095715a52 feat: Add banner with video link for APIKeyView and TeamView
This code change adds a banner component to the APIKeyView and TeamView pages. The banner displays a title, description, and a link to a 5-minute video tutorial about permissions in OneUptime. This enhancement provides users with a quick resource to learn about permissions and how they work in the application.
2024-06-03 12:28:39 +01:00
Simon Larsen
e634ae0c1e refactor: Update ReadPermission to use object syntax for access control column assignment 2024-06-03 12:09:19 +01:00
Simon Larsen
ee080271e5 refactor: Update ReadPermission to use object syntax for access control column assignment 2024-06-03 11:43:49 +01:00
Simon Larsen
f07346a719 refactor: Improve checkReadBlockPermission method in ReadPermission 2024-06-03 11:30:11 +01:00
Simon Larsen
ace95bf75a refactor: Add checkReadBlockPermission method to ReadPermission
This code change adds the checkReadBlockPermission method to the ReadPermission class in ReadPermission.ts. The method is responsible for checking the block permissions for reading records. It allows the query to run if the system is making the query or if the user has root or master admin privileges. This enhancement provides better control over the reading of records and improves the security of the application.
2024-06-03 11:24:28 +01:00
Simon Larsen
4c53dc15e3 refactor: Add block permission checks to CreatePermission and DeletePermission
This code change adds block permission checks to the CreatePermission and DeletePermission classes. The checkCreateBlockPermissions method is added to the CreatePermission class to check block permissions for creating a new record. Similarly, the checkDeleteBlockPermissions method is added to the DeletePermission class to check block permissions for deleting a record. These enhancements provide better control over the creation and deletion of records and improve the security of the application.
2024-06-03 10:47:36 +01:00
Simon Larsen
ac286e0903 refactor: Add checkCreateBlockPermissions method to CreatePermission
This code change adds the checkCreateBlockPermissions method to the CreatePermission class in CreatePermission.ts. The method is responsible for checking the block permissions for creating a new record. It allows the query to run if the system is making the query or if the user has root or master admin privileges. This enhancement provides better control over the creation of records and improves the security of the application.
2024-06-03 10:16:34 +01:00
Simon Larsen
6595202093 refactor: Add isBlockPermission property to UserPermission and TeamPermission
This code change adds the isBlockPermission property to the UserPermission and TeamPermission interfaces and models. The isBlockPermission property allows for blocking specific permissions for users and teams. This enhancement provides greater control and flexibility in managing permissions within the application.
2024-06-03 09:48:02 +01:00
Simon Larsen
1ff5150765 ```text
refactor: Add user2 to TeamMemberService test for improved coverage

The TeamMemberService test in TeamMemberService.test.ts has been updated to include the addition of user2. This change improves the test coverage by testing the behavior with multiple users.
2024-06-03 09:26:17 +01:00
snyk-bot
13be411fc0 fix: upgrade @nivo/core from 0.86.0 to 0.87.0
Snyk has created this PR to upgrade @nivo/core from 0.86.0 to 0.87.0.

See this package in npm:
@nivo/core

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-06-03 04:20:36 +00:00
Simon Larsen
9d596c00da refactor: Update BaseAPI test to use updateOneById instead of updateOneBy
The BaseAPI test in BaseAPI.test.ts has been updated to use the updateOneById method instead of the updateOneBy method. This change ensures consistency in method naming and improves code readability.
2024-06-02 23:10:03 +01:00
Simon Larsen
6a285df796 refactor: Simplify generatePhone method in Faker.ts
The `generatePhone` method in `Faker.ts` has been simplified to remove unnecessary character replacements and instead directly generate a random 10-digit phone number. This change improves the efficiency and readability of the code.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-02 22:54:59 +01:00
Simon Larsen
a053cc53eb refactor: Remove unnecessary characters from generated phone numbers in Faker.ts 2024-06-02 22:48:25 +01:00
Simon Larsen
14647f6bd5 refactor: Update BaseAPI test to use updateOneById instead of updateOneBy
The BaseAPI test in BaseAPI.test.ts has been updated to use the updateOneById method instead of the updateOneBy method. This change ensures consistency in method naming and improves code readability.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-02 22:19:36 +01:00
Simon Larsen
bc1d629576 refactor: Add notInBetween method to QueryHelper for querying records not in a specified range
The `notInBetween` method has been added to the `QueryHelper` class in `Database/QueryHelper.ts`. This method allows for querying records that are not within a specified range of values. It accepts a start value and an end value, and generates a `NOT IN` clause for the query. This enhancement provides greater flexibility in constructing complex queries and improves the overall query capabilities of the application.
2024-06-02 21:58:05 +01:00
Simon Larsen
c19b4e7040 refactor: Add notIn method to QueryHelper for improved query flexibility
The `notIn` method has been added to the `QueryHelper` class in `Database/QueryHelper.ts`. This method allows for querying records that are not in a specified list of values. It accepts an array of strings or ObjectIDs and generates a `NOT IN` clause for the query. This enhancement provides greater flexibility in constructing complex queries and improves the overall query capabilities of the application.
2024-06-02 21:45:18 +01:00
Simon Larsen
fca2c74817 refactor: Improve generatePhone method in Faker.ts
The `generatePhone` method in `Faker.ts` has been updated to remove unnecessary characters from the generated phone number. This change improves the consistency and simplicity of generating phone numbers using the Faker library.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-02 21:38:26 +01:00
Simon Larsen
737c785e73 refactor: Update APIKeyView table descriptions for better clarity
The table descriptions in the APIKeyView component have been updated to provide clearer information about managing permissions for API keys. This change improves the user experience and ensures that the purpose of the table is easily understood.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-02 21:31:26 +01:00
Simon Larsen
25edb45e10 refactor: Add isBlockPermission property to UserPermission and TeamPermission
This code change adds the isBlockPermission property to the UserPermission and TeamPermission interfaces and models. The isBlockPermission property allows for blocking specific permissions for users and teams. This enhancement provides greater control and flexibility in managing permissions within the application.
2024-06-02 21:27:23 +01:00
Simon Larsen
17308692b0 refactor: Update generatePhone method in Faker.ts 2024-06-02 21:08:29 +01:00
Simon Larsen
6785e62edd refactor: Update generatePhone method in Faker.ts
The `generatePhone` method in `Faker.ts` has been updated to remove the country code parameter from the `faker.phone.number` function call. This change improves the consistency and simplicity of generating phone numbers using the Faker library.
2024-06-02 21:06:10 +01:00
Simon Larsen
a1c761f618 refactor: Add validation for required fields in ApiKeyPermissionService and TeamPermissionService
This code change adds validation for the required fields in the ApiKeyPermissionService and TeamPermissionService. It throws a BadDataException if any of the required fields (apiKeyId, projectId, permission) are missing when creating a permission. Additionally, it checks if the permission is already assigned to the API key or team and throws an error if it is. These enhancements improve data integrity and prevent invalid permissions from being created.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-02 20:52:32 +01:00
Simon Larsen
29686f8167 feat: Add isBlockPermission property to UserPermission, UserTenantAccessPermission, ApiKeyPermission, and TeamPermission
This code change adds the isBlockPermission property to the UserPermission, UserTenantAccessPermission, ApiKeyPermission, and TeamPermission interfaces and models. The isBlockPermission property allows for blocking specific permissions for users, tenants, API keys, and teams. This enhancement provides greater control and flexibility in managing permissions within the application.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-02 20:47:49 +01:00
Simon Larsen
235fd6722e refactor: Remove BlockedApiKeyPermissionService and BlockedTeamPermissionService
This code change removes the BlockedApiKeyPermissionService and BlockedTeamPermissionService files, as well as their corresponding models. These services and models are no longer needed and have been deleted to improve code organization and maintainability.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-02 20:42:18 +01:00
snyk-bot
7286825f82 fix: upgrade react-router-dom from 6.23.0 to 6.23.1
Snyk has created this PR to upgrade react-router-dom from 6.23.0 to 6.23.1.

See this package in npm:
react-router-dom

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/5dd2ef9c-1270-4729-aff4-e407805f7a9c?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-06-02 17:43:19 +00:00
Simon Larsen
e344c6d3d1 refactor: Add BlockedApiKeyPermission and BlockedTeamPermission services and models
This code change adds the BlockedApiKeyPermissionService and BlockedTeamPermissionService services, as well as the BlockedApiKeyPermission and BlockedTeamPermission models. These additions provide functionality for managing blocked permissions for API keys and teams. This enhancement improves the flexibility and security of the application.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-02 13:38:07 +01:00
Simon Larsen
2751beae1d refactor: Update TeamMemberService.test.ts for better readability and maintainability 2024-06-02 13:27:17 +01:00
Simon Larsen
f1919d3964 refactor: Update TeamMemberService.test.ts for better readability and maintainability
This code change updates the TeamMemberService.test.ts file to improve readability and maintainability. It refactors the code to remove duplicated lines and uses jest.spyOn to mock the AccessTokenService methods. These changes enhance the code quality and test coverage.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-02 13:02:31 +01:00
Simon Larsen
de261142e5 refactor: Improve clarity and maintainability in BaseAPI.test.ts
This code change improves the clarity and maintainability of the BaseAPI.test.ts file. It removes unnecessary code and updates the logic for deleting and updating items. These changes enhance the code quality and test coverage.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-02 12:35:48 +01:00
Simon Larsen
0bfc28fedc refactor: Rename deleteById method to deleteOneById in BaseAPI and DatabaseService
This code change renames the deleteById method to deleteOneById in the BaseAPI and DatabaseService classes. The new method name provides better clarity and consistency with other methods in the codebase. This change improves the readability and maintainability of the code.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-02 12:29:04 +01:00
Simon Larsen
a59e4cb76b refactor: Add deleteById and updateById methods to DatabaseService
This code change adds the deleteById and updateById methods to the DatabaseService class. These methods allow for more efficient deletion and updating of records in the database by directly targeting the record's ID. This enhancement improves the performance and flexibility of the DatabaseService.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-02 11:58:10 +01:00
Simon Larsen
ebb9c58758 Merge branch 'master' of github.com:OneUptime/oneuptime 2024-06-02 11:48:52 +01:00
Simon Larsen
ee2df1a132 refactor: Improve clarity and maintainability in AccessControlPermission.ts 2024-06-02 11:48:48 +01:00
Simon Larsen
b33dc0ff69 Merge pull request #1448 from OneUptime/snyk-upgrade-0032ed3b91a482732c24656615bdd970
[Snyk] Upgrade react-router-dom from 6.23.0 to 6.23.1
2024-06-02 11:48:33 +01:00
Simon Larsen
80c3bb9dda Merge pull request #1449 from OneUptime/snyk-upgrade-21c5f91e22e4be5a53b1778c80645f80
[Snyk] Upgrade posthog-js from 1.131.3 to 1.131.4
2024-06-02 11:48:24 +01:00
Simon Larsen
283fbda8ee refactor: Improve clarity and maintainability in AccessControlPermission.ts
This code change improves the clarity and maintainability of the AccessControlPermission.ts file. It removes unnecessary code and updates the logic for checking user permissions to delete or update objects in the table. These changes enhance the code quality and user experience.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-02 11:44:24 +01:00
Simon Larsen
a67c70396f refactor: Improve clarity and maintainability in TeamView and APIKeyView components
This code change improves the clarity and maintainability of the TeamView and APIKeyView components. The commit updates the rendering of the permission restrictions messages to have consistent line breaks and spacing. It also adds missing punctuation and capitalization for better readability. These changes enhance the user experience and code quality.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-02 11:33:21 +01:00
Simon Larsen
3aeb22a253 refactor: Update APIKeyView and TeamView titles for better clarity
This code change updates the titles of the APIKeyView and TeamView components to improve clarity. The titles "API Key Permissions" and "Team Permissions" are changed to "Allow Permissions" to better reflect their purpose. This change enhances the user understanding and usability of the components.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-02 11:20:12 +01:00
Simon Larsen
070031d703 refactor: Update DatabaseService.ts to set access control column with specific properties
This code change updates the DatabaseService.ts file to set the access control column with specific properties when retrieving data. Instead of setting it to a boolean value, the access control column is now set to an object with the properties _id and name set to true. This change enhances the flexibility and maintainability of the code.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-02 09:58:49 +01:00
Simon Larsen
a30104fe06 refactor: Remove unused code and improve type safety in AccessControlModel.ts, DatabaseService.ts, LabelService.ts, and ColumnPermission.ts 2024-06-02 09:36:33 +01:00
Simon Larsen
76677233df refactor: Update DatabaseService.ts and ColumnPermission.ts for improved type safety
This code change updates the DatabaseService.ts and ColumnPermission.ts files to improve type safety. In DatabaseService.ts, the type of the projectIdColumn variable is changed from keyof TBaseModel | null to string | null, ensuring compatibility with the getTenantColumn() method. In ColumnPermission.ts, the type of the permissionColumns variable is changed from Columns<TBaseModel> to Columns, removing unnecessary type specificity. These changes enhance the code's clarity and maintainability.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-02 09:34:03 +01:00
Simon Larsen
e1054c2572 refactor: Improve flexibility and maintainability in LabelService.ts and TableColumn.ts
This code change adds flexibility and maintainability improvements to the LabelService.ts and TableColumn.ts files. In LabelService.ts, a constructor is added to the Service class, allowing for the injection of a PostgresDatabase instance. In TableColumn.ts, the propertyKey parameter in the getTableColumn function is changed from keyof T to string, providing more flexibility in handling property keys. These changes enhance the usability and maintainability of the code.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-02 09:32:06 +01:00
Simon Larsen
e3e684352f refactor: Override name property in Label class
This code change overrides the name property in the Label class to allow for more flexibility in handling scenarios where the name is not specified. By setting the name property to undefined, it improves the usability and maintainability of the code.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-01 22:44:18 +01:00
snyk-bot
f9472a1308 fix: upgrade posthog-js from 1.131.3 to 1.131.4
Snyk has created this PR to upgrade posthog-js from 1.131.3 to 1.131.4.

See this package in npm:
posthog-js

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/f6446ec8-d441-487e-b58f-38373430e213?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-06-01 21:36:34 +00:00
snyk-bot
2113022d11 fix: upgrade react-router-dom from 6.23.0 to 6.23.1
Snyk has created this PR to upgrade react-router-dom from 6.23.0 to 6.23.1.

See this package in npm:
react-router-dom

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/40b17bc5-1bd4-48b1-88f1-5b4dc1400e80?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-06-01 21:21:09 +00:00
Simon Larsen
f21cb43b5b refactor: Update DeleteOneBy.ts to allow undefined deletedByUser
This code change updates the DeleteOneBy.ts file to allow the `deletedByUser` property to be undefined. This change provides more flexibility in handling scenarios where the deletedByUser is not specified. It improves the usability and maintainability of the code.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-01 20:54:48 +01:00
Simon Larsen
5e7285fa66 refactor: Update ModelPermission.ts to use specific query permission methods
This code change updates the ModelPermission.ts file to use specific query permission methods for delete, update, and read operations. The checkDeleteQueryPermission, checkUpdateQueryPermissions, and checkReadQueryPermission methods provide more granular control and improve the clarity and maintainability of the code.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-01 19:40:30 +01:00
Simon Larsen
ff1195c837 refactor: Remove unnecessary code in DatabaseService.ts 2024-06-01 19:37:32 +01:00
Simon Larsen
2f5f147ab4 refactor: Remove debugger statements and improve code readability in DatabaseService.ts
This code change removes the debugger statements from the _deleteBy method in DatabaseService.ts and improves code readability by reformatting the code and removing unnecessary comments. The changes enhance the maintainability and clarity of the code.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-01 19:37:02 +01:00
Simon Larsen
f4005ee351 refactor: Update queries to use QueryHelper.inRelationArray for monitors
This code change updates the queries in DatabaseService.ts, IncidentService.ts, and ScheduledMaintenanceStateTimelineService.ts to use the QueryHelper.inRelationArray method instead of QueryHelper.anyRelationArray for the "monitors" property. This change provides a more accurate and efficient way to query for records related to specific monitors. It improves the accuracy and performance of the queries.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-01 19:33:53 +01:00
Simon Larsen
549e41119c refactor: Update createdAt queries to use QueryHelper.inBetween
This code change updates the createdAt queries in multiple files to use the QueryHelper.inBetween method instead of QueryHelper.anyBetween. The inBetween method provides a more accurate and efficient way to query for records within a specific date range. This change improves the accuracy and performance of the queries.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-01 19:32:12 +01:00
Simon Larsen
0f76e075ce refactor: Update QueryHelper to use FindOperator for any and in methods
This code change updates the QueryHelper class to use the FindOperator type for the any and in methods. This allows for more flexibility in querying by accepting an array of values or a single value. The change improves code readability and maintainability.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-01 19:31:20 +01:00
Simon Larsen
7212b93836 refactor: Simplify adding access control IDs to query in BasePermission.ts 2024-06-01 18:04:46 +01:00
Simon Larsen
aca335aa8f refactor: Update ModelPermission.ts to improve code readability and maintainability 2024-06-01 17:45:14 +01:00
Simon Larsen
1053f52b2b Merge branch 'release' 2024-06-01 17:28:50 +01:00
Simon Larsen
4ef8a8d0f9 refactor: Update Go version and use specific ref in release workflow
This code change updates the Go version used in the release workflow and modifies the "Checkout" step to use a specific ref instead of fetching the entire history. By specifying the ref, the workflow will only fetch the necessary code, reducing the time and resources required for the checkout process.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-01 17:27:18 +01:00
Simon Larsen
8d183ceee6 refactor: Update checkout step in release workflow
This code change updates the checkout step in the release workflow to use the `ref` parameter instead of `fetch-depth`. This ensures that the correct branch or tag is checked out during the workflow execution.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-01 17:26:52 +01:00
Simon Larsen
d2a58fbe97 refactor: Reorder imports in CreatePermission.ts and UpdatePermission.ts
This code change reorders the imports in the CreatePermission.ts and UpdatePermission.ts files to group related imports together and improve code readability. The imports are now organized in the following order:
1. External dependencies
2. Internal dependencies
3. Local dependencies

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-01 17:21:01 +01:00
Simon Larsen
9b115da0be Merge branch 'master' of github.com:OneUptime/oneuptime 2024-06-01 17:20:20 +01:00
Simon Larsen
e46133d678 refactor: Update ModelPermission.ts to improve code readability and maintainability 2024-06-01 17:20:14 +01:00
Simon Larsen
c9bf2e3bf1 Merge pull request #1445 from OneUptime/snyk-upgrade-af76d864ab171838e05700ac0e1500b0
[Snyk] Upgrade protobufjs from 7.2.6 to 7.3.0
2024-06-01 16:50:34 +01:00
Simon Larsen
2c16b5ab7d Merge pull request #1447 from OneUptime/snyk-fix-418ca58fe385c0a1a5ff7575c3cda99b
[Snyk] Security upgrade nginx from 1.25.5-alpine to 1.26.1-alpine
2024-06-01 16:50:26 +01:00
Simon Larsen
f7339723cd refactor: Update ModelPermission.ts to improve code readability and maintainability 2024-06-01 15:17:26 +01:00
Simon Larsen
c2e04e94e2 refactor: Update ModelPermission.ts to improve code readability and maintainability
This code change in ModelPermission.ts improves code readability and maintainability by removing unnecessary code, updating function parameters, and adding comments for clarity. The changes include:
- Removing unused function parameters in CheckReadPermissionType and checkReadPermission functions
- Updating the checkIfUserIsLoggedIn function call to include the type parameter
- Refactoring the checkModelLevelPermissions function to include the type parameter
- Adding a comment to clarify the purpose of the checkBillingPermissions function

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-01 15:09:42 +01:00
Simon Larsen
bbb2f8d154 refactor: Remove unnecessary code in ModelPermission.ts
This code change removes unnecessary code in the ModelPermission.ts file. The empty lines and unused function parameters have been removed to improve code readability and maintainability.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-01 14:50:17 +01:00
Simon Larsen
4ab9e8b398 refactor: Update access control permissions in PermissionHelper
This code change updates the access control permissions in the PermissionHelper class. The "isAccessControlPermission" property for various permissions has been changed from "true" to "false". This ensures that the specified permissions no longer have access control restrictions.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-01 14:49:35 +01:00
Simon Larsen
d0e6153758 refactor: Import Stripe and mockStripe together in BillingService.test.ts
This code change updates the import statements in BillingService.test.ts to import both the Stripe and mockStripe modules from the same line. This improves code readability and ensures that both modules are imported consistently.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-06-01 14:36:16 +01:00
Simon Larsen
f308407f68 refactor: Update TeamPermissionService to include projectId in select props
This code change updates the TeamPermissionService to include the "projectId" property in the select props when querying for team members. This ensures that the "projectId" value is retrieved along with the "userId" value, allowing for easier access to the project ID in subsequent code logic.
2024-06-01 14:35:25 +01:00
Simon Larsen
93ba752e8c refactor: Update TeamPermissionService to include projectId in select props
This code change updates the TeamPermissionService to include the "projectId" property in the select props when querying for team members. This ensures that the "projectId" value is retrieved along with the "userId" value, allowing for easier access to the project ID in subsequent code logic.
2024-05-31 22:00:13 +01:00
Simon Larsen
230d345406 refactor: Remove unused "RemoveCanFromPermissions" import in DataMigrations/Index.ts 2024-05-31 21:54:37 +01:00
Simon Larsen
7e51da56f6 refactor: Update TeamPermissionService to include projectId in select props
This code change updates the TeamPermissionService to include the "projectId" property in the select props when querying for team members. This ensures that the "projectId" value is retrieved along with the "userId" value, allowing for easier access to the project ID in subsequent code logic.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-05-31 21:52:01 +01:00
Simon Larsen
cab9fd08fa refactor: Remove unused "RemoveCanFromPermissions" import in DataMigrations/Index.ts
This code change removes the unused import statement for "RemoveCanFromPermissions" in the "DataMigrations/Index.ts" file. The import is no longer needed and can be safely removed to improve code readability and maintainability.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-05-31 19:33:33 +01:00
Simon Larsen
461f69b11e refactor: Update permission names in NotificationAPI.ts, DataMigration.ts, BillingPaymentMethodAPI.ts, BillingInvoiceAPI.ts, and PromoCode.ts
This code change updates the permission names in multiple files to align with the latest naming conventions. The following changes were made:

- In NotificationAPI.ts, the permission name "CanManageProjectBilling" was changed to "ManageProjectBilling".
- In DataMigration.ts, the permission names "CanCreateProjectLabel" and "CanReadProjectLabel" were changed to "CreateProjectLabel" and "ReadProjectLabel" respectively.
- In BillingPaymentMethodAPI.ts, the permission name "CanCreateBillingPaymentMethod" was changed to "CreateBillingPaymentMethod".
- In BillingInvoiceAPI.ts, the permission name "CanEditInvoices" was changed to "EditInvoices".
- In PromoCode.ts, the permission names "CanCreateProjectLabel" and "CanReadProjectLabel" were changed to "CreateProjectLabel" and "ReadProjectLabel" respectively. Additionally, the permission names "CanReadProject" and "CanEditProject" were changed to "ReadProject" and "EditProject" respectively.

These updates ensure that the permission names are consistent and reflect the intended functionality.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-05-31 19:23:45 +01:00
Simon Larsen
ad7a5bddcb remove dup service 2024-05-31 19:01:29 +01:00
Simon Larsen
a64feacb5c refactor: Update TeamPermissionService to refresh access permissions for team members
This code change updates the TeamPermissionService to refresh access permissions for team members when they are deleted. Previously, only the user's global access permission was refreshed, but now both the global and tenant access permissions are refreshed. This ensures that the user's access permissions are up to date after a team member is deleted.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-05-31 17:55:39 +01:00
Simon Larsen
a27b51ea94 refactor: Update Prettier configuration to include @trivago/prettier-plugin-sort-imports
This code change updates the .prettierrc.json file to include the @trivago/prettier-plugin-sort-imports plugin. By adding this plugin, the codebase will automatically sort imports according to specified rules. This improves code organization and maintainability.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-05-31 17:44:51 +01:00
Simon Larsen
a0f7324c01 refactor: Simplify getTestDataSourceOptions in PostgresConfig.ts 2024-05-31 17:40:25 +01:00
Simon Larsen
c3b0302cbe revert haraka changes 2024-05-31 17:35:21 +01:00
snyk-bot
0c264bcd32 fix: Nginx/Dockerfile.tpl to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-ALPINE319-BUSYBOX-6913413
- https://snyk.io/vuln/SNYK-ALPINE319-BUSYBOX-6913413
- https://snyk.io/vuln/SNYK-ALPINE319-BUSYBOX-6928845
- https://snyk.io/vuln/SNYK-ALPINE319-BUSYBOX-6928846
- https://snyk.io/vuln/SNYK-ALPINE319-BUSYBOX-6928847
2024-05-31 15:49:59 +00:00
Simon Larsen
abc7a43d1b refactor: Simplify getTestDataSourceOptions in PostgresConfig.ts
This code change simplifies the `getTestDataSourceOptions` function in `PostgresConfig.ts` by using `process.env` values directly. By removing the conditional fallback to `'localhost'`, the function now relies solely on the environment variable `DATABASE_HOST` for the host value. This change ensures that the function always retrieves the latest values during test runs, as `process.env` can change dynamically.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-05-31 14:06:53 +01:00
Simon Larsen
05e9282d7f Update Haraka SMTP and TLS configurations to listen on port 25 instead of port 2525
This code change modifies the Haraka SMTP and TLS configurations to listen on port 25 instead of port 2525. The previous configuration used port 2525, but it has been changed to align with the standard SMTP port. This update ensures that the Haraka server can receive incoming emails on the correct port.
2024-05-31 13:35:35 +01:00
Simon Larsen
75d2a01a5a refactor: Use process.env values directly in getTestDataSourceOptions
This code change refactors the `getTestDataSourceOptions` function in `PostgresConfig.ts` to use `process.env` values directly. This change is made to ensure that the function always retrieves the latest values during test runs, as `process.env` can change dynamically. By removing the conditional fallback to `'localhost'`, the function relies solely on the environment variable `DATABASE_HOST` for the host value. This simplifies the code and improves consistency.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-05-31 13:27:46 +01:00
Simon Larsen
8d02eddfc6 Update PostgresConfig.ts and PostgresDatabase.ts to use a function for testDataSourceOptions 2024-05-31 13:27:02 +01:00
Simon Larsen
33d38611e2 chore: Update Stripe.mock.ts to allow null value for mockStripe
This code change updates the Stripe.mock.ts file to allow the mockStripe variable to have a null value. This change is necessary to properly handle scenarios where the Stripe library is not mocked. By allowing the variable to be null, it ensures that the code can handle both mocked and non-mocked scenarios without causing errors.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-05-31 13:03:59 +01:00
Simon Larsen
31335ee6b5 Update host_list configuration file path in Dockerfile 2024-05-31 13:01:11 +01:00
Simon Larsen
6eb228d0b8 chore: Add INCOMING_EMAIL_DOMAIN to host_list configuration
This code change adds the INCOMING_EMAIL_DOMAIN variable to the host_list configuration in the Haraka init.sh script. This ensures that incoming emails from the specified domain are accepted by the Haraka application. The INCOMING_EMAIL_DOMAIN value is appended to the host_list file, allowing the application to properly handle emails from this domain.
2024-05-31 12:59:23 +01:00
snyk-bot
0ef82aef01 fix: upgrade protobufjs from 7.2.6 to 7.3.0
Snyk has created this PR to upgrade protobufjs from 7.2.6 to 7.3.0.

See this package in npm:
protobufjs

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/89d21457-97ad-4d10-9b37-253f0b4cc388?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-31 04:55:47 +00:00
Simon Larsen
f644ac117f chore: Update Dockerfile to include loglevel configuration 2024-05-30 21:25:44 +01:00
Simon Larsen
08ddfb1017 chore: Update Dockerfile to include email_parser.js plugin and install dependencies
This code change updates the Dockerfile for the Haraka application. It adds the email_parser.js plugin to the /harakaapp/plugins directory and installs the necessary dependencies by copying the package.json and package-lock.json files to the /harakaapp directory and running npm install. This update ensures that the email parsing functionality is properly configured and all required dependencies are installed.
2024-05-30 21:07:05 +01:00
Simon Larsen
68724478da chore: Update HelmChart values.yaml to use ClusterIP for internalSmtp type
This code change updates the HelmChart values.yaml file to change the type of the internalSmtp service from LoadBalancer to ClusterIP. The LoadBalancer type was causing issues with receiving emails from the internet, so this change provides a workaround by using the ClusterIP type instead. This update ensures that the internalSmtp service can properly receive emails and improves the functionality of the application.
2024-05-30 20:34:14 +01:00
Simon Larsen
ca621bf41c feat: Add support for additional email ports
This code change adds support for additional email ports in the Haraka configuration. It exposes ports 110, 25, 587, 465, 143, 993, and 995 for POP3, SMTP, IMAP, and their secure variants. This enhancement allows for more flexible email communication options.
2024-05-30 20:30:44 +01:00
Simon Larsen
c470abf36c feat: Add host_list.ini configuration file and update email_parser.js plugin
The code changes include adding a new configuration file `host_list.ini` to the Haraka config directory. This file will be used to store a list of allowed hosts for incoming emails. Additionally, the `email_parser.js` plugin file has been moved to the correct directory in the Haraka config. This update ensures that the email parsing functionality is properly configured and the list of allowed hosts is maintained.
2024-05-30 20:12:07 +01:00
Simon Larsen
39bd722cf5 chore: Update Haraka config plugins
This code change updates the Haraka config plugins file to include additional plugins for blocking mails from known bad hosts, blocking mail from known bad HELOs, blocking mail from known bad email addresses, and accepting mail only from domains with resolvable MX records. It also removes the emailParser.js plugin file.

Note: This commit message follows the established convention of starting with a verb in the imperative form (e.g., "Update", "Add", "Fix") and providing a concise summary of the changes made.
2024-05-30 20:04:12 +01:00
Simon Larsen
3851827afb feat: Add mailparser npm dependency 2024-05-30 19:39:07 +01:00
Simon Larsen
cd5c333d97 Merge branch 'master' of github.com:OneUptime/oneuptime 2024-05-30 19:35:40 +01:00
Simon Larsen
fee16520df change default log level 2024-05-30 19:35:22 +01:00
Simon Larsen
025648482e Merge pull request #1443 from OneUptime/snyk-upgrade-e1f8734d934eff9fb30ddb40ca654522
[Snyk] Upgrade posthog-js from 1.130.2 to 1.131.3
2024-05-30 10:46:53 +01:00
Simon Larsen
89a3d3a6ac refactor: Update secrets.yaml to handle release upgrades
This code change updates the secrets.yaml file to handle release upgrades. It introduces a workaround to keep the secrets unchanged during upgrades by retrieving the existing secrets if the release is an upgrade. For new installations, it generates new secrets using the randAlphaNum function. This enhancement ensures that secrets are properly managed during upgrades and installations.
2024-05-30 10:43:25 +01:00
Simon Larsen
e4da9c5212 refactor: Improve password reset email functionality
This code change refactors the `Authentication.ts` file to improve the functionality of the password reset email. It updates the logic for generating the password reset URL and adds logging statements to track the user's email and the generated URL. This enhancement ensures a smoother password reset process and improves the visibility of user actions in the system.
2024-05-30 10:15:31 +01:00
Simon Larsen
1e61fec929 feat: Set current project in App component
This code change adds logic to set the current project in the `App` component. It checks if a `selectedProject` is available and if so, it calls the `ProjectUtil.setCurrentProject` function with the `selectedProject`. This enhancement ensures that the current project is correctly set and improves the functionality of the application.
2024-05-30 09:56:59 +01:00
Simon Larsen
6a76665c79 Merge branch 'master' of github.com:OneUptime/oneuptime 2024-05-30 09:55:13 +01:00
Simon Larsen
2d3d0449e5 feat: Add ProjectUtil.setCurrentProject to App component
This code change adds the import statement for `ProjectUtil` and calls the `setCurrentProject` function with the `selectedProject` in the `App` component. This enhancement ensures that the current project is set correctly and improves the functionality of the application.
2024-05-30 09:54:33 +01:00
snyk-bot
fee5132e7e fix: upgrade posthog-js from 1.130.2 to 1.131.3
Snyk has created this PR to upgrade posthog-js from 1.130.2 to 1.131.3.

See this package in npm:
posthog-js

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/f6446ec8-d441-487e-b58f-38373430e213?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-30 03:30:10 +00:00
Simon Larsen
2dbb91ba24 Merge pull request #1442 from OneUptime/release
refactor: Improve event item descriptions and labels
2024-05-29 17:47:50 +01:00
Simon Larsen
9a37c4b031 refactor: Improve event item descriptions and labels
This code change refactors the EventItem component to improve the display of event descriptions and labels. It updates the CSS classes for the event descriptions to enhance readability and adds CSS classes for the event labels to improve their styling. This enhancement improves the overall appearance and user experience of the EventItem component.
2024-05-29 16:52:53 +01:00
Simon Larsen
d3d64979e0 refactor: Add logging statements for status checks
The code change adds logging statements for the status checks in the StatusAPI file. The logging statements provide information about the status checks being performed, including the result of each check. This enhancement improves the visibility and monitoring of the status checks in the system.
2024-05-29 16:37:11 +01:00
Simon Larsen
c6efe40f3b refactor: Add logging statements for user sign up, email verification, password reset, and login
This code change adds logging statements for user sign up, email verification, password reset, and login in the Authentication.ts and SSO.ts files. The logging statements provide information about the corresponding user actions, including the user's email. This enhancement improves the visibility and monitoring of user activities in the system.
2024-05-29 15:45:48 +01:00
Simon Larsen
d0ace48aeb refactor: Add selectedProject prop to DashboardHeader component
This code change adds the selectedProject prop to the DashboardHeader component in the Header.tsx file. The prop is used to pass the currently selected project to the component, allowing it to display the selected project's information. This enhancement improves the functionality and user experience of the DashboardHeader component.
2024-05-29 15:27:37 +01:00
Simon Larsen
faf0641503 refactor: Update package.json and Encryption.ts to use latest version of crypto-js 2024-05-29 15:25:09 +01:00
Simon Larsen
4fcc066971 Merge remote-tracking branch 'origin/snyk-upgrade-9bde7b8ad7df926b5588a93ac9081118' 2024-05-29 13:59:08 +01:00
Simon Larsen
e37347a611 Merge branch 'master' of github.com:OneUptime/oneuptime 2024-05-29 13:58:24 +01:00
Simon Larsen
95dbeaddba refactor: Update DocsNav to include Monitor Secrets page
This code change updates the DocsNav file to include a new navigation item for the Monitor Secrets page. It adds a new object to the DocsNav array with the title "Monitor Secrets" and the URL "/docs/monitor/monitor-secrets". This enhancement improves the navigation experience for users accessing the Monitor Secrets documentation.
2024-05-29 13:56:38 +01:00
Simon Larsen
5a12e70742 refactor: Update Encryption.ts to use Utf8 encoding for decryption
This code change updates the Encryption.ts file to use the Utf8 encoding for decryption in the `decrypt` method. Previously, it was using the default encoding, which could lead to incorrect results for certain inputs. This update ensures the correct decoding of the encrypted text and improves the reliability of the decryption process.
2024-05-29 13:20:56 +01:00
Simon Larsen
ab0b7bb6ec refactor: Update MonitorSecrets page to display monitors with access to secrets 2024-05-29 12:47:21 +01:00
Simon Larsen
c9874df43f refactor: Add null checks in DatabaseService and Encryption
This code change adds null checks in the DatabaseService and Encryption classes to handle cases where the input data is null or undefined. It prevents potential errors and improves the robustness of the code.
2024-05-29 11:52:50 +01:00
Simon Larsen
594a44392d Merge pull request #1438 from OneUptime/snyk-upgrade-0f21f366f23af175b83fbe7a993653de
[Snyk] Upgrade posthog-js from 1.130.1 to 1.130.2
2024-05-29 11:41:24 +01:00
Simon Larsen
5b9232c785 ```text
refactor: Update package.json and Encryption.ts to use latest version of crypto-js

This code change updates the package.json and Encryption.ts files to use the latest version (4.2.0) of the crypto-js library. It adds the "@types/crypto-js" package as a dependency in the package.json file and updates the import statements in the Encryption.ts file to use the updated library. This update ensures compatibility with the latest features and improvements in crypto-js.
2024-05-29 11:41:05 +01:00
Simon Larsen
06b7f5c236 refactor: Update JSON.ts imports
This code change updates the imports in the JSON.ts file to remove unused imports and organize the imports alphabetically. It improves code readability and maintainability.
2024-05-28 21:33:44 +01:00
Simon Larsen
f20f833720 refactor: Update MonitorSecrets page to display monitors with access to secrets
This code change updates the MonitorSecrets page to display the monitors that have access to the secrets. It adds a new field in the form to select the monitors and renders the selected monitors using the MonitorsElement component. This enhancement improves the visibility and management of secret access for monitors.
2024-05-28 20:13:58 +01:00
Simon Larsen
91c37a2a9e refactor: Update MonitorSecretService to use MonitorSecret model 2024-05-28 20:10:15 +01:00
Simon Larsen
937879aa68 refactor: Update MonitorSecretService to use MonitorSecret model
This code change updates the MonitorSecretService to use the MonitorSecret model instead of the deprecated MonitorProbe model. This refactor ensures consistency and improves code maintainability.
2024-05-28 20:09:25 +01:00
Simon Larsen
df77fdac74 feat: Add Monitor Secrets functionality
This code change adds the necessary functionality for managing Monitor Secrets. It includes updates to the PageMap, SettingsBreadcrumbs, and RouteMap files to support the new "SETTINGS_MONITOR_SECRETS" page. Additionally, the "SETTINGS_MONITOR_SECRETS" route is added to the SettingsRoutePath dictionary. This enhancement improves the application's security and access control.
2024-05-28 20:01:51 +01:00
Simon Larsen
28917b3fcb Merge pull request #1440 from OneUptime/snyk-upgrade-24a45d8b5a59e57a4cd97e1bc201f713
[Snyk] Upgrade @types/lodash from 4.17.0 to 4.17.1
2024-05-28 19:57:25 +01:00
Simon Larsen
853715b17c refactor: Update .prettierrc.json with importOrderParserPlugins option
This code change updates the .prettierrc.json file by adding the "importOrderParserPlugins" option with the values ["typescript", "decorators"]. This enhancement allows the Prettier formatter to correctly parse and sort imports that include TypeScript and decorators. It improves the code formatting and organization.
2024-05-28 19:57:03 +01:00
Simon Larsen
5bdc381925 refactor: Add MonitorSecret permissions 2024-05-28 19:54:50 +01:00
Simon Larsen
c499df2812 ```text
refactor: Add @trivago/prettier-plugin-sort-imports to package.json and .prettierrc.json

This code change adds the "@trivago/prettier-plugin-sort-imports" package as a dependency in the package.json file and includes it in the "plugins" array in the .prettierrc.json file. It also sets the "importOrderSeparation" and "importOrderSortSpecifiers" options to true. This enhancement improves the code formatting and organization by automatically sorting imports.
2024-05-28 19:53:53 +01:00
Simon Larsen
5ef5dbf562 refactor: Add MonitorSecret permissions
This code change adds the necessary permissions for managing MonitorSecrets. The new permissions include CanCreateMonitorSecret, CanEditMonitorSecret, CanDeleteMonitorSecret, and CanReadMonitorSecret. These permissions allow users to create, edit, delete, and read MonitorSecrets respectively. This enhancement improves the access control and security of the application.
2024-05-28 19:46:59 +01:00
Simon Larsen
332aa47e63 refactor: Remove unnecessary checks for event.monitors in SendNotificationToSubscribers.ts 2024-05-28 17:07:23 +01:00
snyk-bot
cb1ddfe0df fix: upgrade @types/lodash from 4.17.0 to 4.17.1
Snyk has created this PR to upgrade @types/lodash from 4.17.0 to 4.17.1.

See this package in npm:
@types/lodash

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/c3622982-05c8-495c-809c-20f301c75f92?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-25 23:09:44 +00:00
Simon Larsen
d5bb29f9b4 Merge pull request #1439 from OneUptime/metrics-box
Metrics box
2024-05-24 13:23:59 +01:00
Simon Larsen
5f851b6936 refactor: Remove server monitor from SummaryView
This code change removes the rendering of the server monitor from the SummaryView component. The monitorType prop is checked, and if it is set to MonitorType.Server, the server monitor is not rendered. This change simplifies the SummaryView component and improves code organization.
2024-05-24 13:19:00 +01:00
Simon Larsen
5fa7c5baaa refactor: Remove Webkit browser support
The code changes in this commit remove support for the Webkit browser in the BrowserType enum and SyntheticMonitor module. The Webkit browser was commented out and not being used, so it was decided to remove it to simplify the codebase and reduce unnecessary dependencies. This refactor improves code organization and maintainability.
2024-05-24 13:14:02 +01:00
Simon Larsen
557c3f1427 refactor: Update title in CustomMonitorSummaryView and SyntheticMonitorItemView components
The code changes in this commit update the title in the CustomMonitorSummaryView and SyntheticMonitorItemView components. The title "Is Error" is changed to "Error" to provide clearer and more concise information to users. This enhancement improves the user experience and readability of the components.
2024-05-24 12:58:07 +01:00
Simon Larsen
a14614b7de refactor: Improve page load performance with lazy loading for images 2024-05-24 12:44:34 +01:00
Simon Larsen
cc1c968d3c refactor: Remove unused Metrics components
The code changes in this commit remove the unused Metrics components: ProbeNowButton.tsx, MetricsScreenshot.tsx, MetricsScreenshotGroup.tsx, PingMonitorView.tsx, and ProbePicker.tsx. These components are no longer needed and removing them improves code organization and maintainability.
2024-05-24 12:37:36 +01:00
Simon Larsen
1830f031e9 refactor: Update email verification confirmation message
The code changes in this commit update the confirmation message for email verification. Instead of just displaying the user's email, it now includes the text "Are you sure you want to verify the email -" before the email address. This change provides clearer context and improves the user experience.
2024-05-24 11:39:58 +01:00
Simon Larsen
5d8dd6ef3c refactor: Add email verification functionality to Users page
The code changes in this commit add email verification functionality to the Users page. This includes adding a "Verify Email" button to each user's row in the table. Clicking the button opens a confirmation modal asking if the user's email should be verified. Upon confirmation, the user's email is marked as verified in the database. This enhancement improves the user experience and provides better control over email verification.
2024-05-24 11:39:43 +01:00
Simon Larsen
d0b63b5c8b Refactor ProbeMonitorResponseService and Metrics component
The code changes refactor the ProbeMonitorResponseService and Metrics component. This includes removing redundant code in ProbeMonitorResponseService and simplifying the Metrics component by removing unnecessary props. These changes improve code organization and maintainability.
2024-05-23 20:31:16 +01:00
Simon Larsen
e94cc8083a refactor: Improve error messages in MetricsInfo and SSLCertificateMonitorView components 2024-05-23 18:58:43 +01:00
Simon Larsen
847f426bc6 refactor: Improve error messages in MetricsInfo and SSLCertificateMonitorView components
The code changes in this commit improve the error messages in the MetricsInfo and SSLCertificateMonitorView components. The updated error messages provide more helpful information to users, indicating that it may take a few minutes for metrics to show up for the selected probe. This enhancement improves the user experience and reduces confusion when metrics are not immediately available.
2024-05-23 18:49:30 +01:00
Simon Larsen
74bcadb2e7 refactor: Update MonitorView and Metrics components
The code changes in this commit update the MonitorView and Metrics components. Specifically, the changes introduce type annotations and improve the readability of the code by using more descriptive variable names. These updates enhance the maintainability and understanding of the codebase.
2024-05-23 18:16:24 +01:00
Simon Larsen
3e255e6dd1 refactor: Remove unused isHeadRequest property in MonitorUtil and ApiMonitor 2024-05-23 17:41:37 +01:00
snyk-bot
eb5cf5a3cb fix: upgrade posthog-js from 1.130.1 to 1.130.2
Snyk has created this PR to upgrade posthog-js from 1.130.1 to 1.130.2.

See this package in npm:
posthog-js

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/f6446ec8-d441-487e-b58f-38373430e213?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-23 12:51:38 +00:00
Simon Larsen
df7bd46428 Remove unused isHeadRequest property in MonitorUtil and ApiMonitor 2024-05-23 13:40:34 +01:00
Simon Larsen
e6dadd0673 refactor: Remove unused isHeadRequest property in MonitorUtil and ApiMonitor 2024-05-23 11:43:54 +01:00
Simon Larsen
ee8706e75b refactor: Remove unused isHeadRequest property in MonitorUtil and ApiMonitor
The code changes remove the unused `isHeadRequest` property in the `MonitorUtil` and `ApiMonitor` classes. This cleanup improves code readability and eliminates unnecessary code.
2024-05-23 10:22:09 +01:00
Simon Larsen
da70359945 feat: Add resourcesAffected field to maintenance event notification templates 2024-05-22 21:13:35 +01:00
Simon Larsen
3622021e57 refactor: Update screenshot handling in monitor scripts 2024-05-22 20:21:22 +01:00
Simon Larsen
5aeada377a feat: Add screenshot functionality to synthetic monitor script 2024-05-22 20:18:13 +01:00
Simon Larsen
d34a493724 feat: Add timeout configuration for monitor scripts
The commit updates the README.md file to include new configurable parameters for timeout values in the monitor scripts. This allows users to set specific timeout values for synthetic monitor scripts, custom code monitor scripts, and workflow scripts. The addition of these timeout configurations improves the flexibility and reliability of the monitoring system.
2024-05-22 20:08:35 +01:00
Simon Larsen
5f7dcf7433 refactor: Update timeout handling in monitor scripts
This commit updates the timeout handling in the monitor scripts to use the `WorkflowScriptTimeoutInMS` and `PROBE_CUSTOM_CODE_MONITOR_SCRIPT_TIMEOUT_IN_MS` values from the environment configuration. This ensures that the monitor scripts have consistent and configurable timeout values, improving the reliability and performance of the monitoring system.
2024-05-22 20:06:32 +01:00
Simon Larsen
39407795a2 refactor: Update logger.debug calls in AnalyticsDatabaseService tests 2024-05-22 14:10:22 +01:00
Simon Larsen
63dfb56da3 refactor: Update return value in StatusPageDomainService
The return value in the `getStatusPageDomain` method of the `StatusPageDomainService` class was updated to `true` to fix a bug where it was always returning `false`. This change ensures that the method returns the correct value based on the success or failure of the database query.
2024-05-22 13:35:18 +01:00
Simon Larsen
ed8714cc34 refactor: Update logger.debug calls in AnalyticsDatabaseService tests
The logger.debug calls in the AnalyticsDatabaseService tests were updated to improve logging consistency and accuracy.
2024-05-22 13:22:37 +01:00
Simon Larsen
dedda5b53b refactor: Add screenshot functionality to synthetic monitor script 2024-05-22 12:39:31 +01:00
Simon Larsen
df2af5858c Merge branch 'master' of github.com:OneUptime/oneuptime 2024-05-22 12:34:59 +01:00
Simon Larsen
e25d38ee74 refactor: Update axios dependency to version 1.6.8 2024-05-22 12:34:57 +01:00
Simon Larsen
2b0dd6687d Merge pull request #1435 from OneUptime/snyk-upgrade-8ff00708899512e4a35ebf204a59691e
[Snyk] Upgrade @nivo/core from 0.85.1 to 0.86.0
2024-05-22 12:30:14 +01:00
Simon Larsen
22f08a4c47 refactor: Add timeout information to monitor documentation 2024-05-22 12:26:16 +01:00
Simon Larsen
fda11d81c0 Merge branch 'master' of github.com:OneUptime/oneuptime 2024-05-22 12:17:27 +01:00
Simon Larsen
18e68b3505 refactor: Remove unnecessary hyphen in monitor documentation
This commit removes an unnecessary hyphen in the monitor documentation by correcting the spelling of "Synthetic Monitor" in both the custom-code-monitor.md and synthetic-monitor.md files. The typo was causing inconsistency in the naming of the monitor, and this fix ensures accuracy and clarity in the documentation.
2024-05-22 12:17:09 +01:00
Simon Larsen
a8a550809d refactor: Fix typo in monitor documentation
This commit fixes a typo in the monitor documentation by correcting the spelling of "Synthetic Monitor" in both the custom-code-monitor.md and synthetic-monitor.md files. The typo was causing inconsistency in the naming of the monitor, and this fix ensures accuracy and clarity in the documentation.
2024-05-22 12:16:42 +01:00
Simon Larsen
dbacf998ff refactor: Add new monitor links to DocsNav
This commit adds new monitor links to the DocsNav utility in the FeatureSet/Docs/Utils/Nav.ts file. The links include "Custom Code Monitor" and "Synthetic Monitor" with their respective URLs. This enhancement improves the navigation experience for users accessing the monitor documentation section.
2024-05-22 12:13:38 +01:00
Simon Larsen
0d41d97b8d refactor: Fix syntax error in MonitorStep and CriteriaFilterUtil 2024-05-22 11:59:33 +01:00
Simon Larsen
36ecf78c4c refactor: Update executionTimeInMS type to number in CustomCodeMonitorResponse
This commit updates the type of the executionTimeInMS property in the CustomCodeMonitorResponse interface from PositiveNumber to number. The PositiveNumber type was unnecessary and caused compatibility issues with other parts of the codebase. Changing it to number simplifies the code and ensures consistency across the application.
2024-05-22 11:57:57 +01:00
Simon Larsen
3eb0eb4289 refactor: Fix syntax error in MonitorStep and CriteriaFilterUtil
This commit fixes a syntax error in the MonitorStep and CriteriaFilterUtil files. In MonitorStep, the syntax error was caused by an extra semicolon (;) in the screenshotDataInBase64 assignment. In CriteriaFilterUtil, the return statement was incorrectly set to true instead of false. These changes ensure that the code is correct and functioning as intended.
2024-05-22 11:47:13 +01:00
Simon Larsen
01c214b51e refactor: Update CodeEditor placeholder for JavaScript type
This commit updates the CodeEditor component to improve the placeholder text for the JavaScript type. The placeholder now includes additional line breaks and indentation for better readability and code organization. This change enhances the user experience when working with JavaScript code in the CodeEditor.
2024-05-22 11:33:54 +01:00
snyk-bot
f756df1e5f fix: upgrade @nivo/core from 0.85.1 to 0.86.0
Snyk has created this PR to upgrade @nivo/core from 0.85.1 to 0.86.0.

See this package in npm:
@nivo/core

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-22 10:21:17 +00:00
Simon Larsen
e2a7f7efc5 refactor: Add support for ArrayOfText field type in Detail component
This commit adds support for the ArrayOfText field type in the Detail component. When the field type is ArrayOfText and there is data available, the data is joined with commas and displayed in the UI. This enhancement improves the user experience by properly rendering and handling the ArrayOfText field type in the Detail component.
2024-05-22 10:58:34 +01:00
Simon Larsen
3bf4137db2 refactor: Update Dockerfile to install necessary dependencies
This commit updates the Dockerfile to install necessary dependencies for the application. It adds the installation of bash, curl, python3, make, g++, and various libraries required for playwright. Additionally, it installs net-tools for network-related functionality. These changes ensure that the application has all the required dependencies to run properly in the Docker environment.
2024-05-22 10:24:06 +01:00
Simon Larsen
f592e852f2 refactor: Update logger.error statements for exiting node process 2024-05-22 10:09:16 +01:00
Simon Larsen
a5f05376b0 refactor: Update logger.debug statements for exiting node process
This commit updates the logger.debug statements in multiple files to log the message 'Exiting node process' instead of 'Exiting node process'. This change improves the logging consistency and ensures that the appropriate log level is used for this message.
2024-05-22 10:04:41 +01:00
Simon Larsen
89e08614f4 refactor: Update RunWorkflow to use VMAPI for replacing values in argumentContent
This commit refactors the RunWorkflow class to use the VMAPI module instead of the deprecated VMUtil module for replacing values in the argumentContent. The VMAPI module provides a more up-to-date and efficient method for replacing values, improving the performance and maintainability of the code.
2024-05-21 20:51:16 +01:00
Simon Larsen
631c22aa64 refactor: Update SyntheticMonitor to use async/await for CustomCodeMonitoringCriteria
This commit updates the SyntheticMonitor class to use async/await when calling the CustomCodeMonitoringCriteria.isMonitorInstanceCriteriaFilterMet() method. This change ensures that the method is properly awaited, allowing for better control flow and error handling. The use of async/await improves the readability and maintainability of the code.
2024-05-21 20:48:46 +01:00
Simon Larsen
0c4ad712b0 refactor: Update CriteriaFilterUtil to filter options based on checkOn value 2024-05-21 20:47:40 +01:00
Simon Larsen
0e4f54d048 refactor: Update CriteriaFilterUtil to filter options based on checkOn value 2024-05-21 20:39:42 +01:00
Simon Larsen
80ede00ced refactor: Update CriteriaFilterUtil to filter options based on checkOn value 2024-05-21 20:37:04 +01:00
Simon Larsen
40b9573324 refactor: Update CriteriaFilterUtil to filter options based on checkOn value
This commit refactors the CriteriaFilterUtil class to improve the filtering of options based on the checkOn value. It removes the unnecessary check for CheckOn.Error in the if statement and adds a new if statement specifically for CheckOn.Error. This change ensures that the options are filtered correctly for each checkOn value, enhancing the accuracy and effectiveness of the criteria filtering functionality.
2024-05-21 20:12:14 +01:00
Simon Larsen
e09f856c92 refactor: Update ProbeApiIngestResponse and APIRequestCriteria
This commit updates the `ProbeApiIngestResponse` interface to include a comment indicating that the `rootCause` property is in markdown format. Additionally, it modifies the `APIRequestCriteria` class to use the `convertToNumber` method from the `CompareCriteria` class instead of the deprecated `convertThresholdToNumber` method. These changes improve the clarity and maintainability of the code.
2024-05-21 19:42:38 +01:00
Simon Larsen
9db5aa56e6 refactor: Update MonitorMetricsByMinute to include browser type and screen size type
This commit modifies the MonitorMetricsByMinute class to include the browserType and screenSizeType properties in the MonitorMetricsMiscData interface. This allows for capturing additional information about the browser type and screen size during monitoring. The changes enhance the accuracy and completeness of the monitoring data.
2024-05-21 15:37:07 +01:00
Simon Larsen
f8c43136e9 refactor: Close browser and page in SyntheticMonitor
This commit refactors the SyntheticMonitor class to ensure that the browser and page are properly closed after use. The code now checks if the page and browser objects exist before attempting to close them, preventing potential memory leaks. This improvement enhances the reliability and efficiency of the SyntheticMonitor functionality.
2024-05-21 15:29:47 +01:00
Simon Larsen
3fb804c4e7 Update import paths for BrowserType and ScreenSizeType enums 2024-05-21 14:49:17 +01:00
Simon Larsen
dad1f1a464 feat: Add support for CustomCodeMonitor in MonitorUtil
This commit adds support for the CustomCodeMonitor type in the MonitorUtil class. It includes the necessary code to execute custom JavaScript code provided in the monitor step data. This enhancement improves the flexibility of the monitoring system by allowing users to define and execute their own custom code for monitoring purposes.
2024-05-21 14:43:03 +01:00
Simon Larsen
95e9eacc83 refactor: Update import paths for VMUtil in JavaScript and IfElse components 2024-05-21 14:42:13 +01:00
Simon Larsen
14b5da110f feat: Update BrowserType enum values
This commit updates the values of the BrowserType enum in the file `Common/Types/BrowserType.ts`. The `Chrome` value is changed to `Chromium`, and the `Safari` value is changed to `Webkit`. This change reflects more accurate and up-to-date browser names, improving the clarity and consistency of the code.
2024-05-21 14:38:15 +01:00
Simon Larsen
b66cd889c0 feat: Update import paths for VMUtil in JavaScript and IfElse components 2024-05-21 14:17:49 +01:00
Simon Larsen
d323c70a51 feat: Add support for SyntheticMonitorResponse in ProbeMonitorResponse
This commit adds the `syntheticMonitorResponse` property to the `ProbeMonitorResponse` interface in order to support the `SyntheticMonitorResponse` type. This allows for the inclusion of synthetic monitor data in the probe monitor response, providing more comprehensive monitoring information.
2024-05-21 13:29:11 +01:00
Simon Larsen
8962ecf42a Merge pull request #1431 from OneUptime/snyk-upgrade-ffa44874323f7156fd8e796f35bbdac2
[Snyk] Upgrade posthog-js from 1.130.0 to 1.130.1
2024-05-21 12:23:42 +01:00
Simon Larsen
31f92c3611 Merge pull request #1433 from OneUptime/snyk-upgrade-43877da1161195f77e3cab219ba9ecab
[Snyk] Upgrade @nivo/line from 0.85.1 to 0.86.0
2024-05-21 12:23:28 +01:00
Simon Larsen
6bed753de3 feat: Add playwright module to VMRunner for browser automation
This commit adds the playwright module to the VMRunner class in order to enable browser automation capabilities. By including playwright, we can now execute code that interacts with web browsers, allowing for more advanced testing and automation scenarios.
2024-05-21 12:08:50 +01:00
Simon Larsen
4017e7ce0e feat: Update import paths for VMUtil in JavaScript and IfElse components
This commit updates the import paths for the VMUtil module in the JavaScript and IfElse components. The new import path is '../../../Utils/VM/VMAPI'. This change ensures that the correct module is imported and used in the components, improving the reliability and maintainability of the code.
2024-05-21 12:07:26 +01:00
Simon Larsen
ccaaaa1823 feat: Fix pagination bug in Pagination component
This commit fixes a bug in the Pagination component where the currentPageNumber was not being properly converted to a number before performing calculations. The bug caused incorrect navigation to the previous and next pages. The issue is resolved by adding a check to convert the currentPageNumber to a number if it is a string.
2024-05-21 12:04:32 +01:00
Simon Larsen
7d7fa2b8f1 feat: Remove unnecessary error message in MonitorStepsElement component 2024-05-21 11:50:47 +01:00
Simon Larsen
2ca57ac8bf feat: Add support for SyntheticMonitor and CustomJavaScriptCode in MonitorTypeHelper
The code changes in `MonitorType.ts` and `MonitorService.ts` add support for the `SyntheticMonitor` and `CustomJavaScriptCode` monitor types in the `MonitorTypeHelper` class. This allows for easier identification of probeable monitor types and improves the flexibility of the monitoring system.
2024-05-21 11:22:26 +01:00
Simon Larsen
a75f655f72 feat: Update code editor placeholders for MonitorStep
This commit updates the code editor placeholders in the MonitorStep component to provide example code using axios and playwright modules. This allows users to easily understand and customize the code for their specific monitoring needs.
2024-05-21 11:13:29 +01:00
Simon Larsen
6ca38a1adb feat: Update MonitorStep to remove unnecessary documentation line 2024-05-21 10:57:41 +01:00
Simon Larsen
46a095569d feat: Update code editor placeholders for CustomJavaScriptCode and SyntheticMonitor
This commit updates the code editor placeholders in the MonitorStep component for the CustomJavaScriptCode and SyntheticMonitor types. The placeholders now provide example code using axios and playwright modules, allowing users to easily understand and customize the code for their specific monitoring needs.
2024-05-21 10:55:29 +01:00
Simon Larsen
cec38190fd feat: Update fetchDropdownOptions to accept item parameter
This commit modifies the `fetchDropdownOptions` function in the `Field` interface to accept an additional `item` parameter of type `FormValues<TEntity>`. This change allows for more dynamic fetching of dropdown options based on the current form values, improving the flexibility and customization of the form fields.
2024-05-21 10:44:49 +01:00
Simon Larsen
ca746d1436 feat: Update CategoryCheckboxType to make categoryId optional
This commit updates the `CategoryCheckboxType` interface to make the `categoryId` property optional. This change allows for more flexibility when working with category checkboxes, as the `categoryId` is not always required.
2024-05-21 10:20:46 +01:00
snyk-bot
2f6133bba0 fix: upgrade @nivo/line from 0.85.1 to 0.86.0
Snyk has created this PR to upgrade @nivo/line from 0.85.1 to 0.86.0.

See this package in npm:
@nivo/line

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-21 08:38:52 +00:00
snyk-bot
d1f62d3c66 fix: upgrade @nivo/core from 0.85.1 to 0.86.0
Snyk has created this PR to upgrade @nivo/core from 0.85.1 to 0.86.0.

See this package in npm:
@nivo/core

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-21 08:38:48 +00:00
snyk-bot
db2c6b0ea5 fix: upgrade posthog-js from 1.130.0 to 1.130.1
Snyk has created this PR to upgrade posthog-js from 1.130.0 to 1.130.1.

See this package in npm:
posthog-js

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/f6446ec8-d441-487e-b58f-38373430e213?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-21 08:22:26 +00:00
Simon Larsen
a2033b94dd feat: Add checkbox lists for browser type and screen type in SyntheticMonitor
This commit adds checkbox lists for selecting the browser type and screen type in the SyntheticMonitor step of the MonitorStep component. This allows users to choose the desired browser and screen type for running the test in SyntheticMonitor.
2024-05-20 21:37:27 +01:00
Simon Larsen
d23c62d30a feat: Update CheckOn enum value to 'ResultValue'
This commit updates the CheckOn enum value in the CriteriaFilter module from 'Result' to 'ResultValue'. This change provides a more descriptive and accurate representation of the value being checked in custom code or JavaScript monitors.
2024-05-20 21:26:28 +01:00
Simon Larsen
6ca5b9572e feat: Add setCustomCode method to MonitorStep class
The code changes include adding a new method, `setCustomCode`, to the `MonitorStep` class. This method allows for setting custom code for a monitor step, enabling the execution of custom JavaScript code in certain types of monitors.
2024-05-20 21:08:51 +01:00
Simon Larsen
f5f62d905b feat: Add custom code support for monitor steps
The code changes include adding support for custom code in monitor steps. This allows for the execution of custom code or JavaScript in certain types of monitors.
2024-05-20 21:03:08 +01:00
Simon Larsen
876de677cd refactor: Update MonitorType descriptions for clarity and consistency 2024-05-20 20:18:23 +01:00
Simon Larsen
19cb221f33 feat: Add isEditable prop to StatusPageDelete component 2024-05-20 19:19:54 +01:00
Simon Larsen
f0f774ecdb Merge branch 'master' of github.com:OneUptime/oneuptime 2024-05-20 15:20:08 +01:00
Simon Larsen
e333c2d43b Merge remote-tracking branch 'origin/snyk-upgrade-74c46bacccd4fb74e83b0646ec8750cb' 2024-05-20 15:20:05 +01:00
Simon Larsen
4cdb832b34 Merge remote-tracking branch 'origin/snyk-upgrade-462450f669807b7eb04e4c4d125fbf2b' into release 2024-05-20 15:17:36 +01:00
Simon Larsen
367715c077 Merge pull request #1428 from OneUptime/snyk-upgrade-3b57e17a87dddbfededa11f5d0e72927
[Snyk] Upgrade: react, react-dom
2024-05-19 09:01:40 +01:00
Simon Larsen
945eb3d11b Merge pull request #1429 from OneUptime/snyk-upgrade-69be6d2a85331ea8cb47b3e28bcc2efe
[Snyk] Upgrade: react, react-dom
2024-05-19 09:01:35 +01:00
snyk-bot
b4c4273485 fix: upgrade multiple dependencies with Snyk
Snyk has created this PR to upgrade:
  - react from 18.3.0 to 18.3.1.
    See this package in npm: https://www.npmjs.com/package/react
  - react-dom from 18.3.0 to 18.3.1.
    See this package in npm: https://www.npmjs.com/package/react-dom

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/11bb5528-45f9-473c-a635-dc097fd03b3c?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-19 06:44:45 +00:00
snyk-bot
1c319bb432 fix: upgrade multiple dependencies with Snyk
Snyk has created this PR to upgrade:
  - react from 18.2.0 to 18.3.1.
    See this package in npm: https://www.npmjs.com/package/react
  - react-dom from 18.2.0 to 18.3.1.
    See this package in npm: https://www.npmjs.com/package/react-dom

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/8ca4ee75-8bc5-43a1-a3bc-244ceebf1437?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-19 06:42:42 +00:00
Simon Larsen
6fc8bc3628 Merge branch 'master' of github.com:OneUptime/oneuptime 2024-05-18 20:33:28 +01:00
Simon Larsen
33e9c8fbe7 refactor: Optimize bulk item deselection logic in Table component 2024-05-18 20:33:11 +01:00
Simon Larsen
6f4da22874 refactor: Update ProgressBar component to support different sizes 2024-05-18 19:53:04 +01:00
Simon Larsen
772341a15c refactor: Update Table and FilterViewer components
This code change updates the Table and FilterViewer components to improve their functionality and user experience.

In the Table component, the onActionEnd callback is modified to reset the state of isAllItemsSelected, setBulkSelectedItems, and then call the props.onBulkActionEnd function. This change ensures that the bulk action end event is handled correctly.

In the FilterViewer component, the styling of the filter criteria section is updated to improve readability. The font size and spacing are adjusted to provide a better visual presentation of the filter criteria.

These refactorings enhance the overall performance and usability of the components.
2024-05-18 19:41:05 +01:00
Simon Larsen
387fdd7b15 Merge pull request #1426 from OneUptime/snyk-upgrade-424acac7465574c09845de51ffbb9e27
[Snyk] Upgrade posthog-js from 1.129.0 to 1.130.0
2024-05-18 19:18:05 +01:00
Simon Larsen
16bad74c4d Merge pull request #1427 from OneUptime/snyk-upgrade-977cadc46113d94d06a8445c04bd36a6
[Snyk] Upgrade: react, react-dom
2024-05-18 19:18:00 +01:00
Simon Larsen
054242df60 refactor: Optimize bulk item deselection in Table component 2024-05-18 19:13:38 +01:00
snyk-bot
3d4aecb896 fix: upgrade multiple dependencies with Snyk
Snyk has created this PR to upgrade:
  - react from 18.3.0 to 18.3.1.
    See this package in npm: https://www.npmjs.com/package/react
  - react-dom from 18.3.0 to 18.3.1.
    See this package in npm: https://www.npmjs.com/package/react-dom

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-18 17:51:55 +00:00
snyk-bot
26c8712fce fix: upgrade posthog-js from 1.129.0 to 1.130.0
Snyk has created this PR to upgrade posthog-js from 1.129.0 to 1.130.0.

See this package in npm:
posthog-js

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/f6446ec8-d441-487e-b58f-38373430e213?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-18 17:41:08 +00:00
Simon Larsen
ab090ab016 refactor: Optimize bulk item deselection in Table component
This code change optimizes the bulk item deselection functionality in the Table component. Instead of using the `filter` method to remove the deselected item from the `bulkSelectedItems` array, it now uses the `findIndex` method to locate the index of the item and then removes it using the `splice` method. This approach improves the performance of bulk item deselection, especially when dealing with large datasets.
2024-05-18 16:34:00 +01:00
Simon Larsen
4653711b58 refactor: Improve error handling in BulkUpdateForm
This code change improves the error handling in the BulkUpdateForm component. The error handling logic is updated to display a more informative error message when a bulk update action fails. This refactor enhances the user experience by providing clearer feedback on failed bulk actions.
2024-05-18 16:28:52 +01:00
Simon Larsen
9aa1876e70 refactor: Update SimpleLogViewer component to be used in BulkUpdateForm
This code change updates the SimpleLogViewer component to be used in the BulkUpdateForm. The component is imported and rendered in the BulkUpdateForm to display logs in a consistent and reusable way. This refactor improves code reusability and reduces duplication by leveraging an existing component for log viewing.
2024-05-18 16:25:14 +01:00
Simon Larsen
40d9aff56a refactor: Update SimpleLogViewer component to use in CallLog, Probes, Workflow, and StatusTimeline pages
This code change updates the SimpleLogViewer component to be used in the CallLog, Probes, Workflow, and StatusTimeline pages. The component is imported and rendered in these pages to display logs in a consistent and reusable way. This refactor improves code reusability and reduces duplication across multiple pages.
2024-05-18 16:20:11 +01:00
Simon Larsen
3c88a1b879 refactor: Update ProgressBar component to support different sizes
This code change updates the ProgressBar component to support different sizes. A new enum `ProgressBarSize` is introduced to define the available sizes: Small, Medium, and Large. The `size` prop is added to the `ComponentProps` interface, allowing the user to specify the desired size of the progress bar. This enhancement provides more flexibility in customizing the appearance of the progress bar based on the UI requirements.
2024-05-18 16:07:32 +01:00
Simon Larsen
149baf17ef refactor: Optimize bulk item deselection in Table component
This code change optimizes the bulk item deselection functionality in the Table component. Instead of using the `filter` method to remove the deselected item from the `bulkSelectedItems` array, it now uses the `findIndex` method to locate the index of the item and then removes it using the `splice` method. This approach improves the performance of bulk item deselection, especially when dealing with large datasets.
2024-05-18 15:57:38 +01:00
Simon Larsen
424cfa2094 refactor: Fix bulk action end event handling in Table component 2024-05-18 15:49:32 +01:00
Simon Larsen
d114c52d6f refactor: Optimize bulk item deselection in Table component 2024-05-18 14:55:30 +01:00
Simon Larsen
213e2111a5 refactor: Optimize bulk item deselection in Table component
This code change optimizes the bulk item deselection functionality in the Table component. Instead of using the `filter` method to remove the deselected item from the `bulkSelectedItems` array, it now uses the `findIndex` method to locate the index of the item and then removes it using the `splice` method. This approach improves the performance of bulk item deselection, especially when dealing with large datasets.
2024-05-18 14:30:47 +01:00
Simon Larsen
31837ef1f5 feat: Add support for bulk actions in Table component 2024-05-18 14:29:22 +01:00
Simon Larsen
b906ff1dce Merge pull request #1423 from OneUptime/snyk-upgrade-853a678be23c5b34b8ae866769c5a56d
[Snyk] Upgrade: react, react-dom
2024-05-18 13:42:04 +01:00
Simon Larsen
cc4d6514cc Merge pull request #1422 from OneUptime/snyk-upgrade-f86bfe08d4514e02784875637d35f3da
[Snyk] Upgrade react-router-dom from 6.22.3 to 6.23.0
2024-05-18 13:41:34 +01:00
Simon Larsen
005256084e Merge pull request #1424 from OneUptime/snyk-upgrade-79a48669a7990a61a83374567c38f84c
[Snyk] Upgrade: react, react-dom
2024-05-18 13:41:28 +01:00
Simon Larsen
67b542d828 feat: Add bulk actions to Table component
The code changes in this commit add support for bulk actions in the Table component. The `BulkActionProps` interface is introduced to define the bulk action buttons, and the `BulkUpdateForm` component is rendered to display the bulk action buttons when provided. This enhancement allows users to perform actions on multiple items in the table simultaneously, improving the efficiency of managing data.
2024-05-17 21:40:10 +01:00
snyk-bot
c147c49465 fix: upgrade multiple dependencies with Snyk
Snyk has created this PR to upgrade:
  - react from 18.2.0 to 18.3.1.
    See this package in npm: https://www.npmjs.com/package/react
  - react-dom from 18.2.0 to 18.3.1.
    See this package in npm: https://www.npmjs.com/package/react-dom

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/5dd2ef9c-1270-4729-aff4-e407805f7a9c?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-17 18:05:45 +00:00
snyk-bot
9428d08def fix: upgrade multiple dependencies with Snyk
Snyk has created this PR to upgrade:
  - react from 18.2.0 to 18.3.1.
    See this package in npm: https://www.npmjs.com/package/react
  - react-dom from 18.2.0 to 18.3.1.
    See this package in npm: https://www.npmjs.com/package/react-dom

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/40b17bc5-1bd4-48b1-88f1-5b4dc1400e80?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-17 17:38:03 +00:00
snyk-bot
79f27550df fix: upgrade react-router-dom from 6.22.3 to 6.23.0
Snyk has created this PR to upgrade react-router-dom from 6.22.3 to 6.23.0.

See this package in npm:
https://www.npmjs.com/package/react-router-dom

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/8ca4ee75-8bc5-43a1-a3bc-244ceebf1437?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-17 17:08:53 +00:00
snyk-bot
21d62eab18 fix: upgrade multiple dependencies with Snyk
Snyk has created this PR to upgrade:
  - react from 18.2.0 to 18.3.1.
    See this package in npm: https://www.npmjs.com/package/react
  - react-dom from 18.2.0 to 18.3.1.
    See this package in npm: https://www.npmjs.com/package/react-dom

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/8ca4ee75-8bc5-43a1-a3bc-244ceebf1437?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-17 17:08:48 +00:00
Simon Larsen
f011559cd2 chore: Add disableSubmitButton prop to ConfirmModal 2024-05-17 18:05:29 +01:00
Simon Larsen
4bb5a29963 refactor: Update axios and posthog-js dependencies
This code change updates the axios and posthog-js dependencies to their latest versions. The axios dependency is updated from 1.6.7 to 1.6.8, and the posthog-js dependency is updated from 1.115.0 to 1.129.0. This update ensures that we have the latest bug fixes and improvements for these libraries, improving the overall stability and performance of our application.
2024-05-17 15:19:16 +01:00
Simon Larsen
e771172b79 refactor: Remove unused code in FilterViewer.tsx 2024-05-17 15:13:07 +01:00
Simon Larsen
9476327a6a Merge branch 'master' of github.com:OneUptime/oneuptime 2024-05-17 14:31:01 +01:00
Simon Larsen
7c14931bb9 refactor: Remove unused @types/markdown-it dependency 2024-05-17 14:30:39 +01:00
Simon Larsen
2ad245083d Merge pull request #1416 from OneUptime/snyk-upgrade-87afa35300d240576e9a2e10b5028185
[Snyk] Upgrade @opentelemetry/instrumentation-xml-http-request from 0.50.0 to 0.51.0
2024-05-17 14:03:54 +01:00
Simon Larsen
81da1546d9 Merge pull request #1419 from OneUptime/markdown-refactor
refactor: Update dependencies and scripts in package.json files
2024-05-17 14:00:41 +01:00
Simon Larsen
a48f472c52 refactor: Update Markdown import in UserNotificationRuleService.ts 2024-05-17 14:00:19 +01:00
Simon Larsen
2a9b3db168 Merge pull request #1418 from OneUptime/snyk-upgrade-4dfc247506d9048ad782d9cdb39ee861
[Snyk] Upgrade: react, react-dom
2024-05-17 13:40:42 +01:00
Simon Larsen
bbc95a3a1d Merge pull request #1417 from OneUptime/snyk-upgrade-2b094c75c37c28e17e318b9fecab3c1a
[Snyk] Upgrade formik from 2.4.5 to 2.4.6
2024-05-17 13:40:37 +01:00
Simon Larsen
0bbb35ff43 Merge pull request #1415 from OneUptime/snyk-upgrade-98c666ed907eebd3249d1581c5f9aca0
[Snyk] Upgrade: react, react-dom
2024-05-17 13:40:27 +01:00
Simon Larsen
7edd8f197a refactor: Remove unused code in Markdown.ts
This code change removes the unused code in the Markdown.ts file that was responsible for customizing the rendering of paragraphs, blockquotes, images, and headings. This code is no longer needed and can be safely removed, simplifying the codebase and improving maintainability.
2024-05-17 13:32:56 +01:00
Simon Larsen
1ad239a9fe Remove unused Tailwind CSS configuration code from the End.hbs template file. The removed code was setting the font family for the display and body elements. This code is no longer needed and can be safely removed. 2024-05-17 13:26:46 +01:00
Simon Larsen
eeae73b7a4 refactor: Update Markdown import in UserNotificationRuleService.ts
This code change updates the import statement for the Markdown module in the UserNotificationRuleService.ts file. It now imports the Markdown module along with the MarkdownContentType enum from the Types/Markdown file. This update ensures that the MarkdownContentType.Email is used when converting the incident description to HTML. This change improves the handling of Markdown content in the UserNotificationRuleService.
2024-05-17 13:24:51 +01:00
Simon Larsen
026997a679 refactor: Update dependencies and scripts in package.json files 2024-05-17 13:17:56 +01:00
Simon Larsen
aa83db3e48 refactor: Add deletedByUser and deletedByUserId columns to User model
This code change adds the `deletedByUser` and `deletedByUserId` columns to the `User` model. These columns are used to track the user who deleted the object and their corresponding user ID. This enhancement allows for better auditing and tracking of deleted objects in the system.
2024-05-17 12:08:05 +01:00
snyk-bot
5725c6a17a fix: upgrade multiple dependencies with Snyk
Snyk has created this PR to upgrade:
  - react from 18.2.0 to 18.3.0.
    See this package in npm: https://www.npmjs.com/package/react
  - react-dom from 18.2.0 to 18.3.0.
    See this package in npm: https://www.npmjs.com/package/react-dom

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/11bb5528-45f9-473c-a635-dc097fd03b3c?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-16 21:55:07 +00:00
snyk-bot
79171c93d9 fix: upgrade formik from 2.4.5 to 2.4.6
Snyk has created this PR to upgrade formik from 2.4.5 to 2.4.6.

See this package in npm:
https://www.npmjs.com/package/formik

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-16 21:39:13 +00:00
snyk-bot
5073a15bf1 fix: upgrade @opentelemetry/instrumentation-xml-http-request from 0.50.0 to 0.51.0
Snyk has created this PR to upgrade @opentelemetry/instrumentation-xml-http-request from 0.50.0 to 0.51.0.

See this package in npm:
https://www.npmjs.com/package/@opentelemetry/instrumentation-xml-http-request

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-16 21:39:09 +00:00
snyk-bot
9285e9b401 fix: upgrade multiple dependencies with Snyk
Snyk has created this PR to upgrade:
  - react from 18.2.0 to 18.3.0.
    See this package in npm: https://www.npmjs.com/package/react
  - react-dom from 18.2.0 to 18.3.0.
    See this package in npm: https://www.npmjs.com/package/react-dom

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-16 21:39:02 +00:00
Simon Larsen
b6adf3fb40 refactor: Improve JSON filter handling in StatementGenerator.ts 2024-05-16 17:46:43 +01:00
Simon Larsen
164e6062c9 refactor: Improve JSON filter handling in StatementGenerator.ts 2024-05-16 17:38:21 +01:00
Simon Larsen
1ebc8a9d91 feat: Add support for JSON filters in BaseModelTable
This commit adds support for JSON filters in the `BaseModelTable` component. It checks if a filter is of type `FieldType.JSON` and if the filter data is of type `Object`. If both conditions are met, the filter data is included in the query. This enhancement allows for more flexible filtering options when working with JSON data in the table.
2024-05-16 17:32:03 +01:00
Simon Larsen
3205453608 refactor: Update Dictionary component to handle different value types 2024-05-16 16:28:56 +01:00
Simon Larsen
be3d4b2ce0 refactor: Update Dictionary component to handle different value types
The code changes in the Dictionary component refactor the implementation to handle different value types, including strings, numbers, and booleans. This allows for more flexibility and accuracy when working with dictionary data in the component.
2024-05-16 16:20:59 +01:00
Simon Larsen
7c8aabe3e8 feat: Improve formatJson function in FilterViewer component
The code changes in the FilterViewer component improve the formatJson function by updating the styling and layout of the rendered JSON elements. This enhances the readability and visual presentation of the JSON data in the component.
2024-05-16 14:07:20 +01:00
Simon Larsen
b0c62ed827 Merge branch 'master' into attributes-filter 2024-05-16 13:32:07 +01:00
Simon Larsen
80a1827455 chore: Update ServerMonitorDocumentation script to use sudo for agent installation and configuration 2024-05-16 13:28:31 +01:00
Simon Larsen
bbb1b2e944 feat: Add equals icon to Dictionary component
The code changes add the `Equals` icon to the `Dictionary` component in the `CommonUI` module. This icon is used to visually represent the equality operator in the component.
2024-05-16 13:27:01 +01:00
Simon Larsen
f70878317a Merge branch 'master' into attributes-filter 2024-05-16 12:40:58 +01:00
Simon Larsen
f5184db0fa feat: Update UptimeUtil to sort monitor status timeline items by start date 2024-05-16 11:47:03 +01:00
Simon Larsen
19128a50d2 feat: Sort monitor status timeline items by start date in UptimeUtil.getMonitorEventsForId() 2024-05-16 11:45:35 +01:00
Simon Larsen
8fbb3774d1 Merge branch 'master' of github.com:OneUptime/oneuptime 2024-05-16 10:53:42 +01:00
Simon Larsen
441efb3d1a chore: Update ServerMonitorDocumentation script to use sudo for agent installation and configuration 2024-05-16 10:53:39 +01:00
Simon Larsen
180491fa57 Merge pull request #1410 from OneUptime/snyk-upgrade-15b470e61c0a4d4baa2eaa864ea3be83
[Snyk] Upgrade react-router-dom from 6.22.2 to 6.23.0
2024-05-16 09:36:07 +01:00
Simon Larsen
7269e93967 Merge pull request #1411 from OneUptime/snyk-upgrade-e4184b69842e3f221e7c756fa028c1da
[Snyk] Upgrade posthog-js from 1.128.3 to 1.129.0
2024-05-16 09:36:02 +01:00
Simon Larsen
a754ec094b Merge pull request #1412 from OneUptime/snyk-upgrade-306eaee1a74876bbe32ce542109f7a61
[Snyk] Upgrade @opentelemetry/exporter-trace-otlp-http from 0.50.0 to 0.51.0
2024-05-16 09:35:47 +01:00
Simon Larsen
d9e097eeb2 Merge pull request #1414 from OneUptime/snyk-upgrade-1581bc45275ce8db68d7fda22e605ad3
[Snyk] Upgrade @opentelemetry/instrumentation-fetch from 0.50.0 to 0.51.0
2024-05-16 09:35:40 +01:00
snyk-bot
53d7aab558 fix: upgrade @opentelemetry/instrumentation-fetch from 0.50.0 to 0.51.0
Snyk has created this PR to upgrade @opentelemetry/instrumentation-fetch from 0.50.0 to 0.51.0.

See this package in npm:
https://www.npmjs.com/package/@opentelemetry/instrumentation-fetch

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-15 21:28:18 +00:00
snyk-bot
dcf2584987 fix: upgrade @opentelemetry/instrumentation from 0.50.0 to 0.51.0
Snyk has created this PR to upgrade @opentelemetry/instrumentation from 0.50.0 to 0.51.0.

See this package in npm:
https://www.npmjs.com/package/@opentelemetry/instrumentation

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-15 21:28:14 +00:00
snyk-bot
d18310ec69 fix: upgrade @opentelemetry/exporter-trace-otlp-http from 0.50.0 to 0.51.0
Snyk has created this PR to upgrade @opentelemetry/exporter-trace-otlp-http from 0.50.0 to 0.51.0.

See this package in npm:
https://www.npmjs.com/package/@opentelemetry/exporter-trace-otlp-http

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-15 21:28:09 +00:00
snyk-bot
f61d603e21 fix: upgrade posthog-js from 1.128.3 to 1.129.0
Snyk has created this PR to upgrade posthog-js from 1.128.3 to 1.129.0.

See this package in npm:
https://www.npmjs.com/package/posthog-js

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/f6446ec8-d441-487e-b58f-38373430e213?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-15 21:14:16 +00:00
snyk-bot
52a44a8383 fix: upgrade react-router-dom from 6.22.2 to 6.23.0
Snyk has created this PR to upgrade react-router-dom from 6.22.2 to 6.23.0.

See this package in npm:
https://www.npmjs.com/package/react-router-dom

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/5dd2ef9c-1270-4729-aff4-e407805f7a9c?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-15 17:51:59 +00:00
Simon Larsen
be848d37a2 Update field descriptions in MonitorCriteriaInstance and MonitorSteps components to improve clarity and consistency. 2024-05-15 17:23:21 +01:00
Simon Larsen
df3a7e1a99 Merge pull request #1408 from OneUptime/snyk-upgrade-1bf0797993f09a9d25f81a37ef931556
[Snyk] Upgrade react-router-dom from 6.22.3 to 6.23.0
2024-05-15 16:46:41 +01:00
Simon Larsen
a6e9f7cd1e feat: Add startsAt and endsAt fields to MonitorView component 2024-05-15 10:59:10 +01:00
Simon Larsen
2e29a63f7b chore: Use explicit type annotation in UptimeUtil loop 2024-05-15 10:38:25 +01:00
Simon Larsen
c153c8c656 chore: Add YouTube tutorial link to README.md 2024-05-15 10:22:56 +01:00
Simon Larsen
61cbaaf4f0 chore: Fix missing end dates in MonitorStatusTimeline 2024-05-15 10:21:58 +01:00
Simon Larsen
70aae76ae3 Merge branch 'master' of github.com:OneUptime/oneuptime 2024-05-14 19:13:08 +01:00
Simon Larsen
972bc9c4cf chore: Update E2E test environment variables in config.example.env 2024-05-14 19:12:52 +01:00
snyk-bot
fb902170e2 fix: upgrade react-router-dom from 6.22.3 to 6.23.0
Snyk has created this PR to upgrade react-router-dom from 6.22.3 to 6.23.0.

See this package in npm:
https://www.npmjs.com/package/react-router-dom

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/40b17bc5-1bd4-48b1-88f1-5b4dc1400e80?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-14 17:21:26 +00:00
Simon Larsen
286429b58f Merge pull request #1404 from OneUptime/snyk-upgrade-9daf4730397a2c5fc08ea00edc4e2109
[Snyk] Upgrade posthog-js from 1.128.1 to 1.128.3
2024-05-14 18:09:32 +01:00
Simon Larsen
b799ce08a9 Merge pull request #1405 from OneUptime/snyk-upgrade-ad84e59eae164272636397edd988457f
[Snyk] Upgrade reactflow from 11.11.1 to 11.11.2
2024-05-14 18:09:25 +01:00
Simon Larsen
b30bb4c95e chore: Update infrastructure agent installation script and documentation 2024-05-14 17:55:15 +01:00
Simon Larsen
0e3eb81ae4 chore: Fix missing end dates in MonitorStatusTimeline 2024-05-14 17:01:57 +01:00
Simon Larsen
b997520977 Merge pull request #1407 from OneUptime/semaphore-monitor-status-timeline
chore: Add mutex lock and release for MonitorStatusTimeline creation
2024-05-14 16:55:50 +01:00
Simon Larsen
29675f2624 Update GoReleaser command in release workflow to include GORELEASER_CURRENT_TAG environment variable 2024-05-14 16:54:45 +01:00
Simon Larsen
fb83476795 chore: Add new data migration to include missing end dates in MonitorStatusTimeline 2024-05-14 16:43:42 +01:00
Simon Larsen
0420586a0e chore: Add mutex lock and release for MonitorStatusTimeline creation 2024-05-14 16:36:25 +01:00
Simon Larsen
900f76f8c8 chore: Update GoReleaser command in release workflow to include GORELEASER_CURRENT_TAG environment variable 2024-05-14 16:27:13 +01:00
Simon Larsen
082c5732c0 chore: Improve UptimeUtil logic for calculating end date 2024-05-14 16:11:46 +01:00
Simon Larsen
20c03c5fd9 chore: Update GoReleaser to version 1 and run release command for InfrastructureAgent 2024-05-14 15:59:52 +01:00
Simon Larsen
5adb8f0d38 chore: Update E2E test environment variables in config.example.env 2024-05-14 15:39:19 +01:00
Simon Larsen
a54037408e Update docker-compose.md with installation tutorial link 2024-05-14 15:37:14 +01:00
Simon Larsen
4c0cf60c42 chore: Update docker-compose.md with sudo command for binding ports 2024-05-14 15:19:16 +01:00
Simon Larsen
6aac72a226 chore: Update dependencies and job dependencies for infrastructure-agent-deploy 2024-05-14 12:56:43 +01:00
Simon Larsen
d1424840d8 chore: Update infrastructure-agent-deploy job dependency to github-release 2024-05-14 12:55:32 +01:00
Simon Larsen
0a90736338 chore: Configure OneUptime Infrastructure Agent as a system service
```
2024-05-14 12:23:15 +01:00
Simon Larsen
6c2144d77e chore: Update go version to 1.22.0 in go.mod file 2024-05-14 12:09:08 +01:00
Simon Larsen
e208b7cc78 Refactor .goreleaser.yaml to use string values for goarm instead of integers 2024-05-14 12:05:37 +01:00
Simon Larsen
69ff3dfe17 Refactor .goreleaser.yaml to use string values for goarm instead of integers 2024-05-14 11:55:48 +01:00
Simon Larsen
29d2abf226 Refactor .gitignore to include InfrastructureAgent/oneuptime-infrastructure-agent 2024-05-14 11:51:44 +01:00
Simon Larsen
1cf7cc4664 Refactor main.go to improve service control commands and error handling 2024-05-14 11:51:36 +01:00
Simon Larsen
d29991117a chore: Update actions/checkout and actions/setup-go versions 2024-05-14 11:46:13 +01:00
Simon Larsen
0bf8713b60 Refactor error handling in main.go for better clarity and instructions 2024-05-14 11:15:15 +01:00
Simon Larsen
dcc9d4fdf2 Refactor error messages in main.go for better clarity and instructions 2024-05-14 10:05:54 +01:00
Simon Larsen
db32292d33 chore: Update launch.json and config.go for InfrastructureAgent 2024-05-14 10:02:48 +01:00
snyk-bot
2b66c52907 fix: upgrade reactflow from 11.11.1 to 11.11.2
Snyk has created this PR to upgrade reactflow from 11.11.1 to 11.11.2.

See this package in npm:
https://www.npmjs.com/package/reactflow

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/8ca4ee75-8bc5-43a1-a3bc-244ceebf1437?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-13 21:23:21 +00:00
snyk-bot
d6b1edb8cb fix: upgrade posthog-js from 1.128.1 to 1.128.3
Snyk has created this PR to upgrade posthog-js from 1.128.1 to 1.128.3.

See this package in npm:
https://www.npmjs.com/package/posthog-js

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/f6446ec8-d441-487e-b58f-38373430e213?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-13 20:56:52 +00:00
Simon Larsen
c7f62fac65 Refactor InfrastructureAgent code to add help command 2024-05-13 21:22:49 +01:00
Simon Larsen
db0aee6c0f chore: Refactor code to use model package for memory, processes, disk, and CPU metrics 2024-05-13 21:12:45 +01:00
Simon Larsen
1f53ecb093 Refactor package names and imports in InfrastructureAgent code files 2024-05-13 20:37:27 +01:00
Simon Larsen
d0325f2d7d chore: Remove unused code files for memory, processes, disk, and CPU metrics 2024-05-13 20:28:21 +01:00
Simon Larsen
a1461a4019 chore: Refactor package imports in InfrastructureAgent code files 2024-05-13 17:49:53 +01:00
Simon Larsen
d3096510bd chore: Refactor package names in InfrastructureAgent code files 2024-05-13 17:15:42 +01:00
Simon Larsen
8dac1a845a chore: Refactor package names in InfrastructureAgent code files 2024-05-13 16:48:47 +01:00
Simon Larsen
da26400aa7 chore: Refactor package names in InfrastructureAgent code files 2024-05-13 14:00:48 +01:00
Simon Larsen
c909d02a5d chore: Refactor package names in InfrastructureAgent code files 2024-05-13 13:41:33 +01:00
Simon Larsen
58e817cecd chore: Update workflow to use Go instead of Node.js for InfrastructureAgent 2024-05-13 09:41:39 +01:00
Simon Larsen
f9a784422d Merge pull request #1399 from anxuanzi/infra-agent-go
Remove the nodejs version agent, rewrite in Golang
2024-05-13 08:28:37 +01:00
Simon Larsen
6494ab9a71 Merge pull request #1400 from neurekadev/update-docker-compose-docs
docs: export env variables in a subshell
2024-05-13 08:16:57 +01:00
Neureka
a3cf038d38 docs: export env variables in a subshell 2024-05-12 12:02:32 -07:00
Simon Larsen
99a88ea6d7 Merge pull request #1397 from OneUptime/snyk-fix-3892a7e111663caea5c508696d2964c1
[Snyk] Security upgrade node from 21.7.2-alpine3.18 to 21.7.3-alpine3.18
2024-05-11 21:09:44 +01:00
Simon Larsen
d46604da53 Merge pull request #1398 from OneUptime/snyk-fix-3b2b2fa56f80398bc77252e1d04e6fcc
[Snyk] Security upgrade node from 21.7.2-alpine3.18 to 21.7.3-alpine3.18
2024-05-11 21:09:34 +01:00
Tony An
4a05ee22be ♻️ remove the nodejs version agent, rewrite in Golang 2024-05-10 19:37:40 -05:00
snyk-bot
28e809c493 fix: Probe/Dockerfile.tpl to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-6593964
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-6593964
- https://snyk.io/vuln/SNYK-UPSTREAM-NODE-6615824
2024-05-10 23:23:48 +00:00
snyk-bot
610373525b fix: StatusPage/Dockerfile.tpl to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-6593964
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-6593964
- https://snyk.io/vuln/SNYK-UPSTREAM-NODE-6615824
2024-05-10 23:12:01 +00:00
Simon Larsen
e84d1c2960 Merge pull request #1396 from OneUptime/snyk-fix-45b3084604f2d5d8f141f074ac048cd5
[Snyk] Security upgrade node from 21.7.2-alpine3.18 to 21.7.3-alpine3.18
2024-05-10 23:26:19 +01:00
snyk-bot
17cb699751 fix: AdminDashboard/Dockerfile.tpl to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-6593964
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-6593964
- https://snyk.io/vuln/SNYK-UPSTREAM-NODE-6615824
2024-05-10 22:04:51 +00:00
Simon Larsen
c3bf383e89 refactor: Update Dictionary component dropdown options
This commit updates the dropdown options in the Dictionary component to use more descriptive variable names. The previous variable names, trueDropdwonOption and falseDropdwonOption, have been changed to trueDropdownOption and falseDropdownOption respectively. This change improves code readability and maintainability.
2024-05-10 11:29:45 +01:00
Simon Larsen
a3e5288737 feat: Add JSONFilter component to FiltersForm
This commit adds the JSONFilter component to the FiltersForm in order to support filtering based on JSON data. The JSONFilter component is imported and rendered within the FiltersForm component, allowing users to input JSON filter criteria. This enhancement expands the filtering capabilities of the application.
2024-05-10 11:20:24 +01:00
Simon Larsen
14cf0d9343 refactor: Update DictionaryOfStrings component
This commit refactors the DictionaryOfStrings component by removing unused imports and simplifying the code structure. The useState hook is now used to manage the component's data state, and the useEffect hook is used to handle changes in the data. The component now uses the DictionaryForm component for rendering and handling user input. These changes improve the readability and maintainability of the code.
2024-05-10 11:09:41 +01:00
Simon Larsen
4ed613bf2c refactor: Update filter labels and submit button text in FilterViewer.tsx 2024-05-10 10:29:06 +01:00
Simon Larsen
f07da41cca Merge remote-tracking branch 'origin/snyk-upgrade-b5d9f77f3c65feeabefe361b92d3d1c8' 2024-05-10 10:27:59 +01:00
Simon Larsen
fe2300146d Merge remote-tracking branch 'origin/snyk-upgrade-ac3f89b452385bc8a0a778616c176acd' 2024-05-10 10:27:07 +01:00
Simon Larsen
207108dc2d Merge remote-tracking branch 'origin/snyk-upgrade-660a96f185a31fad496e714aa07c52b5' 2024-05-10 10:26:23 +01:00
Simon Larsen
b728256c63 refactor: Update font size for filter label in FilterViewer.tsx 2024-05-10 10:23:14 +01:00
Simon Larsen
0e5b71070c refactor: Update filter labels and submit button text in FilterViewer.tsx
This commit updates the filter labels and submit button text in the FilterViewer component. The 'FILTER BY' label is changed to 'FILTER' and the labels are now capitalized. Additionally, the submit button text is changed to 'Apply Filters'. These changes improve the clarity and consistency of the user interface.
2024-05-10 09:55:32 +01:00
Simon Larsen
4c4bc92a14 chore: Update font weight for filter label in FilterViewer.tsx 2024-05-10 09:48:35 +01:00
Simon Larsen
40dccbb382 refactor: Simplify SQL query construction in AnalyticsDatabaseService.ts 2024-05-10 09:42:50 +01:00
Simon Larsen
eedb7173db chore: Update submit button text in FilterViewer.tsx 2024-05-10 08:31:55 +01:00
Simon Larsen
917d12d7f0 refactor: Update FilterViewerItem and DropdownFilter components
This commit refactors the FilterViewerItem and DropdownFilter components to handle changes in the ComponentProps interface. The 'text' prop in FilterViewerItem now accepts a string or ReactElement, and the 'onFilterModalClose' and 'onFilterModalOpen' props in DropdownFilter are now optional. These changes ensure compatibility with the latest version of the codebase and improve code readability and maintainability.
2024-05-10 08:19:10 +01:00
Simon Larsen
11a9cfcb98 Merge pull request #1381 from OneUptime/snyk-upgrade-497decbbac4afbc555f4ba887111dc9a
[Snyk] Upgrade posthog-js from 1.126.0 to 1.128.1
2024-05-10 07:31:54 +01:00
Simon Larsen
172c3dacbe Merge pull request #1382 from OneUptime/snyk-fix-6736c09b254d6ed19f0c345a7715e526
[Snyk] Security upgrade node from 21.7.2-alpine3.18 to 21.7.3-alpine3.18
2024-05-10 07:31:43 +01:00
Simon Larsen
a9381e09c1 Merge pull request #1385 from OneUptime/snyk-fix-6370d57d4cb33cebd301a9f8099f0700
[Snyk] Security upgrade node from 21.7.2-alpine3.18 to 21.7.3-alpine3.18
2024-05-10 07:31:38 +01:00
Simon Larsen
f0816f6fa5 Merge pull request #1383 from OneUptime/snyk-fix-1337460fdd963d53e523192123f3d100
[Snyk] Security upgrade node from 21.7.2-alpine3.18 to 21.7.3-alpine3.18
2024-05-10 07:31:08 +01:00
Simon Larsen
ad95971f46 Merge pull request #1384 from OneUptime/snyk-fix-36290d6a0a64cee8ddc0de0f03f981a7
[Snyk] Security upgrade node from 21.7.2-alpine3.18 to 21.7.3-alpine3.18
2024-05-10 07:31:04 +01:00
Simon Larsen
bb59a365b7 Merge pull request #1386 from OneUptime/snyk-fix-a7809d569ba1546656fa651f1bb77337
[Snyk] Security upgrade node from 21.7.2-alpine3.18 to 21.7.3-alpine3.18
2024-05-10 07:30:57 +01:00
Simon Larsen
503dcffa87 Merge pull request #1387 from OneUptime/snyk-fix-f6067898842e100de3b29fb82f59daf0
[Snyk] Security upgrade node from 21.7.2-alpine3.18 to 21.7.3-alpine3.18
2024-05-10 07:30:51 +01:00
Simon Larsen
42a91415da refactor: Update FilterUtil to handle FieldType.Boolean filters 2024-05-10 07:30:16 +01:00
snyk-bot
09c6160a15 fix: Ingestor/Dockerfile.tpl to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-6593964
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-6593964
2024-05-09 21:47:35 +00:00
snyk-bot
0638b797b3 fix: TestServer/Dockerfile.tpl to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-6593964
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-6593964
2024-05-09 21:46:36 +00:00
snyk-bot
c6020a8eb6 fix: Accounts/Dockerfile.tpl to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-6593964
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-6593964
2024-05-09 21:41:32 +00:00
snyk-bot
2023f37ab7 fix: Dashboard/Dockerfile.tpl to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-6593964
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-6593964
2024-05-09 21:25:59 +00:00
snyk-bot
65f024c3f6 fix: Tests/Dockerfile.tpl to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-6593964
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-6593964
2024-05-09 21:10:47 +00:00
snyk-bot
06936f0065 fix: Haraka/Dockerfile.tpl to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-6593964
- https://snyk.io/vuln/SNYK-ALPINE318-OPENSSL-6593964
2024-05-09 20:35:05 +00:00
Simon Larsen
41a2e2cdbe refactor: Update Dropdown and EntityFilter to handle multi-select values 2024-05-09 20:24:41 +01:00
Simon Larsen
96cfe4c1fd refactor: Update DropdownFilter and EntityFilter to use DropdownOption type for dropdown values 2024-05-09 20:16:19 +01:00
snyk-bot
0096860584 fix: upgrade posthog-js from 1.126.0 to 1.128.1
Snyk has created this PR to upgrade posthog-js from 1.126.0 to 1.128.1.

See this package in npm:
https://www.npmjs.com/package/posthog-js

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/f6446ec8-d441-487e-b58f-38373430e213?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-09 17:37:39 +00:00
Simon Larsen
da90c9b733 refactor: Update FilterViewer to use showFilterModal instead of showFilter prop 2024-05-09 17:09:25 +01:00
Simon Larsen
5cef1bacb7 refactor: Update FilterViewer to use showFilterModal instead of showFilter prop 2024-05-09 14:47:50 +01:00
Simon Larsen
9560883954 refactor: Update FilterData type to use Query object for improved database querying 2024-05-09 13:47:47 +01:00
Simon Larsen
f84a8d6d7a refactor: Include createdAt in SELECT query in StatementGenerator.test.ts 2024-05-09 12:50:46 +01:00
Simon Larsen
aea1ec24ef refactor: Update EntityFilter to handle FieldType.Entity and FieldType.EntityArray filters 2024-05-09 12:01:31 +01:00
Simon Larsen
7c250a25e3 refactor: Update StatementGenerator to include createdAt and updatedAt in SELECT query 2024-05-09 11:54:28 +01:00
Simon Larsen
e7799adc1c feat: Update StatementGenerator to include createdAt in SELECT query 2024-05-09 10:54:04 +01:00
Simon Larsen
2c949150ef refactor: Improve error handling and formatting in DatabaseService 2024-05-09 10:54:04 +01:00
Simon Larsen
983892d8b3 refactor: Update AnalyticsDatabaseService to support groupBy in queries 2024-05-09 10:54:04 +01:00
Simon Larsen
054234116b refactor: Update sort field in StatusPageAPI to use startsAt instead of createdAt 2024-05-09 10:54:04 +01:00
Simon Larsen
d6aafa8493 feat: Add support for counting with groupBy in DatabaseService 2024-05-09 10:54:04 +01:00
Simon Larsen
b5407b47b2 feat: Add onViewPage function to Metrics component 2024-05-09 10:54:04 +01:00
Simon Larsen
f84bec7e66 refactor: Fix formatting and remove unnecessary code in AnalyticsDatabaseService 2024-05-09 10:54:04 +01:00
Simon Larsen
43354d850b feat: Add AnalyticsModelTable component to Metrics page 2024-05-09 10:54:04 +01:00
Simon Larsen
1977dc3e62 refactor: Add GroupBy support to analytics database queries 2024-05-09 10:54:04 +01:00
Simon Larsen
c2bd27b0f9 refactor: Add GroupBy support to analytics database queries 2024-05-09 10:54:04 +01:00
Simon Larsen
264c0f0347 Merge pull request #1379 from OneUptime/snyk-upgrade-c9d2d1e5a53e5e8a69bea4eb64fe195b
[Snyk] Upgrade css-loader from 6.10.0 to 6.11.0
2024-05-09 08:56:09 +01:00
snyk-bot
0de98ae262 fix: upgrade css-loader from 6.10.0 to 6.11.0
Snyk has created this PR to upgrade css-loader from 6.10.0 to 6.11.0.

See this package in npm:
https://www.npmjs.com/package/css-loader

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/11bb5528-45f9-473c-a635-dc097fd03b3c?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-08 21:54:23 +00:00
Simon Larsen
573a12075b Merge pull request #1377 from OneUptime/snyk-upgrade-5ae69998d12b665f469b0997420ea928
[Snyk] Upgrade posthog-js from 1.125.0 to 1.126.0
2024-05-08 20:55:12 +01:00
snyk-bot
0a85e245d7 fix: upgrade posthog-js from 1.125.0 to 1.126.0
Snyk has created this PR to upgrade posthog-js from 1.125.0 to 1.126.0.

See this package in npm:
https://www.npmjs.com/package/posthog-js

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/f6446ec8-d441-487e-b58f-38373430e213?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-08 17:21:50 +00:00
Simon Larsen
41d01cceee Merge pull request #1373 from OneUptime/snyk-upgrade-0f03e56c8fcfe93e0825bfeb309bddb8
[Snyk] Upgrade @opentelemetry/instrumentation-xml-http-request from 0.49.1 to 0.50.0
2024-05-08 12:56:44 +01:00
Simon Larsen
dcd9aeccb3 Merge pull request #1371 from OneUptime/snyk-upgrade-3ed96983eb9a1ec2fc0be8285f56cff9
[Snyk] Upgrade @opentelemetry/exporter-trace-otlp-http from 0.49.1 to 0.50.0
2024-05-08 12:56:17 +01:00
Simon Larsen
c59ebc2373 refactor: Update monitor steps to include monitor name 2024-05-08 12:49:07 +01:00
Simon Larsen
643f4acddd refactor: Improve error handling in API class and include URL in exception message 2024-05-08 12:17:14 +01:00
Simon Larsen
b3fb21af59 refactor: Update markdown field types for root cause in Incident and IncidentStateTimeline models 2024-05-08 11:43:54 +01:00
Simon Larsen
2164f45a68 refactor: Update UptimeUtil to use startsAt and endsAt properties for event dates 2024-05-08 11:21:34 +01:00
Simon Larsen
8a4afe992c refactor: Improve calculation of incident duration in IncidentView component 2024-05-08 11:10:20 +01:00
Simon Larsen
f35e50bab3 refactor: Add startsAt property to monitorStatusTimelines in StatusPageAPI 2024-05-08 10:34:59 +01:00
Simon Larsen
63064c587c refactor: Remove dark mode styles from progress bar and pagination components 2024-05-08 08:41:59 +01:00
snyk-bot
edd11ffade fix: upgrade @opentelemetry/instrumentation-xml-http-request from 0.49.1 to 0.50.0
Snyk has created this PR to upgrade @opentelemetry/instrumentation-xml-http-request from 0.49.1 to 0.50.0.

See this package in npm:
https://www.npmjs.com/package/@opentelemetry/instrumentation-xml-http-request

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-07 21:06:49 +00:00
snyk-bot
97e1688b50 fix: upgrade @opentelemetry/sdk-trace-web from 1.22.0 to 1.23.0
Snyk has created this PR to upgrade @opentelemetry/sdk-trace-web from 1.22.0 to 1.23.0.

See this package in npm:
https://www.npmjs.com/package/@opentelemetry/sdk-trace-web

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-07 21:06:45 +00:00
snyk-bot
b7e97a29ee fix: upgrade @opentelemetry/exporter-trace-otlp-http from 0.49.1 to 0.50.0
Snyk has created this PR to upgrade @opentelemetry/exporter-trace-otlp-http from 0.49.1 to 0.50.0.

See this package in npm:
https://www.npmjs.com/package/@opentelemetry/exporter-trace-otlp-http

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-07 21:06:41 +00:00
snyk-bot
f0acbc6eb0 fix: upgrade @opentelemetry/instrumentation from 0.49.1 to 0.50.0
Snyk has created this PR to upgrade @opentelemetry/instrumentation from 0.49.1 to 0.50.0.

See this package in npm:
https://www.npmjs.com/package/@opentelemetry/instrumentation

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-07 21:06:37 +00:00
Simon Larsen
fdf6e3dfa3 refactor: Optimize sorting of monitorStatusTimelines by createdAt in StatusPageAPI 2024-05-07 20:01:37 +01:00
Simon Larsen
b59b8257cc refactor: Use explicit type annotations for mutex and mutexId in Semaphore class 2024-05-06 22:42:09 +01:00
Simon Larsen
9bde353e93 refactor: Add Semaphore locking for monitor probe creation and release mutex after completion 2024-05-06 22:18:14 +01:00
Simon Larsen
a2c2867469 refactor: Add Semaphore locking for monitor probe creation and release mutex after completion 2024-05-06 21:52:09 +01:00
Simon Larsen
bd3ba94da8 chore: Update package-lock.json and package.json to include redis-semaphore dependency 2024-05-06 21:47:47 +01:00
Simon Larsen
8e6800c17b refactor: Update UserAuthorization middleware to improve project permissions handling 2024-05-06 20:47:15 +01:00
Simon Larsen
e481e043dd refactor: Update REDIS_PORT value in _helpers.tpl to use dynamic value from values.yaml 2024-05-06 20:47:09 +01:00
Simon Larsen
a4e6552c91 refactor: Disable redis persistence and add common configuration in values.yaml 2024-05-06 15:20:42 +01:00
Simon Larsen
6ce5cde46e Merge pull request #1365 from OneUptime/snyk-upgrade-e95d2830e79bc050ba332cb3d9670e5b
[Snyk] Upgrade reactflow from 11.10.4 to 11.11.1
2024-05-06 15:16:47 +01:00
Simon Larsen
22014c81c4 Merge pull request #1366 from OneUptime/snyk-upgrade-ec50f233945652edca96198c892ea002
[Snyk] Upgrade @opentelemetry/context-zone from 1.22.0 to 1.23.0
2024-05-06 15:16:40 +01:00
Simon Larsen
bff63cdf58 Merge pull request #1367 from OneUptime/snyk-upgrade-9bdef45fe03889844c5f043354578d14
[Snyk] Upgrade @opentelemetry/instrumentation-fetch from 0.49.1 to 0.50.0
2024-05-06 15:16:32 +01:00
Simon Larsen
5f9d57a099 Merge pull request #1369 from OneUptime/snyk-upgrade-1b2e0c757b53983d536db6e5be033842
[Snyk] Upgrade @opentelemetry/resources from 1.22.0 to 1.23.0
2024-05-06 15:16:22 +01:00
Simon Larsen
ca100f9de9 refactor: Update REDIS_PORT value in _helpers.tpl to use dynamic value from values.yaml 2024-05-06 13:53:37 +01:00
Simon Larsen
68dbb010aa refactor: Disable redis persistence and add common configuration in values.yaml 2024-05-06 13:49:08 +01:00
Simon Larsen
5cd213a750 refactor: Update SSO.ts and StatusPageSSO.ts to include issuer URL in SAML request 2024-05-06 13:20:34 +01:00
Simon Larsen
26683914bc refactor: Update SSO.ts and StatusPageSSO.ts to include issuer URL in SAML request 2024-05-06 13:13:52 +01:00
Simon Larsen
8a5adfd589 refactor: Remove unnecessary code in UserAuthorization.ts 2024-05-06 12:39:11 +01:00
Simon Larsen
d2eefeabba refactor: Include issuer URL in SAML request for SSO 2024-05-06 12:26:18 +01:00
Simon Larsen
1148b59416 refactor: Include issuer URL in SAML request for SSO 2024-05-06 12:02:55 +01:00
Simon Larsen
848c0c8100 refactor: Update SSO.ts and StatusPageSSO.ts to include issuer URL in SAML request 2024-05-06 12:00:23 +01:00
Simon Larsen
21f40961cf refactor: Update isGlobalLogin flag in SSO.ts and UserAuthorization.ts 2024-05-06 11:53:45 +01:00
Simon Larsen
2f74fbe0a8 refactor: Simplify SSO.ts code for SAMLRequest encoding and redirect 2024-05-06 10:17:49 +01:00
Simon Larsen
571784a523 refactor: Simplify SSO.ts code for SAMLRequest encoding and redirect 2024-05-06 09:52:14 +01:00
snyk-bot
7c60fe8009 fix: upgrade @opentelemetry/resources from 1.22.0 to 1.23.0
Snyk has created this PR to upgrade @opentelemetry/resources from 1.22.0 to 1.23.0.

See this package in npm:
https://www.npmjs.com/package/@opentelemetry/resources

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-05 22:21:24 +00:00
snyk-bot
07f99b8796 fix: upgrade @opentelemetry/semantic-conventions from 1.22.0 to 1.23.0
Snyk has created this PR to upgrade @opentelemetry/semantic-conventions from 1.22.0 to 1.23.0.

See this package in npm:
https://www.npmjs.com/package/@opentelemetry/semantic-conventions

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-05 22:21:21 +00:00
snyk-bot
1a2fe1d16d fix: upgrade @opentelemetry/instrumentation-fetch from 0.49.1 to 0.50.0
Snyk has created this PR to upgrade @opentelemetry/instrumentation-fetch from 0.49.1 to 0.50.0.

See this package in npm:
https://www.npmjs.com/package/@opentelemetry/instrumentation-fetch

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-05 22:21:17 +00:00
snyk-bot
a28a041c8d fix: upgrade @opentelemetry/context-zone from 1.22.0 to 1.23.0
Snyk has created this PR to upgrade @opentelemetry/context-zone from 1.22.0 to 1.23.0.

See this package in npm:
https://www.npmjs.com/package/@opentelemetry/context-zone

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-05 22:21:13 +00:00
snyk-bot
cfcce00060 fix: upgrade reactflow from 11.10.4 to 11.11.1
Snyk has created this PR to upgrade reactflow from 11.10.4 to 11.11.1.

See this package in npm:
https://www.npmjs.com/package/reactflow

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/47001ef1-7b3a-49c2-88cd-8025c56346d0?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-05 22:21:08 +00:00
Simon Larsen
da0fa045e6 refactor: Simplify SSO.ts code for SAMLRequest encoding and redirect 2024-05-05 21:37:05 +01:00
Simon Larsen
859f62bf93 refactor: Simplify base64 encoding in SSO.ts 2024-05-04 23:26:13 +01:00
Simon Larsen
6a1cc1bd8b refactor: Update SSO.ts to use zlib.deflateRawSync for SAML message encoding 2024-05-04 22:55:29 +01:00
Simon Larsen
5b9abe8aea refactor: Add SAMLRequest encoding and redirect to Identity Provider 2024-05-04 22:54:06 +01:00
Simon Larsen
d0ec483a0f refactor: Update Register.tsx and UserAuthorization.test.ts for isGlobalLogin flag 2024-05-04 22:00:33 +01:00
Simon Larsen
c03a3d6f56 refactor: Remove debugger statement in SSO.ts 2024-05-04 21:53:00 +01:00
Simon Larsen
8761dbd75b refactor: Update login page SSO message for clarity and consistency 2024-05-04 21:51:09 +01:00
Simon Larsen
5541922b25 refactor: Update login page SSO message for clarity and consistency 2024-05-04 21:50:35 +01:00
Simon Larsen
8693ab065e refactor: Add isGlobalLogin flag to user object in ProjectAuthorization middleware 2024-05-04 21:29:53 +01:00
Simon Larsen
fe4daa7937 refactor: Update login page SSO message for clarity and consistency 2024-05-04 21:27:21 +01:00
Simon Larsen
20d7f2f8b4 refactor: Update JSONWebToken.signUserLoginToken() method to include isGlobalLogin flag 2024-05-04 21:13:34 +01:00
Simon Larsen
7f94f3d4d4 refactor: Update column_1 and column_2 definitions in StatementGenerator.test.ts 2024-05-04 20:54:19 +01:00
Simon Larsen
bc46370f7c refactor: Update JSONWebToken.sign() method to accept an object with data and expiresInSeconds properties 2024-05-04 20:37:58 +01:00
Simon Larsen
b3346a9702 refactor: Update login page SSO message for clarity and consistency 2024-05-04 20:11:02 +01:00
Simon Larsen
f793f7dd16 refactor: Update email regex to improve validation accuracy 2024-05-04 20:02:17 +01:00
Simon Larsen
766f1f6178 update email regex 2024-05-04 19:33:59 +01:00
Simon Larsen
9f76748037 update deps 2024-05-04 19:33:45 +01:00
Simon Larsen
469e06280a refactor: Improve code readability and maintainability in AnalyticsDatabaseService.ts 2024-05-03 19:05:56 +01:00
Simon Larsen
aede9af03d chore: Remove unnecessary line in BaseModel.ts 2024-05-03 14:48:07 +01:00
Nawaz Dhandala
0bc7cf345f chore: Add missing newline character in BaseModel.ts 2024-05-03 14:45:26 +01:00
Nawaz Dhandala
95c7b10ce0 Refactor AnalyticsDatabaseService.ts for improved code readability and maintainability 2024-05-03 14:04:24 +01:00
Simon Larsen
daceab164c Merge branch 'master' of github.com-simon:OneUptime/oneuptime 2024-05-03 13:38:00 +01:00
Simon Larsen
2d28fbaf85 refactor: Add required flag and default value for attributes column in Log model 2024-05-03 13:37:57 +01:00
Simon Larsen
8d2cbe49ad Merge pull request #1364 from OneUptime/snyk-upgrade-8c197b0383ff1f076301a2077e18b9b2
[Snyk] Upgrade reactflow from 11.11.0 to 11.11.1
2024-05-03 13:10:26 +01:00
Simon Larsen
86f262583c feat: Generate new certificates for status page domains
This commit adds a new data migration script, GenerateNewCertsForStatusPage.ts, which generates new certificates for status page domains. It retrieves all domains in the greenlock certs, orders them, and updates the certificates accordingly. This will ensure that the status page domains have up-to-date and valid certificates.

Refactor and delete unused Metric services and models
Refactor Queue class to use explicit type annotation for queue variable
Add Queue caching to improve performance and reduce redundant connections
Refactor test-e2e job in release.yml workflow
Fix error handling in StatusPageDomainService.ts
Update select field in MoveGreenlockCertsToAcmeCerts.ts to use _id instead of id
Update ingress configuration for OneUptime Helm chart
Refactor StatusPageAPI to improve code readability and maintainability
Refactor StatusPageAPI and UpdateByID to improve code readability and maintainability
Refactor Let's Encrypt configuration and update GreenlockUtil class
2024-05-03 13:07:45 +01:00
Simon Larsen
4e748d1626 Refactor and delete unused Metric services and models 2024-05-03 13:03:01 +01:00
Simon Larsen
1dbea8e636 Refactor Queue class to use explicit type annotation for queue variable 2024-05-03 10:30:41 +01:00
Simon Larsen
3991acf5fc Add Queue caching to improve performance and reduce redundant connections 2024-05-03 10:04:19 +01:00
snyk-bot
1285830a9b fix: upgrade reactflow from 11.11.0 to 11.11.1
Snyk has created this PR to upgrade reactflow from 11.11.0 to 11.11.1.

See this package in npm:
https://www.npmjs.com/package/reactflow

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/8ca4ee75-8bc5-43a1-a3bc-244ceebf1437?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-05-02 17:57:26 +00:00
Simon Larsen
96d3243205 Refactor test-e2e job in release.yml workflow 2024-05-01 17:22:12 +01:00
Simon Larsen
08cbdb15d0 Fix error handling in StatusPageDomainService.ts 2024-05-01 15:16:59 +01:00
Simon Larsen
f59284e4d6 Update select field in MoveGreenlockCertsToAcmeCerts.ts to use _id instead of id 2024-05-01 13:57:46 +01:00
Simon Larsen
0c5d0e81a5 Update ingress configuration for OneUptime Helm chart 2024-05-01 13:41:35 +01:00
Simon Larsen
82829a5b97 Refactor StatusPageAPI to improve code readability and maintainability 2024-05-01 13:12:16 +01:00
Simon Larsen
d3c188a804 Refactor StatusPageAPI and UpdateByID to improve code readability and maintainability 2024-05-01 13:08:15 +01:00
Simon Larsen
85ffc36fad Refactor Let's Encrypt configuration and update GreenlockUtil class 2024-05-01 12:44:49 +01:00
Simon Larsen
8d34e9ccbe Refactor LetsEncrypt configuration and update GreenlockUtil class 2024-05-01 12:42:32 +01:00
Simon Larsen
c6643d7f7c Update GreenlockUtil class to handle lets encrypt account key properly 2024-05-01 12:37:41 +01:00
Simon Larsen
1433823efe Update LetsEncrypt configuration for OneUptime deployment 2024-05-01 12:13:01 +01:00
Simon Larsen
bd5902ed6d Update ingress configuration for OneUptime Helm chart 2024-05-01 11:44:30 +01:00
Simon Larsen
b64666f0ff Update oneuptime logo URL in README.md 2024-05-01 11:32:30 +01:00
Simon Larsen
9706cced86 Update OneUptime Helm chart with production readiness checklist 2024-05-01 11:29:14 +01:00
Simon Larsen
49cb3024ef Update nginx.yaml for OneUptime Helm chart 2024-05-01 11:09:30 +01:00
Simon Larsen
2fec007c5f Update ingressClassName in values.yaml for OneUptime Helm chart 2024-05-01 10:57:26 +01:00
Simon Larsen
0f40f5f730 Update HelmChart templates and values for OneUptime deployment 2024-05-01 10:30:21 +01:00
Simon Larsen
120ca78760 Update HelmChart/Public/oneuptime/templates/extra-templates.yaml and HelmChart/Public/oneuptime/values.yaml 2024-05-01 10:19:30 +01:00
Simon Larsen
d50fdf3464 Update nginx.yaml and values.yaml for OneUptime Helm chart 2024-05-01 10:14:02 +01:00
Simon Larsen
34ddb8efdb Merge branch 'master' of github.com-simon:OneUptime/oneuptime 2024-05-01 09:49:38 +01:00
Simon Larsen
3724cce4f0 Add cron job to verify CNAMEs in StatusPageCerts.ts 2024-05-01 09:49:11 +01:00
Simon Larsen
d864992bdb Add MoveGreenlockCertsToAcmeCerts migration and update DataMigrations in Index.ts 2024-05-01 09:31:45 +01:00
Simon Larsen
3515752a95 Add MoveGreenlockCertsToAcmeCerts migration 2024-05-01 09:29:29 +01:00
Simon Larsen
53d66db8cb Merge pull request #1359 from OneUptime/snyk-fix-6d9e266d473ce0fed1ec1645f0bf6548
[Snyk] Security upgrade ejs from 3.1.9 to 3.1.10
2024-04-30 22:13:44 +01:00
Simon Larsen
548250f837 Merge pull request #1360 from OneUptime/snyk-fix-4fe336667711cbbe5c8ccb29e8c049e7
[Snyk] Security upgrade ejs from 3.1.9 to 3.1.10
2024-04-30 22:13:36 +01:00
Simon Larsen
b3b343d4aa Merge pull request #1361 from OneUptime/snyk-fix-eff57b0386677ae55037cf20bb1b38e3
[Snyk] Security upgrade ejs from 3.1.9 to 3.1.10
2024-04-30 22:13:31 +01:00
Simon Larsen
69a8f438f7 Merge pull request #1362 from OneUptime/snyk-fix-b0f6bc6acf45920714d4b0cacfb5c537
[Snyk] Security upgrade ejs from 3.1.9 to 3.1.10
2024-04-30 22:13:25 +01:00
Simon Larsen
7b571f15a9 Merge pull request #1363 from OneUptime/snyk-fix-2342a863e5405ba1a2449f7819d9a66b
[Snyk] Security upgrade ejs from 3.1.9 to 3.1.10
2024-04-30 22:13:18 +01:00
Simon Larsen
d783eaea9d Refactor table name in PostgresDatabase.ts, remove unused volume in app.yaml, fix typos in Domains.tsx and Index.ts, update nodemon.json files, remove greenlock dependency, and add validation for cname in StatusPageDomainService.ts 2024-04-30 21:24:04 +01:00
Simon Larsen
2e5aafe151 Update table name in PostgresDatabase.ts to use "domain" instead of "key" 2024-04-30 21:16:31 +01:00
Simon Larsen
dea938bcbb Add FetchCertificateJobs.init() to Nginx/Index.ts 2024-04-30 20:18:36 +01:00
Simon Larsen
7c16b14ab4 Update table name in PostgresDatabase.ts and remove unused volume in app.yaml 2024-04-30 19:45:43 +01:00
Simon Larsen
e22ff26dc0 Refactor error handling in StatusAPI.ts 2024-04-30 19:30:35 +01:00
Simon Larsen
75bd6ca6ed Fix DatabaseNotConnectedException code in ExceptionCode.ts and DatabaseNotConnectedException.test.ts 2024-04-30 19:24:54 +01:00
Simon Larsen
f0bdb76999 Fix typos in Domains.tsx and Index.ts 2024-04-30 19:12:03 +01:00
Simon Larsen
a9e9d14f69 Update StatusPageAPI and StatusPageDomainAPI to use AcmeChallenge model and remove Greenlock dependencies 2024-04-30 18:43:15 +01:00
Simon Larsen
21daac0400 Update nodemon.json files for Accounts, AdminDashboard, and Dashboard 2024-04-30 17:34:15 +01:00
Simon Larsen
3cdf71906b Remove greenlock dependency from package.json 2024-04-30 15:10:54 +01:00
Simon Larsen
0714161460 Add validation for cname in StatusPageDomainService.ts 2024-04-30 15:02:54 +01:00
Simon Larsen
78b7252743 Refactor GreenlockUtil challengeCreateFn and challengeRemoveFn to improve readability 2024-04-30 14:16:35 +01:00
Simon Larsen
2ba406f802 Add AcmeChallenge model, update StatusPageDomain model, and import AcmeCertificate in Model and Service files 2024-04-30 14:15:18 +01:00
Simon Larsen
48ebfc17dd Add AcmeChallenge model and update StatusPageDomain model 2024-04-30 14:08:05 +01:00
Simon Larsen
9d180a2dcb Remove unused Greenlock configuration files and import AcmeCertificate in Model and Service files 2024-04-30 13:22:06 +01:00
Simon Larsen
0f2a970ede Merge branch 'master' of github.com-simon:OneUptime/oneuptime 2024-04-30 11:37:28 +01:00
Simon Larsen
4ab3c99fe4 Update dependencies in package.json 2024-04-30 11:37:24 +01:00
Simon Larsen
ae2e452d27 Merge pull request #1356 from sainak/sainak/fix/sert-scripts
Update nginx service name and host variable in cert helper scripts
2024-04-30 09:37:30 +01:00
snyk-bot
825d733f92 fix: Probe/package.json & Probe/package-lock.json to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-EJS-6689533
2024-04-29 21:39:29 +00:00
snyk-bot
27039bc646 fix: Scripts/package.json & Scripts/package-lock.json to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-EJS-6689533
2024-04-29 21:09:12 +00:00
snyk-bot
1bb1d80b09 fix: TestServer/package.json & TestServer/package-lock.json to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-EJS-6689533
2024-04-29 20:56:52 +00:00
snyk-bot
983f587ce4 fix: Ingestor/package.json & Ingestor/package-lock.json to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-EJS-6689533
2024-04-29 20:32:33 +00:00
Simon Larsen
e1f9325512 Fix renewOffset value in GreenlockUtil 2024-04-29 20:34:06 +01:00
snyk-bot
96c27c86ca fix: CommonServer/package.json & CommonServer/package-lock.json to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-JS-EJS-6689533
2024-04-29 17:18:14 +00:00
Simon Larsen
a172596e46 Update GreenlockUtil to include renewOffset and renewStagger options 2024-04-29 16:59:28 +01:00
Simon Larsen
3d30e9356a Fix column handling in ModelPermission.ts 2024-04-29 16:34:00 +01:00
Simon Larsen
7c04ecec35 Fix column handling in ModelPermission.ts and update GreenlockCertificateService in Store.ts 2024-04-29 15:59:37 +01:00
Simon Larsen
80511a5f8d Fix expiration date calculation in Greenlock Manager.ts 2024-04-29 14:19:50 +01:00
Simon Larsen
6692fb00b8 Refactor BaseModel and ModelPermission classes to improve column handling 2024-04-29 14:15:11 +01:00
Simon Larsen
83e207a7de Refactor OneUptimeDate class to improve convertMinutesToDaysHoursAndMinutes method in Date.ts 2024-04-29 11:35:25 +01:00
Simon Larsen
d62aa7f5a6 Refactor Index.tsx to import PromiseVoidFunction from 'Common/Types/FunctionTypes' 2024-04-29 11:06:08 +01:00
Simon Larsen
8a130f96e2 Refactor InfoCard component to add className prop and improve readability 2024-04-29 11:05:57 +01:00
Simon Larsen
66a470ebe1 Refactor GreenlockChallenge and GreenlockCertificate models to add deletedByUser and deletedByUserId properties 2024-04-29 10:26:10 +01:00
Simon Larsen
30a59aa21e Refactor InfoCard component to improve readability and fix indentation issue 2024-04-29 10:17:10 +01:00
Simon Larsen
7a6a5c141b Refactor IncidentView component to add incidentStates state and update getTimeToAcknowledge and getTimeToResolve functions 2024-04-29 10:15:17 +01:00
Simon Larsen
c4bf458074 Refactor OneUptimeDate class to add convertMinutesToHoursAndMinutes method in Date.ts 2024-04-29 09:44:33 +01:00
Simon Larsen
ae873e296c Improve CNAME verification process and add DNS propagation reminder 2024-04-29 09:23:12 +01:00
Simon Larsen
4a973d7107 Fix indentation issue and handle CNAME verification failure in StatusPageDomainAPI.ts 2024-04-29 08:24:33 +01:00
Simon Larsen
9bbf460b97 Fix indentation issue in EnvironmentConfig.ts 2024-04-28 21:31:29 +01:00
Simon Larsen
c348a8bd05 Refactor StatusPageDomainAPI to enable custom domains and improve CNAME verification process 2024-04-28 21:20:45 +01:00
Simon Larsen
76d8f5d5ef Remove @socket.io/redis-adapter dependency 2024-04-28 21:03:29 +01:00
Simon Larsen
72ac305aad Fix multiple slashes in route and handle CNAME verification failure in StatusPageDomainAPI.ts 2024-04-28 20:55:35 +01:00
Simon Larsen
1ac05450e7 Refactor StatusPageDomainAPI to set isRoot property in StatusPageDomainAPI.ts 2024-04-28 20:46:33 +01:00
Simon Larsen
67165375ac Add isSslOrdered property to StatusPageDomain model and update orderCert method in StatusPageDomainService 2024-04-28 20:44:54 +01:00
Simon Larsen
6325e36bd0 Refactor BaseAPI/Index.ts to remove unused imports and clean up code
Refactor StatusPageDomainAPI and related components to improve CNAME verification process
Refactor StatusPageDomainService and Domains.tsx to improve CNAME verification process
Refactor API endpoints to use sendEmptySuccessResponse instead of sendEmptyResponse
Refactor SocketIO.ts to remove Redis adapter initialization
Refactor StatusPageDelete component: Add SSL auto-renewal feature and improve CNAME verification process
Refactor GreenlockUtil and StatusPageDomainService to improve CNAME validation and configuration paths
Refactor StatusPageDomainService: Add onBeforeUpdate hook to validate CNAME and update GreenlockUtil configuration paths
Refactor StatusPageDomainService: Add onBeforeUpdate hook to validate CNAME before updating
Refactor StatusPageCerts:RemoveCerts method to use statusPageDomain.fullDomain instead of domain.fullDomain
2024-04-28 20:13:32 +01:00
Simon Larsen
e6375087cd Refactor BaseAPI/Index.ts to remove unused imports and clean up code 2024-04-28 20:06:34 +01:00
Simon Larsen
737e234ec0 Refactor StatusPageDomainAPI and related components to improve CNAME verification process 2024-04-28 20:04:38 +01:00
Simon Larsen
1427d52c9f Refactor StatusPageDomainService and Domains.tsx to improve CNAME verification process 2024-04-28 20:03:00 +01:00
Simon Larsen
8377285a27 Refactor API endpoints to use sendEmptySuccessResponse instead of sendEmptyResponse 2024-04-28 19:52:57 +01:00
Simon Larsen
7414c6563d Refactor SocketIO.ts to remove Redis adapter initialization 2024-04-28 14:45:51 +01:00
Simon Larsen
0669e96a5d Refactor StatusPageDelete component: Add SSL auto-renewal feature and improve CNAME verification process 2024-04-28 14:37:52 +01:00
Aakash Singh
c092adfa3d Update nginx service name and host variable in cert helper scripts 2024-04-26 16:58:09 +00:00
1453 changed files with 60542 additions and 38035 deletions

View File

@@ -113,6 +113,7 @@
"no-console": "error",
"no-undef": "error",
"no-empty": "error",
"no-control-regex": "off",
"prefer-arrow-callback": "error",
"constructor-super": "error",
"no-case-declarations": "error",

View File

@@ -179,21 +179,6 @@ jobs:
- name: build docker image
run: sudo docker build -f ./StatusPage/Dockerfile .
docker-build-infrastructure-agent:
runs-on: ubuntu-latest
env:
CI_PIPELINE_ID: ${{github.run_number}}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Preinstall
run: npm run prerun
# build image for mail service
- name: build docker image
run: sudo docker build -f ./InfrastructureAgent/Dockerfile .
docker-build-test-server:
runs-on: ubuntu-latest
env:

View File

@@ -111,14 +111,10 @@ jobs:
env:
CI_PIPELINE_ID: ${{github.run_number}}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 18.3.0
- run: cd Common && npm install
- run: cd Model && npm install
- run: cd CommonServer && npm install
- run: cd InfrastructureAgent && npm install && npm run compile && npm run dep-check
- uses: actions/checkout@v4
# Setup Go
- uses: actions/setup-go@v5
- run: cd InfrastructureAgent && go build .
compile-admin-dashboard:

View File

@@ -19,7 +19,7 @@ jobs:
- run: echo "Build number is ${{ steps.buildnumber.outputs.build_number }}"
github-release:
needs: generate-build-number
needs: [generate-build-number]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/release'
permissions:
@@ -46,7 +46,7 @@ jobs:
helm-chart-deploy:
runs-on: ubuntu-latest
needs: generate-build-number
needs: [generate-build-number, github-release]
env:
CI_COMMIT_AUTHOR: Continuous Integration
steps:
@@ -92,7 +92,7 @@ jobs:
git push origin master
nginx-docker-image-deploy:
needs: generate-build-number
needs: [generate-build-number, github-release]
runs-on: ubuntu-latest
steps:
- name: Docker Meta
@@ -152,7 +152,7 @@ jobs:
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
e2e-docker-image-deploy:
needs: generate-build-number
needs: [generate-build-number, github-release]
runs-on: ubuntu-latest
steps:
- name: Docker Meta
@@ -212,7 +212,7 @@ jobs:
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
isolated-vm-docker-image-deploy:
needs: generate-build-number
needs: [generate-build-number, github-release]
runs-on: ubuntu-latest
steps:
- name: Docker Meta
@@ -272,7 +272,7 @@ jobs:
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
test-server-docker-image-deploy:
needs: generate-build-number
needs: [generate-build-number, github-release]
runs-on: ubuntu-latest
steps:
- name: Docker Meta
@@ -332,7 +332,7 @@ jobs:
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
otel-collector-docker-image-deploy:
needs: generate-build-number
needs: [generate-build-number, github-release]
runs-on: ubuntu-latest
steps:
- name: Docker Meta
@@ -394,7 +394,7 @@ jobs:
status-page-docker-image-deploy:
needs: generate-build-number
needs: [generate-build-number, github-release]
runs-on: ubuntu-latest
steps:
- name: Docker Meta
@@ -454,7 +454,7 @@ jobs:
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
test-docker-image-deploy:
needs: generate-build-number
needs: [generate-build-number, github-release]
runs-on: ubuntu-latest
steps:
- name: Docker Meta
@@ -514,7 +514,7 @@ jobs:
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
ingestor-docker-image-deploy:
needs: generate-build-number
needs: [generate-build-number, github-release]
runs-on: ubuntu-latest
steps:
- name: Docker Meta
@@ -574,7 +574,7 @@ jobs:
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
probe-docker-image-deploy:
needs: generate-build-number
needs: [generate-build-number, github-release]
runs-on: ubuntu-latest
steps:
- name: Docker Meta
@@ -635,7 +635,7 @@ jobs:
haraka-docker-image-deploy:
needs: generate-build-number
needs: [generate-build-number, github-release]
runs-on: ubuntu-latest
steps:
- name: Docker Meta
@@ -695,7 +695,7 @@ jobs:
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
admin-dashboard-docker-image-deploy:
needs: generate-build-number
needs: [generate-build-number, github-release]
runs-on: ubuntu-latest
steps:
- name: Docker Meta
@@ -756,7 +756,7 @@ jobs:
dashboard-docker-image-deploy:
needs: generate-build-number
needs: [generate-build-number, github-release]
runs-on: ubuntu-latest
steps:
- name: Docker Meta
@@ -816,7 +816,7 @@ jobs:
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
app-docker-image-deploy:
needs: generate-build-number
needs: [generate-build-number, github-release]
runs-on: ubuntu-latest
steps:
- name: Docker Meta
@@ -876,7 +876,7 @@ jobs:
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
accounts-docker-image-deploy:
needs: generate-build-number
needs: [generate-build-number, github-release]
runs-on: ubuntu-latest
steps:
- name: Docker Meta
@@ -935,39 +935,10 @@ jobs:
GIT_SHA=${{ github.sha }}
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
# We dont need any of this because we are using the npm package
# infrastructure-agent-macos-binary-release:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v2
# with:
# node-version: 21.6.2
# - run: cd InfrastructureAgent && bash Scripts/Build/Mac.sh
# We dont need any of this because we are using the npm package
# infrastructure-agent-windows-binary-release:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v2
# with:
# node-version: 21.6.2
# - run: cd InfrastructureAgent && ./Scripts/Build/Windows.ps1
# We dont need any of this because we are using the npm package
# infrastructure-agent-linux-binary-release:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-node@v2
# with:
# node-version: 21.6.2
# - run: cd InfrastructureAgent && bash ./Scripts/Build/Linux.sh
publish-npm-packages:
runs-on: ubuntu-latest
needs: generate-build-number
needs: [generate-build-number, github-release]
env:
CI_PIPELINE_ID: ${{github.run_number}}
NPM_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
@@ -980,90 +951,35 @@ jobs:
- name: Publish Infrastructure Agent
run: bash ./Scripts/NPM/PublishAllPackages.sh
infrastructure-agent-docker-image-deploy:
needs: generate-build-number
infrastructure-agent-deploy:
needs: [generate-build-number, github-release]
runs-on: ubuntu-latest
steps:
- name: Docker Meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
oneuptime/infrastructure-agent
ghcr.io/oneuptime/infrastructure-agent
tags: |
type=raw,value=release,enable=true
type=semver,value=7.0.${{needs.generate-build-number.outputs.build_number}},pattern={{version}},enable=true
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Set up Go
uses: actions/setup-go@v4
- uses: actions/setup-node@v2
- name: Install GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
node-version: 18.3.0
install-only: true
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Show GoReleaser version
run: goreleaser -v
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Generate Dockerfile from Dockerfile.tpl
run: npm run prerun
# Build and deploy infrastructure-agent.
- name: Login to Docker Hub
uses: docker/login-action@v2.2.0
- name: Run GoReleaser
run: cd InfrastructureAgent && export GORELEASER_CURRENT_TAG=7.0.${{needs.generate-build-number.outputs.build_number}} && goreleaser release --clean --snapshot
# Upload binaries to github release
- name: Release
uses: softprops/action-gh-release@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
file: ./InfrastructureAgent/Dockerfile
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GIT_SHA=${{ github.sha }}
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
test-e2e:
runs-on: ubuntu-latest
# Needs all the jobs to be done before this job
needs: [e2e-docker-image-deploy, test-docker-image-deploy, test-server-docker-image-deploy, otel-collector-docker-image-deploy, status-page-docker-image-deploy, ingestor-docker-image-deploy, probe-docker-image-deploy, haraka-docker-image-deploy, admin-dashboard-docker-image-deploy, dashboard-docker-image-deploy, app-docker-image-deploy, accounts-docker-image-deploy, infrastructure-agent-docker-image-deploy, publish-npm-packages]
env:
CI_PIPELINE_ID: ${{github.run_number}}
steps:
# Docker compose needs a lot of space to build images, so we need to free up some space first in the GitHub Actions runner
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 18.3.0
- run: npm run start
- run: cd E2E && npm install && npm run test
files: |
InfrastructureAgent/dist/*
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
prerelease: false
tag_name: 7.0.${{needs.generate-build-number.outputs.build_number}}

View File

@@ -877,72 +877,9 @@ jobs:
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
infrastructure-agent-docker-image-deploy:
needs: generate-build-number
runs-on: ubuntu-latest
steps:
- name: Docker Meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
oneuptime/infrastructure
ghcr.io/oneuptime/infrastructure
tags: |
type=raw,value=test,enable=true
type=semver,value=7.0.${{needs.generate-build-number.outputs.build_number}}-test,pattern={{version}},enable=true
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: actions/setup-node@v2
with:
node-version: 18.3.0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Generate Dockerfile from Dockerfile.tpl
run: npm run prerun
# Build and deploy infrastructure.
- name: Login to Docker Hub
uses: docker/login-action@v2.2.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2.2.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
file: ./InfrastructureAgent/Dockerfile
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GIT_SHA=${{ github.sha }}
APP_VERSION=7.0.${{needs.generate-build-number.outputs.build_number}}
test-helm-chart:
runs-on: ubuntu-latest
needs: [ infrastructure-agent-docker-image-deploy, isolated-vm-docker-image-deploy, test-server-docker-image-deploy, test-docker-image-deploy, ingestor-docker-image-deploy, probe-docker-image-deploy, haraka-docker-image-deploy, dashboard-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, accounts-docker-image-deploy, otel-collector-docker-image-deploy, status-page-docker-image-deploy, nginx-docker-image-deploy, e2e-docker-image-deploy]
needs: [isolated-vm-docker-image-deploy, test-server-docker-image-deploy, test-docker-image-deploy, ingestor-docker-image-deploy, probe-docker-image-deploy, haraka-docker-image-deploy, dashboard-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, accounts-docker-image-deploy, otel-collector-docker-image-deploy, status-page-docker-image-deploy, nginx-docker-image-deploy, e2e-docker-image-deploy]
env:
CI_PIPELINE_ID: ${{github.run_number}}
steps:

2
.gitignore vendored
View File

@@ -111,3 +111,5 @@ InfrastructureAgent/daemon.pid
App/greenlock/.greenlockrc
App/greenlock/greenlock.d/config.json
App/greenlock/greenlock.d/config.json.bak
Examples/otel-dotnet/bin/Debug/net6.0/Grpc.Core.Api.dll.txt
InfrastructureAgent/oneuptime-infrastructure-agent

View File

@@ -50,4 +50,7 @@ marketing/*/*
licenses/*
certifications/*
ApiReference/public/assets/*
JavaScriptSDK/src/cli/server-monitor/out/scripts/prettify/*
JavaScriptSDK/src/cli/server-monitor/out/scripts/prettify/*
CommonServer/Tests/TestingUtils/__mocks__/Stripe.mock.ts

View File

@@ -4,5 +4,9 @@
"semi": true,
"singleQuote": true,
"bracketSpacing": true,
"arrowParens": "avoid"
"arrowParens": "avoid",
"plugins": ["@trivago/prettier-plugin-sort-imports"],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true,
"importOrderParserPlugins": ["typescript", "decorators", "dynamicImport", "jsx"]
}

21
.vscode/launch.json vendored
View File

@@ -19,6 +19,14 @@
}
],
"configurations": [
{
"name": "Debug Infrastructure Agent",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "./InfrastructureAgent",
"args": ["start"],
},
{
"name": "Node.js - Debug Current File",
"type": "node",
@@ -208,19 +216,6 @@
"debug:test"
],
},
{
"name": "Probe: Debug Tests",
"type": "node",
"restart": true,
"autoAttachChildProcesses": true,
"request": "launch",
"cwd": "${workspaceRoot}/Probe",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run-script",
"debug:test"
],
},
{
"name": "Accounts: Debug Local Files",
"type": "node",

View File

@@ -3,7 +3,7 @@
#
# Pull base image nodejs image.
FROM node:21.7.2-alpine3.18
FROM node:21.7.3-alpine3.18
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global

View File

@@ -1,7 +1,7 @@
import App from 'CommonServer/Utils/StartServer';
import { PromiseVoidFunction } from 'Common/Types/FunctionTypes';
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
import logger from 'CommonServer/Utils/Logger';
import App from 'CommonServer/Utils/StartServer';
export const APP_NAME: string = 'accounts';
@@ -30,7 +30,7 @@ const init: PromiseVoidFunction = async (): Promise<void> => {
init().catch((err: Error) => {
logger.error(err);
logger.info('Exiting node process');
logger.error('Exiting node process');
process.exit(1);
});

View File

@@ -1,4 +1,4 @@
{
"watch": ["webpack.config.js"],
"exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && echo 'HOST=localhost' >> /usr/src/app/dev-env/.env && echo 'USE_HTTPS=false' >> /usr/src/app/dev-env/.env && webpack-dev-server --port=3003 --mode=development"
"exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && echo 'USE_HTTPS=false' >> /usr/src/app/dev-env/.env && webpack-dev-server --port=3003 --mode=development"
}

View File

@@ -16,9 +16,9 @@
"express": "^4.19.2",
"file-loader": "^6.2.0",
"Model": "file:../Model",
"react": "^18.2.0",
"react-dom": "^18.1.0",
"react-router-dom": "^6.22.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.23.1",
"sass-loader": "^13.3.3",
"style-loader": "^3.3.4",
"ts-loader": "^9.5.1",
@@ -35,19 +35,19 @@
}
},
"../Common": {
"name": "common",
"name": "@oneuptime/common",
"version": "1.0.0",
"license": "MIT",
"license": "Apache-2.0",
"dependencies": {
"@types/crypto-js": "^4.2.2",
"@types/uuid": "^8.3.4",
"axios": "^1.6.7",
"axios": "^1.6.8",
"crypto-js": "^4.1.1",
"json5": "^2.2.3",
"moment": "^2.30.1",
"moment-timezone": "^0.5.45",
"posthog-js": "^1.104.4",
"reflect-metadata": "^0.2.1",
"posthog-js": "^1.116.6",
"reflect-metadata": "^0.2.2",
"slugify": "^1.6.5",
"typeorm": "^0.3.20",
"uuid": "^8.3.2"
@@ -61,49 +61,46 @@
}
},
"../CommonServer": {
"name": "common-server",
"name": "@oneuptime/common-server",
"version": "1.0.0",
"license": "MIT",
"license": "Apache-2.0",
"dependencies": {
"@clickhouse/client": "^0.2.7",
"@elastic/elasticsearch": "^8.11.0",
"@clickhouse/client": "^0.2.10",
"@elastic/elasticsearch": "^8.12.1",
"@opentelemetry/api": "^1.7.0",
"@opentelemetry/api-logs": "^0.48.0",
"@opentelemetry/exporter-logs-otlp-http": "^0.48.0",
"@opentelemetry/exporter-metrics-otlp-proto": "^0.48.0",
"@opentelemetry/exporter-trace-otlp-proto": "^0.48.0",
"@opentelemetry/api-logs": "^0.49.1",
"@opentelemetry/auto-instrumentations-node": "^0.43.0",
"@opentelemetry/exporter-logs-otlp-http": "^0.49.1",
"@opentelemetry/exporter-metrics-otlp-proto": "^0.49.1",
"@opentelemetry/exporter-trace-otlp-proto": "^0.49.1",
"@opentelemetry/id-generator-aws-xray": "^1.2.1",
"@opentelemetry/instrumentation-express": "^0.35.0",
"@opentelemetry/instrumentation-http": "^0.48.0",
"@opentelemetry/sdk-logs": "^0.48.0",
"@opentelemetry/sdk-logs": "^0.49.1",
"@opentelemetry/sdk-metrics": "^1.21.0",
"@opentelemetry/sdk-node": "^0.48.0",
"@opentelemetry/sdk-trace-node": "^1.21.0",
"@socket.io/redis-adapter": "^8.2.1",
"acme-client": "^5.3.0",
"airtable": "^0.12.2",
"axios": "^1.6.4",
"bullmq": "^5.3.3",
"Common": "file:../Common",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"cron-parser": "^4.8.1",
"dotenv": "^16.4.1",
"ejs": "^3.1.8",
"express": "^4.17.3",
"dotenv": "^16.4.4",
"ejs": "^3.1.10",
"express": "^4.19.2",
"ioredis": "^5.3.2",
"json2csv": "^5.0.7",
"jsonwebtoken": "^9.0.0",
"markdown-it": "^13.0.1",
"Model": "file:../Model",
"node-cron": "^3.0.3",
"nodemailer": "^6.9.9",
"nodemailer": "^6.9.10",
"pg": "^8.7.3",
"socket.io": "^4.7.2",
"socket.io": "^4.7.4",
"stripe": "^10.17.0",
"twilio": "^4.19.3",
"twilio": "^4.22.0",
"typeorm": "^0.3.20",
"typeorm-extension": "^2.2.13",
"vm2": "^3.9.14"
"typeorm-extension": "^2.2.13"
},
"devDependencies": {
"@faker-js/faker": "^6.3.1",
@@ -124,43 +121,48 @@
}
},
"../CommonUI": {
"name": "common-ui",
"name": "@oneuptime/common-ui",
"version": "1.0.0",
"license": "MIT",
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.24.1",
"@monaco-editor/react": "^4.4.6",
"@opentelemetry/api": "^1.7.0",
"@opentelemetry/context-zone": "^1.21.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.48.0",
"@opentelemetry/instrumentation": "^0.48.0",
"@opentelemetry/instrumentation-fetch": "^0.48.0",
"@opentelemetry/instrumentation-xml-http-request": "^0.48.0",
"@nivo/core": "^0.85.1",
"@nivo/line": "^0.85.1",
"@opentelemetry/api": "^1.8.0",
"@opentelemetry/context-zone": "^1.22.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.49.1",
"@opentelemetry/instrumentation": "^0.49.1",
"@opentelemetry/instrumentation-fetch": "^0.49.1",
"@opentelemetry/instrumentation-xml-http-request": "^0.49.1",
"@opentelemetry/resources": "^1.21.0",
"@opentelemetry/sdk-trace-web": "^1.21.0",
"@opentelemetry/semantic-conventions": "^1.21.0",
"@tippyjs/react": "^4.2.6",
"@types/react-highlight": "^0.12.8",
"Common": "file:../Common",
"formik": "^2.2.9",
"history": "^5.3.0",
"lodash": "^4.17.21",
"Model": "file:../Model",
"moment-timezone": "^0.5.44",
"moment-timezone": "^0.5.45",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-beautiful-dnd": "^13.1.1",
"react-big-calendar": "^1.8.7",
"react-big-calendar": "^1.11.2",
"react-color": "^2.19.3",
"react-dom": "^18.1.0",
"react-dropzone": "^14.2.2",
"react-error-boundary": "^4.0.12",
"react-error-boundary": "^4.0.13",
"react-highlight": "^0.15.0",
"react-markdown": "^8.0.3",
"react-router-dom": "^6.21.3",
"react-router-dom": "^6.22.3",
"react-select": "^5.4.0",
"react-spinners": "^0.13.6",
"react-toggle": "^4.1.3",
"reactflow": "^11.10.3",
"reactflow": "^11.10.4",
"remark-gfm": "^3.0.1",
"socket.io-client": "^4.7.4",
"socket.io-client": "^4.7.5",
"tippy.js": "^6.3.7",
"universal-cookie": "^4.0.4",
"use-async-effect": "^2.2.6"
@@ -186,9 +188,9 @@
}
},
"../Model": {
"name": "model",
"name": "@oneuptime/model",
"version": "1.0.0",
"license": "ISC",
"license": "Apache-2.0",
"dependencies": {
"Common": "file:../Common",
"typeorm": "^0.3.20"
@@ -265,9 +267,10 @@
}
},
"node_modules/@remix-run/router": {
"version": "1.15.3",
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.3.tgz",
"integrity": "sha512-Oy8rmScVrVxWZVOpEF57ovlnhpZ8CCPlnIIumVcV9nFdiSIrus99+Lw78ekXyGvVDlIsFJbSfmSovJUhCWYV3w==",
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.16.1.tgz",
"integrity": "sha512-es2g3dq6Nb07iFxGk5GuHN20RwBZOsuDQN7izWIisUcv9r+d2C5jQxqmgkdebXgReWfiyUabcki6Fg77mSNrig==",
"license": "MIT",
"engines": {
"node": ">=14.0.0"
}
@@ -2062,9 +2065,9 @@
}
},
"node_modules/react": {
"version": "18.2.0",
"resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
"integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
"version": "18.3.1",
"resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
"integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
"dependencies": {
"loose-envify": "^1.1.0"
},
@@ -2073,23 +2076,24 @@
}
},
"node_modules/react-dom": {
"version": "18.2.0",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
"integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
"version": "18.3.1",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
"integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",
"dependencies": {
"loose-envify": "^1.1.0",
"scheduler": "^0.23.0"
"scheduler": "^0.23.2"
},
"peerDependencies": {
"react": "^18.2.0"
"react": "^18.3.1"
}
},
"node_modules/react-router": {
"version": "6.22.3",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.3.tgz",
"integrity": "sha512-dr2eb3Mj5zK2YISHK++foM9w4eBnO23eKnZEDs7c880P6oKbrjz/Svg9+nxqtHQK+oMW4OtjZca0RqPglXxguQ==",
"version": "6.23.1",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-6.23.1.tgz",
"integrity": "sha512-fzcOaRF69uvqbbM7OhvQyBTFDVrrGlsFdS3AL+1KfIBtGETibHzi3FkoTRyiDJnWNc2VxrfvR+657ROHjaNjqQ==",
"license": "MIT",
"dependencies": {
"@remix-run/router": "1.15.3"
"@remix-run/router": "1.16.1"
},
"engines": {
"node": ">=14.0.0"
@@ -2099,12 +2103,13 @@
}
},
"node_modules/react-router-dom": {
"version": "6.22.3",
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.3.tgz",
"integrity": "sha512-7ZILI7HjcE+p31oQvwbokjk6OA/bnFxrhJ19n82Ex9Ph8fNAq+Hm/7KchpMGlTgWhUxRHMMCut+vEtNpWpowKw==",
"version": "6.23.1",
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.23.1.tgz",
"integrity": "sha512-utP+K+aSTtEdbWpC+4gxhdlPFwuEfDKq8ZrPFU65bbRJY+l706qjR7yaidBpo3MSeA/fzwbXWbKBI6ftOnP3OQ==",
"license": "MIT",
"dependencies": {
"@remix-run/router": "1.15.3",
"react-router": "6.22.3"
"@remix-run/router": "1.16.1",
"react-router": "6.23.1"
},
"engines": {
"node": ">=14.0.0"
@@ -2187,9 +2192,9 @@
}
},
"node_modules/scheduler": {
"version": "0.23.0",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz",
"integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==",
"version": "0.23.2",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",
"integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",
"dependencies": {
"loose-envify": "^1.1.0"
}

View File

@@ -34,9 +34,9 @@
"express": "^4.19.2",
"file-loader": "^6.2.0",
"Model": "file:../Model",
"react": "^18.2.0",
"react-dom": "^18.1.0",
"react-router-dom": "^6.22.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.23.1",
"sass-loader": "^13.3.3",
"style-loader": "^3.3.4",
"ts-loader": "^9.5.1",

View File

@@ -1,18 +1,18 @@
import React, { ReactElement } from 'react';
import {
Routes,
Route,
useNavigate,
useLocation,
useParams,
} from 'react-router-dom';
import ForgotPasswordPage from './Pages/ForgotPassword';
import LoginPage from './Pages/Login';
import NotFound from './Pages/NotFound';
import ForgotPasswordPage from './Pages/ForgotPassword';
import RegisterPage from './Pages/Register';
import Navigation from 'CommonUI/src/Utils/Navigation';
import VerifyEmail from './Pages/VerifyEmail';
import ResetPasswordPage from './Pages/ResetPassword';
import VerifyEmail from './Pages/VerifyEmail';
import Navigation from 'CommonUI/src/Utils/Navigation';
import React, { ReactElement } from 'react';
import {
Route,
Routes,
useLocation,
useNavigate,
useParams,
} from 'react-router-dom';
function App(): ReactElement {
Navigation.setNavigateHook(useNavigate());

View File

@@ -1,10 +1,9 @@
import App from './App';
import Telemetry from 'CommonUI/src/Utils/Telemetry';
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import { BrowserRouter } from 'react-router-dom';
import Telemetry from 'CommonUI/src/Utils/Telemetry';
Telemetry.init({
serviceName: 'Accounts',
});

View File

@@ -1,12 +1,12 @@
import React, { useState } from 'react';
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
import User from 'Model/Models/User';
import Route from 'Common/Types/API/Route';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
import Link from 'CommonUI/src/Components/Link/Link';
import { FORGOT_PASSWORD_API_URL } from '../Utils/ApiPaths';
import Route from 'Common/Types/API/Route';
import URL from 'Common/Types/API/URL';
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import Link from 'CommonUI/src/Components/Link/Link';
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
import User from 'Model/Models/User';
import React, { useState } from 'react';
const ForgotPassword: () => JSX.Element = () => {
const apiUrl: URL = FORGOT_PASSWORD_API_URL;

View File

@@ -1,19 +1,20 @@
import React, { useState } from 'react';
import User from 'Model/Models/User';
import Route from 'Common/Types/API/Route';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
import Link from 'CommonUI/src/Components/Link/Link';
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
import { LOGIN_API_URL } from '../Utils/ApiPaths';
import Route from 'Common/Types/API/Route';
import URL from 'Common/Types/API/URL';
import { JSONObject } from 'Common/Types/JSON';
import LoginUtil from '../Utils/Login';
import UserUtil from 'CommonUI/src/Utils/User';
import Navigation from 'CommonUI/src/Utils/Navigation';
import { DASHBOARD_URL } from 'CommonUI/src/Config';
import Alert, { AlertType } from 'CommonUI/src/Components/Alerts/Alert';
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import Link from 'CommonUI/src/Components/Link/Link';
import { DASHBOARD_URL } from 'CommonUI/src/Config';
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
import UiAnalytics from 'CommonUI/src/Utils/Analytics';
import LoginUtil from 'CommonUI/src/Utils/Login';
import Navigation from 'CommonUI/src/Utils/Navigation';
import UserUtil from 'CommonUI/src/Utils/User';
import User from 'Model/Models/User';
import React, { useState } from 'react';
import useAsyncEffect from 'use-async-effect';
const LoginPage: () => JSX.Element = () => {
const apiUrl: URL = LOGIN_API_URL;
@@ -28,6 +29,16 @@ const LoginPage: () => JSX.Element = () => {
const [showSsoTip, setShowSSOTip] = useState<boolean>(false);
const [initialValues, setInitialValues] = React.useState<JSONObject>({});
useAsyncEffect(async () => {
if (Navigation.getQueryStringByName('email')) {
setInitialValues({
email: Navigation.getQueryStringByName('email'),
});
}
}, []);
return (
<div className="flex min-h-full flex-col justify-center py-12 sm:px-6 lg:px-8">
<div className="">
@@ -66,9 +77,13 @@ const LoginPage: () => JSX.Element = () => {
field: {
email: true,
},
title: 'Email',
fieldType: FormFieldSchemaType.Email,
placeholder: 'jeff@example.com',
required: true,
disabled: Boolean(
initialValues && initialValues['email']
),
title: 'Email',
dataTestId: 'email',
},
{
@@ -108,7 +123,7 @@ const LoginPage: () => JSX.Element = () => {
}}
maxPrimaryButtonWidth={true}
footer={
<div className="actions pointer text-center mt-4 hover:underline fw-semibold">
<div className="actions text-center mt-4 hover:underline fw-semibold">
<div>
{!showSsoTip && (
<div
@@ -123,11 +138,9 @@ const LoginPage: () => JSX.Element = () => {
{showSsoTip && (
<div className="text-gray-500 text-sm">
Please sign in with your username
and password. Once you have signed
in, you&apos;ll be able to sign in
via SSO that&apos;s configured for
your project.
Please sign in with your SSO
provider like Okta, Auth0, Entra ID
or any other SAML 2.0 provider.
</div>
)}
</div>

View File

@@ -1,26 +1,26 @@
import React, { useState } from 'react';
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
import User from 'Model/Models/User';
import Link from 'CommonUI/src/Components/Link/Link';
import Route from 'Common/Types/API/Route';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
import LoginUtil from '../Utils/Login';
import { JSONObject } from 'Common/Types/JSON';
import UserUtil from 'CommonUI/src/Utils/User';
import Navigation from 'CommonUI/src/Utils/Navigation';
import { BILLING_ENABLED, DASHBOARD_URL } from 'CommonUI/src/Config';
import URL from 'Common/Types/API/URL';
import { SIGNUP_API_URL } from '../Utils/ApiPaths';
import Fields from 'CommonUI/src/Components/Forms/Types/Fields';
import Route from 'Common/Types/API/Route';
import URL from 'Common/Types/API/URL';
import Dictionary from 'Common/Types/Dictionary';
import { JSONObject } from 'Common/Types/JSON';
import ErrorMessage from 'CommonUI/src/Components/ErrorMessage/ErrorMessage';
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
import Fields from 'CommonUI/src/Components/Forms/Types/Fields';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import Link from 'CommonUI/src/Components/Link/Link';
import PageLoader from 'CommonUI/src/Components/Loader/PageLoader';
import { BILLING_ENABLED, DASHBOARD_URL } from 'CommonUI/src/Config';
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
import BaseAPI from 'CommonUI/src/Utils/API/API';
import UiAnalytics from 'CommonUI/src/Utils/Analytics';
import LocalStorage from 'CommonUI/src/Utils/LocalStorage';
import Reseller from 'Model/Models/Reseller';
import LoginUtil from 'CommonUI/src/Utils/Login';
import ModelAPI, { ListResult } from 'CommonUI/src/Utils/ModelAPI/ModelAPI';
import BaseAPI from 'CommonUI/src/Utils/API/API';
import ErrorMessage from 'CommonUI/src/Components/ErrorMessage/ErrorMessage';
import PageLoader from 'CommonUI/src/Components/Loader/PageLoader';
import Navigation from 'CommonUI/src/Utils/Navigation';
import UserUtil from 'CommonUI/src/Utils/User';
import Reseller from 'Model/Models/Reseller';
import User from 'Model/Models/User';
import React, { useState } from 'react';
import useAsyncEffect from 'use-async-effect';
const RegisterPage: () => JSX.Element = () => {

View File

@@ -1,14 +1,13 @@
import React, { useState } from 'react';
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
import User from 'Model/Models/User';
import Link from 'CommonUI/src/Components/Link/Link';
import Route from 'Common/Types/API/Route';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
import URL from 'Common/Types/API/URL';
import { RESET_PASSWORD_API_URL } from '../Utils/ApiPaths';
import Route from 'Common/Types/API/Route';
import URL from 'Common/Types/API/URL';
import ModelForm, { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import Link from 'CommonUI/src/Components/Link/Link';
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
import Navigation from 'CommonUI/src/Utils/Navigation';
import User from 'Model/Models/User';
import React, { useState } from 'react';
const RegisterPage: () => JSX.Element = () => {
const apiUrl: URL = RESET_PASSWORD_API_URL;

View File

@@ -1,17 +1,17 @@
import React, { useEffect, useState } from 'react';
import { VERIFY_EMAIL_API_URL } from '../Utils/ApiPaths';
import Route from 'Common/Types/API/Route';
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
import URL from 'Common/Types/API/URL';
import { PromiseVoidFunction } from 'Common/Types/FunctionTypes';
import ObjectID from 'Common/Types/ObjectID';
import { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
import Link from 'CommonUI/src/Components/Link/Link';
import PageLoader from 'CommonUI/src/Components/Loader/PageLoader';
import ModelAPI from 'CommonUI/src/Utils/ModelAPI/ModelAPI';
import EmailVerificationToken from 'Model/Models/EmailVerificationToken';
import { VERIFY_EMAIL_API_URL } from '../Utils/ApiPaths';
import { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
import Navigation from 'CommonUI/src/Utils/Navigation';
import ObjectID from 'Common/Types/ObjectID';
import URL from 'Common/Types/API/URL';
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
import API from 'CommonUI/src/Utils/API/API';
import { PromiseVoidFunction } from 'Common/Types/FunctionTypes';
import ModelAPI from 'CommonUI/src/Utils/ModelAPI/ModelAPI';
import Navigation from 'CommonUI/src/Utils/Navigation';
import EmailVerificationToken from 'Model/Models/EmailVerificationToken';
import React, { useEffect, useState } from 'react';
const VerifyEmail: () => JSX.Element = () => {
const apiUrl: URL = VERIFY_EMAIL_API_URL;

View File

@@ -3,7 +3,7 @@
#
# Pull base image nodejs image.
FROM node:21.7.2-alpine3.18
FROM node:21.7.3-alpine3.18
RUN mkdir /tmp/npm && chmod 2777 /tmp/npm && chown 1000:1000 /tmp/npm && npm config set cache /tmp/npm --global

View File

@@ -1,7 +1,7 @@
import App from 'CommonServer/Utils/StartServer';
import { PromiseVoidFunction } from 'Common/Types/FunctionTypes';
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
import logger from 'CommonServer/Utils/Logger';
import { PromiseVoidFunction } from 'Common/Types/FunctionTypes';
import App from 'CommonServer/Utils/StartServer';
export const APP_NAME: string = 'admin';
@@ -31,7 +31,7 @@ const init: PromiseVoidFunction = async (): Promise<void> => {
init().catch((err: Error) => {
logger.error(err);
logger.info('Exiting node process');
logger.error('Exiting node process');
process.exit(1);
});

View File

@@ -1,4 +1,4 @@
{
"watch": ["webpack.config.js"],
"exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && echo 'HOST=localhost' >> /usr/src/app/dev-env/.env && echo 'USE_HTTPS=false' >> /usr/src/app/dev-env/.env && webpack-dev-server --port=3158 --mode=development"
"exec": "export DEBUG=express:* && printenv > /usr/src/app/dev-env/.env && echo 'USE_HTTPS=false' >> /usr/src/app/dev-env/.env && webpack-dev-server --port=3158 --mode=development"
}

View File

@@ -14,9 +14,9 @@
"dotenv": "^16.4.5",
"file-loader": "^6.2.0",
"Model": "file:../Model",
"react": "^18.2.0",
"react-dom": "^18.1.0",
"react-router-dom": "^6.22.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.23.1",
"style-loader": "^3.3.4"
},
"devDependencies": {
@@ -35,21 +35,21 @@
}
},
"../Common": {
"name": "common",
"name": "@oneuptime/common",
"version": "1.0.0",
"license": "MIT",
"license": "Apache-2.0",
"dependencies": {
"@types/crypto-js": "^4.1.1",
"@types/crypto-js": "^4.2.2",
"@types/uuid": "^8.3.4",
"axios": "^1.6.2",
"axios": "^1.6.8",
"crypto-js": "^4.1.1",
"json5": "^2.2.3",
"moment": "^2.29.2",
"moment-timezone": "^0.5.40",
"posthog-js": "^1.77.0",
"reflect-metadata": "^0.1.13",
"moment": "^2.30.1",
"moment-timezone": "^0.5.45",
"posthog-js": "^1.130.1",
"reflect-metadata": "^0.2.2",
"slugify": "^1.6.5",
"typeorm": "^0.3.6",
"typeorm": "^0.3.20",
"uuid": "^8.3.2"
},
"devDependencies": {
@@ -61,40 +61,47 @@
}
},
"../CommonServer": {
"name": "common-server",
"name": "@oneuptime/common-server",
"version": "1.0.0",
"license": "MIT",
"license": "Apache-2.0",
"dependencies": {
"@clickhouse/client": "^0.2.1",
"@elastic/elasticsearch": "^8.1.0",
"@clickhouse/client": "^0.2.10",
"@elastic/elasticsearch": "^8.12.1",
"@opentelemetry/api": "^1.7.0",
"@opentelemetry/auto-instrumentations-node": "^0.40.1",
"@opentelemetry/sdk-node": "^0.45.1",
"@socket.io/redis-adapter": "^8.2.1",
"@opentelemetry/api-logs": "^0.49.1",
"@opentelemetry/auto-instrumentations-node": "^0.43.0",
"@opentelemetry/exporter-logs-otlp-http": "^0.49.1",
"@opentelemetry/exporter-metrics-otlp-proto": "^0.49.1",
"@opentelemetry/exporter-trace-otlp-proto": "^0.49.1",
"@opentelemetry/id-generator-aws-xray": "^1.2.1",
"@opentelemetry/sdk-logs": "^0.49.1",
"@opentelemetry/sdk-metrics": "^1.21.0",
"@opentelemetry/sdk-node": "^0.48.0",
"@opentelemetry/sdk-trace-node": "^1.21.0",
"acme-client": "^5.3.0",
"airtable": "^0.12.2",
"axios": "^1.6.2",
"bullmq": "^3.6.6",
"bullmq": "^5.3.3",
"Common": "file:../Common",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"cron-parser": "^4.8.1",
"dotenv": "^16.0.0",
"ejs": "^3.1.8",
"express": "^4.17.3",
"dotenv": "^16.4.4",
"ejs": "^3.1.10",
"express": "^4.19.2",
"ioredis": "^5.3.2",
"json2csv": "^5.0.7",
"jsonwebtoken": "^9.0.0",
"markdown-it": "^13.0.1",
"marked": "^12.0.2",
"Model": "file:../Model",
"nodemailer": "^6.7.3",
"node-cron": "^3.0.3",
"nodemailer": "^6.9.10",
"pg": "^8.7.3",
"socket.io": "^4.7.2",
"redis-semaphore": "^5.5.1",
"socket.io": "^4.7.4",
"stripe": "^10.17.0",
"twilio": "^4.19.3",
"typeorm": "^0.3.10",
"typeorm-extension": "^2.2.13",
"vm2": "^3.9.14",
"winston": "^3.6.0"
"twilio": "^4.22.0",
"typeorm": "^0.3.20",
"typeorm-extension": "^2.2.13"
},
"devDependencies": {
"@faker-js/faker": "^6.3.1",
@@ -105,8 +112,8 @@
"@types/jest": "^27.4.1",
"@types/json2csv": "^5.0.3",
"@types/jsonwebtoken": "^8.5.9",
"@types/markdown-it": "^12.2.3",
"@types/node": "^17.0.22",
"@types/node-cron": "^3.0.7",
"@types/nodemailer": "^6.4.7",
"jest": "^27.5.1",
"jest-mock-extended": "^3.0.5",
@@ -114,34 +121,48 @@
}
},
"../CommonUI": {
"name": "common-ui",
"name": "@oneuptime/common-ui",
"version": "1.0.0",
"license": "MIT",
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.24.1",
"@monaco-editor/react": "^4.4.6",
"@nivo/core": "^0.86.0",
"@nivo/line": "^0.86.0",
"@opentelemetry/api": "^1.8.0",
"@opentelemetry/context-zone": "^1.23.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.51.0",
"@opentelemetry/instrumentation": "^0.51.0",
"@opentelemetry/instrumentation-fetch": "^0.51.0",
"@opentelemetry/instrumentation-xml-http-request": "^0.51.0",
"@opentelemetry/resources": "^1.23.0",
"@opentelemetry/sdk-trace-web": "^1.23.0",
"@opentelemetry/semantic-conventions": "^1.23.0",
"@tippyjs/react": "^4.2.6",
"@types/react-highlight": "^0.12.8",
"Common": "file:../Common",
"formik": "^2.2.9",
"formik": "^2.4.6",
"history": "^5.3.0",
"lodash": "^4.17.21",
"Model": "file:../Model",
"moment-timezone": "^0.5.43",
"moment-timezone": "^0.5.45",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react": "^18.3.1",
"react-beautiful-dnd": "^13.1.1",
"react-big-calendar": "^1.8.5",
"react-big-calendar": "^1.11.2",
"react-color": "^2.19.3",
"react-dom": "^18.1.0",
"react-dom": "^18.3.1",
"react-dropzone": "^14.2.2",
"react-error-boundary": "^4.0.11",
"react-error-boundary": "^4.0.13",
"react-highlight": "^0.15.0",
"react-markdown": "^8.0.3",
"react-router-dom": "^6.3.0",
"react-router-dom": "^6.22.3",
"react-select": "^5.4.0",
"react-spinners": "^0.13.6",
"react-toggle": "^4.1.3",
"reactflow": "^11.5.3",
"reactflow": "^11.11.1",
"remark-gfm": "^3.0.1",
"socket.io-client": "^4.7.2",
"socket.io-client": "^4.7.5",
"tippy.js": "^6.3.7",
"universal-cookie": "^4.0.4",
"use-async-effect": "^2.2.6"
@@ -167,12 +188,12 @@
}
},
"../Model": {
"name": "model",
"name": "@oneuptime/model",
"version": "1.0.0",
"license": "ISC",
"license": "Apache-2.0",
"dependencies": {
"Common": "file:../Common",
"typeorm": "^0.3.17"
"typeorm": "^0.3.20"
},
"devDependencies": {
"@types/jest": "^27.4.1",
@@ -4009,9 +4030,10 @@
}
},
"node_modules/@remix-run/router": {
"version": "1.15.2",
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.2.tgz",
"integrity": "sha512-+Rnav+CaoTE5QJc4Jcwh5toUpnVLKYbpU6Ys0zqbakqbaLQHeglLVHPfxOiQqdNmUy5C2lXz5dwC6tQNX2JW2Q==",
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.16.1.tgz",
"integrity": "sha512-es2g3dq6Nb07iFxGk5GuHN20RwBZOsuDQN7izWIisUcv9r+d2C5jQxqmgkdebXgReWfiyUabcki6Fg77mSNrig==",
"license": "MIT",
"engines": {
"node": ">=14.0.0"
}
@@ -16705,9 +16727,9 @@
}
},
"node_modules/react": {
"version": "18.2.0",
"resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
"integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
"version": "18.3.1",
"resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz",
"integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==",
"dependencies": {
"loose-envify": "^1.1.0"
},
@@ -16900,15 +16922,15 @@
}
},
"node_modules/react-dom": {
"version": "18.2.0",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
"integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
"version": "18.3.1",
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz",
"integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==",
"dependencies": {
"loose-envify": "^1.1.0",
"scheduler": "^0.23.0"
"scheduler": "^0.23.2"
},
"peerDependencies": {
"react": "^18.2.0"
"react": "^18.3.1"
}
},
"node_modules/react-error-overlay": {
@@ -16936,11 +16958,12 @@
}
},
"node_modules/react-router": {
"version": "6.22.2",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.2.tgz",
"integrity": "sha512-YD3Dzprzpcq+tBMHBS822tCjnWD3iIZbTeSXMY9LPSG541EfoBGyZ3bS25KEnaZjLcmQpw2AVLkFyfgXY8uvcw==",
"version": "6.23.1",
"resolved": "https://registry.npmjs.org/react-router/-/react-router-6.23.1.tgz",
"integrity": "sha512-fzcOaRF69uvqbbM7OhvQyBTFDVrrGlsFdS3AL+1KfIBtGETibHzi3FkoTRyiDJnWNc2VxrfvR+657ROHjaNjqQ==",
"license": "MIT",
"dependencies": {
"@remix-run/router": "1.15.2"
"@remix-run/router": "1.16.1"
},
"engines": {
"node": ">=14.0.0"
@@ -16950,12 +16973,13 @@
}
},
"node_modules/react-router-dom": {
"version": "6.22.2",
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.2.tgz",
"integrity": "sha512-WgqxD2qySEIBPZ3w0sHH+PUAiamDeszls9tzqMPBDA1YYVucTBXLU7+gtRfcSnhe92A3glPnvSxK2dhNoAVOIQ==",
"version": "6.23.1",
"resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.23.1.tgz",
"integrity": "sha512-utP+K+aSTtEdbWpC+4gxhdlPFwuEfDKq8ZrPFU65bbRJY+l706qjR7yaidBpo3MSeA/fzwbXWbKBI6ftOnP3OQ==",
"license": "MIT",
"dependencies": {
"@remix-run/router": "1.15.2",
"react-router": "6.22.2"
"@remix-run/router": "1.16.1",
"react-router": "6.23.1"
},
"engines": {
"node": ">=14.0.0"
@@ -17681,9 +17705,9 @@
}
},
"node_modules/scheduler": {
"version": "0.23.0",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz",
"integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==",
"version": "0.23.2",
"resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz",
"integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==",
"dependencies": {
"loose-envify": "^1.1.0"
}

View File

@@ -9,9 +9,9 @@
"dotenv": "^16.4.5",
"file-loader": "^6.2.0",
"Model": "file:../Model",
"react": "^18.2.0",
"react-dom": "^18.1.0",
"react-router-dom": "^6.22.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.23.1",
"style-loader": "^3.3.4"
},
"scripts": {

View File

@@ -1,29 +1,28 @@
import React from 'react';
import {
Routes,
Route as PageRoute,
useNavigate,
useLocation,
useParams,
} from 'react-router-dom';
import Navigation from 'CommonUI/src/Utils/Navigation';
import User from 'CommonUI/src/Utils/User';
import URL from 'Common/Types/API/URL';
import { ACCOUNTS_URL, DASHBOARD_URL } from 'CommonUI/src/Config';
import MasterPage from './Components/MasterPage/MasterPage';
import RouteMap from './Utils/RouteMap';
import PageMap from './Utils/PageMap';
import Init from './Pages/Init/Init';
import Projects from './Pages/Projects/Index';
import Users from './Pages/Users/Index';
import Logout from './Pages/Logout/Logout';
import Projects from './Pages/Projects/Index';
import SettingsAPIKey from './Pages/Settings/APIKey/Index';
import SettingsAuthentication from './Pages/Settings/Authentication/Index';
import SettingsCallSMS from './Pages/Settings/CallSMS/Index';
// Settings Pages.
import SettingsEmail from './Pages/Settings/Email/Index';
import SettingsCallSMS from './Pages/Settings/CallSMS/Index';
import SettingsProbes from './Pages/Settings/Probes/Index';
import SettingsAuthentication from './Pages/Settings/Authentication/Index';
import SettingsAPIKey from './Pages/Settings/APIKey/Index';
import Users from './Pages/Users/Index';
import PageMap from './Utils/PageMap';
import RouteMap from './Utils/RouteMap';
import URL from 'Common/Types/API/URL';
import { ACCOUNTS_URL, DASHBOARD_URL } from 'CommonUI/src/Config';
import Navigation from 'CommonUI/src/Utils/Navigation';
import User from 'CommonUI/src/Utils/User';
import React from 'react';
import {
Route as PageRoute,
Routes,
useLocation,
useNavigate,
useParams,
} from 'react-router-dom';
const App: () => JSX.Element = () => {
Navigation.setNavigateHook(useNavigate());

View File

@@ -1,14 +1,14 @@
import React from 'react';
import Footer from 'CommonUI/src/Components/Footer/Footer';
import URL from 'Common/Types/API/URL';
import API from 'Common/Utils/API';
import { HOST, HTTP_PROTOCOL } from 'CommonUI/src/Config';
import { JSONObject } from 'Common/Types/JSON';
import BadDataException from 'Common/Types/Exception/BadDataException';
import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal';
import Dictionary from 'Common/Types/Dictionary';
import HTTPResponse from 'Common/Types/API/HTTPResponse';
import URL from 'Common/Types/API/URL';
import Dictionary from 'Common/Types/Dictionary';
import BadDataException from 'Common/Types/Exception/BadDataException';
import { PromiseVoidFunction } from 'Common/Types/FunctionTypes';
import { JSONObject } from 'Common/Types/JSON';
import API from 'Common/Utils/API';
import Footer from 'CommonUI/src/Components/Footer/Footer';
import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal';
import { HOST, HTTP_PROTOCOL } from 'CommonUI/src/Config';
import React from 'react';
const DashboardFooter: () => JSX.Element = () => {
const [showAboutModal, setShowAboutModal] = React.useState<boolean>(false);

View File

@@ -1,11 +1,11 @@
import React, { FunctionComponent, ReactElement } from 'react';
import Help from './Help';
import Header from 'CommonUI/src/Components/Header/Header';
import Logo from './Logo';
import Button, { ButtonStyleType } from 'CommonUI/src/Components/Button/Button';
import Navigation from 'CommonUI/src/Utils/Navigation';
import { DASHBOARD_URL } from 'CommonUI/src/Config';
import UserProfile from './UserProfile';
import Button, { ButtonStyleType } from 'CommonUI/src/Components/Button/Button';
import Header from 'CommonUI/src/Components/Header/Header';
import { DASHBOARD_URL } from 'CommonUI/src/Config';
import Navigation from 'CommonUI/src/Utils/Navigation';
import React, { FunctionComponent, ReactElement } from 'react';
const DashboardHeader: FunctionComponent = (): ReactElement => {
return (

View File

@@ -1,10 +1,10 @@
import React, { ReactElement, useState } from 'react';
import URL from 'Common/Types/API/URL';
import IconProp from 'Common/Types/Icon/IconProp';
import HeaderIconDropdownButton from 'CommonUI/src/Components/Header/HeaderIconDropdownButton';
import IconDropdownItem from 'CommonUI/src/Components/Header/IconDropdown/IconDropdownItem';
import IconDropdownMenu from 'CommonUI/src/Components/Header/IconDropdown/IconDropdownMenu';
import IconDropdownRow from 'CommonUI/src/Components/Header/IconDropdown/IconDropdownRow';
import IconProp from 'Common/Types/Icon/IconProp';
import URL from 'Common/Types/API/URL';
import React, { ReactElement, useState } from 'react';
const Help: () => JSX.Element = (): ReactElement => {
const [isDropdownVisible, setIsDropdownVisible] = useState<boolean>(false);

View File

@@ -1,9 +1,8 @@
// Tailwind
import React, { FunctionComponent, ReactElement } from 'react';
import Route from 'Common/Types/API/Route';
import Image from 'CommonUI/src/Components/Image/Image';
import OneUptimeLogo from 'CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg';
import Route from 'Common/Types/API/Route';
import React, { FunctionComponent, ReactElement } from 'react';
export interface ComponentProps {
onClick: () => void;

View File

@@ -1,8 +1,8 @@
import React, { ReactElement, useState } from 'react';
import HeaderIconDropdownButton from 'CommonUI/src/Components/Header/HeaderIconDropdownButton';
import Notifications from 'CommonUI/src/Components/Header/Notifications/Notifications';
import NotificationItem from 'CommonUI/src/Components/Header/Notifications/NotificationItem';
import IconProp from 'Common/Types/Icon/IconProp';
import HeaderIconDropdownButton from 'CommonUI/src/Components/Header/HeaderIconDropdownButton';
import NotificationItem from 'CommonUI/src/Components/Header/Notifications/NotificationItem';
import Notifications from 'CommonUI/src/Components/Header/Notifications/Notifications';
import React, { ReactElement, useState } from 'react';
const DashboardHeader: () => JSX.Element = (): ReactElement => {
const [isDropdownVisible, setIsDropdownVisible] = useState<boolean>(false);

View File

@@ -1,22 +1,22 @@
import SubscriptionPlan from 'Common/Types/Billing/SubscriptionPlan';
import IconProp from 'Common/Types/Icon/IconProp';
import { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
import Field from 'CommonUI/src/Components/Forms/Types/Field';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import ProjectPicker from 'CommonUI/src/Components/Header/ProjectPicker/ProjectPicker';
import ModelFormModal from 'CommonUI/src/Components/ModelFormModal/ModelFormModal';
import { RadioButton } from 'CommonUI/src/Components/RadioButtons/GroupRadioButtons';
import Toggle from 'CommonUI/src/Components/Toggle/Toggle';
import { BILLING_ENABLED, getAllEnvVars } from 'CommonUI/src/Config';
import { GetReactElementFunction } from 'CommonUI/src/Types/FunctionTypes';
import ProjectUtil from 'CommonUI/src/Utils/Project';
import Project from 'Model/Models/Project';
import React, {
FunctionComponent,
ReactElement,
useState,
useEffect,
useState,
} from 'react';
import ProjectPicker from 'CommonUI/src/Components/Header/ProjectPicker/ProjectPicker';
import IconProp from 'Common/Types/Icon/IconProp';
import Project from 'Model/Models/Project';
import ModelFormModal from 'CommonUI/src/Components/ModelFormModal/ModelFormModal';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import { FormType } from 'CommonUI/src/Components/Forms/ModelForm';
import ProjectUtil from 'CommonUI/src/Utils/Project';
import { BILLING_ENABLED, getAllEnvVars } from 'CommonUI/src/Config';
import SubscriptionPlan from 'Common/Types/Billing/SubscriptionPlan';
import Field from 'CommonUI/src/Components/Forms/Types/Field';
import { RadioButton } from 'CommonUI/src/Components/RadioButtons/GroupRadioButtons';
import Toggle from 'CommonUI/src/Components/Toggle/Toggle';
import { GetReactElementFunction } from 'CommonUI/src/Types/FunctionTypes';
export interface ComponentProps {
projects: Array<Project>;

View File

@@ -1,6 +1,6 @@
import React, { FunctionComponent, ReactElement } from 'react';
import SearchBox from 'CommonUI/src/Components/Header/SearchBox';
import Project from 'Model/Models/Project';
import React, { FunctionComponent, ReactElement } from 'react';
export interface ComponentProps {
onChange: (search: string) => void;

View File

@@ -1,15 +1,15 @@
import React, { FunctionComponent, ReactElement, useState } from 'react';
import IconProp from 'Common/Types/Icon/IconProp';
import Route from 'Common/Types/API/Route';
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
import PageMap from '../../Utils/PageMap';
import BlankProfilePic from 'CommonUI/src/Images/users/blank-profile.svg';
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
import Route from 'Common/Types/API/Route';
import IconProp from 'Common/Types/Icon/IconProp';
import HeaderIconDropdownButton from 'CommonUI/src/Components/Header/HeaderIconDropdownButton';
import IconDropdownItem from 'CommonUI/src/Components/Header/IconDropdown/IconDropdownItem';
import IconDropdownMenu from 'CommonUI/src/Components/Header/IconDropdown/IconDropdownMenu';
import Navigation from 'CommonUI/src/Utils/Navigation';
import { DASHBOARD_URL } from 'CommonUI/src/Config';
import BlankProfilePic from 'CommonUI/src/Images/users/blank-profile.svg';
import Navigation from 'CommonUI/src/Utils/Navigation';
import User from 'CommonUI/src/Utils/User';
import React, { FunctionComponent, ReactElement, useState } from 'react';
const DashboardUserProfile: FunctionComponent = (): ReactElement => {
const [isDropdownVisible, setIsDropdownVisible] = useState<boolean>(false);

View File

@@ -1,9 +1,9 @@
import MasterPage from 'CommonUI/src/Components/MasterPage/MasterPage';
import Footer from '../Footer/Footer';
import Header from '../Header/Header';
import NavBar from '../NavBar/NavBar';
import React, { FunctionComponent, ReactElement } from 'react';
import MasterPage from 'CommonUI/src/Components/MasterPage/MasterPage';
import TopAlert from 'CommonUI/src/Components/TopAlert/TopAlert';
import React, { FunctionComponent, ReactElement } from 'react';
export interface ComponentProps {
children: ReactElement | Array<ReactElement>;

View File

@@ -1,10 +1,10 @@
import React, { FunctionComponent, ReactElement } from 'react';
import NavBar from 'CommonUI/src/Components/Navbar/NavBar';
import NavBarItem from 'CommonUI/src/Components/Navbar/NavBarItem';
import Route from 'Common/Types/API/Route';
import IconProp from 'Common/Types/Icon/IconProp';
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 'CommonUI/src/Components/Navbar/NavBar';
import NavBarItem from 'CommonUI/src/Components/Navbar/NavBarItem';
import React, { FunctionComponent, ReactElement } from 'react';
const DashboardNavbar: FunctionComponent = (): ReactElement => {
return (

View File

@@ -1,8 +1,8 @@
import App from './App';
import Telemetry from 'CommonUI/src/Utils/Telemetry';
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import { BrowserRouter } from 'react-router-dom';
import Telemetry from 'CommonUI/src/Utils/Telemetry';
Telemetry.init({
serviceName: 'AdminDashboard',

View File

@@ -1,9 +1,9 @@
import PageMap from '../../Utils/PageMap';
import RouteMap from '../../Utils/RouteMap';
import PageLoader from 'CommonUI/src/Components/Loader/PageLoader';
import Page from 'CommonUI/src/Components/Page/Page';
import Navigation from 'CommonUI/src/Utils/Navigation';
import React, { FunctionComponent, ReactElement, useEffect } from 'react';
import RouteMap from '../../Utils/RouteMap';
import PageMap from '../../Utils/PageMap';
const Init: FunctionComponent = (): ReactElement => {
useEffect(() => {

View File

@@ -1,16 +1,15 @@
import React, { FunctionComponent, ReactElement, useEffect } from 'react';
import Page from 'CommonUI/src/Components/Page/Page';
import Route from 'Common/Types/API/Route';
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
import PageMap from '../../Utils/PageMap';
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
import Route from 'Common/Types/API/Route';
import { PromiseVoidFunction } from 'Common/Types/FunctionTypes';
import ErrorMessage from 'CommonUI/src/Components/ErrorMessage/ErrorMessage';
import PageLoader from 'CommonUI/src/Components/Loader/PageLoader';
import UserUtil from 'CommonUI/src/Utils/User';
import Navigation from 'CommonUI/src/Utils/Navigation';
import Page from 'CommonUI/src/Components/Page/Page';
import { ACCOUNTS_URL } from 'CommonUI/src/Config';
import UiAnalytics from 'CommonUI/src/Utils/Analytics';
import ErrorMessage from 'CommonUI/src/Components/ErrorMessage/ErrorMessage';
import { PromiseVoidFunction } from 'Common/Types/FunctionTypes';
import Navigation from 'CommonUI/src/Utils/Navigation';
import UserUtil from 'CommonUI/src/Utils/User';
import React, { FunctionComponent, ReactElement, useEffect } from 'react';
const Logout: FunctionComponent = (): ReactElement => {
const [error, setError] = React.useState<string | null>(null);

View File

@@ -1,26 +1,26 @@
import AdminModelAPI from '../../Utils/ModelAPI';
import PageMap from '../../Utils/PageMap';
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
import Route from 'Common/Types/API/Route';
import SubscriptionPlan from 'Common/Types/Billing/SubscriptionPlan';
import Field from 'CommonUI/src/Components/Forms/Types/Field';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
import Page from 'CommonUI/src/Components/Page/Page';
import { RadioButton } from 'CommonUI/src/Components/RadioButtons/GroupRadioButtons';
import Toggle from 'CommonUI/src/Components/Toggle/Toggle';
import FieldType from 'CommonUI/src/Components/Types/FieldType';
import { BILLING_ENABLED, getAllEnvVars } from 'CommonUI/src/Config';
import { GetReactElementFunction } from 'CommonUI/src/Types/FunctionTypes';
import Navigation from 'CommonUI/src/Utils/Navigation';
import Project from 'Model/Models/Project';
import User from 'Model/Models/User';
import React, {
FunctionComponent,
ReactElement,
useEffect,
useState,
} from 'react';
import PageMap from '../../Utils/PageMap';
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
import FieldType from 'CommonUI/src/Components/Types/FieldType';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import Navigation from 'CommonUI/src/Utils/Navigation';
import Project from 'Model/Models/Project';
import User from 'Model/Models/User';
import { BILLING_ENABLED, getAllEnvVars } from 'CommonUI/src/Config';
import Field from 'CommonUI/src/Components/Forms/Types/Field';
import SubscriptionPlan from 'Common/Types/Billing/SubscriptionPlan';
import { RadioButton } from 'CommonUI/src/Components/RadioButtons/GroupRadioButtons';
import Toggle from 'CommonUI/src/Components/Toggle/Toggle';
import AdminModelAPI from '../../Utils/ModelAPI';
import { GetReactElementFunction } from 'CommonUI/src/Types/FunctionTypes';
const Projects: FunctionComponent = (): ReactElement => {
const [isSubscriptionPlanYearly, setIsSubscriptionPlanYearly] =

View File

@@ -1,14 +1,14 @@
import Route from 'Common/Types/API/Route';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
import Page from 'CommonUI/src/Components/Page/Page';
import React, { FunctionComponent, ReactElement } from 'react';
import PageMap from '../../../Utils/PageMap';
import RouteMap, { RouteUtil } from '../../../Utils/RouteMap';
import DashboardSideMenu from '../SideMenu';
import GlobalConfig from 'Model/Models/GlobalConfig';
import Route from 'Common/Types/API/Route';
import ObjectID from 'Common/Types/ObjectID';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
import Page from 'CommonUI/src/Components/Page/Page';
import FieldType from 'CommonUI/src/Components/Types/FieldType';
import GlobalConfig from 'Model/Models/GlobalConfig';
import React, { FunctionComponent, ReactElement } from 'react';
const Settings: FunctionComponent = (): ReactElement => {
return (

View File

@@ -1,14 +1,14 @@
import Route from 'Common/Types/API/Route';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
import Page from 'CommonUI/src/Components/Page/Page';
import React, { FunctionComponent, ReactElement } from 'react';
import PageMap from '../../../Utils/PageMap';
import RouteMap, { RouteUtil } from '../../../Utils/RouteMap';
import DashboardSideMenu from '../SideMenu';
import GlobalConfig from 'Model/Models/GlobalConfig';
import Route from 'Common/Types/API/Route';
import ObjectID from 'Common/Types/ObjectID';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
import Page from 'CommonUI/src/Components/Page/Page';
import FieldType from 'CommonUI/src/Components/Types/FieldType';
import GlobalConfig from 'Model/Models/GlobalConfig';
import React, { FunctionComponent, ReactElement } from 'react';
const Settings: FunctionComponent = (): ReactElement => {
return (

View File

@@ -1,14 +1,14 @@
import Route from 'Common/Types/API/Route';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
import Page from 'CommonUI/src/Components/Page/Page';
import React, { FunctionComponent, ReactElement } from 'react';
import PageMap from '../../../Utils/PageMap';
import RouteMap, { RouteUtil } from '../../../Utils/RouteMap';
import DashboardSideMenu from '../SideMenu';
import GlobalConfig from 'Model/Models/GlobalConfig';
import Route from 'Common/Types/API/Route';
import ObjectID from 'Common/Types/ObjectID';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
import Page from 'CommonUI/src/Components/Page/Page';
import FieldType from 'CommonUI/src/Components/Types/FieldType';
import GlobalConfig from 'Model/Models/GlobalConfig';
import React, { FunctionComponent, ReactElement } from 'react';
const Settings: FunctionComponent = (): ReactElement => {
return (

View File

@@ -1,21 +1,21 @@
import Route from 'Common/Types/API/Route';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
import Page from 'CommonUI/src/Components/Page/Page';
import React, { FunctionComponent, ReactElement, useEffect } from 'react';
import PageMap from '../../../Utils/PageMap';
import RouteMap, { RouteUtil } from '../../../Utils/RouteMap';
import DashboardSideMenu from '../SideMenu';
import GlobalConfig, { EmailServerType } from 'Model/Models/GlobalConfig';
import ObjectID from 'Common/Types/ObjectID';
import FieldType from 'CommonUI/src/Components/Types/FieldType';
import ModelAPI from 'CommonUI/src/Utils/ModelAPI/ModelAPI';
import PageLoader from 'CommonUI/src/Components/Loader/PageLoader';
import ErrorMessage from 'CommonUI/src/Components/ErrorMessage/ErrorMessage';
import DropdownUtil from 'CommonUI/src/Utils/Dropdown';
import Pill from 'CommonUI/src/Components/Pill/Pill';
import Route from 'Common/Types/API/Route';
import { Green, Red } from 'Common/Types/BrandColors';
import { PromiseVoidFunction } from 'Common/Types/FunctionTypes';
import ObjectID from 'Common/Types/ObjectID';
import ErrorMessage from 'CommonUI/src/Components/ErrorMessage/ErrorMessage';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import PageLoader from 'CommonUI/src/Components/Loader/PageLoader';
import CardModelDetail from 'CommonUI/src/Components/ModelDetail/CardModelDetail';
import Page from 'CommonUI/src/Components/Page/Page';
import Pill from 'CommonUI/src/Components/Pill/Pill';
import FieldType from 'CommonUI/src/Components/Types/FieldType';
import DropdownUtil from 'CommonUI/src/Utils/Dropdown';
import ModelAPI from 'CommonUI/src/Utils/ModelAPI/ModelAPI';
import GlobalConfig, { EmailServerType } from 'Model/Models/GlobalConfig';
import React, { FunctionComponent, ReactElement, useEffect } from 'react';
const Settings: FunctionComponent = (): ReactElement => {
const [emailServerType, setemailServerType] =

View File

@@ -1,23 +1,23 @@
import Route from 'Common/Types/API/Route';
import Page from 'CommonUI/src/Components/Page/Page';
import React, { FunctionComponent, ReactElement, useState } from 'react';
import AdminModelAPI from '../../../Utils/ModelAPI';
import PageMap from '../../../Utils/PageMap';
import RouteMap, { RouteUtil } from '../../../Utils/RouteMap';
import DashboardSideMenu from '../SideMenu';
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
import Probe from 'Model/Models/Probe';
import FieldType from 'CommonUI/src/Components/Types/FieldType';
import OneUptimeDate from 'Common/Types/Date';
import { Green, Red } from 'Common/Types/BrandColors';
import Statusbubble from 'CommonUI/src/Components/StatusBubble/StatusBubble';
import ProbeElement from 'CommonUI/src/Components/Probe/Probe';
import Route from 'Common/Types/API/Route';
import IsNull from 'Common/Types/BaseDatabase/IsNull';
import Banner from 'CommonUI/src/Components/Banner/Banner';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import { ButtonStyleType } from 'CommonUI/src/Components/Button/Button';
import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal';
import AdminModelAPI from '../../../Utils/ModelAPI';
import { Green, Red } from 'Common/Types/BrandColors';
import OneUptimeDate from 'Common/Types/Date';
import { ErrorFunction, VoidFunction } from 'Common/Types/FunctionTypes';
import Banner from 'CommonUI/src/Components/Banner/Banner';
import { ButtonStyleType } from 'CommonUI/src/Components/Button/Button';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal';
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
import Page from 'CommonUI/src/Components/Page/Page';
import ProbeElement from 'CommonUI/src/Components/Probe/Probe';
import Statusbubble from 'CommonUI/src/Components/StatusBubble/StatusBubble';
import FieldType from 'CommonUI/src/Components/Types/FieldType';
import Probe from 'Model/Models/Probe';
import React, { FunctionComponent, ReactElement, useState } from 'react';
const Settings: FunctionComponent = (): ReactElement => {
const [showKeyModal, setShowKeyModal] = useState<boolean>(false);

View File

@@ -1,11 +1,11 @@
import React, { ReactElement } from 'react';
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 SideMenu from 'CommonUI/src/Components/SideMenu/SideMenu';
import SideMenuItem from 'CommonUI/src/Components/SideMenu/SideMenuItem';
import SideMenuSection from 'CommonUI/src/Components/SideMenu/SideMenuSection';
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
import PageMap from '../../Utils/PageMap';
import React, { ReactElement } from 'react';
const DashboardSideMenu: () => JSX.Element = (): ReactElement => {
return (

View File

@@ -1,15 +1,31 @@
import Route from 'Common/Types/API/Route';
import Page from 'CommonUI/src/Components/Page/Page';
import React, { FunctionComponent, ReactElement } from 'react';
import PageMap from '../../Utils/PageMap';
import RouteMap, { RouteUtil } from '../../Utils/RouteMap';
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
import FieldType from 'CommonUI/src/Components/Types/FieldType';
import Route from 'Common/Types/API/Route';
import { ErrorFunction } from 'Common/Types/FunctionTypes';
import { ButtonStyleType } from 'CommonUI/src/Components/Button/Button';
import FormFieldSchemaType from 'CommonUI/src/Components/Forms/Types/FormFieldSchemaType';
import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal';
import ModelTable from 'CommonUI/src/Components/ModelTable/ModelTable';
import Page from 'CommonUI/src/Components/Page/Page';
import FieldType from 'CommonUI/src/Components/Types/FieldType';
import API from 'CommonUI/src/Utils/API/API';
import ModelAPI from 'CommonUI/src/Utils/ModelAPI/ModelAPI';
import Navigation from 'CommonUI/src/Utils/Navigation';
import User from 'Model/Models/User';
import React, { FunctionComponent, ReactElement, useState } from 'react';
const Users: FunctionComponent = (): ReactElement => {
const [showConfirmVerifyEmailModal, setShowConfirmVerifyEmailModal] =
useState<boolean>(false);
const [selectedUser, setSelectedUser] = useState<User | null>(null);
const [error, setError] = useState<string | null>(null);
const [isConfimModalLoading, setIsConfirmModalLoading] =
useState<boolean>(false);
const [refreshItemsTrigger, setRefreshItemsTrigger] =
useState<boolean>(false);
return (
<Page
title={'Users'}
@@ -34,6 +50,7 @@ const Users: FunctionComponent = (): ReactElement => {
isDeleteable={false}
isEditable={false}
showViewIdButton={true}
refreshToggle={refreshItemsTrigger}
isCreateable={true}
name="Users"
isViewable={false}
@@ -41,6 +58,30 @@ const Users: FunctionComponent = (): ReactElement => {
title: 'Users',
description: 'Here is a list of users in OneUptime.',
}}
actionButtons={[
{
title: 'Verify Email',
buttonStyleType: ButtonStyleType.NORMAL,
isVisible: (item: User) => {
return !item.isEmailVerified;
},
onClick: async (
item: User,
onCompleteAction: VoidFunction,
onError: ErrorFunction
) => {
try {
setSelectedUser(item);
setShowConfirmVerifyEmailModal(true);
onCompleteAction();
} catch (err) {
onCompleteAction();
onError(err as Error);
}
},
},
]}
noItemsMessage={'No users found.'}
formFields={[
{
@@ -111,6 +152,13 @@ const Users: FunctionComponent = (): ReactElement => {
title: 'Email',
type: FieldType.Email,
},
{
field: {
isEmailVerified: true,
},
title: 'Email Verified',
type: FieldType.Boolean,
},
{
field: {
createdAt: true,
@@ -120,6 +168,53 @@ const Users: FunctionComponent = (): ReactElement => {
},
]}
/>
{error ? (
<ConfirmModal
title={`Error`}
description={error}
submitButtonText={'Close'}
onSubmit={async () => {
setError(null);
}}
submitButtonType={ButtonStyleType.NORMAL}
/>
) : (
<></>
)}
{showConfirmVerifyEmailModal && selectedUser ? (
<ConfirmModal
title={`Verify Email`}
description={`Are you sure you want to verify the email - ${selectedUser.email}?`}
isLoading={isConfimModalLoading}
submitButtonText={'Verify Email'}
onClose={async () => {
setShowConfirmVerifyEmailModal(false);
setSelectedUser(null);
}}
onSubmit={async () => {
try {
setIsConfirmModalLoading(true);
await ModelAPI.updateById<User>({
modelType: User,
id: selectedUser.id!,
data: {
isEmailVerified: true,
},
});
} catch (err) {
setError(API.getFriendlyMessage(err as Error));
}
setRefreshItemsTrigger(!refreshItemsTrigger);
setIsConfirmModalLoading(false);
setShowConfirmVerifyEmailModal(false);
}}
/>
) : (
<></>
)}
</Page>
);
};

View File

@@ -1,7 +1,7 @@
import Route from 'Common/Types/API/Route';
import Dictionary from 'Common/Types/Dictionary';
import PageMap from './PageMap';
import RouteParams from './RouteParams';
import Route from 'Common/Types/API/Route';
import Dictionary from 'Common/Types/Dictionary';
import ObjectID from 'Common/Types/ObjectID';
const RouteMap: Dictionary<Route> = {

View File

@@ -1,22 +1,22 @@
import AuthenticationServiceHandler from './Service/Authentication';
import DataTypeServiceHandler from './Service/DataType';
import ErrorServiceHandler from './Service/Errors';
import IntroductionServiceHandler from './Service/Introduction';
import ModelServiceHandler from './Service/Model';
import PageNotFoundServiceHandler from './Service/PageNotFound';
import PaginationServiceHandler from './Service/Pagination';
import PermissionServiceHandler from './Service/Permissions';
import StatusServiceHandler from './Service/Status';
import { StaticPath } from './Utils/Config';
import ResourceUtil, { ModelDocumentation } from './Utils/Resources';
import Dictionary from 'Common/Types/Dictionary';
import FeatureSet from 'CommonServer/Types/FeatureSet';
import Express, {
ExpressApplication,
ExpressRequest,
ExpressResponse,
ExpressStatic,
} from 'CommonServer/Utils/Express';
import ResourceUtil, { ModelDocumentation } from './Utils/Resources';
import IntroductionServiceHandler from './Service/Introduction';
import ErrorServiceHandler from './Service/Errors';
import PermissionServiceHandler from './Service/Permissions';
import AuthenticationServiceHandler from './Service/Authentication';
import PageNotFoundServiceHandler from './Service/PageNotFound';
import ModelServiceHandler from './Service/Model';
import PaginationServiceHandler from './Service/Pagination';
import StatusServiceHandler from './Service/Status';
import DataTypeServiceHandler from './Service/DataType';
import Dictionary from 'Common/Types/Dictionary';
import { StaticPath } from './Utils/Config';
import FeatureSet from 'CommonServer/Types/FeatureSet';
const APIReferenceFeatureSet: FeatureSet = {
init: async (): Promise<void> => {

View File

@@ -1,6 +1,6 @@
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
import { ViewsPath } from '../Utils/Config';
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();

View File

@@ -1,8 +1,8 @@
import { CodeExamplesPath, ViewsPath } from '../Utils/Config';
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
import LocalCache from 'CommonServer/Infrastructure/LocalCache';
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
import LocalFile from 'CommonServer/Utils/LocalFile';
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
import { CodeExamplesPath, ViewsPath } from '../Utils/Config';
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();

View File

@@ -1,6 +1,6 @@
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
import { ViewsPath } from '../Utils/Config';
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();

View File

@@ -1,6 +1,6 @@
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
import { ViewsPath } from '../Utils/Config';
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
const FeaturedResources: Array<ModelDocumentation> =

View File

@@ -1,3 +1,7 @@
import { CodeExamplesPath, ViewsPath } from '../Utils/Config';
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
import PageNotFoundServiceHandler from './PageNotFound';
import { AppApiRoute } from 'Common/ServiceRoute';
import { ColumnAccessControl } from 'Common/Types/BaseDatabase/AccessControl';
import { getTableColumns } from 'Common/Types/Database/TableColumn';
import Dictionary from 'Common/Types/Dictionary';
@@ -6,13 +10,9 @@ import Permission, {
PermissionHelper,
PermissionProps,
} from 'Common/Types/Permission';
import { AppApiRoute } from 'Common/ServiceRoute';
import LocalCache from 'CommonServer/Infrastructure/LocalCache';
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
import LocalFile from 'CommonServer/Utils/LocalFile';
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
import PageNotFoundServiceHandler from './PageNotFound';
import { CodeExamplesPath, ViewsPath } from '../Utils/Config';
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
const ResourceDictionary: Dictionary<ModelDocumentation> =

View File

@@ -1,6 +1,6 @@
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
import { ViewsPath } from '../Utils/Config';
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();

View File

@@ -1,8 +1,8 @@
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
import LocalFile from 'CommonServer/Utils/LocalFile';
import LocalCache from 'CommonServer/Infrastructure/LocalCache';
import { CodeExamplesPath, ViewsPath } from '../Utils/Config';
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
import LocalCache from 'CommonServer/Infrastructure/LocalCache';
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
import LocalFile from 'CommonServer/Utils/LocalFile';
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();

View File

@@ -1,7 +1,7 @@
import { ViewsPath } from '../Utils/Config';
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
import { PermissionHelper, PermissionProps } from 'Common/Types/Permission';
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
import { ViewsPath } from '../Utils/Config';
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();

View File

@@ -1,6 +1,6 @@
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
import { ViewsPath } from '../Utils/Config';
import ResourceUtil, { ModelDocumentation } from '../Utils/Resources';
import { ExpressRequest, ExpressResponse } from 'CommonServer/Utils/Express';
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();

View File

@@ -1,8 +1,8 @@
import BaseModel from 'Common/Models/BaseModel';
import Models from 'Model/Models/Index';
import ArrayUtil from 'Common/Types/ArrayUtil';
import Dictionary from 'Common/Types/Dictionary';
import { IsBillingEnabled } from 'CommonServer/EnvironmentConfig';
import Models from 'Model/Models/Index';
export interface ModelDocumentation {
name: string;

View File

@@ -1,453 +1,364 @@
import User from 'Model/Models/User';
import UserService, {
Service as UserServiceType,
} from 'CommonServer/Services/UserService';
import BillingPaymentMethodAPI from 'CommonServer/API/BillingPaymentMethodAPI';
import BaseAPI from 'CommonServer/API/BaseAPI';
import BaseAnalyticsAPI from 'CommonServer/API/BaseAnalyticsAPI';
import BillingInvoiceAPI from 'CommonServer/API/BillingInvoiceAPI';
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
import ProjectAPI from 'CommonServer/API/ProjectAPI';
import GlobalConfigAPI from 'CommonServer/API/GlobalConfigAPI';
import ShortLink from 'Model/Models/ShortLink';
import ShortLinkService, {
Service as ShortLinkServiceType,
} from 'CommonServer/Services/ShortLinkService';
import IncidentOwnerTeam from 'Model/Models/IncidentOwnerTeam';
import IncidentOwnerTeamService, {
Service as IncidentOwnerTeamServiceType,
} from 'CommonServer/Services/IncidentOwnerTeamService';
import StatusPageHistoryChartBarColorRule from 'Model/Models/StatusPageHistoryChartBarColorRule';
import StatusPageHistoryChartBarColorRuleService, {
Service as StatusPageHistoryChartBarColorRuleServiceType,
} from 'CommonServer/Services/StatusPageHistoryChartBarColorRuleService';
import IncidentTemplate from 'Model/Models/IncidentTemplate';
import IncidentTemplateService, {
Service as IncidentTemplateServiceType,
} from 'CommonServer/Services/IncidentTemplateService';
import IncidentNoteTemplate from 'Model/Models/IncidentNoteTemplate';
import IncidentNoteTemplateService, {
Service as IncidentNoteTemplateServiceType,
} from 'CommonServer/Services/IncidentNoteTemplateService';
import ScheduledMaintenanceNoteTemplate from 'Model/Models/ScheduledMaintenanceNoteTemplate';
import ScheduledMaintenanceNoteTemplateService, {
Service as ScheduledMaintenanceNoteTemplateServiceType,
} from 'CommonServer/Services/ScheduledMaintenanceNoteTemplateService';
import IncidentTemplateOwnerTeam from 'Model/Models/IncidentTemplateOwnerTeam';
import IncidentTemplateOwnerTeamService, {
Service as IncidentTemplateOwnerTeamServiceType,
} from 'CommonServer/Services/IncidentTemplateOwnerTeamService';
import IncidentTemplateOwnerUser from 'Model/Models/IncidentTemplateOwnerUser';
import IncidentTemplateOwnerUserService, {
Service as IncidentTemplateOwnerUserServiceType,
} from 'CommonServer/Services/IncidentTemplateOwnerUserService';
import MonitorOwnerTeam from 'Model/Models/MonitorOwnerTeam';
import MonitorOwnerTeamService, {
Service as MonitorOwnerTeamServiceType,
} from 'CommonServer/Services/MonitorOwnerTeamService';
import StatusPageOwnerTeam from 'Model/Models/StatusPageOwnerTeam';
import StatusPageOwnerTeamService, {
Service as StatusPageOwnerTeamServiceType,
} from 'CommonServer/Services/StatusPageOwnerTeamService';
import ScheduledMaintenanceOwnerTeam from 'Model/Models/ScheduledMaintenanceOwnerTeam';
import ScheduledMaintenanceOwnerTeamService, {
Service as ScheduledMaintenanceOwnerTeamServiceType,
} from 'CommonServer/Services/ScheduledMaintenanceOwnerTeamService';
import IncidentOwnerUser from 'Model/Models/IncidentOwnerUser';
import IncidentOwnerUserService, {
Service as IncidentOwnerUserServiceType,
} from 'CommonServer/Services/IncidentOwnerUserService';
import MonitorOwnerUser from 'Model/Models/MonitorOwnerUser';
import MonitorOwnerUserService, {
Service as MonitorOwnerUserServiceType,
} from 'CommonServer/Services/MonitorOwnerUserService';
import StatusPageOwnerUser from 'Model/Models/StatusPageOwnerUser';
import StatusPageOwnerUserService, {
Service as StatusPageOwnerUserServiceType,
} from 'CommonServer/Services/StatusPageOwnerUserService';
import ScheduledMaintenanceOwnerUser from 'Model/Models/ScheduledMaintenanceOwnerUser';
import ScheduledMaintenanceOwnerUserService, {
Service as ScheduledMaintenanceOwnerUserServiceType,
} from 'CommonServer/Services/ScheduledMaintenanceOwnerUserService';
import Workflow from 'Model/Models/Workflow';
import WorkflowService, {
Service as WorkflowServiceType,
} from 'CommonServer/Services/WorkflowService';
import WorkflowLog from 'Model/Models/WorkflowLog';
import WorkflowLogService, {
Service as WorkflowLogServiceType,
} from 'CommonServer/Services/WorkflowLogService';
import ProjectSsoAPI from 'CommonServer/API/ProjectSSO';
import SmsLog from 'Model/Models/SmsLog';
import SmsLogService, {
Service as SmsLogServiceType,
} from 'CommonServer/Services/SmsLogService';
import EmailLog from 'Model/Models/EmailLog';
import EmailLogService, {
Service as EmailLogServiceType,
} from 'CommonServer/Services/EmailLogService';
import Reseller from 'Model/Models/Reseller';
import ResellerService, {
Service as ResellerServiceType,
} from 'CommonServer/Services/ResellerService';
import CallLog from 'Model/Models/CallLog';
import CallLogService, {
Service as CallLogServiceType,
} from 'CommonServer/Services/CallLogService';
import StatusPageSSO from 'Model/Models/StatusPageSso';
import StatusPageSSOService, {
Service as StatusPageSSOServiceType,
} from 'CommonServer/Services/StatusPageSsoService';
import WorkflowVariable from 'Model/Models/WorkflowVariable';
import WorkflowVariableService, {
Service as WorkflowVariableServiceType,
} from 'CommonServer/Services/WorkflowVariableService';
import TelemetryService from 'Model/Models/TelemetryService';
import TelemetryServiceService, {
Service as TelemetryServiceServiceType,
} from 'CommonServer/Services/TelemetryServiceService';
import MonitorProbe from 'Model/Models/MonitorProbe';
import MonitorProbeService, {
Service as MonitorProbeServiceType,
} from 'CommonServer/Services/MonitorProbeService';
import StatusPagePrivateUser from 'Model/Models/StatusPagePrivateUser';
import StatusPagePrivateUserService, {
Service as StatusPagePrivateUserServiceType,
} from 'CommonServer/Services/StatusPagePrivateUserService';
import StatusPageFooterLink from 'Model/Models/StatusPageFooterLink';
import StatusPageFooterLinkService, {
Service as StatusPageFooterLinkServiceType,
} from 'CommonServer/Services/StatusPageFooterLinkService';
import StatusPageHeaderLink from 'Model/Models/StatusPageHeaderLink';
import StatusPageHeaderLinkService, {
Service as StatusPageHeaderLinkServiceType,
} from 'CommonServer/Services/StatusPageHeaderLinkService';
import BillingPaymentMethodAPI from 'CommonServer/API/BillingPaymentMethodAPI';
import FileAPI from 'CommonServer/API/FileAPI';
import UserNotificationRule from 'Model/Models/UserNotificationRule';
import UserNotificationRuleService, {
Service as UserNotificationRuleServiceType,
} from 'CommonServer/Services/UserNotificationRuleService';
import StatusPageAnnouncement from 'Model/Models/StatusPageAnnouncement';
import StatusPageAnnouncementService, {
Service as StatusPageAnnouncementServiceType,
} from 'CommonServer/Services/StatusPageAnnouncementService';
import EmailVerificationToken from 'Model/Models/EmailVerificationToken';
import EmailVerificationTokenService, {
Service as EmailVerificationTokenServiceType,
} from 'CommonServer/Services/EmailVerificationTokenService';
import Team from 'Model/Models/Team';
import TeamService, {
Service as TeamServiceType,
} from 'CommonServer/Services/TeamService';
import TeamMember from 'Model/Models/TeamMember';
import TeamMemberService, {
TeamMemberService as TeamMemberServiceType,
} from 'CommonServer/Services/TeamMemberService';
import TeamPermission from 'Model/Models/TeamPermission';
import TeamPermissionService, {
Service as TeamPermissionServiceType,
} from 'CommonServer/Services/TeamPermissionService';
import Label from 'Model/Models/Label';
import LabelService, {
Service as LabelServiceType,
} from 'CommonServer/Services/LabelService';
import ProjectSmtpConfig from 'Model/Models/ProjectSmtpConfig';
import ProjectSmtpConfigService, {
Service as ProjectSMTPConfigServiceType,
} from 'CommonServer/Services/ProjectSmtpConfigService';
import ApiKey from 'Model/Models/ApiKey';
import ApiKeyService, {
Service as ApiKeyServiceType,
} from 'CommonServer/Services/ApiKeyService';
import ApiKeyPermission from 'Model/Models/ApiKeyPermission';
import GlobalConfigAPI from 'CommonServer/API/GlobalConfigAPI';
import MonitorGroupAPI from 'CommonServer/API/MonitorGroupAPI';
import NotificationAPI from 'CommonServer/API/NotificationAPI';
import Ingestor from 'CommonServer/API/ProbeAPI';
import ProjectAPI from 'CommonServer/API/ProjectAPI';
import ProjectSsoAPI from 'CommonServer/API/ProjectSSO';
// Import API
import ResellerPlanAPI from 'CommonServer/API/ResellerPlanAPI';
import ShortLinkAPI from 'CommonServer/API/ShortLinkAPI';
import StatusPageAPI from 'CommonServer/API/StatusPageAPI';
import StatusPageDomainAPI from 'CommonServer/API/StatusPageDomainAPI';
import StatusPageSubscriberAPI from 'CommonServer/API/StatusPageSubscriberAPI';
import UserCallAPI from 'CommonServer/API/UserCallAPI';
// User Notification methods.
import UserEmailAPI from 'CommonServer/API/UserEmailAPI';
import UserNotificationLogTimelineAPI from 'CommonServer/API/UserOnCallLogTimelineAPI';
import UserSMSAPI from 'CommonServer/API/UserSmsAPI';
import ApiKeyPermissionService, {
Service as ApiKeyPermissionServiceType,
} from 'CommonServer/Services/ApiKeyPermissionService';
import Monitor from 'Model/Models/Monitor';
import MonitorService, {
Service as MonitorServiceType,
} from 'CommonServer/Services/MonitorService';
import OnCallDutyPolicy from 'Model/Models/OnCallDutyPolicy';
import OnCallDutyPolicyService, {
Service as OnCallDutyPolicyServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyService';
import MonitorStatus from 'Model/Models/MonitorStatus';
import MonitorStatusService, {
Service as MonitorStatusServiceType,
} from 'CommonServer/Services/MonitorStatusService';
import MonitorTimelineStatus from 'Model/Models/MonitorStatusTimeline';
import MonitorTimelineStatusService, {
Service as MonitorTimelineStatusServiceType,
} from 'CommonServer/Services/MonitorStatusTimelineService';
import ScheduledMaintenanceState from 'Model/Models/ScheduledMaintenanceState';
import ScheduledMaintenanceStateService, {
Service as ScheduledMaintenanceStateServiceType,
} from 'CommonServer/Services/ScheduledMaintenanceStateService';
import ScheduledMaintenance from 'Model/Models/ScheduledMaintenance';
import ScheduledMaintenanceService, {
Service as ScheduledMaintenanceServiceType,
} from 'CommonServer/Services/ScheduledMaintenanceService';
import ScheduledMaintenanceStateTimeline from 'Model/Models/ScheduledMaintenanceStateTimeline';
import ScheduledMaintenanceStateTimelineService, {
Service as ScheduledMaintenanceStateTimelineServiceType,
} from 'CommonServer/Services/ScheduledMaintenanceStateTimelineService';
import ScheduledMaintenanceInternalNote from 'Model/Models/ScheduledMaintenanceInternalNote';
import ScheduledMaintenanceInternalNoteService, {
Service as ScheduledMaintenanceInternalNoteServiceType,
} from 'CommonServer/Services/ScheduledMaintenanceInternalNoteService';
import ScheduledMaintenancePublicNote from 'Model/Models/ScheduledMaintenancePublicNote';
import ScheduledMaintenancePublicNoteService, {
Service as ScheduledMaintenancePublicNoteServiceType,
} from 'CommonServer/Services/ScheduledMaintenancePublicNoteService';
import IncidentState from 'Model/Models/IncidentState';
import IncidentStateService, {
Service as IncidentStateServiceType,
} from 'CommonServer/Services/IncidentStateService';
import Incident from 'Model/Models/Incident';
import IncidentService, {
Service as IncidentServiceType,
} from 'CommonServer/Services/IncidentService';
import IncidentStateTimeline from 'Model/Models/IncidentStateTimeline';
import IncidentStateTimelineService, {
Service as IncidentStateTimelineServiceType,
} from 'CommonServer/Services/IncidentStateTimelineService';
import IncidentInternalNote from 'Model/Models/IncidentInternalNote';
import IncidentInternalNoteService, {
Service as IncidentInternalNoteServiceType,
} from 'CommonServer/Services/IncidentInternalNoteService';
import IncidentPublicNote from 'Model/Models/IncidentPublicNote';
import IncidentPublicNoteService, {
Service as IncidentPublicNoteServiceType,
} from 'CommonServer/Services/IncidentPublicNoteService';
import Domain from 'Model/Models/Domain';
import ApiKeyService, {
Service as ApiKeyServiceType,
} from 'CommonServer/Services/ApiKeyService';
import CallLogService, {
Service as CallLogServiceType,
} from 'CommonServer/Services/CallLogService';
import DomainService, {
Service as DomainServiceType,
} from 'CommonServer/Services/DomainService';
import StatusPageGroup from 'Model/Models/StatusPageGroup';
import StatusPageGroupService, {
Service as StatusPageGroupServiceType,
} from 'CommonServer/Services/StatusPageGroupService';
import StatusPageResource from 'Model/Models/StatusPageResource';
import StatusPageResourceService, {
Service as StatusPageResourceServiceType,
} from 'CommonServer/Services/StatusPageResourceService';
import IncidentSeverity from 'Model/Models/IncidentSeverity';
import IncidentSeverityService, {
Service as IncidentSeverityServiceType,
} from 'CommonServer/Services/IncidentSeverityService';
import StatusPageDomain from 'Model/Models/StatusPageDomain';
import StatusPageDomainService, {
Service as StatusPageDomainServiceType,
} from 'CommonServer/Services/StatusPageDomainService';
// User Notification methods.
import UserEmailAPI from 'CommonServer/API/UserEmailAPI';
import UserSMSAPI from 'CommonServer/API/UserSmsAPI';
import UserCallAPI from 'CommonServer/API/UserCallAPI';
// Import API
import ResellerPlanAPI from 'CommonServer/API/ResellerPlanAPI';
import StatusPageAPI from 'CommonServer/API/StatusPageAPI';
import ShortLinkAPI from 'CommonServer/API/ShortLinkAPI';
import NotificationAPI from 'CommonServer/API/NotificationAPI';
import MonitorGroupAPI from 'CommonServer/API/MonitorGroupAPI';
import Ingestor from 'CommonServer/API/ProbeAPI';
import StatusPageSubscriberAPI from 'CommonServer/API/StatusPageSubscriberAPI';
// Custom Fields API
import StatusPageCustomField from 'Model/Models/StatusPageCustomField';
import StatusPageCustomFieldService, {
Service as StatusPageCustomFieldServiceType,
} from 'CommonServer/Services/StatusPageCustomFieldService';
import MonitorCustomField from 'Model/Models/MonitorCustomField';
import MonitorCustomFieldService, {
Service as MonitorCustomFieldServiceType,
} from 'CommonServer/Services/MonitorCustomFieldService';
import IncidentCustomField from 'Model/Models/IncidentCustomField';
import EmailLogService, {
Service as EmailLogServiceType,
} from 'CommonServer/Services/EmailLogService';
import EmailVerificationTokenService, {
Service as EmailVerificationTokenServiceType,
} from 'CommonServer/Services/EmailVerificationTokenService';
import IncidentCustomFieldService, {
Service as IncidentCustomFieldServiceType,
} from 'CommonServer/Services/IncidentCustomFieldService';
import OnCallDutyPolicySchedule from 'Model/Models/OnCallDutyPolicySchedule';
import OnCallDutyPolicyScheduleService, {
Service as OnCallDutyPolicyScheduleServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyScheduleService';
import OnCallDutyPolicyScheduleLayer from 'Model/Models/OnCallDutyPolicyScheduleLayer';
import OnCallDutyPolicyScheduleLayerService, {
Service as OnCallDutyPolicyScheduleLayerServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyScheduleLayerService';
import OnCallDutyPolicyScheduleLayerUser from 'Model/Models/OnCallDutyPolicyScheduleLayerUser';
import OnCallDutyPolicyScheduleLayerUserService, {
Service as OnCallDutyPolicyScheduleLayerUserServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyScheduleLayerUserService';
import OnCallDutyPolicyExecutionLogTimeline from 'Model/Models/OnCallDutyPolicyExecutionLogTimeline';
import OnCallDutyPolicyExecutionLogTimelineService, {
Service as OnCallDutyPolicyExecutionLogTimelineServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyExecutionLogTimelineService';
import ScheduledMaintenanceCustomField from 'Model/Models/ScheduledMaintenanceCustomField';
import ScheduledMaintenanceCustomFieldService, {
Service as ScheduledMaintenanceCustomFieldServiceType,
} from 'CommonServer/Services/ScheduledMaintenanceCustomFieldService';
import OnCallDutyPolicyExecutionLog from 'Model/Models/OnCallDutyPolicyExecutionLog';
import OnCallDutyPolicyExecutionLogService, {
Service as OnCallDutyPolicyExecutionLogServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyExecutionLogService';
import PromoCode from 'Model/Models/PromoCode';
import PromoCodeService, {
Service as PromoCodeServiceType,
} from 'CommonServer/Services/PromoCodeService';
import OnCallDutyPolicyEscalationRule from 'Model/Models/OnCallDutyPolicyEscalationRule';
import OnCallDutyPolicyEscalationRuleService, {
Service as OnCallDutyPolicyEscalationRuleServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyEscalationRuleService';
import OnCallDutyPolicyEscalationRuleTeam from 'Model/Models/OnCallDutyPolicyEscalationRuleTeam';
import OnCallDutyPolicyEscalationRuleTeamService, {
Service as OnCallDutyPolicyEscalationRuleTeamServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyEscalationRuleTeamService';
import OnCallDutyPolicyEscalationRuleSchedule from 'Model/Models/OnCallDutyPolicyEscalationRuleSchedule';
import OnCallDutyPolicyEscalationRuleScheduleService, {
Service as OnCallDutyPolicyEscalationRuleScheduleServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyEscalationRuleScheduleService';
import OnCallDutyPolicyEscalationRuleUser from 'Model/Models/OnCallDutyPolicyEscalationRuleUser';
import OnCallDutyPolicyEscalationRuleUserService, {
Service as OnCallDutyPolicyEscalationRuleUserServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyEscalationRuleUserService';
import OnCallDutyPolicyCustomField from 'Model/Models/OnCallDutyPolicyCustomField';
import OnCallDutyPolicyCustomFieldService, {
Service as OnCallDutyPolicyCustomFieldServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyCustomFieldService';
import UserNotificationLogTimelineAPI from 'CommonServer/API/UserOnCallLogTimelineAPI';
import UserOnCallLog from 'Model/Models/UserOnCallLog';
import UserOnCallLogService, {
Service as UserNotificationLogServiceType,
} from 'CommonServer/Services/UserOnCallLogService';
import UserNotificationSetting from 'Model/Models/UserNotificationSetting';
import UserNotificationSettingService, {
Service as UserNotificationSettingServiceType,
} from 'CommonServer/Services/UserNotificationSettingService';
import MonitorGroupOwnerUser from 'Model/Models/MonitorGroupOwnerUser';
import MonitorGroupOwnerUserService, {
Service as MonitorGroupOwnerUserServiceType,
} from 'CommonServer/Services/MonitorGroupOwnerUserService';
import MonitorGroupOwnerTeam from 'Model/Models/MonitorGroupOwnerTeam';
import MonitorGroupOwnerTeamService, {
Service as MonitorGroupOwnerTeamServiceType,
} from 'CommonServer/Services/MonitorGroupOwnerTeamService';
import MonitorGroupResource from 'Model/Models/MonitorGroupResource';
import MonitorGroupResourceService, {
Service as MonitorGroupResourceServiceType,
} from 'CommonServer/Services/MonitorGroupResourceService';
import Log from 'Model/AnalyticsModels/Log';
import IncidentInternalNoteService, {
Service as IncidentInternalNoteServiceType,
} from 'CommonServer/Services/IncidentInternalNoteService';
import IncidentNoteTemplateService, {
Service as IncidentNoteTemplateServiceType,
} from 'CommonServer/Services/IncidentNoteTemplateService';
import IncidentOwnerTeamService, {
Service as IncidentOwnerTeamServiceType,
} from 'CommonServer/Services/IncidentOwnerTeamService';
import IncidentOwnerUserService, {
Service as IncidentOwnerUserServiceType,
} from 'CommonServer/Services/IncidentOwnerUserService';
import IncidentPublicNoteService, {
Service as IncidentPublicNoteServiceType,
} from 'CommonServer/Services/IncidentPublicNoteService';
import IncidentService, {
Service as IncidentServiceType,
} from 'CommonServer/Services/IncidentService';
import IncidentSeverityService, {
Service as IncidentSeverityServiceType,
} from 'CommonServer/Services/IncidentSeverityService';
import IncidentStateService, {
Service as IncidentStateServiceType,
} from 'CommonServer/Services/IncidentStateService';
import IncidentStateTimelineService, {
Service as IncidentStateTimelineServiceType,
} from 'CommonServer/Services/IncidentStateTimelineService';
import IncidentTemplateOwnerTeamService, {
Service as IncidentTemplateOwnerTeamServiceType,
} from 'CommonServer/Services/IncidentTemplateOwnerTeamService';
import IncidentTemplateOwnerUserService, {
Service as IncidentTemplateOwnerUserServiceType,
} from 'CommonServer/Services/IncidentTemplateOwnerUserService';
import IncidentTemplateService, {
Service as IncidentTemplateServiceType,
} from 'CommonServer/Services/IncidentTemplateService';
import LabelService, {
Service as LabelServiceType,
} from 'CommonServer/Services/LabelService';
import LogService, {
LogService as LogServiceType,
} from 'CommonServer/Services/LogService';
import MonitorMetricsByMinute from 'Model/AnalyticsModels/MonitorMetricsByMinute';
import MetricService, {
MetricService as MetricServiceType,
} from 'CommonServer/Services/MetricService';
import MonitorCustomFieldService, {
Service as MonitorCustomFieldServiceType,
} from 'CommonServer/Services/MonitorCustomFieldService';
import MonitorGroupOwnerTeamService, {
Service as MonitorGroupOwnerTeamServiceType,
} from 'CommonServer/Services/MonitorGroupOwnerTeamService';
import MonitorGroupOwnerUserService, {
Service as MonitorGroupOwnerUserServiceType,
} from 'CommonServer/Services/MonitorGroupOwnerUserService';
import MonitorGroupResourceService, {
Service as MonitorGroupResourceServiceType,
} from 'CommonServer/Services/MonitorGroupResourceService';
import MonitorMetricsByMinuteService, {
MonitorMetricsByMinuteService as MonitorMetricsByMinuteServiceType,
} from 'CommonServer/Services/MonitorMetricsByMinuteService';
import Span from 'Model/AnalyticsModels/Span';
import SpanService, {
SpanService as SpanServiceType,
} from 'CommonServer/Services/SpanService';
import TelemetryUsageBilling from 'Model/Models/TelemetryUsageBilling';
import TelemetryUsageBillingService, {
Service as TelemetryUsageBillingServiceType,
} from 'CommonServer/Services/TelemetryUsageBillingService';
import BaseAPI from 'CommonServer/API/BaseAPI';
import BaseAnalyticsAPI from 'CommonServer/API/BaseAnalyticsAPI';
import ProjectCallSMSConfig from 'Model/Models/ProjectCallSMSConfig';
import MonitorOwnerTeamService, {
Service as MonitorOwnerTeamServiceType,
} from 'CommonServer/Services/MonitorOwnerTeamService';
import MonitorOwnerUserService, {
Service as MonitorOwnerUserServiceType,
} from 'CommonServer/Services/MonitorOwnerUserService';
import MonitorProbeService, {
Service as MonitorProbeServiceType,
} from 'CommonServer/Services/MonitorProbeService';
import MonitorSecretService, {
Service as MonitorSecretServiceType,
} from 'CommonServer/Services/MonitorSecretService';
import MonitorService, {
Service as MonitorServiceType,
} from 'CommonServer/Services/MonitorService';
import MonitorStatusService, {
Service as MonitorStatusServiceType,
} from 'CommonServer/Services/MonitorStatusService';
import MonitorTimelineStatusService, {
Service as MonitorTimelineStatusServiceType,
} from 'CommonServer/Services/MonitorStatusTimelineService';
import OnCallDutyPolicyCustomFieldService, {
Service as OnCallDutyPolicyCustomFieldServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyCustomFieldService';
import OnCallDutyPolicyEscalationRuleScheduleService, {
Service as OnCallDutyPolicyEscalationRuleScheduleServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyEscalationRuleScheduleService';
import OnCallDutyPolicyEscalationRuleService, {
Service as OnCallDutyPolicyEscalationRuleServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyEscalationRuleService';
import OnCallDutyPolicyEscalationRuleTeamService, {
Service as OnCallDutyPolicyEscalationRuleTeamServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyEscalationRuleTeamService';
import OnCallDutyPolicyEscalationRuleUserService, {
Service as OnCallDutyPolicyEscalationRuleUserServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyEscalationRuleUserService';
import OnCallDutyPolicyExecutionLogService, {
Service as OnCallDutyPolicyExecutionLogServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyExecutionLogService';
import OnCallDutyPolicyExecutionLogTimelineService, {
Service as OnCallDutyPolicyExecutionLogTimelineServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyExecutionLogTimelineService';
import OnCallDutyPolicyScheduleLayerService, {
Service as OnCallDutyPolicyScheduleLayerServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyScheduleLayerService';
import OnCallDutyPolicyScheduleLayerUserService, {
Service as OnCallDutyPolicyScheduleLayerUserServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyScheduleLayerUserService';
import OnCallDutyPolicyScheduleService, {
Service as OnCallDutyPolicyScheduleServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyScheduleService';
import OnCallDutyPolicyService, {
Service as OnCallDutyPolicyServiceType,
} from 'CommonServer/Services/OnCallDutyPolicyService';
import ProjectCallSMSConfigService, {
Service as ProjectCallSMSConfigServiceType,
} from 'CommonServer/Services/ProjectCallSMSConfigService';
import ProjectSmtpConfigService, {
Service as ProjectSMTPConfigServiceType,
} from 'CommonServer/Services/ProjectSmtpConfigService';
import PromoCodeService, {
Service as PromoCodeServiceType,
} from 'CommonServer/Services/PromoCodeService';
import ResellerService, {
Service as ResellerServiceType,
} from 'CommonServer/Services/ResellerService';
import ScheduledMaintenanceCustomFieldService, {
Service as ScheduledMaintenanceCustomFieldServiceType,
} from 'CommonServer/Services/ScheduledMaintenanceCustomFieldService';
import ScheduledMaintenanceInternalNoteService, {
Service as ScheduledMaintenanceInternalNoteServiceType,
} from 'CommonServer/Services/ScheduledMaintenanceInternalNoteService';
import ScheduledMaintenanceNoteTemplateService, {
Service as ScheduledMaintenanceNoteTemplateServiceType,
} from 'CommonServer/Services/ScheduledMaintenanceNoteTemplateService';
import ScheduledMaintenanceOwnerTeamService, {
Service as ScheduledMaintenanceOwnerTeamServiceType,
} from 'CommonServer/Services/ScheduledMaintenanceOwnerTeamService';
import ScheduledMaintenanceOwnerUserService, {
Service as ScheduledMaintenanceOwnerUserServiceType,
} from 'CommonServer/Services/ScheduledMaintenanceOwnerUserService';
import ScheduledMaintenancePublicNoteService, {
Service as ScheduledMaintenancePublicNoteServiceType,
} from 'CommonServer/Services/ScheduledMaintenancePublicNoteService';
import ScheduledMaintenanceService, {
Service as ScheduledMaintenanceServiceType,
} from 'CommonServer/Services/ScheduledMaintenanceService';
import ScheduledMaintenanceStateService, {
Service as ScheduledMaintenanceStateServiceType,
} from 'CommonServer/Services/ScheduledMaintenanceStateService';
import ScheduledMaintenanceStateTimelineService, {
Service as ScheduledMaintenanceStateTimelineServiceType,
} from 'CommonServer/Services/ScheduledMaintenanceStateTimelineService';
import ShortLinkService, {
Service as ShortLinkServiceType,
} from 'CommonServer/Services/ShortLinkService';
import SmsLogService, {
Service as SmsLogServiceType,
} from 'CommonServer/Services/SmsLogService';
import SpanService, {
SpanService as SpanServiceType,
} from 'CommonServer/Services/SpanService';
import StatusPageAnnouncementService, {
Service as StatusPageAnnouncementServiceType,
} from 'CommonServer/Services/StatusPageAnnouncementService';
import StatusPageCustomFieldService, {
Service as StatusPageCustomFieldServiceType,
} from 'CommonServer/Services/StatusPageCustomFieldService';
import StatusPageFooterLinkService, {
Service as StatusPageFooterLinkServiceType,
} from 'CommonServer/Services/StatusPageFooterLinkService';
import StatusPageGroupService, {
Service as StatusPageGroupServiceType,
} from 'CommonServer/Services/StatusPageGroupService';
import StatusPageHeaderLinkService, {
Service as StatusPageHeaderLinkServiceType,
} from 'CommonServer/Services/StatusPageHeaderLinkService';
import StatusPageHistoryChartBarColorRuleService, {
Service as StatusPageHistoryChartBarColorRuleServiceType,
} from 'CommonServer/Services/StatusPageHistoryChartBarColorRuleService';
import StatusPageOwnerTeamService, {
Service as StatusPageOwnerTeamServiceType,
} from 'CommonServer/Services/StatusPageOwnerTeamService';
import StatusPageOwnerUserService, {
Service as StatusPageOwnerUserServiceType,
} from 'CommonServer/Services/StatusPageOwnerUserService';
import StatusPagePrivateUserService, {
Service as StatusPagePrivateUserServiceType,
} from 'CommonServer/Services/StatusPagePrivateUserService';
import StatusPageResourceService, {
Service as StatusPageResourceServiceType,
} from 'CommonServer/Services/StatusPageResourceService';
import StatusPageSSOService, {
Service as StatusPageSSOServiceType,
} from 'CommonServer/Services/StatusPageSsoService';
import TeamMemberService, {
TeamMemberService as TeamMemberServiceType,
} from 'CommonServer/Services/TeamMemberService';
import TeamPermissionService, {
Service as TeamPermissionServiceType,
} from 'CommonServer/Services/TeamPermissionService';
import TeamService, {
Service as TeamServiceType,
} from 'CommonServer/Services/TeamService';
import TelemetryServiceService, {
Service as TelemetryServiceServiceType,
} from 'CommonServer/Services/TelemetryServiceService';
import TelemetryUsageBillingService, {
Service as TelemetryUsageBillingServiceType,
} from 'CommonServer/Services/TelemetryUsageBillingService';
import UserNotificationRuleService, {
Service as UserNotificationRuleServiceType,
} from 'CommonServer/Services/UserNotificationRuleService';
import UserNotificationSettingService, {
Service as UserNotificationSettingServiceType,
} from 'CommonServer/Services/UserNotificationSettingService';
import UserOnCallLogService, {
Service as UserNotificationLogServiceType,
} from 'CommonServer/Services/UserOnCallLogService';
import UserService, {
Service as UserServiceType,
} from 'CommonServer/Services/UserService';
import WorkflowLogService, {
Service as WorkflowLogServiceType,
} from 'CommonServer/Services/WorkflowLogService';
import WorkflowService, {
Service as WorkflowServiceType,
} from 'CommonServer/Services/WorkflowService';
import WorkflowVariableService, {
Service as WorkflowVariableServiceType,
} from 'CommonServer/Services/WorkflowVariableService';
import FeatureSet from 'CommonServer/Types/FeatureSet';
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
import Log from 'Model/AnalyticsModels/Log';
import Metric from 'Model/AnalyticsModels/Metric';
import MonitorMetricsByMinute from 'Model/AnalyticsModels/MonitorMetricsByMinute';
import Span from 'Model/AnalyticsModels/Span';
import ApiKey from 'Model/Models/ApiKey';
import ApiKeyPermission from 'Model/Models/ApiKeyPermission';
import CallLog from 'Model/Models/CallLog';
import Domain from 'Model/Models/Domain';
import EmailLog from 'Model/Models/EmailLog';
import EmailVerificationToken from 'Model/Models/EmailVerificationToken';
import Incident from 'Model/Models/Incident';
import IncidentCustomField from 'Model/Models/IncidentCustomField';
import IncidentInternalNote from 'Model/Models/IncidentInternalNote';
import IncidentNoteTemplate from 'Model/Models/IncidentNoteTemplate';
import IncidentOwnerTeam from 'Model/Models/IncidentOwnerTeam';
import IncidentOwnerUser from 'Model/Models/IncidentOwnerUser';
import IncidentPublicNote from 'Model/Models/IncidentPublicNote';
import IncidentSeverity from 'Model/Models/IncidentSeverity';
import IncidentState from 'Model/Models/IncidentState';
import IncidentStateTimeline from 'Model/Models/IncidentStateTimeline';
import IncidentTemplate from 'Model/Models/IncidentTemplate';
import IncidentTemplateOwnerTeam from 'Model/Models/IncidentTemplateOwnerTeam';
import IncidentTemplateOwnerUser from 'Model/Models/IncidentTemplateOwnerUser';
import Label from 'Model/Models/Label';
import Monitor from 'Model/Models/Monitor';
import MonitorCustomField from 'Model/Models/MonitorCustomField';
import MonitorGroupOwnerTeam from 'Model/Models/MonitorGroupOwnerTeam';
import MonitorGroupOwnerUser from 'Model/Models/MonitorGroupOwnerUser';
import MonitorGroupResource from 'Model/Models/MonitorGroupResource';
import MonitorOwnerTeam from 'Model/Models/MonitorOwnerTeam';
import MonitorOwnerUser from 'Model/Models/MonitorOwnerUser';
import MonitorProbe from 'Model/Models/MonitorProbe';
import MonitorSecret from 'Model/Models/MonitorSecret';
import MonitorStatus from 'Model/Models/MonitorStatus';
import MonitorTimelineStatus from 'Model/Models/MonitorStatusTimeline';
import OnCallDutyPolicy from 'Model/Models/OnCallDutyPolicy';
import OnCallDutyPolicyCustomField from 'Model/Models/OnCallDutyPolicyCustomField';
import OnCallDutyPolicyEscalationRule from 'Model/Models/OnCallDutyPolicyEscalationRule';
import OnCallDutyPolicyEscalationRuleSchedule from 'Model/Models/OnCallDutyPolicyEscalationRuleSchedule';
import OnCallDutyPolicyEscalationRuleTeam from 'Model/Models/OnCallDutyPolicyEscalationRuleTeam';
import OnCallDutyPolicyEscalationRuleUser from 'Model/Models/OnCallDutyPolicyEscalationRuleUser';
import OnCallDutyPolicyExecutionLog from 'Model/Models/OnCallDutyPolicyExecutionLog';
import OnCallDutyPolicyExecutionLogTimeline from 'Model/Models/OnCallDutyPolicyExecutionLogTimeline';
import OnCallDutyPolicySchedule from 'Model/Models/OnCallDutyPolicySchedule';
import OnCallDutyPolicyScheduleLayer from 'Model/Models/OnCallDutyPolicyScheduleLayer';
import OnCallDutyPolicyScheduleLayerUser from 'Model/Models/OnCallDutyPolicyScheduleLayerUser';
import ProjectCallSMSConfig from 'Model/Models/ProjectCallSMSConfig';
import ProjectSmtpConfig from 'Model/Models/ProjectSmtpConfig';
import PromoCode from 'Model/Models/PromoCode';
import Reseller from 'Model/Models/Reseller';
import ScheduledMaintenance from 'Model/Models/ScheduledMaintenance';
import ScheduledMaintenanceCustomField from 'Model/Models/ScheduledMaintenanceCustomField';
import ScheduledMaintenanceInternalNote from 'Model/Models/ScheduledMaintenanceInternalNote';
import ScheduledMaintenanceNoteTemplate from 'Model/Models/ScheduledMaintenanceNoteTemplate';
import ScheduledMaintenanceOwnerTeam from 'Model/Models/ScheduledMaintenanceOwnerTeam';
import ScheduledMaintenanceOwnerUser from 'Model/Models/ScheduledMaintenanceOwnerUser';
import ScheduledMaintenancePublicNote from 'Model/Models/ScheduledMaintenancePublicNote';
import ScheduledMaintenanceState from 'Model/Models/ScheduledMaintenanceState';
import ScheduledMaintenanceStateTimeline from 'Model/Models/ScheduledMaintenanceStateTimeline';
import ShortLink from 'Model/Models/ShortLink';
import SmsLog from 'Model/Models/SmsLog';
import StatusPageAnnouncement from 'Model/Models/StatusPageAnnouncement';
// Custom Fields API
import StatusPageCustomField from 'Model/Models/StatusPageCustomField';
import StatusPageFooterLink from 'Model/Models/StatusPageFooterLink';
import StatusPageGroup from 'Model/Models/StatusPageGroup';
import StatusPageHeaderLink from 'Model/Models/StatusPageHeaderLink';
import StatusPageHistoryChartBarColorRule from 'Model/Models/StatusPageHistoryChartBarColorRule';
import StatusPageOwnerTeam from 'Model/Models/StatusPageOwnerTeam';
import StatusPageOwnerUser from 'Model/Models/StatusPageOwnerUser';
import StatusPagePrivateUser from 'Model/Models/StatusPagePrivateUser';
import StatusPageResource from 'Model/Models/StatusPageResource';
import StatusPageSSO from 'Model/Models/StatusPageSso';
import Team from 'Model/Models/Team';
import TeamMember from 'Model/Models/TeamMember';
import TeamPermission from 'Model/Models/TeamPermission';
import TelemetryService from 'Model/Models/TelemetryService';
import TelemetryUsageBilling from 'Model/Models/TelemetryUsageBilling';
import User from 'Model/Models/User';
import UserNotificationRule from 'Model/Models/UserNotificationRule';
import UserNotificationSetting from 'Model/Models/UserNotificationSetting';
import UserOnCallLog from 'Model/Models/UserOnCallLog';
import Workflow from 'Model/Models/Workflow';
import WorkflowLog from 'Model/Models/WorkflowLog';
import WorkflowVariable from 'Model/Models/WorkflowVariable';
const BaseAPIFeatureSet: FeatureSet = {
init: async (): Promise<void> => {
@@ -469,6 +380,14 @@ const BaseAPIFeatureSet: FeatureSet = {
).getRouter()
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAnalyticsAPI<Metric, MetricServiceType>(
Metric,
MetricService
).getRouter()
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAnalyticsAPI<
@@ -520,6 +439,14 @@ const BaseAPIFeatureSet: FeatureSet = {
).getRouter()
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<MonitorSecret, MonitorSecretServiceType>(
MonitorSecret,
MonitorSecretService
).getRouter()
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<
@@ -697,14 +624,6 @@ const BaseAPIFeatureSet: FeatureSet = {
).getRouter()
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<StatusPageDomain, StatusPageDomainServiceType>(
StatusPageDomain,
StatusPageDomainService
).getRouter()
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<
@@ -1052,6 +971,12 @@ const BaseAPIFeatureSet: FeatureSet = {
`/${APP_NAME.toLocaleLowerCase()}`,
new MonitorGroupAPI().getRouter()
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new StatusPageDomainAPI().getRouter()
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new ProjectSsoAPI().getRouter()

View File

@@ -20,6 +20,9 @@ Depending on your usage and budget, you can choose from different system require
#### Prerequisites for Single-Server Deployment
Installation tutorial: [https://youtu.be/j1SWmMW2oL4](https://youtu.be/j1SWmMW2oL4)
Before you start the deployment process, please make sure you have:
- A server running Debian, Ubuntu, or RHEL derivative
@@ -47,7 +50,10 @@ If you don't like to use npm or do not have it installed, run this instead:
```
# Read env vars from config.env file and run docker-compose up.
export $(grep -v '^#' config.env | xargs) && docker compose up --remove-orphans -d
(export $(grep -v '^#' config.env | xargs) && docker compose up --remove-orphans -d)
# Use sudo if you're having permission issues with binding ports.
sudo bash -c "(export $(grep -v '^#' config.env | xargs) && docker compose up --remove-orphans -d)"
```
To update:

View File

@@ -0,0 +1,27 @@
# Custom Code Monitor
Custom Code Monitor allows you to write custom scripts to monitor your applications. You can use this feature to monitor your applications in a way that is not possible with the existing monitors. For example, you can have multi-step API requests.
#### Example
The following example shows how to use a Synthetic Monitor:
```javascript
// You can use axios module.
await axios.get('https://api.example.com/');
// Axios Documentation here: https://axios-http.com/docs/intro
return {
data: 'Hello World' // return any data you like here.
};
```
### Things to consider
- You can use `console.log` to log the data in the console. This will be available in the logs section of the monitor.
- You can return the data from the script using the `return` statement.
- This is a JavaScript script, so you can use all the JavaScript features in the script.
- You can use `axios` module to make HTTP requests in the script. You can use it to make API calls from the script.
- Timeout for the script is 2 minutes. If the script takes more than 2 mins, it will be terminated.

View File

@@ -0,0 +1,34 @@
# Monitor Secrets
You can use secrets to store sensitive information that you want to use in your monitoring checks. Secrets are encrypted and stored securely.
### Adding a secret
To add a secret, please go to OneUptime Dashboard -> Project Settings -> Monitor Secrets -> Create Monitor Secret.
![Create Secret](/docs/static/images/CreateMonitorSecret.png)
You can select which monitors have access to the secret. In this case we added `ApiKey` secret and selected monitors to have access to it.
**Please note**: Secrets are encrypted and stored securely. If you lose the secret, you will need to create a new secret. You cannot view or update the secret after its saved.
### Using a secret
You can use secrets in the following monitoring types:
- API (in request headers, request body, and URL)
- Website, IP, Port, Ping, SSL Certificate (in URL)
- Synthetic Monitor, Custom Code Monitor (in the code)
![Using Secret](/docs/static/images/UsingMonitorSecret.png)
To use a secret, add `{{monitorSecrets.SECRET_NAME}}` in the field where you want to use the secret. For example, in this case we added `{{monitorSecrets.ApiKey}}` in the Requets Header field.
### Monitor Secret Permissions
You can select which monitors have access to the secret. You can also update the permissions at any time. So, if you want to add a new monitor to have access to the secret, you can do so by updating the permissions.

View File

@@ -0,0 +1,71 @@
# Synthetic Monitor
Synthetic monitoring is a way to proactively monitor your applications by simulating user interactions. You can create a synthetic monitor to check the availability and performance of your applications from different locations around the world.
#### Example
The following example shows how to use a Synthetic Monitor:
```javascript
// You can use axios module, and page object from Playwright here.
// Page Object is a class that represents a single page in a browser.
await page.goto('https://playwright.dev/');
// Playwright Documentation here: https://playwright.dev/docs/intro
// Here are some of the variables that you can use in the context of the monitored object:
console.log(browserType) // This will list the browser type in the current run context - Chromium, Firefox, Webkit
console.log(screenSizeType) // This will list the screen size type in the current run context - Mobile, Tablet, Desktop
// Playwright page object belongs to that specific browser context, so you can use it to interact with the browser.
// To take screenshots,
const screenshots = {};
screenshots['screenshot-name'] = await page.screenshot(); // you can save multiple screenshots and have them with different names.
// when you want to return a value, use return statement with data as a prop. You can also add screenshots in the screenshots array.
return {
data: 'Hello World',
screenshots: screenshots
};
```
### Use of Playwright
We use Playwright to simulate user interactions. You can use Playwright `page` object to interact with the browser and perform actions like clicking buttons, filling forms, and taking screenshots.
### Screenshots
You can take screenshots of the page at any point in the script. You can take multiple screenshots and return them in the screenshots array. These screenshots will be available in the OneUptime Dashboard for that specific monitor.
```javascript
// To take screenshots,
const screenshots = {};
screenshots['screenshot-name'] = await page.screenshot();
return {
data: 'Hello World',
screenshots: screenshots
};
```
### Things to consider
- You only have `page` object available in the context of the script. This is from Playwright Page class. You can use it to run all the interactions with the browser.
- You can use `console.log` to log the data in the console. This will be available in the logs section of the monitor.
- You can return the data from the script using the `return` statement. You can also return screenshots in the screenshots array.
- You can use `browserType` and `screenSizeType` variables to get the browser type and screen size type in the current run context. Feel free to use them in your script if you like.
- This is a JavaScript script, so you can use all the JavaScript features in the script.
- You can use `axios` module to make HTTP requests in the script. You can use it to make API calls from the script.
- If you are using oneuptime.com, you will always have the latest version of Playwright & browsers available in the context of the script. If you're self-hosting, please make sure you update the probes to have the latest version of Playwright and the browsers.
- Timeout for the script is 2 minutes. If the script takes more than 2 mins, it will be terminated.

View File

@@ -1,16 +1,16 @@
import 'ejs';
import { ContentPath, StaticPath, ViewsPath } from './Utils/Config';
import DocsNav, { NavGroup, NavLink } from './Utils/Nav';
import DocsRender from './Utils/Render';
import FeatureSet from 'CommonServer/Types/FeatureSet';
import Express, {
ExpressApplication,
ExpressRequest,
ExpressResponse,
ExpressStatic,
ExpressApplication,
} from 'CommonServer/Utils/Express';
import { ContentPath, StaticPath, ViewsPath } from './Utils/Config';
import DocsNav, { NavGroup, NavLink } from './Utils/Nav';
import LocalFile from 'CommonServer/Utils/LocalFile';
import DocsRender from './Utils/Render';
import logger from 'CommonServer/Utils/Logger';
import FeatureSet from 'CommonServer/Types/FeatureSet';
import 'ejs';
const DocsFeatureSet: FeatureSet = {
init: async (): Promise<void> => {

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

View File

@@ -1,54 +0,0 @@
#!/bin/bash
# Check if this is debian based
# Check if system supports apt-get
if [ -x "$(command -v apt-get)" ]; then
# Update apt-get
sudo apt-get update
# Install build-essential
sudo apt-get install build-essential -y
fi
# Check if system supports yum
if [ -x "$(command -v yum)" ]; then
# Update yum
sudo yum update
# Install build-essential
sudo yum install gcc-c++ make -y
fi
# Check if system supports apk
if [ -x "$(command -v apk)" ]; then
# Update apk
sudo apk update
# Install build-essential
sudo apk add build-base
fi
# Install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# Export to path
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# Refresh bash
source ~/.bashrc
# Install latest Node.js via NVM
nvm install node
# Make this nodejs version the default
nvm alias default node
# Use the default version
nvm use default
# Now install
npm install -g tsx
npm install -g @oneuptime/infrastructure-agent

View File

@@ -0,0 +1,77 @@
#!/bin/sh
set -e
usage() {
echo "Usage: $0 [-b bindir] [-d]"
echo " -b sets the directory for the binary installation, default is ./bin"
echo " -d enables debug mode"
exit 1
}
# Default parameters
BINDIR=/usr/bin
DEBUG=0
# Parse command-line options
while getopts "b:d" opt; do
case ${opt} in
b )
BINDIR=$OPTARG
;;
d )
set -x
DEBUG=1
;;
\? )
usage
;;
esac
done
echo "Installing to ${BINDIR}"
mkdir -p "${BINDIR}"
# Detect platform and architecture
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH=$(uname -m)
case $ARCH in
x86_64)
ARCH=amd64
;;
aarch64)
ARCH=arm64
;;
*arm*)
ARCH=arm
;;
*)
echo "Architecture $ARCH is not supported"
exit 1
;;
esac
# Fetch the latest release tag from GitHub
REPO="oneuptime/oneuptime"
API_URL="https://api.github.com/repos/${REPO}/releases/latest"
TAG=$(curl -s ${API_URL} | grep '"tag_name":' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/')
if [ "$TAG" = "" ]; then
echo "Failed to find the latest release. Please check your internet connection or GitHub API limits."
exit 1
fi
echo "Fetching the latest release: $TAG"
# Construct the URL for the binary release
URL="https://github.com/${REPO}/releases/download/${TAG}/oneuptime-infrastructure-agent_${OS}_${ARCH}.tar.gz"
# Download and extract the binary
curl -sL "${URL}" | tar xz -C "${BINDIR}"
# Check if the binary is executable
if [ ! -x "${BINDIR}/oneuptime-infrastructure-agent" ]; then
echo "Failed to install oneuptime-infrastructure-agent"
exit 1
fi
echo "oneuptime-infrastructure-agent installed successfully to ${BINDIR}. Please configure the agent using 'oneuptime-infrastructure-agent configure'."

View File

@@ -38,10 +38,22 @@ const DocsNav: NavGroup[] = [
{
title: 'Monitor',
links: [
{
title: 'Custom Code Monitor',
url: '/docs/monitor/custom-code-monitor',
},
{
title: 'Synthetic Monitor',
url: '/docs/monitor/synthetic-monitor',
},
{
title: 'JavaScript Expressions',
url: '/docs/monitor/javascript-expression',
},
{
title: 'Monitor Secrets',
url: '/docs/monitor/monitor-secrets',
},
],
},
{

View File

@@ -1,50 +1,10 @@
import { Renderer, marked } from 'marked';
import Markdown, { MarkdownContentType } from 'CommonServer/Types/Markdown';
export default class DocsRender {
public static async render(markdownContent: string): Promise<string> {
const renderer: Renderer = this.getBlogRenderer();
return await marked(markdownContent, {
renderer: renderer,
});
}
private static getBlogRenderer(): Renderer {
const renderer: Renderer = new Renderer();
renderer.paragraph = function (text) {
return `<p class="mt-2 mb-2 leading-8 text-gray-600">${text}</p>`;
};
renderer.blockquote = function (quote) {
return `<blockquote class="p-4 pt-1 pb-1 my-4 border-s-4 border-indigo-500">
<div class="leading-8 text-gray-600">${quote}</div>
</blockquote>`;
};
renderer.image = function (href, _title, text) {
return `<img src="${href}" alt="${text}" class="rounded-md shadow-md" />`;
};
renderer.code = function (code, language) {
return `<pre class="language-${language} rounded-md"><code class="language-${language} rounded-md">${code}</code></pre>`;
};
renderer.heading = function (text, level) {
if (level === 1) {
return `<h1 class="my-5 mt-8 text-4xl font-bold tracking-tight text-gray-800">${text}</h1>`;
} else if (level === 2) {
return `<h2 class="my-5 mt-8 text-3xl font-bold tracking-tight text-gray-800">${text}</h2>`;
} else if (level === 3) {
return `<h3 class="my-5 mt-8 text-2xl font-bold tracking-tight text-gray-800">${text}</h3>`;
} else if (level === 4) {
return `<h4 class="my-5 mt-8 text-xl font-bold tracking-tight text-gray-800">${text}</h4>`;
} else if (level === 5) {
return `<h5 class="my-5 mt-8 text-lg font-bold tracking-tight text-gray-800">${text}</h5>`;
}
return `<h6 class="my-5 tracking-tight font-bold text-gray-800">${text}</h6>`;
};
return renderer;
return Markdown.convertToHTML(
markdownContent,
MarkdownContentType.Docs
);
}
}

View File

@@ -5,18 +5,18 @@
<%- include('./Partials/Head.ejs') %>
</head>
<body class="flex min-h-full bg-white dark:bg-slate-900">
<body class="flex min-h-full bg-white ">
<div class="flex w-full flex-col">
<%- include('./Partials/Header.ejs') %>
<div class="relative mx-auto flex w-full max-w-8xl flex-auto justify-center sm:px-2 lg:px-8 xl:px-12">
<div class="hidden lg:relative lg:block lg:flex-none">
<div class="absolute inset-y-0 right-0 w-[50vw] bg-slate-50 dark:hidden"></div>
<div class="absolute inset-y-0 right-0 w-[50vw] bg-slate-50 "></div>
<div
class="absolute bottom-0 right-0 top-16 hidden h-12 w-px bg-gradient-to-t from-slate-800 dark:block">
class="absolute bottom-0 right-0 top-16 hidden h-12 w-px bg-gradient-to-t from-slate-800 ">
</div>
<div class="absolute bottom-0 right-0 top-28 hidden w-px bg-slate-800 dark:block"></div>
<div class="absolute bottom-0 right-0 top-28 hidden w-px bg-slate-800 "></div>
<div
class="sticky top-[4.75rem] -ml-0.5 h-[calc(100vh-4.75rem)] w-64 overflow-y-auto overflow-x-hidden py-16 pl-0.5 pr-8 xl:w-72 xl:pr-16">
<%- include('./Partials/Nav.ejs') %>

View File

@@ -1,11 +1,11 @@
<article>
<header class="mb-9 space-y-1">
<p class="text-base font-bold text-sky-500"><%- category.title %></p>
<h1 class="font-bold text-3xl tracking-tight text-slate-900 dark:text-white"><%- link.title %>
<h1 class="font-bold text-3xl tracking-tight text-slate-900 "><%- link.title %>
</h1>
</header>
<div
class="prose prose-slate max-w-none dark:prose-invert dark:text-slate-400 prose-headings:scroll-mt-28 prose-headings:font-display prose-headings:font-normal lg:prose-headings:scroll-mt-[8.5rem] prose-lead:text-slate-500 dark:prose-lead:text-slate-400 prose-a:font-semibold dark:prose-a:text-sky-400 prose-a:no-underline prose-a:shadow-[inset_0_-2px_0_0_var(--tw-prose-background,#fff),inset_0_calc(-1*(var(--tw-prose-underline-size,4px)+2px))_0_0_var(--tw-prose-underline,theme(colors.sky.300))] hover:prose-a:[--tw-prose-underline-size:6px] dark:[--tw-prose-background:theme(colors.slate.900)] dark:prose-a:shadow-[inset_0_calc(-1*var(--tw-prose-underline-size,2px))_0_0_var(--tw-prose-underline,theme(colors.sky.800))] dark:hover:prose-a:[--tw-prose-underline-size:6px] prose-pre:rounded-xl prose-pre:bg-slate-900 prose-pre:shadow-lg dark:prose-pre:bg-slate-800/60 dark:prose-pre:shadow-none dark:prose-pre:ring-1 dark:prose-pre:ring-slate-300/10 dark:prose-hr:border-slate-800">
class="prose prose-slate max-w-none prose-headings:scroll-mt-28 prose-headings:font-display prose-headings:font-normal lg:prose-headings:scroll-mt-[8.5rem] prose-lead:text-slate-500 prose-a:font-semibold prose-a:no-underline prose-a:shadow-[inset_0_-2px_0_0_var(--tw-prose-background,#fff),inset_0_calc(-1*(var(--tw-prose-underline-size,4px)+2px))_0_0_var(--tw-prose-underline,theme(colors.sky.300))] hover:prose-a:[--tw-prose-underline-size:6px] prose-pre:rounded-xl prose-pre:bg-slate-900 prose-pre:shadow-lg ">
<%- content %>
</div>
</article>

View File

@@ -1,5 +1,5 @@
<header
class="sticky top-0 z-50 flex flex-none flex-wrap items-center justify-between bg-white px-4 py-5 shadow-md shadow-slate-900/5 transition duration-500 sm:px-6 lg:px-8 dark:shadow-none dark:bg-slate-900/95 dark:backdrop-blur dark:[@supports(backdrop-filter:blur(0))]:bg-slate-900/75">
class="sticky top-0 z-50 flex flex-none flex-wrap items-center justify-between bg-white px-4 py-5 shadow-md shadow-slate-900/5 transition duration-500 sm:px-6 lg:px-8 ">
<div class="relative flex flex-grow basis-0 items-center"><a aria-label="Home page" href="/">
<img class="h-8 w-auto" src="/img/3-transparent.svg" alt="">
@@ -8,7 +8,7 @@
<div class="relative flex basis-0 justify-end gap-6 sm:gap-8 md:flex-grow">
<a class="group" aria-label="GitHub" target="_blank" href="https://github.com/oneuptime/oneuptime"><svg
aria-hidden="true" viewBox="0 0 16 16"
class="h-6 w-6 fill-slate-400 group-hover:fill-slate-500 dark:group-hover:fill-slate-300">
class="h-6 w-6 fill-slate-400 group-hover:fill-slate-500 ">
<path
d="M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.73 6.56 11.53C4.78 11.33 2.92 10.64 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7.34 3.86 8.02 3.86C8.7 3.86 9.38 3.95 10.02 4.13C11.55 3.09 12.22 3.31 12.22 3.31C12.66 4.41 12.38 5.23 12.3 5.43C12.81 5.99 13.12 6.7 13.12 7.58C13.12 10.65 11.25 11.33 9.47 11.53C9.76 11.78 10.01 12.26 10.01 13.01C10.01 14.08 10 14.94 10 15.21C10 15.42 10.15 15.67 10.55 15.59C13.71 14.53 16 11.53 16 8C16 3.58 12.42 0 8 0Z">
</path>

View File

@@ -2,11 +2,11 @@
<ul role="list" class="space-y-9">
<% for(var i=0; i<nav.length; i++) {%>
<li>
<h2 class="font-display font-medium text-slate-900 dark:text-white"><%- nav[i].title -%>
<h2 class="font-display font-medium text-slate-900 "><%- nav[i].title -%>
</h2>
<ul role="list"
class="mt-2 space-y-2 border-l-2 border-slate-100 lg:mt-4 lg:space-y-4 lg:border-slate-200 dark:border-slate-800">
class="mt-2 space-y-2 border-l-2 border-slate-100 lg:mt-4 lg:space-y-4 lg:border-slate-200 ">
<% if(nav[i].links.length> 0) { %>
<% for(var j=0; j<nav[i].links.length; j++) {%>
<% if(link.url===nav[i].links[j].url) { %>
@@ -17,7 +17,7 @@
</li>
<% } else { %>
<li class="relative"><a
class="block w-full pl-3.5 before:pointer-events-none before:absolute before:-left-1 before:top-1/2 before:h-1.5 before:w-1.5 before:-translate-y-1/2 before:rounded-full text-slate-500 before:hidden before:bg-slate-300 hover:text-slate-600 hover:before:block dark:text-slate-400 dark:before:bg-slate-700 dark:hover:text-slate-300"
class="block w-full pl-3.5 before:pointer-events-none before:absolute before:-left-1 before:top-1/2 before:h-1.5 before:w-1.5 before:-translate-y-1/2 before:rounded-full text-slate-500 before:hidden before:bg-slate-300 hover:text-slate-600 hover:before:block "
href="<%- nav[i].links[j].url -%>"><%-
nav[i].links[j].title -%></a></li>

View File

@@ -1,8 +1,8 @@
<dl class="mt-12 flex border-t border-slate-200 pt-6 dark:border-slate-800">
<dl class="mt-12 flex border-t border-slate-200 pt-6 ">
<div class="ml-auto text-right">
<dt class="font-display text-sm font-medium text-slate-900 dark:text-white">Next</dt>
<dt class="font-display text-sm font-medium text-slate-900 ">Next</dt>
<dd class="mt-1"><a
class="flex items-center gap-x-1 text-base font-semibold text-slate-500 hover:text-slate-600 dark:text-slate-400 dark:hover:text-slate-300"
class="flex items-center gap-x-1 text-base font-semibold text-slate-500 hover:text-slate-600 "
href="/docs/installation">Installation<svg viewBox="0 0 16 16" aria-hidden="true"
class="h-4 w-4 flex-none fill-current">
<path

View File

@@ -1,14 +1,14 @@
import BlogPostUtil, { BlogPost, BlogPostHeader } from '../Utils/BlogPost';
import { ViewsPath } from '../Utils/Config';
import NotFoundUtil from '../Utils/NotFound';
import ServerErrorUtil from '../Utils/ServerError';
import Text from 'Common/Types/Text';
import Express, {
ExpressApplication,
ExpressRequest,
ExpressResponse,
} from 'CommonServer/Utils/Express';
import BlogPostUtil, { BlogPost, BlogPostHeader } from '../Utils/BlogPost';
import { ViewsPath } from '../Utils/Config';
import logger from 'CommonServer/Utils/Logger';
import ServerErrorUtil from '../Utils/ServerError';
import NotFoundUtil from '../Utils/NotFound';
import Text from 'Common/Types/Text';
const app: ExpressApplication = Express.getExpressApp();

View File

@@ -1,26 +1,25 @@
import 'ejs';
// improt API
import './API/BlogAPI';
import { StaticPath, ViewsPath } from './Utils/Config';
import NotFoundUtil from './Utils/NotFound';
import ProductCompare, { Product } from './Utils/ProductCompare';
import HTTPErrorResponse from 'Common/Types/API/HTTPErrorResponse';
import HTTPResponse from 'Common/Types/API/HTTPResponse';
import URL from 'Common/Types/API/URL';
import OneUptimeDate from 'Common/Types/Date';
import Dictionary from 'Common/Types/Dictionary';
import { JSONObject } from 'Common/Types/JSON';
import API from 'Common/Utils/API';
import FeatureSet from 'CommonServer/Types/FeatureSet';
import Express, {
ExpressApplication,
ExpressRequest,
ExpressResponse,
ExpressStatic,
ExpressApplication,
} from 'CommonServer/Utils/Express';
import Dictionary from 'Common/Types/Dictionary';
import OneUptimeDate from 'Common/Types/Date';
import URL from 'Common/Types/API/URL';
import ProductCompare, { Product } from './Utils/ProductCompare';
import 'ejs';
import builder from 'xmlbuilder2';
import { XMLBuilder } from 'xmlbuilder2/lib/interfaces';
import API from 'Common/Utils/API';
import { JSONObject } from 'Common/Types/JSON';
import HTTPResponse from 'Common/Types/API/HTTPResponse';
import HTTPErrorResponse from 'Common/Types/API/HTTPErrorResponse';
import { StaticPath, ViewsPath } from './Utils/Config';
import NotFoundUtil from './Utils/NotFound';
// improt API
import './API/BlogAPI';
import FeatureSet from 'CommonServer/Types/FeatureSet';
const HomeFeatureSet: FeatureSet = {
init: async (): Promise<void> => {

View File

@@ -1,16 +1,16 @@
import HTTPResponse from 'Common/Types/API/HTTPResponse';
import API from 'Common/Utils/API';
import URL from 'Common/Types/API/URL';
import { marked, Renderer } from 'marked';
import { JSONArray, JSONObject, JSONObjectOrArray } from 'Common/Types/JSON';
import BaseModel from 'Common/Models/BaseModel';
import AnalyticsBaseModel from 'Common/AnalyticsModels/BaseModel';
import LocalCache from 'CommonServer/Infrastructure/LocalCache';
import JSONFunctions from 'Common/Types/JSONFunctions';
import BaseModel from 'Common/Models/BaseModel';
import HTTPErrorResponse from 'Common/Types/API/HTTPErrorResponse';
import HTTPResponse from 'Common/Types/API/HTTPResponse';
import URL from 'Common/Types/API/URL';
import OneUptimeDate from 'Common/Types/Date';
import BadDataException from 'Common/Types/Exception/BadDataException';
import { JSONArray, JSONObject, JSONObjectOrArray } from 'Common/Types/JSON';
import JSONFunctions from 'Common/Types/JSONFunctions';
import Text from 'Common/Types/Text';
import API from 'Common/Utils/API';
import LocalCache from 'CommonServer/Infrastructure/LocalCache';
import Markdown, { MarkdownContentType } from 'CommonServer/Types/Markdown';
export interface BlogPostAuthor {
username: string;
@@ -271,11 +271,10 @@ export default class BlogPostUtil {
markdownContent = this.getPostFromMarkdown(markdownContent);
const renderer: Renderer = this.getBlogRenderer();
const htmlBody: string = await marked(markdownContent, {
renderer: renderer,
});
const htmlBody: string = await Markdown.convertToHTML(
markdownContent,
MarkdownContentType.Blog
);
const blogPost: BlogPost = {
title,
@@ -320,41 +319,6 @@ export default class BlogPostUtil {
return OneUptimeDate.getDateAsLocalFormattedString(date, true);
}
private static getBlogRenderer(): Renderer {
const renderer: Renderer = new Renderer();
renderer.paragraph = function (text) {
return `<p class="mt-2 mb-2 leading-8 text-gray-600">${text}</p>`;
};
renderer.blockquote = function (quote) {
return `<blockquote class="p-4 pt-1 pb-1 my-4 border-s-4 border-indigo-500">
<div class="leading-8 text-gray-600">${quote}</div>
</blockquote>`;
};
renderer.code = function (code, language) {
return `<pre class="language-${language} rounded-md"><code class="language-${language} rounded-md">${code}</code></pre>`;
};
renderer.heading = function (text, level) {
if (level === 1) {
return `<h1 class="my-5 mt-8 text-4xl font-bold tracking-tight text-gray-800">${text}</h1>`;
} else if (level === 2) {
return `<h2 class="my-5 mt-8 text-3xl font-bold tracking-tight text-gray-800">${text}</h2>`;
} else if (level === 3) {
return `<h3 class="my-5 mt-8 text-2xl font-bold tracking-tight text-gray-800">${text}</h3>`;
} else if (level === 4) {
return `<h4 class="my-5 mt-8 text-xl font-bold tracking-tight text-gray-800">${text}</h4>`;
} else if (level === 5) {
return `<h5 class="my-5 mt-8 text-lg font-bold tracking-tight text-gray-800">${text}</h5>`;
}
return `<h6 class="my-5 tracking-tight font-bold text-gray-800">${text}</h6>`;
};
return renderer;
}
private static getPostFromMarkdown(markdownContent: string): string {
const authorLine: string | undefined = markdownContent
.split('\n')

View File

@@ -1,5 +1,5 @@
import { ExpressResponse } from 'CommonServer/Utils/Express';
import { ViewsPath } from './Config';
import { ExpressResponse } from 'CommonServer/Utils/Express';
export default class NotFoundUtil {
public static renderNotFound(res: ExpressResponse): void {

View File

@@ -1,5 +1,5 @@
import { ExpressResponse } from 'CommonServer/Utils/Express';
import { ViewsPath } from './Config';
import { ExpressResponse } from 'CommonServer/Utils/Express';
export default class ServerErrorUtil {
public static renderServerError(res: ExpressResponse): void {

View File

@@ -474,7 +474,7 @@
</div>
<input id="default-range" type="range" value="1" max="100" min="0" step="1"
onchange="updateMonitorPrice(this.value)" oninput="updateMonitorPrice(this.value)"
class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700">
class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer ">
<div>
<p id="more-than-100-monitors-message" style="display: none;" class="text-base text-gray-600">If you have
@@ -564,7 +564,7 @@
</div>
<input id="default-range" type="range" value="1" max="1000" min="0" step="1"
onchange="updateTelemetryPrice(this.value, null)" oninput="updateTelemetryPrice(this.value, null)"
class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700">
class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer ">
<div>
<p id="more-than-10-tb-ingested-message" style="display: none;" class="text-base text-gray-600">If you are
ingesting more than 1 TB of data every month, contact sales@oneuptime.com for a discount.</p>
@@ -578,7 +578,7 @@
</div>
<input id="default-range" type="range" value="15" max="180" min="0" step="1"
onchange="updateTelemetryPrice(null, this.value)" oninput="updateTelemetryPrice(null,this.value)"
class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700">
class="w-full h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer ">
<div>
<p id="more-than-6-months-rentention" style="display: none;" class="text-base text-gray-600">If you're
looking for data rention of more than 6 months. contact sales@oneuptime.com for a discount. </p>

View File

@@ -1,40 +1,40 @@
import {
IsBillingEnabled,
EncryptionSecret,
} from 'CommonServer/EnvironmentConfig';
import AuthenticationEmail from '../Utils/AuthenticationEmail';
import BaseModel from 'Common/Models/BaseModel';
import { AccountsRoute } from 'Common/ServiceRoute';
import Hostname from 'Common/Types/API/Hostname';
import Protocol from 'Common/Types/API/Protocol';
import Route from 'Common/Types/API/Route';
import URL from 'Common/Types/API/URL';
import OneUptimeDate from 'Common/Types/Date';
import Email from 'Common/Types/Email';
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
import BadDataException from 'Common/Types/Exception/BadDataException';
import BadRequestException from 'Common/Types/Exception/BadRequestException';
import { JSONObject } from 'Common/Types/JSON';
import Name from 'Common/Types/Name';
import ObjectID from 'Common/Types/ObjectID';
import PositiveNumber from 'Common/Types/PositiveNumber';
import DatabaseConfig from 'CommonServer/DatabaseConfig';
import {
EncryptionSecret,
IsBillingEnabled,
} from 'CommonServer/EnvironmentConfig';
import AccessTokenService from 'CommonServer/Services/AccessTokenService';
import EmailVerificationTokenService from 'CommonServer/Services/EmailVerificationTokenService';
import MailService from 'CommonServer/Services/MailService';
import UserService from 'CommonServer/Services/UserService';
import CookieUtil from 'CommonServer/Utils/Cookie';
import Express, {
ExpressRequest,
ExpressResponse,
ExpressRouter,
NextFunction,
} from 'CommonServer/Utils/Express';
import BadRequestException from 'Common/Types/Exception/BadRequestException';
import { JSONObject } from 'Common/Types/JSON';
import User from 'Model/Models/User';
import EmailVerificationTokenService from 'CommonServer/Services/EmailVerificationTokenService';
import UserService from 'CommonServer/Services/UserService';
import ObjectID from 'Common/Types/ObjectID';
import EmailVerificationToken from 'Model/Models/EmailVerificationToken';
import BadDataException from 'Common/Types/Exception/BadDataException';
import MailService from 'CommonServer/Services/MailService';
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
import URL from 'Common/Types/API/URL';
import Response from 'CommonServer/Utils/Response';
import JSONWebToken from 'CommonServer/Utils/JsonWebToken';
import OneUptimeDate from 'Common/Types/Date';
import PositiveNumber from 'Common/Types/PositiveNumber';
import Route from 'Common/Types/API/Route';
import logger from 'CommonServer/Utils/Logger';
import Email from 'Common/Types/Email';
import Name from 'Common/Types/Name';
import AuthenticationEmail from '../Utils/AuthenticationEmail';
import AccessTokenService from 'CommonServer/Services/AccessTokenService';
import Hostname from 'Common/Types/API/Hostname';
import Protocol from 'Common/Types/API/Protocol';
import DatabaseConfig from 'CommonServer/DatabaseConfig';
import CookieUtil from 'CommonServer/Utils/Cookie';
import BaseModel from 'Common/Models/BaseModel';
import Response from 'CommonServer/Utils/Response';
import EmailVerificationToken from 'Model/Models/EmailVerificationToken';
import User from 'Model/Models/User';
const router: ExpressRouter = Express.getRouter();
@@ -182,10 +182,18 @@ router.post(
savedUser.id!
);
const token: string = JSONWebToken.sign(
savedUser,
OneUptimeDate.getSecondsInDays(new PositiveNumber(30))
);
const token: string = JSONWebToken.signUserLoginToken({
tokenData: {
userId: savedUser.id!,
email: savedUser.email!,
name: savedUser.name!,
isMasterAdmin: savedUser.isMasterAdmin!,
isGlobalLogin: true, // This is a general login without SSO. So, we will set this to true. This will give access to all the projects that dont require SSO.
},
expiresInSeconds: OneUptimeDate.getSecondsInDays(
new PositiveNumber(30)
),
});
// Set a cookie with token.
CookieUtil.setCookie(res, CookieUtil.getUserTokenKey(), token, {
@@ -195,6 +203,8 @@ router.post(
httpOnly: true,
});
logger.info('User signed up: ' + savedUser.email?.toString());
return Response.sendEntityResponse(req, res, savedUser, User);
}
@@ -257,25 +267,30 @@ router.post(
const httpProtocol: Protocol =
await DatabaseConfig.getHttpProtocol();
const tokenVerifyUrl: string = new URL(
httpProtocol,
host,
new Route(AccountsRoute.toString()).addRoute(
'/reset-password/' + token
)
).toString();
logger.info('User forgot password: ' + user.email?.toString());
logger.info('Reset Password URL: ' + tokenVerifyUrl);
MailService.sendMail({
toEmail: user.email!,
subject: 'Password Reset Request for OneUptime',
templateType: EmailTemplateType.ForgotPassword,
vars: {
homeURL: new URL(httpProtocol, host).toString(),
tokenVerifyUrl: new URL(
httpProtocol,
host,
new Route(AccountsRoute.toString()).addRoute(
'/reset-password/' + token
)
).toString(),
tokenVerifyUrl: tokenVerifyUrl,
},
}).catch((err: Error) => {
logger.error(err);
});
return Response.sendEmptyResponse(req, res);
return Response.sendEmptySuccessResponse(req, res);
}
return Response.sendErrorResponse(
@@ -390,7 +405,9 @@ router.post(
logger.error(err);
});
return Response.sendEmptyResponse(req, res);
logger.info('User email verified: ' + user.email?.toString());
return Response.sendEmptySuccessResponse(req, res);
} catch (err) {
return next(err);
}
@@ -482,7 +499,11 @@ router.post(
logger.error(err);
});
return Response.sendEmptyResponse(req, res);
logger.info(
'User password reset: ' + alreadySavedUser.email?.toString()
);
return Response.sendEmptySuccessResponse(req, res);
} catch (err) {
return next(err);
}
@@ -499,7 +520,7 @@ router.post(
try {
CookieUtil.removeAllCookies(req, res);
return Response.sendEmptyResponse(req, res);
return Response.sendEmptySuccessResponse(req, res);
} catch (err) {
return next(err);
}
@@ -573,11 +594,23 @@ router.post(
alreadySavedUser.password.toString() ===
user.password!.toString()
) {
const token: string = JSONWebToken.sign(
alreadySavedUser,
OneUptimeDate.getSecondsInDays(new PositiveNumber(30))
logger.info(
'User logged in: ' + alreadySavedUser.email?.toString()
);
const token: string = JSONWebToken.signUserLoginToken({
tokenData: {
userId: alreadySavedUser.id!,
email: alreadySavedUser.email!,
name: alreadySavedUser.name!,
isMasterAdmin: alreadySavedUser.isMasterAdmin!,
isGlobalLogin: true, // This is a general login without SSO. So, we will set this to true. This will give access to all the projects that dont require SSO.
},
expiresInSeconds: OneUptimeDate.getSecondsInDays(
new PositiveNumber(30)
),
});
// Set a cookie with token.
CookieUtil.setCookie(
res,

View File

@@ -1,15 +1,15 @@
import OneUptimeDate from 'Common/Types/Date';
import BadDataException from 'Common/Types/Exception/BadDataException';
import ResellerService from 'CommonServer/Services/ResellerService';
import Express, {
ExpressRequest,
ExpressResponse,
ExpressRouter,
NextFunction,
} from 'CommonServer/Utils/Express';
import BadDataException from 'Common/Types/Exception/BadDataException';
import Reseller from 'Model/Models/Reseller';
import ResellerService from 'CommonServer/Services/ResellerService';
import JSONWebToken from 'CommonServer/Utils/JsonWebToken';
import OneUptimeDate from 'Common/Types/Date';
import Response from 'CommonServer/Utils/Response';
import Reseller from 'Model/Models/Reseller';
const router: ExpressRouter = Express.getRouter();
@@ -62,10 +62,10 @@ router.post(
// if found then generate a token and return it.
const token: string = JSONWebToken.sign(
{ resellerId: resellerId },
OneUptimeDate.getDayInSeconds(365)
);
const token: string = JSONWebToken.sign({
data: { resellerId: resellerId },
expiresInSeconds: OneUptimeDate.getDayInSeconds(365),
});
return Response.sendJsonObjectResponse(req, res, {
access: token,

View File

@@ -1,37 +1,38 @@
import AuthenticationEmail from '../Utils/AuthenticationEmail';
import SSOUtil from '../Utils/SSO';
import { DashboardRoute } from 'Common/ServiceRoute';
import Hostname from 'Common/Types/API/Hostname';
import Protocol from 'Common/Types/API/Protocol';
import Route from 'Common/Types/API/Route';
import URL from 'Common/Types/API/URL';
import OneUptimeDate from 'Common/Types/Date';
import Email from 'Common/Types/Email';
import BadRequestException from 'Common/Types/Exception/BadRequestException';
import Exception from 'Common/Types/Exception/Exception';
import ServerException from 'Common/Types/Exception/ServerException';
import { JSONObject } from 'Common/Types/JSON';
import ObjectID from 'Common/Types/ObjectID';
import PositiveNumber from 'Common/Types/PositiveNumber';
import DatabaseConfig from 'CommonServer/DatabaseConfig';
import { Host, HttpProtocol } from 'CommonServer/EnvironmentConfig';
import AccessTokenService from 'CommonServer/Services/AccessTokenService';
import ProjectSSOService from 'CommonServer/Services/ProjectSsoService';
import TeamMemberService from 'CommonServer/Services/TeamMemberService';
import UserService from 'CommonServer/Services/UserService';
import CookieUtil from 'CommonServer/Utils/Cookie';
import Express, {
ExpressRequest,
ExpressResponse,
ExpressRouter,
NextFunction,
} from 'CommonServer/Utils/Express';
import BadRequestException from 'Common/Types/Exception/BadRequestException';
import ServerException from 'Common/Types/Exception/ServerException';
import JSONWebToken from 'CommonServer/Utils/JsonWebToken';
import logger from 'CommonServer/Utils/Logger';
import Response from 'CommonServer/Utils/Response';
import ProjectSSO from 'Model/Models/ProjectSso';
import ProjectSSOService from 'CommonServer/Services/ProjectSsoService';
import ObjectID from 'Common/Types/ObjectID';
import xml2js from 'xml2js';
import { JSONObject } from 'Common/Types/JSON';
import logger from 'CommonServer/Utils/Logger';
import Email from 'Common/Types/Email';
import User from 'Model/Models/User';
import UserService from 'CommonServer/Services/UserService';
import AuthenticationEmail from '../Utils/AuthenticationEmail';
import OneUptimeDate from 'Common/Types/Date';
import PositiveNumber from 'Common/Types/PositiveNumber';
import JSONWebToken from 'CommonServer/Utils/JsonWebToken';
import URL from 'Common/Types/API/URL';
import { DashboardRoute } from 'Common/ServiceRoute';
import Route from 'Common/Types/API/Route';
import TeamMember from 'Model/Models/TeamMember';
import TeamMemberService from 'CommonServer/Services/TeamMemberService';
import AccessTokenService from 'CommonServer/Services/AccessTokenService';
import SSOUtil from '../Utils/SSO';
import Exception from 'Common/Types/Exception/Exception';
import Hostname from 'Common/Types/API/Hostname';
import Protocol from 'Common/Types/API/Protocol';
import DatabaseConfig from 'CommonServer/DatabaseConfig';
import CookieUtil from 'CommonServer/Utils/Cookie';
import User from 'Model/Models/User';
import xml2js from 'xml2js';
const router: ExpressRouter = Express.getRouter();
@@ -67,7 +68,10 @@ router.get(
isEnabled: true,
},
select: {
_id: true,
signOnURL: true,
issuerURL: true,
projectId: true,
},
props: {
isRoot: true,
@@ -92,310 +96,376 @@ router.get(
);
}
return Response.redirect(req, res, projectSSO.signOnURL);
if (!projectSSO.issuerURL) {
return Response.sendErrorResponse(
req,
res,
new BadRequestException('Issuer not found')
);
}
const samlRequestUrl: URL = SSOUtil.createSAMLRequestUrl({
acsUrl: URL.fromString(
`${HttpProtocol}${Host}/identity/idp-login/${projectSSO.projectId?.toString()}/${projectSSO.id?.toString()}`
),
signOnUrl: projectSSO.signOnURL!,
issuerUrl: URL.fromString(
`${HttpProtocol}${Host}/${projectSSO.projectId?.toString()}/${projectSSO.id?.toString()}`
),
});
return Response.redirect(req, res, samlRequestUrl);
} catch (err) {
return next(err);
}
}
);
router.get(
'/idp-login/:projectId/:projectSsoId',
async (req: ExpressRequest, res: ExpressResponse): Promise<void> => {
return await loginUserWithSso(req, res);
}
);
router.post(
'/idp-login/:projectId/:projectSsoId',
async (req: ExpressRequest, res: ExpressResponse): Promise<void> => {
try {
const samlResponseBase64: string = req.body.SAMLResponse;
return await loginUserWithSso(req, res);
}
);
const samlResponse: string = Buffer.from(
samlResponseBase64,
'base64'
).toString();
type LoginUserWithSsoFunction = (
req: ExpressRequest,
res: ExpressResponse
) => Promise<void>;
const response: JSONObject = await xml2js.parseStringPromise(
samlResponse
const loginUserWithSso: LoginUserWithSsoFunction = async (
req: ExpressRequest,
res: ExpressResponse
): Promise<void> => {
try {
const samlResponseBase64: string = req.body.SAMLResponse;
if (!samlResponseBase64) {
return Response.sendErrorResponse(
req,
res,
new BadRequestException('SAMLResponse not found')
);
}
let issuerUrl: string = '';
let email: Email | null = null;
const samlResponse: string = Buffer.from(
samlResponseBase64,
'base64'
).toString();
if (!req.params['projectId']) {
return Response.sendErrorResponse(
req,
res,
new BadRequestException('Project ID not found')
);
}
const response: JSONObject = await xml2js.parseStringPromise(
samlResponse
);
if (!req.params['projectSsoId']) {
return Response.sendErrorResponse(
req,
res,
new BadRequestException('Project SSO ID not found')
);
}
let issuerUrl: string = '';
let email: Email | null = null;
const projectSSO: ProjectSSO | null =
await ProjectSSOService.findOneBy({
query: {
projectId: new ObjectID(req.params['projectId']),
_id: req.params['projectSsoId'],
isEnabled: true,
},
select: {
signOnURL: true,
issuerURL: true,
publicCertificate: true,
teams: {
_id: true,
},
},
props: {
isRoot: true,
},
});
if (!req.params['projectId']) {
return Response.sendErrorResponse(
req,
res,
new BadRequestException('Project ID not found')
);
}
if (!projectSSO) {
return Response.sendErrorResponse(
req,
res,
new BadRequestException('SSO Config not found')
);
}
if (!req.params['projectSsoId']) {
return Response.sendErrorResponse(
req,
res,
new BadRequestException('Project SSO ID not found')
);
}
// redirect to Identity Provider.
if (!projectSSO.issuerURL) {
return Response.sendErrorResponse(
req,
res,
new BadRequestException('Issuer URL not found')
);
}
// redirect to Identity Provider.
if (!projectSSO.signOnURL) {
return Response.sendErrorResponse(
req,
res,
new BadRequestException('Sign on URL not found')
);
}
if (!projectSSO.publicCertificate) {
return Response.sendErrorResponse(
req,
res,
new BadRequestException('Public Certificate not found')
);
}
try {
SSOUtil.isPayloadValid(response);
if (
!SSOUtil.isSignatureValid(
samlResponse,
projectSSO.publicCertificate
)
) {
return Response.sendErrorResponse(
req,
res,
new BadRequestException(
'Signature is not valid or Public Certificate configured with this SSO provider is not valid'
)
);
}
issuerUrl = SSOUtil.getIssuer(response);
email = SSOUtil.getEmail(response);
} catch (err: unknown) {
if (err instanceof Exception) {
return Response.sendErrorResponse(req, res, err);
}
return Response.sendErrorResponse(
req,
res,
new ServerException()
);
}
if (projectSSO.issuerURL.toString() !== issuerUrl) {
return Response.sendErrorResponse(
req,
res,
new BadRequestException('Issuer URL does not match')
);
}
// Check if he already belongs to the project, If he does - then log in.
let alreadySavedUser: User | null = await UserService.findOneBy({
query: { email: email },
select: {
_id: true,
name: true,
email: true,
isMasterAdmin: true,
isEmailVerified: true,
profilePictureId: true,
const projectSSO: ProjectSSO | null = await ProjectSSOService.findOneBy(
{
query: {
projectId: new ObjectID(req.params['projectId']),
_id: req.params['projectSsoId'],
isEnabled: true,
},
select: {
signOnURL: true,
issuerURL: true,
publicCertificate: true,
teams: {
_id: true,
},
},
props: {
isRoot: true,
},
}
);
if (!projectSSO) {
return Response.sendErrorResponse(
req,
res,
new BadRequestException('SSO Config not found')
);
}
// redirect to Identity Provider.
if (!projectSSO.issuerURL) {
return Response.sendErrorResponse(
req,
res,
new BadRequestException('Issuer URL not found')
);
}
// redirect to Identity Provider.
if (!projectSSO.signOnURL) {
return Response.sendErrorResponse(
req,
res,
new BadRequestException('Sign on URL not found')
);
}
if (!projectSSO.publicCertificate) {
return Response.sendErrorResponse(
req,
res,
new BadRequestException('Public Certificate not found')
);
}
try {
SSOUtil.isPayloadValid(response);
if (
!SSOUtil.isSignatureValid(
samlResponse,
projectSSO.publicCertificate
)
) {
return Response.sendErrorResponse(
req,
res,
new BadRequestException(
'Signature is not valid or Public Certificate configured with this SSO provider is not valid'
)
);
}
issuerUrl = SSOUtil.getIssuer(response);
email = SSOUtil.getEmail(response);
} catch (err: unknown) {
if (err instanceof Exception) {
return Response.sendErrorResponse(req, res, err);
}
return Response.sendErrorResponse(req, res, new ServerException());
}
if (projectSSO.issuerURL.toString() !== issuerUrl) {
logger.error(
'Issuer URL does not match. It should be ' +
projectSSO.issuerURL.toString() +
' but it is ' +
issuerUrl.toString()
);
return Response.sendErrorResponse(
req,
res,
new BadRequestException('Issuer URL does not match')
);
}
// Check if he already belongs to the project, If he does - then log in.
let alreadySavedUser: User | null = await UserService.findOneBy({
query: { email: email },
select: {
_id: true,
name: true,
email: true,
isMasterAdmin: true,
isEmailVerified: true,
profilePictureId: true,
},
props: {
isRoot: true,
},
});
let isNewUser: boolean = false;
if (!alreadySavedUser) {
// this should never happen because user is logged in before he signs in with SSO UNLESS he initiates the login though the IDP.
/// Create a user.
alreadySavedUser = await UserService.createByEmail({
email,
isEmailVerified: true,
generateRandomPassword: true,
props: {
isRoot: true,
},
});
let isNewUser: boolean = false;
isNewUser = true;
}
if (!alreadySavedUser) {
// this should never happen because user is logged in before he signs in with SSO UNLESS he initiates the login though the IDP.
// If he does not then add him to teams that he should belong and log in.
// This should never happen because email is verified before he logs in with SSO.
if (!alreadySavedUser.isEmailVerified && !isNewUser) {
await AuthenticationEmail.sendVerificationEmail(alreadySavedUser!);
/// Create a user.
alreadySavedUser = await UserService.createByEmail(email, {
isRoot: true,
});
isNewUser = true;
}
// If he does not then add him to teams that he should belong and log in.
if (!alreadySavedUser.isEmailVerified && !isNewUser) {
await AuthenticationEmail.sendVerificationEmail(
alreadySavedUser
);
return Response.render(
req,
res,
'/usr/src/app/FeatureSet/Identity/Views/Message.ejs',
{
title: 'Email not verified.',
message:
'Email is not verified. We have sent you an email with the verification link. Please do not forget to check spam.',
}
);
}
// check if the user already belongs to the project
const teamMemberCount: PositiveNumber =
await TeamMemberService.countBy({
query: {
projectId: new ObjectID(
req.params['projectId'] as string
),
userId: alreadySavedUser.id!,
},
props: {
isRoot: true,
},
});
if (teamMemberCount.toNumber() === 0) {
// user not in project, add him to default teams.
if (!projectSSO.teams || projectSSO.teams.length === 0) {
return Response.render(
req,
res,
'/usr/src/app/FeatureSet/Identity/Views/Message.ejs',
{
title: 'No teams added.',
message:
'No teams have been added to this SSO config. Please contact your admin and have default teams added.',
}
);
}
for (const team of projectSSO.teams) {
// add user to team
let teamMember: TeamMember = new TeamMember();
teamMember.projectId = new ObjectID(
req.params['projectId'] as string
);
teamMember.userId = alreadySavedUser.id!;
teamMember.hasAcceptedInvitation = true;
teamMember.invitationAcceptedAt =
OneUptimeDate.getCurrentDate();
teamMember.teamId = team.id!;
teamMember = await TeamMemberService.create({
data: teamMember,
props: {
isRoot: true,
ignoreHooks: true,
},
});
}
}
if (isNewUser) {
return Response.render(
req,
res,
'/usr/src/app/FeatureSet/Identity/Views/Message.ejs',
{
title: 'You have not signed up so far.',
message:
'You need to sign up for an account on OneUptime with this email:' +
email.toString() +
'. Once you have signed up, you can use SSO to log in to your project.',
}
);
}
const projectId: ObjectID = new ObjectID(
req.params['projectId'] as string
);
const token: string = JSONWebToken.sign(
{
userId: alreadySavedUser.id!,
projectId: projectId,
email: email,
isMasterAdmin: false,
},
OneUptimeDate.getSecondsInDays(new PositiveNumber(30))
);
// Refresh Permissions for this user here.
await AccessTokenService.refreshUserAllPermissions(
alreadySavedUser.id!
);
const host: Hostname = await DatabaseConfig.getHost();
const httpProtocol: Protocol =
await DatabaseConfig.getHttpProtocol();
CookieUtil.setCookie(
res,
CookieUtil.getUserSSOKey(projectId),
token,
{
maxAge: OneUptimeDate.getMillisecondsInDays(
new PositiveNumber(30)
),
httpOnly: true,
}
);
return Response.redirect(
return Response.render(
req,
res,
new URL(
httpProtocol,
host,
new Route(DashboardRoute.toString()).addRoute(
'/' + req.params['projectId']
),
'sso_token=' + token
)
'/usr/src/app/FeatureSet/Identity/Views/Message.ejs',
{
title: 'Email not verified.',
message:
'Email is not verified. We have sent you an email with the verification link. Please do not forget to check spam.',
}
);
} catch (err) {
logger.error(err);
Response.sendErrorResponse(req, res, new ServerException());
}
// check if the user already belongs to the project
const teamMemberCount: PositiveNumber = await TeamMemberService.countBy(
{
query: {
projectId: new ObjectID(req.params['projectId'] as string),
userId: alreadySavedUser!.id!,
},
props: {
isRoot: true,
},
}
);
if (teamMemberCount.toNumber() === 0) {
// user not in project, add him to default teams.
if (!projectSSO.teams || projectSSO.teams.length === 0) {
return Response.render(
req,
res,
'/usr/src/app/FeatureSet/Identity/Views/Message.ejs',
{
title: 'No teams added.',
message:
'No teams have been added to this SSO config. Please contact your admin and have default teams added.',
}
);
}
for (const team of projectSSO.teams) {
// add user to team
let teamMember: TeamMember = new TeamMember();
teamMember.projectId = new ObjectID(
req.params['projectId'] as string
);
teamMember.userId = alreadySavedUser.id!;
teamMember.hasAcceptedInvitation = true;
teamMember.invitationAcceptedAt =
OneUptimeDate.getCurrentDate();
teamMember.teamId = team.id!;
teamMember = await TeamMemberService.create({
data: teamMember,
props: {
isRoot: true,
ignoreHooks: true,
},
});
}
}
const projectId: ObjectID = new ObjectID(
req.params['projectId'] as string
);
const ssoToken: string = JSONWebToken.sign({
data: {
userId: alreadySavedUser.id!,
projectId: projectId,
name: alreadySavedUser.name!,
email: email,
isMasterAdmin: false,
isGeneralLogin: false,
},
expiresInSeconds: OneUptimeDate.getSecondsInDays(
new PositiveNumber(30)
),
});
const oneUptimeToken: string = JSONWebToken.signUserLoginToken({
tokenData: {
userId: alreadySavedUser.id!,
email: alreadySavedUser.email!,
name: alreadySavedUser.name!,
isMasterAdmin: alreadySavedUser.isMasterAdmin!,
isGlobalLogin: false, // This is a general login without SSO. So, we will set this to false. This will give access to all the projects that dont require SSO.
},
expiresInSeconds: OneUptimeDate.getSecondsInDays(
new PositiveNumber(30)
),
});
// Set a cookie with token.
CookieUtil.setCookie(
res,
CookieUtil.getUserTokenKey(),
oneUptimeToken,
{
maxAge: OneUptimeDate.getMillisecondsInDays(
new PositiveNumber(30)
),
httpOnly: true,
}
);
CookieUtil.setCookie(
res,
CookieUtil.getUserSSOKey(projectId),
ssoToken,
{
maxAge: OneUptimeDate.getMillisecondsInDays(
new PositiveNumber(30)
),
httpOnly: true,
}
);
// Refresh Permissions for this user here.
await AccessTokenService.refreshUserAllPermissions(
alreadySavedUser.id!
);
const host: Hostname = await DatabaseConfig.getHost();
const httpProtocol: Protocol = await DatabaseConfig.getHttpProtocol();
logger.info('User logged in with SSO' + email.toString());
return Response.redirect(
req,
res,
new URL(
httpProtocol,
host,
new Route(DashboardRoute.toString()).addRoute(
'/' + req.params['projectId']
)
)
);
} catch (err) {
logger.error(err);
Response.sendErrorResponse(req, res, new ServerException());
}
);
};
export default router;

View File

@@ -1,32 +1,32 @@
import { EncryptionSecret } from 'CommonServer/EnvironmentConfig';
import BaseModel from 'Common/Models/BaseModel';
import { FileRoute } from 'Common/ServiceRoute';
import Hostname from 'Common/Types/API/Hostname';
import Protocol from 'Common/Types/API/Protocol';
import URL from 'Common/Types/API/URL';
import OneUptimeDate from 'Common/Types/Date';
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
import BadDataException from 'Common/Types/Exception/BadDataException';
import { JSONObject } from 'Common/Types/JSON';
import JSONFunctions from 'Common/Types/JSONFunctions';
import ObjectID from 'Common/Types/ObjectID';
import PositiveNumber from 'Common/Types/PositiveNumber';
import DatabaseConfig from 'CommonServer/DatabaseConfig';
import { EncryptionSecret } from 'CommonServer/EnvironmentConfig';
import MailService from 'CommonServer/Services/MailService';
import StatusPagePrivateUserService from 'CommonServer/Services/StatusPagePrivateUserService';
import StatusPageService from 'CommonServer/Services/StatusPageService';
import CookieUtil from 'CommonServer/Utils/Cookie';
import Express, {
ExpressRequest,
ExpressResponse,
ExpressRouter,
NextFunction,
} from 'CommonServer/Utils/Express';
import { JSONObject } from 'Common/Types/JSON';
import StatusPagePrivateUserService from 'CommonServer/Services/StatusPagePrivateUserService';
import ObjectID from 'Common/Types/ObjectID';
import BadDataException from 'Common/Types/Exception/BadDataException';
import MailService from 'CommonServer/Services/MailService';
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
import URL from 'Common/Types/API/URL';
import Response from 'CommonServer/Utils/Response';
import JSONWebToken from 'CommonServer/Utils/JsonWebToken';
import OneUptimeDate from 'Common/Types/Date';
import PositiveNumber from 'Common/Types/PositiveNumber';
import logger from 'CommonServer/Utils/Logger';
import JSONFunctions from 'Common/Types/JSONFunctions';
import StatusPagePrivateUser from 'Model/Models/StatusPagePrivateUser';
import Response from 'CommonServer/Utils/Response';
import StatusPage from 'Model/Models/StatusPage';
import StatusPageService from 'CommonServer/Services/StatusPageService';
import Protocol from 'Common/Types/API/Protocol';
import Hostname from 'Common/Types/API/Hostname';
import DatabaseConfig from 'CommonServer/DatabaseConfig';
import CookieUtil from 'CommonServer/Utils/Cookie';
import BaseModel from 'Common/Models/BaseModel';
import StatusPagePrivateUser from 'Model/Models/StatusPagePrivateUser';
const router: ExpressRouter = Express.getRouter();
@@ -51,7 +51,7 @@ router.post(
CookieUtil.getUserTokenKey(statusPageId)
); // remove the cookie.
return Response.sendEmptyResponse(req, res);
return Response.sendEmptySuccessResponse(req, res);
} catch (err) {
return next(err);
}
@@ -178,7 +178,7 @@ router.post(
logger.error(err);
});
return Response.sendEmptyResponse(req, res);
return Response.sendEmptySuccessResponse(req, res);
}
throw new BadDataException(
@@ -320,7 +320,7 @@ router.post(
logger.error(err);
});
return Response.sendEmptyResponse(req, res);
return Response.sendEmptySuccessResponse(req, res);
} catch (err) {
return next(err);
}
@@ -389,10 +389,12 @@ router.post(
});
if (alreadySavedUser) {
const token: string = JSONWebToken.sign(
alreadySavedUser,
OneUptimeDate.getSecondsInDays(new PositiveNumber(30))
);
const token: string = JSONWebToken.sign({
data: alreadySavedUser,
expiresInSeconds: OneUptimeDate.getSecondsInDays(
new PositiveNumber(30)
),
});
CookieUtil.setCookie(
res,

View File

@@ -1,30 +1,31 @@
import SSOUtil from '../Utils/SSO';
import URL from 'Common/Types/API/URL';
import OneUptimeDate from 'Common/Types/Date';
import Email from 'Common/Types/Email';
import BadRequestException from 'Common/Types/Exception/BadRequestException';
import Exception from 'Common/Types/Exception/Exception';
import ServerException from 'Common/Types/Exception/ServerException';
import HashedString from 'Common/Types/HashedString';
import { JSONObject } from 'Common/Types/JSON';
import ObjectID from 'Common/Types/ObjectID';
import PositiveNumber from 'Common/Types/PositiveNumber';
import { Host, HttpProtocol } from 'CommonServer/EnvironmentConfig';
import StatusPagePrivateUserService from 'CommonServer/Services/StatusPagePrivateUserService';
import StatusPageService from 'CommonServer/Services/StatusPageService';
import StatusPageSsoService from 'CommonServer/Services/StatusPageSsoService';
import CookieUtil from 'CommonServer/Utils/Cookie';
import Express, {
ExpressRequest,
ExpressResponse,
ExpressRouter,
NextFunction,
} from 'CommonServer/Utils/Express';
import BadRequestException from 'Common/Types/Exception/BadRequestException';
import ServerException from 'Common/Types/Exception/ServerException';
import Response from 'CommonServer/Utils/Response';
import StatusPageSsoService from 'CommonServer/Services/StatusPageSsoService';
import ObjectID from 'Common/Types/ObjectID';
import xml2js from 'xml2js';
import { JSONObject } from 'Common/Types/JSON';
import logger from 'CommonServer/Utils/Logger';
import Email from 'Common/Types/Email';
import OneUptimeDate from 'Common/Types/Date';
import PositiveNumber from 'Common/Types/PositiveNumber';
import JSONWebToken from 'CommonServer/Utils/JsonWebToken';
import URL from 'Common/Types/API/URL';
import SSOUtil from '../Utils/SSO';
import Exception from 'Common/Types/Exception/Exception';
import StatusPageSSO from 'Model/Models/StatusPageSso';
import logger from 'CommonServer/Utils/Logger';
import Response from 'CommonServer/Utils/Response';
import StatusPagePrivateUser from 'Model/Models/StatusPagePrivateUser';
import StatusPagePrivateUserService from 'CommonServer/Services/StatusPagePrivateUserService';
import HashedString from 'Common/Types/HashedString';
import StatusPageService from 'CommonServer/Services/StatusPageService';
import CookieUtil from 'CommonServer/Utils/Cookie';
import StatusPageSSO from 'Model/Models/StatusPageSso';
import xml2js from 'xml2js';
const router: ExpressRouter = Express.getRouter();
@@ -65,6 +66,8 @@ router.get(
},
select: {
signOnURL: true,
statusPageId: true,
_id: true,
},
props: {
isRoot: true,
@@ -89,7 +92,17 @@ router.get(
);
}
return Response.redirect(req, res, statusPageSSO.signOnURL);
const samlRequestUrl: URL = SSOUtil.createSAMLRequestUrl({
acsUrl: URL.fromString(
`${HttpProtocol}${Host}/identity/status-page-idp-login/${statusPageSSO.statusPageId?.toString()}/${statusPageSSO.id?.toString()}`
),
signOnUrl: statusPageSSO.signOnURL!,
issuerUrl: URL.fromString(
`${HttpProtocol}${Host}/${statusPageSSO.statusPageId?.toString()}/${statusPageSSO.id?.toString()}`
),
});
return Response.redirect(req, res, samlRequestUrl);
} catch (err) {
return next(err);
}
@@ -270,10 +283,12 @@ router.post(
});
}
const token: string = JSONWebToken.sign(
alreadySavedUser,
OneUptimeDate.getSecondsInDays(new PositiveNumber(30))
);
const token: string = JSONWebToken.sign({
data: alreadySavedUser,
expiresInSeconds: OneUptimeDate.getSecondsInDays(
new PositiveNumber(30)
),
});
CookieUtil.setCookie(
res,

View File

@@ -1,11 +1,11 @@
import 'ejs';
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
import AuthenticationAPI from './API/Authentication';
import SsoAPI from './API/SSO';
import ResellerAPI from './API/Reseller';
import StatusPageSsoAPI from './API/StatusPageSSO';
import SsoAPI from './API/SSO';
import StatusPageAuthenticationAPI from './API/StatusPageAuthentication';
import StatusPageSsoAPI from './API/StatusPageSSO';
import FeatureSet from 'CommonServer/Types/FeatureSet';
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
import 'ejs';
const IdentityFeatureSet: FeatureSet = {
init: async (): Promise<void> => {

View File

@@ -1,23 +1,18 @@
import { AccountsRoute } from 'Common/ServiceRoute';
import EmailVerificationTokenService from 'CommonServer/Services/EmailVerificationTokenService';
import ObjectID from 'Common/Types/ObjectID';
import EmailVerificationToken from 'Model/Models/EmailVerificationToken';
import MailService from 'CommonServer/Services/MailService';
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
import URL from 'Common/Types/API/URL';
import OneUptimeDate from 'Common/Types/Date';
import Route from 'Common/Types/API/Route';
import logger from 'CommonServer/Utils/Logger';
import User from 'Model/Models/User';
import Hostname from 'Common/Types/API/Hostname';
import Protocol from 'Common/Types/API/Protocol';
import Route from 'Common/Types/API/Route';
import URL from 'Common/Types/API/URL';
import OneUptimeDate from 'Common/Types/Date';
import Email from 'Common/Types/Email';
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
import ObjectID from 'Common/Types/ObjectID';
import DatabaseConfig from 'CommonServer/DatabaseConfig';
import EmailVerificationTokenService from 'CommonServer/Services/EmailVerificationTokenService';
import MailService from 'CommonServer/Services/MailService';
import logger from 'CommonServer/Utils/Logger';
import EmailVerificationToken from 'Model/Models/EmailVerificationToken';
import User from 'Model/Models/User';
export default class AuthenticationEmail {
public static async sendVerificationEmail(user: User): Promise<void> {

View File

@@ -1,11 +1,37 @@
import { JSONArray, JSONObject } from 'Common/Types/JSON';
import BadRequestException from 'Common/Types/Exception/BadRequestException';
import URL from 'Common/Types/API/URL';
import OneUptimeDate from 'Common/Types/Date';
import Email from 'Common/Types/Email';
import xmldom from 'xmldom';
import xmlCrypto, { FileKeyInfo } from 'xml-crypto';
import BadRequestException from 'Common/Types/Exception/BadRequestException';
import { JSONArray, JSONObject } from 'Common/Types/JSON';
import Text from 'Common/Types/Text';
import logger from 'CommonServer/Utils/Logger';
import xmlCrypto, { FileKeyInfo } from 'xml-crypto';
import xmldom from 'xmldom';
import zlib from 'zlib';
export default class SSOUtil {
public static createSAMLRequestUrl(data: {
acsUrl: URL;
signOnUrl: URL;
issuerUrl: URL;
}): URL {
const { acsUrl, signOnUrl } = data;
const samlRequest: string = `<samlp:AuthnRequest xmlns="urn:oasis:names:tc:SAML:2.0:metadata" ID="${Text.generateRandomText(
10
).toUpperCase()}" Version="2.0" IssueInstant="${OneUptimeDate.getCurrentDate().toISOString()}" IsPassive="false" AssertionConsumerServiceURL="${acsUrl.toString()}" xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol" ForceAuthn="false"><Issuer xmlns="urn:oasis:names:tc:SAML:2.0:assertion">${data.issuerUrl.toString()}</Issuer></samlp:AuthnRequest>`;
const deflated: Buffer = zlib.deflateRawSync(samlRequest);
const base64Encoded: string = deflated.toString('base64');
return URL.fromString(signOnUrl.toString()).addQueryParam(
'SAMLRequest',
base64Encoded,
true
);
}
public static isPayloadValid(payload: JSONObject): void {
if (
!payload['saml2p:Response'] &&
@@ -18,11 +44,13 @@ export default class SSOUtil {
payload =
(payload['saml2p:Response'] as JSONObject) ||
(payload['samlp:Response'] as JSONObject) ||
(payload['samlp:Response'] as JSONObject);
(payload['samlp:Response'] as JSONObject) ||
(payload['Response'] as JSONObject);
const issuers: JSONArray =
(payload['saml2:Issuer'] as JSONArray) ||
(payload['saml:Issuer'] as JSONArray);
(payload['saml:Issuer'] as JSONArray) ||
(payload['Issuer'] as JSONArray);
if (issuers.length === 0) {
throw new BadRequestException('Issuers not found');
@@ -47,7 +75,8 @@ export default class SSOUtil {
const samlAssertion: JSONArray =
(payload['saml2:Assertion'] as JSONArray) ||
(payload['saml:Assertion'] as JSONArray);
(payload['saml:Assertion'] as JSONArray) ||
(payload['Assertion'] as JSONArray);
if (!samlAssertion || samlAssertion.length === 0) {
throw new BadRequestException('SAML Assertion not found');
@@ -55,7 +84,8 @@ export default class SSOUtil {
const samlSubject: JSONArray =
((samlAssertion[0] as JSONObject)['saml2:Subject'] as JSONArray) ||
((samlAssertion[0] as JSONObject)['saml:Subject'] as JSONArray);
((samlAssertion[0] as JSONObject)['saml:Subject'] as JSONArray) ||
((samlAssertion[0] as JSONObject)['Subject'] as JSONArray);
if (!samlSubject || samlSubject.length === 0) {
throw new BadRequestException('SAML Subject not found');
@@ -63,7 +93,8 @@ export default class SSOUtil {
const samlNameId: JSONArray =
((samlSubject[0] as JSONObject)['saml2:NameID'] as JSONArray) ||
((samlSubject[0] as JSONObject)['saml:NameID'] as JSONArray);
((samlSubject[0] as JSONObject)['saml:NameID'] as JSONArray) ||
((samlSubject[0] as JSONObject)['NameID'] as JSONArray);
if (!samlNameId || samlNameId.length === 0) {
throw new BadRequestException('SAML NAME ID not found');
@@ -120,11 +151,13 @@ export default class SSOUtil {
payload =
(payload['saml2p:Response'] as JSONObject) ||
(payload['samlp:Response'] as JSONObject);
(payload['samlp:Response'] as JSONObject) ||
(payload['Response'] as JSONObject);
const samlAssertion: JSONArray =
(payload['saml2:Assertion'] as JSONArray) ||
(payload['saml:Assertion'] as JSONArray);
(payload['saml:Assertion'] as JSONArray) ||
(payload['Assertion'] as JSONArray);
if (!samlAssertion || samlAssertion.length === 0) {
throw new BadRequestException('SAML Assertion not found');
@@ -132,7 +165,8 @@ export default class SSOUtil {
const samlSubject: JSONArray =
((samlAssertion[0] as JSONObject)['saml2:Subject'] as JSONArray) ||
((samlAssertion[0] as JSONObject)['saml:Subject'] as JSONArray);
((samlAssertion[0] as JSONObject)['saml:Subject'] as JSONArray) ||
((samlAssertion[0] as JSONObject)['Subject'] as JSONArray);
if (!samlSubject || samlSubject.length === 0) {
throw new BadRequestException('SAML Subject not found');
@@ -140,7 +174,8 @@ export default class SSOUtil {
const samlNameId: JSONArray =
((samlSubject[0] as JSONObject)['saml2:NameID'] as JSONArray) ||
((samlSubject[0] as JSONObject)['saml:NameID'] as JSONArray);
((samlSubject[0] as JSONObject)['saml:NameID'] as JSONArray) ||
((samlSubject[0] as JSONObject)['NameID'] as JSONArray);
if (!samlNameId || samlNameId.length === 0) {
throw new BadRequestException('SAML NAME ID not found');
@@ -160,11 +195,13 @@ export default class SSOUtil {
payload =
(payload['saml2p:Response'] as JSONObject) ||
(payload['samlp:Response'] as JSONObject);
(payload['samlp:Response'] as JSONObject) ||
(payload['Response'] as JSONObject);
const issuers: JSONArray =
(payload['saml2:Issuer'] as JSONArray) ||
(payload['saml:Issuer'] as JSONArray);
(payload['saml:Issuer'] as JSONArray) ||
(payload['Issuer'] as JSONArray);
if (issuers.length === 0) {
throw new BadRequestException('Issuers not found');

View File

@@ -1,22 +1,23 @@
import CallService from '../Services/CallService';
import CallRequest from 'Common/Types/Call/CallRequest';
import TwilioConfig from 'Common/Types/CallAndSMS/TwilioConfig';
import BadDataException from 'Common/Types/Exception/BadDataException';
import { JSONObject } from 'Common/Types/JSON';
import JSONFunctions from 'Common/Types/JSONFunctions';
import ObjectID from 'Common/Types/ObjectID';
import Phone from 'Common/Types/Phone';
import ClusterKeyAuthorization from 'CommonServer/Middleware/ClusterKeyAuthorization';
import ProjectCallSMSConfigService from 'CommonServer/Services/ProjectCallSMSConfigService';
import Express, {
ExpressRequest,
ExpressResponse,
ExpressRouter,
} from 'CommonServer/Utils/Express';
const router: ExpressRouter = Express.getRouter();
import Response from 'CommonServer/Utils/Response';
import ClusterKeyAuthorization from 'CommonServer/Middleware/ClusterKeyAuthorization';
import { JSONObject } from 'Common/Types/JSON';
import JSONFunctions from 'Common/Types/JSONFunctions';
import Phone from 'Common/Types/Phone';
import ObjectID from 'Common/Types/ObjectID';
import CallService from '../Services/CallService';
import CallRequest from 'Common/Types/Call/CallRequest';
import ProjectCallSMSConfig from 'Model/Models/ProjectCallSMSConfig';
import ProjectCallSMSConfigService from 'CommonServer/Services/ProjectCallSMSConfigService';
import BadDataException from 'Common/Types/Exception/BadDataException';
import TwilioConfig from 'Common/Types/CallAndSMS/TwilioConfig';
import logger from 'CommonServer/Utils/Logger';
import Response from 'CommonServer/Utils/Response';
import ProjectCallSMSConfig from 'Model/Models/ProjectCallSMSConfig';
const router: ExpressRouter = Express.getRouter();
router.post(
'/make-call',
@@ -32,7 +33,7 @@ router.post(
customTwilioConfig: body['customTwilioConfig'] as any,
});
return Response.sendEmptyResponse(req, res);
return Response.sendEmptySuccessResponse(req, res);
}
);
@@ -137,7 +138,7 @@ router.post('/test', async (req: ExpressRequest, res: ExpressResponse) => {
);
}
return Response.sendEmptyResponse(req, res);
return Response.sendEmptySuccessResponse(req, res);
});
export default router;

View File

@@ -1,19 +1,20 @@
import MailService from '../Services/MailService';
import Dictionary from 'Common/Types/Dictionary';
import Email from 'Common/Types/Email';
import EmailMessage from 'Common/Types/Email/EmailMessage';
import EmailServer from 'Common/Types/Email/EmailServer';
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
import { JSONObject } from 'Common/Types/JSON';
import ObjectID from 'Common/Types/ObjectID';
import ClusterKeyAuthorization from 'CommonServer/Middleware/ClusterKeyAuthorization';
import Express, {
ExpressRequest,
ExpressResponse,
ExpressRouter,
} from 'CommonServer/Utils/Express';
const router: ExpressRouter = Express.getRouter();
import Response from 'CommonServer/Utils/Response';
import ClusterKeyAuthorization from 'CommonServer/Middleware/ClusterKeyAuthorization';
import MailService from '../Services/MailService';
import EmailMessage from 'Common/Types/Email/EmailMessage';
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
import { JSONObject } from 'Common/Types/JSON';
import Email from 'Common/Types/Email';
import Dictionary from 'Common/Types/Dictionary';
import EmailServer from 'Common/Types/Email/EmailServer';
import ObjectID from 'Common/Types/ObjectID';
const router: ExpressRouter = Express.getRouter();
router.post(
'/send',
@@ -44,7 +45,7 @@ router.post(
(body['userOnCallLogTimelineId'] as ObjectID) || undefined,
});
return Response.sendEmptyResponse(req, res);
return Response.sendEmptySuccessResponse(req, res);
}
);

View File

@@ -1,21 +1,22 @@
import SmsService from '../Services/SmsService';
import TwilioConfig from 'Common/Types/CallAndSMS/TwilioConfig';
import BadDataException from 'Common/Types/Exception/BadDataException';
import { JSONObject } from 'Common/Types/JSON';
import JSONFunctions from 'Common/Types/JSONFunctions';
import ObjectID from 'Common/Types/ObjectID';
import Phone from 'Common/Types/Phone';
import ClusterKeyAuthorization from 'CommonServer/Middleware/ClusterKeyAuthorization';
import ProjectCallSMSConfigService from 'CommonServer/Services/ProjectCallSMSConfigService';
import Express, {
ExpressRequest,
ExpressResponse,
ExpressRouter,
} from 'CommonServer/Utils/Express';
const router: ExpressRouter = Express.getRouter();
import Response from 'CommonServer/Utils/Response';
import ClusterKeyAuthorization from 'CommonServer/Middleware/ClusterKeyAuthorization';
import { JSONObject } from 'Common/Types/JSON';
import JSONFunctions from 'Common/Types/JSONFunctions';
import SmsService from '../Services/SmsService';
import Phone from 'Common/Types/Phone';
import ObjectID from 'Common/Types/ObjectID';
import ProjectCallSMSConfig from 'Model/Models/ProjectCallSMSConfig';
import ProjectCallSMSConfigService from 'CommonServer/Services/ProjectCallSMSConfigService';
import BadDataException from 'Common/Types/Exception/BadDataException';
import TwilioConfig from 'Common/Types/CallAndSMS/TwilioConfig';
import logger from 'CommonServer/Utils/Logger';
import Response from 'CommonServer/Utils/Response';
import ProjectCallSMSConfig from 'Model/Models/ProjectCallSMSConfig';
const router: ExpressRouter = Express.getRouter();
router.post(
'/send',
@@ -35,7 +36,7 @@ router.post(
}
);
return Response.sendEmptyResponse(req, res);
return Response.sendEmptySuccessResponse(req, res);
}
);
@@ -135,7 +136,7 @@ router.post('/test', async (req: ExpressRequest, res: ExpressResponse) => {
);
}
return Response.sendEmptyResponse(req, res);
return Response.sendEmptySuccessResponse(req, res);
});
export default router;

View File

@@ -1,22 +1,22 @@
import MailService from '../Services/MailService';
import Email from 'Common/Types/Email';
import EmailMessage from 'Common/Types/Email/EmailMessage';
import EmailServer from 'Common/Types/Email/EmailServer';
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
import BadDataException from 'Common/Types/Exception/BadDataException';
import { JSONObject } from 'Common/Types/JSON';
import ObjectID from 'Common/Types/ObjectID';
import ProjectSMTPConfigService from 'CommonServer/Services/ProjectSmtpConfigService';
import Express, {
ExpressRequest,
ExpressResponse,
ExpressRouter,
} from 'CommonServer/Utils/Express';
const router: ExpressRouter = Express.getRouter();
import Response from 'CommonServer/Utils/Response';
import MailService from '../Services/MailService';
import EmailMessage from 'Common/Types/Email/EmailMessage';
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
import { JSONObject } from 'Common/Types/JSON';
import Email from 'Common/Types/Email';
import EmailServer from 'Common/Types/Email/EmailServer';
import ProjectSmtpConfig from 'Model/Models/ProjectSmtpConfig';
import ProjectSMTPConfigService from 'CommonServer/Services/ProjectSmtpConfigService';
import BadDataException from 'Common/Types/Exception/BadDataException';
import ObjectID from 'Common/Types/ObjectID';
import logger from 'CommonServer/Utils/Logger';
import Response from 'CommonServer/Utils/Response';
import ProjectSmtpConfig from 'Model/Models/ProjectSmtpConfig';
const router: ExpressRouter = Express.getRouter();
router.post('/test', async (req: ExpressRequest, res: ExpressResponse) => {
const body: JSONObject = req.body;
@@ -98,7 +98,7 @@ router.post('/test', async (req: ExpressRequest, res: ExpressResponse) => {
);
}
return Response.sendEmptyResponse(req, res);
return Response.sendEmptySuccessResponse(req, res);
});
export default router;

View File

@@ -1,12 +1,12 @@
import GlobalConfig, { EmailServerType } from 'Model/Models/GlobalConfig';
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 GlobalConfigService from 'CommonServer/Services/GlobalConfigService';
import EmailServer from 'Common/Types/Email/EmailServer';
import TwilioConfig from 'Common/Types/CallAndSMS/TwilioConfig';
import GlobalConfig, { EmailServerType } from 'Model/Models/GlobalConfig';
export const InternalSmtpPassword: string =
process.env['INTERNAL_SMTP_PASSWORD'] || '';

View File

@@ -1,13 +1,12 @@
import 'ejs';
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
import CallAPI from './API/Call';
// API
import MailAPI from './API/Mail';
import SmsAPI from './API/SMS';
import CallAPI from './API/Call';
import SMTPConfigAPI from './API/SMTPConfig';
import './Utils/Handlebars';
import FeatureSet from 'CommonServer/Types/FeatureSet';
import Express, { ExpressApplication } from 'CommonServer/Utils/Express';
import 'ejs';
const NotificationFeatureSet: FeatureSet = {
init: async (): Promise<void> => {

View File

@@ -1,31 +1,31 @@
import ObjectID from 'Common/Types/ObjectID';
import {
CallDefaultCostInCentsPerMinute,
CallHighRiskCostInCentsPerMinute,
getTwilioConfig,
} from '../Config';
import Twilio from 'twilio';
import CallLog from 'Model/Models/CallLog';
import CallStatus from 'Common/Types/Call/CallStatus';
import CallRequest, {
GatherInput,
Say,
isHighRiskPhoneNumber,
} from 'Common/Types/Call/CallRequest';
import CallStatus from 'Common/Types/Call/CallStatus';
import TwilioConfig from 'Common/Types/CallAndSMS/TwilioConfig';
import OneUptimeDate from 'Common/Types/Date';
import BadDataException from 'Common/Types/Exception/BadDataException';
import JSONFunctions from 'Common/Types/JSONFunctions';
import ObjectID from 'Common/Types/ObjectID';
import UserNotificationStatus from 'Common/Types/UserNotification/UserNotificationStatus';
import { IsBillingEnabled } from 'CommonServer/EnvironmentConfig';
import CallLogService from 'CommonServer/Services/CallLogService';
import ProjectService from 'CommonServer/Services/ProjectService';
import Project from 'Model/Models/Project';
import NotificationService from 'CommonServer/Services/NotificationService';
import logger from 'CommonServer/Utils/Logger';
import { CallInstance } from 'twilio/lib/rest/api/v2010/account/call';
import JSONWebToken from 'CommonServer/Utils/JsonWebToken';
import OneUptimeDate from 'Common/Types/Date';
import JSONFunctions from 'Common/Types/JSONFunctions';
import ProjectService from 'CommonServer/Services/ProjectService';
import UserOnCallLogTimelineService from 'CommonServer/Services/UserOnCallLogTimelineService';
import UserNotificationStatus from 'Common/Types/UserNotification/UserNotificationStatus';
import BadDataException from 'Common/Types/Exception/BadDataException';
import TwilioConfig from 'Common/Types/CallAndSMS/TwilioConfig';
import JSONWebToken from 'CommonServer/Utils/JsonWebToken';
import logger from 'CommonServer/Utils/Logger';
import CallLog from 'Model/Models/CallLog';
import Project from 'Model/Models/Project';
import Twilio from 'twilio';
import { CallInstance } from 'twilio/lib/rest/api/v2010/account/call';
export default class CallService {
public static async makeCall(
@@ -41,7 +41,7 @@ export default class CallService {
const callLog: CallLog = new CallLog();
try {
logger.info('Call Request received.');
logger.debug('Call Request received.');
let callCost: number = 0;
@@ -56,7 +56,7 @@ export default class CallService {
}
}
logger.info('Call Cost: ' + callCost);
logger.debug('Call Cost: ' + callCost);
const twilioConfig: TwilioConfig | null =
options.customTwilioConfig || (await getTwilioConfig());
@@ -101,7 +101,7 @@ export default class CallService {
},
});
logger.info('Project found.');
logger.debug('Project found.');
if (!project) {
callLog.status = CallStatus.Error;
@@ -243,7 +243,7 @@ export default class CallService {
}
}
logger.info('Sending Call Request.');
logger.debug('Sending Call Request.');
const twillioCall: CallInstance = await client.calls.create({
twiml: this.generateTwimlForCall(callRequest),
@@ -251,16 +251,16 @@ export default class CallService {
from: twilioConfig.phoneNumber.toString(), // From a valid Twilio number
});
logger.info('Call Request sent successfully.');
logger.debug('Call Request sent successfully.');
callLog.status = CallStatus.Success;
callLog.statusMessage = 'Call ID: ' + twillioCall.sid;
logger.info('Call ID: ' + twillioCall.sid);
logger.info(callLog.statusMessage);
logger.debug('Call ID: ' + twillioCall.sid);
logger.debug(callLog.statusMessage);
if (shouldChargeForCall && project) {
logger.info('Updating Project Balance.');
logger.debug('Updating Project Balance.');
callLog.callCostInUSDCents = callCost * 100;
@@ -271,7 +271,7 @@ export default class CallService {
);
}
logger.info('Call Cost: ' + callLog.callCostInUSDCents);
logger.debug('Call Cost: ' + callLog.callCostInUSDCents);
project.smsOrCallCurrentBalanceInUSDCents = Math.floor(
project.smsOrCallCurrentBalanceInUSDCents! - callCost * 100
@@ -289,8 +289,8 @@ export default class CallService {
},
});
logger.info("Project's current balance updated.");
logger.info(
logger.debug("Project's current balance updated.");
logger.debug(
'Current Balance: ' +
project.smsOrCallCurrentBalanceInUSDCents
);
@@ -306,19 +306,19 @@ export default class CallService {
callError = e;
}
logger.info('Saving Call Log if project id is provided.');
logger.debug('Saving Call Log if project id is provided.');
if (options.projectId) {
logger.info('Saving Call Log.');
logger.debug('Saving Call Log.');
await CallLogService.create({
data: callLog,
props: {
isRoot: true,
},
});
logger.info('Call Log saved.');
logger.debug('Call Log saved.');
} else {
logger.info('Project Id is not provided. Call Log not saved.');
logger.debug('Project Id is not provided. Call Log not saved.');
}
if (options.userOnCallLogTimelineId) {

View File

@@ -1,20 +1,3 @@
import nodemailer, { Transporter } from 'nodemailer';
import Handlebars from 'handlebars';
import fsp from 'fs/promises';
import EmailMessage from 'Common/Types/Email/EmailMessage';
import Path from 'path';
import Email from 'Common/Types/Email';
import BadDataException from 'Common/Types/Exception/BadDataException';
import EmailServer from 'Common/Types/Email/EmailServer';
import LocalCache from 'CommonServer/Infrastructure/LocalCache';
import OneUptimeDate from 'Common/Types/Date';
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
import Dictionary from 'Common/Types/Dictionary';
import Hostname from 'Common/Types/API/Hostname';
import Port from 'Common/Types/Port';
import { JSONObject } from 'Common/Types/JSON';
import logger from 'CommonServer/Utils/Logger';
import { IsDevelopment } from 'CommonServer/EnvironmentConfig';
import {
InternalSmtpEmail,
InternalSmtpFromName,
@@ -22,19 +5,36 @@ import {
InternalSmtpPassword,
InternalSmtpPort,
InternalSmtpSecure,
SendGridConfig,
getEmailServerType,
getGlobalSMTPConfig,
SendGridConfig,
getSendgridConfig,
} from '../Config';
import SendgridMail, { MailDataRequired } from '@sendgrid/mail';
import ObjectID from 'Common/Types/ObjectID';
import UserOnCallLogTimelineService from 'CommonServer/Services/UserOnCallLogTimelineService';
import UserNotificationStatus from 'Common/Types/UserNotification/UserNotificationStatus';
import EmailLog from 'Model/Models/EmailLog';
import Hostname from 'Common/Types/API/Hostname';
import OneUptimeDate from 'Common/Types/Date';
import Dictionary from 'Common/Types/Dictionary';
import Email from 'Common/Types/Email';
import EmailMessage from 'Common/Types/Email/EmailMessage';
import EmailServer from 'Common/Types/Email/EmailServer';
import EmailTemplateType from 'Common/Types/Email/EmailTemplateType';
import BadDataException from 'Common/Types/Exception/BadDataException';
import { JSONObject } from 'Common/Types/JSON';
import MailStatus from 'Common/Types/Mail/MailStatus';
import ObjectID from 'Common/Types/ObjectID';
import Port from 'Common/Types/Port';
import UserNotificationStatus from 'Common/Types/UserNotification/UserNotificationStatus';
import { IsDevelopment } from 'CommonServer/EnvironmentConfig';
import LocalCache from 'CommonServer/Infrastructure/LocalCache';
import EmailLogService from 'CommonServer/Services/EmailLogService';
import UserOnCallLogTimelineService from 'CommonServer/Services/UserOnCallLogTimelineService';
import logger from 'CommonServer/Utils/Logger';
import EmailLog from 'Model/Models/EmailLog';
import { EmailServerType } from 'Model/Models/GlobalConfig';
import fsp from 'fs/promises';
import Handlebars from 'handlebars';
import nodemailer, { Transporter } from 'nodemailer';
import Path from 'path';
export default class MailService {
public static isSMTPConfigValid(obj: JSONObject): boolean {

View File

@@ -1,26 +1,26 @@
import ObjectID from 'Common/Types/ObjectID';
import Phone from 'Common/Types/Phone';
import {
SMSDefaultCostInCents,
SMSHighRiskCostInCents,
getTwilioConfig,
} from '../Config';
import Twilio from 'twilio';
import SmsLog from 'Model/Models/SmsLog';
import SmsStatus from 'Common/Types/SmsStatus';
import { IsBillingEnabled } from 'CommonServer/EnvironmentConfig';
import SmsLogService from 'CommonServer/Services/SmsLogService';
import ProjectService from 'CommonServer/Services/ProjectService';
import Project from 'Model/Models/Project';
import { MessageInstance } from 'twilio/lib/rest/api/v2010/account/message';
import NotificationService from 'CommonServer/Services/NotificationService';
import logger from 'CommonServer/Utils/Logger';
import UserOnCallLogTimelineService from 'CommonServer/Services/UserOnCallLogTimelineService';
import UserNotificationStatus from 'Common/Types/UserNotification/UserNotificationStatus';
import BadDataException from 'Common/Types/Exception/BadDataException';
import { isHighRiskPhoneNumber } from 'Common/Types/Call/CallRequest';
import Text from 'Common/Types/Text';
import TwilioConfig from 'Common/Types/CallAndSMS/TwilioConfig';
import BadDataException from 'Common/Types/Exception/BadDataException';
import ObjectID from 'Common/Types/ObjectID';
import Phone from 'Common/Types/Phone';
import SmsStatus from 'Common/Types/SmsStatus';
import Text from 'Common/Types/Text';
import UserNotificationStatus from 'Common/Types/UserNotification/UserNotificationStatus';
import { IsBillingEnabled } from 'CommonServer/EnvironmentConfig';
import NotificationService from 'CommonServer/Services/NotificationService';
import ProjectService from 'CommonServer/Services/ProjectService';
import SmsLogService from 'CommonServer/Services/SmsLogService';
import UserOnCallLogTimelineService from 'CommonServer/Services/UserOnCallLogTimelineService';
import logger from 'CommonServer/Utils/Logger';
import Project from 'Model/Models/Project';
import SmsLog from 'Model/Models/SmsLog';
import Twilio from 'twilio';
import { MessageInstance } from 'twilio/lib/rest/api/v2010/account/message';
export default class SmsService {
public static async sendSms(
@@ -251,8 +251,8 @@ export default class SmsService {
smsLog.status = SmsStatus.Success;
smsLog.statusMessage = 'Message ID: ' + twillioMessage.sid;
logger.info('SMS message sent successfully.');
logger.info(smsLog.statusMessage);
logger.debug('SMS message sent successfully.');
logger.debug(smsLog.statusMessage);
if (shouldChargeForSMS && project) {
smsLog.smsCostInUSDCents = smsCost * 100;

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