Compare commits

...

657 Commits

Author SHA1 Message Date
Simon Larsen
9b83202e58 refactor: Add occuranceCount field to ExceptionsTable and ExceptionExplorer components 2024-08-29 12:29:44 +01:00
Simon Larsen
3ca4d5d481 refactor: Remove unused code and optimize imports in ExceptionInstance and TraceElement components 2024-08-29 11:57:24 +01:00
Simon Larsen
5c4d4b2c63 refactor: Add exception span status code and name to ExceptionInstance model 2024-08-29 11:25:43 +01:00
Simon Larsen
fd0a95d436 refactor: Add Unarchive icon and handle archived exceptions in TelemetryExceptionElement 2024-08-29 10:32:40 +01:00
Simon Larsen
23c65cecf0 refactor: Update Telemetry class to handle metricReader being undefined 2024-08-28 12:34:15 +01:00
Simon Larsen
5c3dcf7bc9 refactor: Improve SSL ordering for domains in StatusPageCerts job 2024-08-28 12:25:04 +01:00
Simon Larsen
108940678f refactor: Update TraceExplorer to handle rootSpan with null or undefined parentSpanId 2024-08-28 12:00:45 +01:00
Simon Larsen
3df72091a2 refactor: Update Telemetry class to import TelemetryCounter from Utils/Telemetry 2024-08-28 10:26:26 +01:00
Simon Larsen
b1de73a16a refactor: Update telemetry dependencies and improve SSL ordering in StatusAPI and Telemetry classes 2024-08-28 10:21:22 +01:00
Simon Larsen
f715b14b74 refactor: Update telemetry dependencies and improve SSL ordering in Telemetry class 2024-08-28 09:42:26 +01:00
Simon Larsen
17eef6408e refactor: Update telemetry dependencies and improve SSL ordering in StatusPageCerts job 2024-08-27 20:32:02 +01:00
Simon Larsen
bc288100c0 refactor: Update telemetry dependencies to latest versions 2024-08-27 18:53:48 +01:00
Simon Larsen
c4a01058b7 refactor: Improve SSL ordering for domains in StatusPageCerts job 2024-08-27 18:43:02 +01:00
Simon Larsen
cb10647285 fix depreated prop 2024-08-27 18:42:39 +01:00
Simon Larsen
fb8b00d383 refactor: Update startActiveSpan method in Telemetry class 2024-08-27 14:51:38 +01:00
Simon Larsen
4563f42794 chore: Update timeout handling in Cron and Queue classes 2024-08-27 13:33:15 +01:00
Simon Larsen
a6072634f2 refactor: Improve error handling and logging in Cron and Queue classes 2024-08-27 13:10:40 +01:00
Simon Larsen
646908e66b refactor: Remove unused timeoutInMs property in Cron and Queue classes 2024-08-27 11:12:39 +01:00
Simon Larsen
ed150c1482 refactor: Remove unused timeoutInMs property in Cron and Queue classes 2024-08-27 11:09:00 +01:00
Simon Larsen
fac59332ed refactor: Update CNAME verification logging in StatusPageDomainService 2024-08-27 11:05:07 +01:00
Simon Larsen
64725b3973 refactor: Update code and field types for telemetry exceptions 2024-08-26 20:38:39 +01:00
Simon Larsen
3636b160fb refactor: Update telemetry exception view layout components 2024-08-26 16:48:20 +01:00
Simon Larsen
fee3264350 refactor: Improve CNAME verification logging in StatusPageDomainService 2024-08-26 14:55:52 +01:00
Simon Larsen
5bcd451bc8 Merge branch 'error-tracking' 2024-08-26 14:35:29 +01:00
Simon Larsen
7c2d6dc9e5 refactor: Remove BadDataException from StatusAPI 2024-08-26 14:34:55 +01:00
Simon Larsen
185eb20d1b refactor: Update telemetry exception view layout components 2024-08-26 14:33:01 +01:00
Simon Larsen
cc7696f481 refactor: Update telemetry exception view layout components 2024-08-26 08:58:45 +01:00
Simon Larsen
a3856588bb refactor: Enable telemetry for the app service 2024-08-26 07:40:54 +01:00
Simon Larsen
1a9668a877 refactor: Update telemetry exception view layout components 2024-08-26 07:10:03 +01:00
Simon Larsen
92e519c49e refactor: Update telemetry exception view layout components 2024-08-26 06:45:33 +01:00
Simon Larsen
3c296f72d8 refactor: Update exceptions table messages and routes 2024-08-25 23:25:21 +01:00
Simon Larsen
f0e701c5bb refactor: Update telemetry exception view layout components 2024-08-25 22:52:50 +01:00
Simon Larsen
7fa461e652 refactor: Improve CNAME verification logging in StatusPageDomainService 2024-08-25 22:36:01 +01:00
Simon Larsen
66b4fbded1 refactor: Remove TelemetryExceptionStatusService and ExceptionService 2024-08-25 22:35:06 +01:00
Simon Larsen
e7fc9bb9a5 refactor: Remove TelemetryExceptionStatusService and ExceptionService 2024-08-25 19:42:47 +01:00
Simon Larsen
2f3dbebe9a refactor: Add TelemetryExceptionStatusService to handle telemetry exception status in the database 2024-08-25 19:29:25 +01:00
Simon Larsen
a6a5f189c3 refactor: Add TelemetryExceptionStatus model to DatabaseModels and update Permission enum with Telemetry Exception permissions 2024-08-25 18:40:40 +01:00
Simon Larsen
67f1ad9ef1 Merge pull request #1653 from Johncs2d/master
Add debug logging to StatusPageDomainService.ts for debugging failing…
2024-08-23 15:44:21 +01:00
Johncs2d
4e7d1d5c7a Add debug logging to StatusPageDomainService.ts for debugging failing domain verification requests. 2024-08-23 22:36:41 +08:00
Simon Larsen
b9dd9eb8de refactor: Add Crypto class for MD5 and SHA256 hashing 2024-08-23 14:49:04 +01:00
Simon Larsen
3c86293864 refactor: Add Exception model to AnalyticsModels and update Permission enum with Telemetry Service Exception permissions 2024-08-23 12:32:39 +01:00
Simon Larsen
b202b07353 refactor: Add syncId prop to LineChart component for syncing multiple charts 2024-08-21 19:01:21 +01:00
Simon Larsen
9db1c59893 refactor: Update LineChart component to use new curve prop and add missing type annotations 2024-08-21 18:37:22 +01:00
Simon Larsen
ac7d4f974b refactor: Update ChartCurve enum and LineChart component to use new curve prop 2024-08-21 17:30:07 +01:00
Simon Larsen
6251dfe482 refactor: Update ChartColors and GetYAxisDomain utility functions 2024-08-21 14:57:15 +01:00
Simon Larsen
dbdca789d4 refactor: Update YAxisOptions interface to include a precision property 2024-08-21 14:49:47 +01:00
Simon Larsen
12e766e9d4 refactor: Update YAxisOptions interface to include a precision property 2024-08-21 14:06:19 +01:00
Simon Larsen
ba2a480d4f refactor: Update XAxisOptions interface to include a formatter function 2024-08-21 13:55:57 +01:00
Simon Larsen
3b141d7e90 refactor: Update XAxisOptions interface to include a formatter function 2024-08-21 13:10:46 +01:00
Simon Larsen
61541ac7c9 Merge branch 'master' into tremor-graphs-refactor 2024-08-20 22:04:56 +01:00
Simon Larsen
abde6ee7cb Merge pull request #1651 from OneUptime/bull-board-ui
feat: Add Bull Board for monitoring and managing queues
2024-08-20 22:00:32 +01:00
Simon Larsen
9aae86cc78 feat: Add Bull Board for monitoring and managing queues 2024-08-20 21:59:26 +01:00
Simon Larsen
222027f2e0 refactor: Increase concurrency for running workers to 100 2024-08-20 21:21:39 +01:00
Simon Larsen
adfb3e1db4 refactor: Update logging in CheckHeartbeat.ts and Telemetry.ts 2024-08-20 20:57:33 +01:00
Simon Larsen
fe8aa54f1c feat: Add API endpoint to get count of pending incoming request monitors 2024-08-20 18:27:04 +01:00
Simon Larsen
5237384d08 refactor: Update PostgresAppInstance to use static methods and properties 2024-08-20 17:37:45 +01:00
Simon Larsen
aca766a252 Merge branch 'master' into tremor-graphs-refactor 2024-08-20 16:27:05 +01:00
Simon Larsen
ee29277cb9 refactor: Add SortOrder import and update query sorting in CheckHeartbeat.ts 2024-08-20 16:26:31 +01:00
Simon Larsen
310ca572ff Update XAxisOptions interface to include a formatter function 2024-08-20 16:19:14 +01:00
Simon Larsen
3d13620a28 refactor: Update chart colors in LineChart and BrandColors files 2024-08-20 14:46:26 +01:00
Simon Larsen
1c069c60fc refactor: Update types for X and Y values in Charts 2024-08-19 19:44:25 +01:00
Simon Larsen
7146b341c5 chore: Add new types for X and Y values in Charts 2024-08-19 19:42:57 +01:00
Simon Larsen
8f8e40aa71 Merge branch 'master' into tremor-graphs-refactor 2024-08-19 17:54:17 +01:00
Simon Larsen
0e9c752aae Merge pull request #1649 from OneUptime/add-more-conds
refactor: Update description for Input 2 in Condition component
2024-08-19 17:30:19 +01:00
Simon Larsen
d37f8a4049 refactor: Update description for Input 2 in Condition component 2024-08-19 17:29:38 +01:00
Simon Larsen
26dd72eea2 Merge pull request #1648 from OneUptime/add-more-conds
refactor: Add support for additional condition operators in IfElse co…
2024-08-19 17:24:05 +01:00
Simon Larsen
462105c6fd refactor: Add support for additional condition operators in IfElse component 2024-08-19 17:23:50 +01:00
Simon Larsen
5662d45826 Merge pull request #1647 from OneUptime/make-graphs-beautiful
Make graphs beautiful
2024-08-19 16:55:58 +01:00
Simon Larsen
32ebb26960 refactor: Update chart colors in LineChart and BrandColors files 2024-08-19 16:55:38 +01:00
Simon Larsen
235fed6f17 refactor: Update chart colors in LineChart and BrandColors files 2024-08-19 16:53:04 +01:00
Simon Larsen
a51c0c45e4 chore: Add @tremor/react dependency to package.json 2024-08-19 16:23:37 +01:00
Simon Larsen
8ea54108c1 Merge pull request #1646 from OneUptime/incoming-request-heartbeat-check
Incoming request heartbeat check
2024-08-19 16:18:10 +01:00
Simon Larsen
cba6e9e2a0 refactor: Add incomingRequestMonitorHeartbeatCheckedAt property to MonitorView and Summary components 2024-08-19 16:17:07 +01:00
Simon Larsen
bd1e1792e4 Merge pull request #1645 from OneUptime/refactor-query-types
Refactor query typescript types
2024-08-19 15:33:24 +01:00
Simon Larsen
e5c9b20c64 refactor: Update aggregationType property name in AggregateBy interface and related files 2024-08-19 15:33:04 +01:00
Simon Larsen
8145f07e51 refactor: Update projectId usage in multiple files to use non-null assertion operator 2024-08-19 14:10:03 +01:00
Simon Larsen
56654085a4 refactor: Update projectId usage in multiple files to use non-null assertion operator 2024-08-19 14:06:09 +01:00
Simon Larsen
a6ddba16ec refactor: Update projectId usage in multiple files to use non-null assertion operator 2024-08-19 13:19:26 +01:00
Simon Larsen
b3cf198649 refactor: Update QueryOperator class to extend SerializableObject 2024-08-19 13:15:17 +01:00
Simon Larsen
4dd7285c13 Merge pull request #1644 from OneUptime/Fix-error-message
refactor: Improve error message for no summary available in SummaryIn…
2024-08-19 11:14:43 +01:00
Simon Larsen
5347b5c109 refactor: Improve error message for no summary available in SummaryInfo component 2024-08-19 11:14:11 +01:00
Simon Larsen
24b956c55f Merge pull request #1643 from OneUptime/africa-domain
Add .africa TLD
2024-08-19 10:43:02 +01:00
Simon Larsen
32c9d6d2df add africa tld 2024-08-19 10:42:28 +01:00
Simon Larsen
c883ce6a34 refactor: Improve overall uptime precision display in StatusPageSettings 2024-08-17 10:09:46 +01:00
Simon Larsen
3851c1f963 refactor: Update UptimePrecision enum to separate file for reusability 2024-08-17 09:53:46 +01:00
Simon Larsen
dd5cb900ff refactor: Update workflow dependencies in release.yml 2024-08-15 20:54:18 +01:00
Simon Larsen
47a4fe1937 Merge branch 'release' of github.com:OneUptime/oneuptime into release 2024-08-15 18:43:09 +01:00
Simon Larsen
0d0e64f633 refactor: Update BillingService.test.ts to use OneUptimeDate.getCurrentDate() for mockDate 2024-08-15 18:42:33 +01:00
Simon Larsen
cc432dfa1c refactor: Update QR code description for two-factor authentication 2024-08-15 17:37:57 +01:00
Simon Larsen
0fd161d251 refactor: Update JSON deserialization logic in DatabaseBaseModel 2024-08-15 17:19:00 +01:00
Simon Larsen
a6cb80f640 refactor: Update JSON deserialization logic in DatabaseBaseModel 2024-08-15 16:57:59 +01:00
Simon Larsen
5dbd8b9b35 refactor: Update environment variable name for billing private key in test.common.yaml and test-setup.sh 2024-08-15 16:39:15 +01:00
Simon Larsen
3df855c52a refactor: Add getSpanStatusText method to SpanUtil for retrieving span status text 2024-08-15 16:36:48 +01:00
Simon Larsen
183ff170ae refactor: Update telemetry service fetching logic in MonitorStepElement 2024-08-15 16:34:25 +01:00
Simon Larsen
946e53b5c5 refactor: Update Dropdown component to improve code readability and formatting 2024-08-15 16:12:59 +01:00
Simon Larsen
c8f8b79cea refactor: Improve code readability and formatting in Dropdown component and test-setup.sh 2024-08-15 15:57:46 +01:00
Simon Larsen
cf71ba0c72 refactor: Improve code readability and formatting in QueryUtil 2024-08-15 15:33:12 +01:00
Simon Larsen
90ffb7233d refactor: Update test-setup.sh to set test environment variables and billing keys 2024-08-15 15:31:24 +01:00
Simon Larsen
7742318b74 refactor: Improve code readability and formatting in DropdownUtil and QueryUtil 2024-08-15 15:25:59 +01:00
Simon Larsen
5a1705cf12 refactor: Update watch paths in nodemon.json files and add test-setup.sh script 2024-08-15 14:12:30 +01:00
Simon Larsen
fe55d39d14 refactor: Update table container class name in BaseModelTable and Table components 2024-08-15 12:40:21 +01:00
Simon Larsen
a820b53d65 refactor: Update config.env with test billing private key 2024-08-15 12:16:57 +01:00
Simon Larsen
d2a9d9fed4 reafactor: fix team member tests 2024-08-15 00:05:40 +01:00
Simon Larsen
c9a69db7f2 refactor: Update import paths for ObjectID and OneUptimeDate in various service files 2024-08-14 22:51:29 +01:00
Simon Larsen
69dd24128a feat: Add PATCH method support to API components 2024-08-14 16:42:07 +01:00
Simon Larsen
7c2238eac7 refactor: Update code to handle missing teamMembers in AccessTokenService 2024-08-14 15:42:03 +01:00
Simon Larsen
2e850ed6ab refactor: Update PostgresDatabase.ts and UserService.ts to use explicit type annotations 2024-08-14 13:52:42 +01:00
Simon Larsen
7e54fc33ae refactor: Update ProjectTestService to allow generating random projects with seat limit 2024-08-14 10:11:08 +01:00
Simon Larsen
bc15416103 refactor: Remove unused imports and update error message in ScheduledMaintenanceService 2024-08-14 10:10:22 +01:00
Simon Larsen
b61fb75e36 refactor: Remove unused imports and update error message in ScheduledMaintenanceService 2024-08-13 19:18:27 +01:00
Simon Larsen
a2d2ed038b refactor: Update ScheduledMaintenanceService error message for missing ProjectId 2024-08-13 19:16:56 +01:00
Simon Larsen
f36ea78168 refactor: Update Database class to initialize dataSourceOptions and dataSource as null 2024-08-13 15:10:40 +01:00
Simon Larsen
14cf7f047f refactor: Remove unused imports in ServiceRoute.ts, Index.ts, and various service files 2024-08-13 14:54:29 +01:00
Simon Larsen
c64c3d7012 refactor: Remove unused imports in ServiceRoute.ts, Index.ts, and various service files 2024-08-13 14:37:23 +01:00
Simon Larsen
8cb15df390 refactor: Update ServiceRoute.ts, BillingService.test.ts, ProjectService.ts, ProjectSsoService.ts, DomainService.ts, GlobalConfigService.ts, ProbeService.ts, AcmeChallengeService.ts, CopilotActionService.ts, StatusPageSsoService.ts, ApiKeyService.ts, ResellerService.ts, and ProbeOwnerTeamService.ts 2024-08-13 14:16:53 +01:00
Simon Larsen
32da3f7c94 refactor: Update ProjectAPI and DatabaseService to use explicit type annotations 2024-08-13 13:31:00 +01:00
Simon Larsen
9355f185a9 refactor: Update pricing page with new feature description 2024-08-13 12:12:17 +01:00
Simon Larsen
c53584e9d5 should generate a string of random numbers of specified length 2024-08-12 22:57:36 +01:00
Simon Larsen
01be73612d refactor: Update TestDatabase to use pg-mem for in-memory database in tests 2024-08-09 09:53:22 -06:00
Simon Larsen
99a80ab9b6 refactor: Update PostgresDatabase.ts to use async/await for createDatabase and dropDatabase methods 2024-08-09 09:28:09 -06:00
Simon Larsen
95dca8e8c6 refactor: Update Statement.ts to use explicit type annotations for isNumberArray 2024-08-09 08:38:28 -06:00
Simon Larsen
eddc5f1845 refactor: Update DropdownUtil to return dropdownOptions directly 2024-08-09 08:34:00 -06:00
Simon Larsen
c965c18943 refactor: Update test.common.yaml to install npm dependencies in Common directory 2024-08-08 16:22:37 -06:00
Simon Larsen
3c20f424e9 refactor: Update test-setup.sh to export environment variables and start PostgreSQL in docker-compose 2024-08-08 16:05:37 -06:00
Simon Larsen
0ef7ca93f8 refactor: Update JSONFunctions and Table component to support custom classNames 2024-08-08 16:04:14 -06:00
Simon Larsen
ca7c55b557 refactor: Update test-setup.sh path in test.common.yaml 2024-08-08 14:36:27 -06:00
Simon Larsen
a72373994a refactor: Update test-setup.sh for running database in docker-compose 2024-08-08 14:36:05 -06:00
Simon Larsen
fc0071162e refactor: Update span count and query in MonitorTelemetryMonitor.ts 2024-08-08 12:00:48 -06:00
Simon Larsen
3eef55a29d refactor: Update import statements for CommonUI to use Common/UI 2024-08-08 11:52:34 -06:00
Simon Larsen
aa5dc27427 refactor: Update PostgresDatabase.ts to use async/await for createDatabase and dropDatabase methods 2024-08-08 11:42:30 -06:00
Simon Larsen
900e567748 refactor: Update Slug.ts to use getRandomNumbers method in Faker 2024-08-08 10:45:30 -06:00
Simon Larsen
a88b14747c refactor: Update values.yaml and config.example.env for Let's Encrypt integration 2024-08-08 09:56:15 -06:00
Simon Larsen
1619b23996 refactor: Update Statement.ts to support numbers in finalValue map 2024-08-08 08:35:12 -06:00
Simon Larsen
6ed7e19538 refactor: Update QueryHelper to support numbers in any() method 2024-08-08 08:28:23 -06:00
Simon Larsen
41a3bc8a72 refactor: Add support for monitoring trace counts 2024-08-07 21:11:16 -06:00
Simon Larsen
2621dc7cc2 refactor: Update type name in PostgresDatabase.ts 2024-08-07 19:57:23 -06:00
Simon Larsen
c40ec85ce3 refactor: Remove moduleNameMapper for axios in jest.config.json 2024-08-07 19:52:37 -06:00
Simon Larsen
ff6369389c refactor: Update import statements for axios in jest.config.json 2024-08-07 19:31:17 -06:00
Simon Larsen
9211c91510 refactor: Update import statements for CommonUI to use Common/UI 2024-08-07 18:11:30 -06:00
Simon Larsen
3e778fe503 refactor: Update mockRequest.cookies assignment in Cookie.test.ts 2024-08-07 17:38:56 -06:00
Simon Larsen
77308cd9b7 refactor: Fix formatting and indentation in ProjectAuthorization.test.ts 2024-08-07 16:58:35 -06:00
Simon Larsen
60a33b5b0c Merge pull request #1636 from OneUptime/refactor-common-ui
Refactor common UI
2024-08-07 16:48:04 -06:00
Simon Larsen
679649e7ac refactor: Update import statements for axios in jest.config.json 2024-08-07 16:47:14 -06:00
Simon Larsen
719272e360 refactor: Update import statements for CommonUI to use Common/UI 2024-08-07 16:43:50 -06:00
Simon Larsen
ca7907973a refactor: Update test-setup.sh to use relative path for changing directory 2024-08-07 16:16:11 -06:00
Simon Larsen
86e5a33bd9 refactor: Update import statements for CommonUI to use Common/UI 2024-08-07 16:14:31 -06:00
Simon Larsen
3eb6f4da5f refactor: Update import statements for CommonUI to use Common/UI 2024-08-07 15:58:06 -06:00
Simon Larsen
dea6c55365 refactor: Update import statements for CommonUI to use Common/UI 2024-08-07 15:50:32 -06:00
Simon Larsen
ce9e449ba1 Merge pull request #1637 from OneUptime/master
Release
2024-08-07 15:40:50 -06:00
Simon Larsen
12530a1d0d refactor: Update Date.test.ts to use Date objects instead of formatted strings 2024-08-07 15:26:07 -06:00
Simon Larsen
4e81ed92f2 refactor: Remove node_modules from the Common project 2024-08-07 13:40:10 -06:00
Simon Larsen
21047e77b1 refactor: Remove CommonUI from package.json dependencies 2024-08-07 13:37:29 -06:00
Simon Larsen
67a326e6af refactor: Update import statements for CommonUI to use Common/UI 2024-08-07 13:36:13 -06:00
Simon Larsen
23318f093f refactor: Update import statements for CommonUI to use Common/UI 2024-08-07 13:34:27 -06:00
Simon Larsen
805a9b928f refactor: Update import statements for test files to use relative paths 2024-08-07 13:32:16 -06:00
Simon Larsen
63202cc51f refactor: Update import statements for UserProfile component to use FileUtil.getFileRoute instead of FileUtil.getFileURL 2024-08-07 13:30:33 -06:00
Simon Larsen
bb646bbcf1 refactor: Update Date.test.ts to use Date objects instead of formatted strings 2024-08-07 13:24:19 -06:00
Simon Larsen
000012cd03 refactor: Update Date.test.ts to use Date objects instead of formatted strings 2024-08-07 13:11:48 -06:00
Simon Larsen
1ed9dfc429 refactor: Update Date.test.ts to use Date objects instead of formatted strings 2024-08-07 12:50:45 -06:00
Simon Larsen
491b89cbb4 Merge branch 'merge-dir' 2024-08-07 10:43:17 -06:00
Simon Larsen
bfc8619095 refactor: Update import statements for UserProfile component to use FileUtil.getFileRoute instead of FileUtil.getFileURL 2024-08-07 10:42:47 -06:00
Simon Larsen
8ec5e4bb8a chore: Add telemetry logs viewer to IncidentView page 2024-08-07 09:33:41 -06:00
Simon Larsen
c0c596346c refactor: Update import statements for UserProfile component to use FileUtil.getFileRoute instead of FileUtil.getFileURL 2024-08-07 09:20:19 -06:00
Simon Larsen
e27d47e5bb Merge pull request #1633 from OneUptime/merge-dir
Add Log Monitors
2024-08-06 22:10:56 -06:00
Simon Larsen
524863dff3 refactor: Update import statements for UserProfile component to use FileUtil.getFileRoute instead of FileUtil.getFileURL 2024-08-06 19:38:47 -06:00
Simon Larsen
5bc054504a refactor: Update import statements for UserProfile component to use FileUtil.getFileRoute instead of FileUtil.getFileURL 2024-08-06 17:57:27 -06:00
Simon Larsen
6fd43622a3 refactor: Update import statements for UserProfile component to use FileUtil.getFileRoute instead of FileUtil.getFileURL 2024-08-06 17:47:18 -06:00
Simon Larsen
725a58d5fb refactor: Update import statements for ProbeMonitor and ServerMonitor to use ProbeMonitorResponse and ServerMonitorResponse 2024-08-06 17:47:14 -06:00
Simon Larsen
9bf3856c95 refactor: Update import statements for ProbeMonitor and ServerMonitor to use ProbeMonitorResponse and ServerMonitorResponse 2024-08-06 14:02:28 -06:00
Simon Larsen
5fc95eb02e refactor: Update import statements for ProbeMonitor and ServerMonitor to use ProbeMonitorResponse and ServerMonitorResponse 2024-08-06 11:26:13 -06:00
Simon Larsen
3f7cfa3110 refactor: Update import statements for ProbeMonitor and ServerMonitor to use ProbeMonitorResponse and ServerMonitorResponse 2024-08-06 09:20:10 -06:00
Simon Larsen
bca44b5faf refactor: Update import statements for ProbeMonitor and ServerMonitor to use ProbeMonitorResponse and ServerMonitorResponse 2024-08-05 15:41:32 -06:00
Simon Larsen
02f91d26ff refactor: Update import statements for ProbeMonitor and ServerMonitor to use ProbeMonitorResponse and ServerMonitorResponse 2024-08-05 15:40:20 -06:00
Simon Larsen
5221c20ee2 refactor: Remove commented out code and unused monitor types in MonitorTypeHelper 2024-08-05 15:11:54 -06:00
Simon Larsen
ea0d1a479f Merge pull request #1626 from OneUptime/merge-dir
refactor: Update import statements for ProbeMonitor and ServerMonitor…
2024-08-05 14:59:54 -06:00
Simon Larsen
ea3c357be1 refactor: Remove unused "Model" dependency from package.json files 2024-08-05 14:58:52 -06:00
Simon Larsen
b1c3a9e3c8 refactor: Update import statements for ProbeMonitor and ServerMonitor to use ProbeMonitorResponse and ServerMonitorResponse 2024-08-05 14:34:48 -06:00
Simon Larsen
9ec136bf78 chore: Update npm dependencies and remove unnecessary npm install commands 2024-08-05 13:15:36 -06:00
Simon Larsen
c4611848e3 refactor: Update import statement for NestedModel in StatementGenerator.test.ts 2024-08-05 13:13:06 -06:00
Simon Larsen
a096591c52 refactor: Update import statements for ProbeMonitor and ServerMonitor to use ProbeMonitorResponse and ServerMonitorResponse 2024-08-05 13:05:53 -06:00
Simon Larsen
b29fb6e833 refactor: Update import statements for ProbeMonitor and ServerMonitor to use ProbeMonitorResponse and ServerMonitorResponse 2024-08-05 13:00:31 -06:00
Simon Larsen
2e2ade0b16 refactor: Update import statements for BaseModel in JSONFunctions and BaseModel in UserModel 2024-08-05 12:08:45 -06:00
Simon Larsen
525ad8c664 refactor: Update import statements for ProbeMonitor and ServerMonitor to use ProbeMonitorResponse and ServerMonitorResponse 2024-08-05 11:46:35 -06:00
Simon Larsen
434c55f88f refactor: Update import statements for ProbeMonitor and ServerMonitor to use ProbeMonitorResponse and ServerMonitorResponse 2024-08-05 11:44:52 -06:00
Simon Larsen
c968156fa7 refactor: Update import statements for ProbeMonitor and ServerMonitor to use ProbeMonitorResponse and ServerMonitorResponse 2024-08-05 11:43:45 -06:00
Simon Larsen
36a0dad41c refactor: Update import statements for ProbeMonitor and ServerMonitor to use ProbeMonitorResponse and ServerMonitorResponse 2024-08-05 11:35:45 -06:00
Simon Larsen
52630b16d1 refactor: Update import statements for ProbeMonitor and ServerMonitor to use ProbeMonitorResponse and ServerMonitorResponse 2024-08-05 10:06:53 -06:00
Simon Larsen
7b994675c8 Merge pull request #1625 from OneUptime/log-monitors
Log monitors
2024-08-05 09:56:26 -06:00
Simon Larsen
d0692ebc8f refactor: Remove unnecessary whitespace in code 2024-08-04 20:44:30 -06:00
Simon Larsen
63197d263f refactor: Update monitor interfaces to use consistent naming 2024-08-04 20:33:16 -06:00
Simon Larsen
13b1998261 refactor: Update import statements for ProbeMonitor and ServerMonitor to use ProbeMonitorResponse and ServerMonitorResponse 2024-08-04 19:56:45 -06:00
Simon Larsen
29764ae7c7 refactor: Update monitor interfaces to use consistent naming 2024-08-04 19:39:36 -06:00
Simon Larsen
5c3175f9e7 refactor: Update monitor interfaces to use consistent naming
```
2024-08-04 18:01:04 -06:00
Simon Larsen
8caac12041 refactor: Update LogSeverity enum to use string values instead of enum values 2024-08-04 17:29:38 -06:00
Simon Larsen
d84cf5b8ec refactor: Update LogSeverity enum to use string values instead of enum values
This refactor updates the LogSeverity enum to use string values instead of enum values. This change allows for better compatibility and flexibility when working with log severity levels. The enum values have been replaced with corresponding string values.

Files modified:
- Common/Types/Log/LogSeverity.ts
- Ingestor/API/OTelIngest.ts
- Ingestor/API/FluentIngest.ts
- Model/AnalyticsModels/Log.ts
- CommonUI/src/Components/LogsViewer/LogItem.tsx
- CommonUI/src/Components/LogsViewer/LogsViewer.tsx
- CommonUI/src/Components/Filters/DropdownFilter.tsx
- Common/Types/ObjectID.ts
- CommonUI/src/Components/Filters/FiltersForm.tsx
2024-08-04 16:41:07 -06:00
Simon Larsen
a49709992c refactor: Update docker-compose commands to use "docker compose" instead of "docker-compose" 2024-08-03 20:07:56 -06:00
Simon Larsen
21b078040c refactor: Update proudly-open-source.ejs to include GitHub repo link 2024-08-03 14:34:51 -06:00
Simon Larsen
70371a32af feat: Add imagePullSecrets to Helm chart templates 2024-08-03 14:25:26 -06:00
Simon Larsen
f45985e0ce Merge pull request #1624 from kruchkov-alexandr/feature/add-imagepullsecret-to-chart
Add imagePullSecrets to chart
2024-08-03 14:18:25 -06:00
AlexK
f1d7e0d13f add imagePullSecrets to chart 2024-08-03 15:02:44 +02:00
Simon Larsen
3f8a5291f0 refactor: Initialize telemetry with correct service name in Telemetry and InfrastructureStatus 2024-08-02 16:50:13 -06:00
Simon Larsen
e60b06d014 refactor: Initialize telemetry with correct service name in Telemetry and InfrastructureStatus
This refactor updates the Telemetry and InfrastructureStatus components to initialize telemetry with the correct service name. By using the APP_NAME constant defined in the Index.ts file, the service name is now dynamically set, ensuring accurate telemetry tracking.

Files modified:
- App/Index.ts
- CommonServer/Utils/Telemetry.ts
2024-08-02 16:47:55 -06:00
Simon Larsen
c9e67311e7 refactor: Update TelemetryIngestor and Probe to initialize telemetry with the correct service name 2024-08-02 16:37:23 -06:00
Simon Larsen
0b10880f58 refactor: Update TelemetryIngestor and Probe to initialize telemetry with the correct service name
This refactor updates the TelemetryIngestor and Probe components to initialize telemetry with the correct service name. Previously, the service name was hardcoded or set to a default value, which could lead to inconsistencies and confusion. By using the APP_NAME constant defined in each component, the service name is now dynamically set, ensuring accurate telemetry tracking.

Files modified:
- TelemetryIngestor/Index.ts
- Probe/Index.ts
2024-08-02 16:35:09 -06:00
Simon Larsen
d49a6ce009 refactor: Update OneUptime chart to use probes instead of probe for probe configuration 2024-08-02 14:02:55 -06:00
Simon Larsen
9b8a5c9c43 feat: Add lazy loading for images in SettingsRoutes 2024-08-02 13:44:59 -06:00
Simon Larsen
9dc31fe536 refactor: Update APIKeyView and TelemetryIngestionKeyView to use RouteUtil.populateRouteParams
This refactor updates the APIKeyView and TelemetryIngestionKeyView components to use the RouteUtil.populateRouteParams function when navigating to other routes. This ensures that route parameters are properly populated, improving the reliability and consistency of the navigation logic.
2024-08-02 12:06:29 -06:00
Simon Larsen
0d40be3db1 refactor: Update APIKeyView and TelemetryIngestionKeyView to use RouteUtil.populateRouteParams
This refactor updates the APIKeyView and TelemetryIngestionKeyView components to use the RouteUtil.populateRouteParams function when navigating to other routes. This ensures that route parameters are properly populated, improving the reliability and consistency of the navigation logic.

Files modified:
- Dashboard/src/Pages/Settings/APIKeyView.tsx
- Dashboard/src/Pages/Settings/TelemetryIngestionKeyView.tsx
2024-08-01 20:43:41 -06:00
Simon Larsen
6754167e57 Update Docker Compose files to use OPENTELEMETRY_EXPORTER_OTLP_ENDPOINT consistently across all services. This change ensures that the OpenTelemetry exporter endpoint is set uniformly for all services, improving consistency and reducing potential configuration errors.
Files modified:
- docker-compose.base.yml
- config.example.env
2024-08-01 19:40:56 -06:00
Simon Larsen
3bf74edae4 feat: Update OneUptime chart to use probes instead of probe for probe configuration 2024-08-01 19:37:46 -06:00
Simon Larsen
8a77ae977e refactor: Update OneUptime chart to use probes instead of probe for probe configuration 2024-08-01 19:25:54 -06:00
Simon Larsen
6fbca4b6cb refactor: Remove deprecated Service Token field
The deprecated Service Token field in the TelemetryService model and related components was removed. This improves code cleanliness and removes unnecessary dependencies.

Files modified:
- Dashboard/src/Pages/Telemetry/Services/View/Index.tsx
- Dashboard/src/Pages/Telemetry/Services/View/Settings.tsx
- Model/Models/TelemetryService.ts
2024-08-01 15:46:14 -06:00
Simon Larsen
5cf1a7f675 chore: Remove unused ResetObjectID component
The ResetObjectID component in the Settings page was removed as it is no longer needed. This improves code cleanliness and reduces unnecessary dependencies.

Files modified:
- Dashboard/src/Pages/Telemetry/Services/View/Settings.tsx
2024-08-01 15:41:55 -06:00
Simon Larsen
7339f4873b feat: Add lazy loading for images in SettingsRoutes
Update SettingsRoutes to include lazy loading for images in the telemetry ingestion key view. This improves page load performance by loading images only when they are in the viewport.

Files modified:
- Dashboard/src/Routes/SettingsRoutes.tsx
2024-08-01 15:38:31 -06:00
Simon Larsen
0872b1e8a2 feat: Add Telemetry Ingestion Keys page to Settings 2024-08-01 14:26:35 -06:00
Simon Larsen
8307f4deca feat: Add Telemetry Ingestion Keys page to Settings
This commit adds a new page, "Telemetry Ingestion Keys," to the Settings section of the dashboard. The page allows users to manage and view the telemetry ingestion keys used for data collection. It includes a list of keys and their associated details, such as name and creation date. This enhancement provides users with better control and visibility over their telemetry data.

Files modified:
- Dashboard/src/Utils/PageMap.ts
- Dashboard/src/Pages/Settings/SideMenu.tsx
- Dashboard/src/Routes/SettingsRoutes.tsx
2024-08-01 14:23:02 -06:00
Simon Larsen
0ac88b3679 refactor: Update Copilot module styling and content
This commit updates the styling and content of the Copilot module on the home page. The changes include adding a border-radius to the module, improving the visual appearance. Additionally, the text content of the module is modified to provide a clearer description of the services offered by OneUptime. These updates enhance the overall user experience and make the Copilot module more visually appealing.

Files modified:
- App/FeatureSet/Home/Views/Partials/copilot.ejs
2024-08-01 12:48:39 -06:00
Simon Larsen
2c5bbbb6da feat: Update OneUptime chart to use probes instead of probe for probe configuration
This commit modifies the OneUptime chart to use the `probes` parameter instead of the `probe` parameter for configuring probes. The `probes` parameter now accepts a key-value pair where the key represents the probe name and the value contains the probe configuration details. This change improves the clarity and consistency of the chart configuration, making it easier to manage and maintain.

Files modified:
- HelmChart/Public/oneuptime/README.md
2024-08-01 08:22:51 -06:00
Simon Larsen
88216cdebb Update OneUptime chart to include secure probe keys
This commit adds a new configurable parameter `probe.<key>.key` to the OneUptime chart. It is recommended to set this parameter to a long random string to secure the probes. This enhancement improves the security of the OneUptime application by ensuring that only authorized entities can access and use the probes.

Files modified:
- HelmChart/Public/oneuptime/README.md
2024-08-01 08:18:28 -06:00
Simon Larsen
a24822bd56 refactor: Include Reviews module on home page 2024-07-31 20:51:23 -06:00
Simon Larsen
8f4538a75c refactor: Include Copilot module in home page 2024-07-31 17:36:16 -06:00
Simon Larsen
14be322ef7 refactor: Update home page to include Reviews module 2024-07-31 17:28:18 -06:00
Simon Larsen
b50f05b290 Merge branch 'release' of github.com:OneUptime/oneuptime into release 2024-07-31 17:02:45 -06:00
Simon Larsen
e215b5b1ba Merge branch 'master' into release 2024-07-31 17:02:34 -06:00
Simon Larsen
c93f58227f refactor: Update home page to include Reviews module
This commit updates the home page to include the Reviews module. The Reviews module displays a list of reviews from customers, providing social proof and enhancing the user experience. The necessary changes are made to the index.ejs file and the include statements for the Reviews module. This improvement showcases positive feedback and builds trust with potential customers.

Files modified:
- App/FeatureSet/Home/Views/index.ejs
- App/FeatureSet/Home/Views/Partials/reviews.ejs
2024-07-31 17:02:09 -06:00
Simon Larsen
538e40c4ae refactor: Add Reviews module and update home page to display reviews
This commit adds a new Reviews module to the Home feature set. The Reviews module contains a list of reviews that will be displayed on the home page. The home page is updated to include the Reviews module and pass the reviews list to the view template. This enhancement improves the user experience by showcasing positive feedback from customers.

Files modified:
- App/FeatureSet/Home/Index.ts
- App/FeatureSet/Home/Views/Partials/proudly-open-source.ejs
- App/FeatureSet/Home/Views/Partials/review.ejs
- App/FeatureSet/Home/Utils/Reviews.ts
2024-07-31 16:49:48 -06:00
Simon Larsen
4a03abe3d5 refactor: Update about page content and add values section 2024-07-31 16:01:54 -06:00
Simon Larsen
c218a6f209 refactor: Update about page content and add values section 2024-07-31 15:37:45 -06:00
Simon Larsen
a8f04a8204 refactor: Update about page content and add values section
This commit updates the content of the about page to better reflect the goals and vision of the project. It also adds a new section called "Our values" that highlights the principles that the company cares deeply about. This change improves the clarity and messaging of the about page, providing a better understanding of the project's purpose and values.

Files modified:
- App/FeatureSet/Home/Views/about.ejs
2024-07-30 16:52:24 -06:00
Simon Larsen
642b1616ca refactor: Rename telemetry tables and update related code 2024-07-30 15:07:53 -06:00
Simon Larsen
9afbac2cbc refactor: Rename telemetry tables and update related code
This commit renames the telemetry tables in the AnalyticsModels directory to have a "Telemetry" suffix (e.g., Log -> LogTelemetry, Metric -> MetricTelemetry, Span -> SpanTelemetry). It also updates the related code in the TelemetryAttribute, StatementGenerator, and DataMigrations files to reflect the table name changes. This change improves the clarity and consistency of the telemetry-related code.

Files modified:
- Model/AnalyticsModels/TelemetryAttribute.ts
- Model/AnalyticsModels/Log.ts
- Model/AnalyticsModels/Metric.ts
- Model/AnalyticsModels/Span.ts
- CommonServer/Tests/Services/AnalyticsDatabaseService.test.ts
- CommonServer/Tests/Utils/AnalyticsDatabase/StatementGenerator.test.ts
- App/FeatureSet/Workers/DataMigrations/Index.ts
- App/FeatureSet/Workers/DataMigrations/DeleteOldTelelmetryTable.ts
2024-07-30 14:35:30 -06:00
Simon Larsen
b6b49a1255 Merge pull request #1615 from OneUptime/master
feat: Add support for displaying Open Source Friends
2024-07-30 12:10:45 -06:00
Simon Larsen
1cd89851bb feat: Add support for displaying Open Source Friends 2024-07-30 10:50:26 -06:00
Simon Larsen
229b5cd772 feat: Add ArrayUtil import to TelemetryAPI
This commit adds the import statement for the ArrayUtil module to the TelemetryAPI file. The ArrayUtil module is used to remove duplicate attributes fetched from the server. This import ensures that the ArrayUtil functions can be used in the TelemetryAPI module, improving the efficiency and accuracy of attribute handling in the telemetry system.
2024-07-30 09:39:19 -06:00
Simon Larsen
2b1ad303d9 feat: Update MetricsTable to fetch and display attributes
This commit updates the MetricsTable component to fetch and display attributes for each metric. It adds a new API request to retrieve the attributes from the server and updates the component's state to store the fetched attributes. The attributes are then passed to the AnalyticsModelTable component to be displayed in the "Attributes" column. This enhancement improves the visibility and analysis capabilities of the metrics data.

Files modified:
- Dashboard/src/Components/Metrics/MetricsTable.tsx
2024-07-29 17:12:39 -06:00
Simon Larsen
54b0f355dc feat: Update OTelIngest to index attributes for telemetry types
This commit updates the OTelIngest module to index attributes for different telemetry types (Trace, Metric, and Log). It adds the necessary code to extract attributes from spans, metrics, and logs, and sends them to the OTelIngestService.indexAttributes() function. This ensures that the attributes are properly indexed for each telemetry type, improving the search and analysis capabilities of the system.

Files modified:
- Ingestor/API/OTelIngest.ts
- Ingestor/Service/OTelIngest.ts
2024-07-29 16:53:23 -06:00
Simon Larsen
10ed38197e feat: Update TwoFactorAuth utility class to use otpauth library 2024-07-29 16:45:14 -06:00
Simon Larsen
cc4dab2dcf feat: Add email verification to two-factor authentication
This commit adds the user's email to the two-factor authentication process. When verifying the two-factor authentication code, the user's email is now passed as an additional parameter. This enhances the security of the authentication process by ensuring that the code is associated with the correct user. The email is retrieved from the user object and passed to the TwoFactorAuth.verifyToken() function.

Files modified:
- App/FeatureSet/Identity/API/Authentication.ts
- CommonServer/API/UserTwoFactorAuthAPI.ts
2024-07-29 15:27:54 -06:00
Simon Larsen
8852e2ab61 feat: Update TwoFactorAuth utility class to use otpauth library
This commit updates the TwoFactorAuth utility class to use the otpauth library instead of the speakeasy library for generating and verifying two-factor authentication tokens. The otpauth library provides a more modern and maintained solution for handling OTP generation and verification. This change improves the security and reliability of the two-factor authentication feature.

Files modified:
- CommonServer/Utils/TwoFactorAuth.ts
- CommonServer/package.json
2024-07-29 14:23:19 -06:00
Simon Larsen
50b6a746f4 feat: Add support for displaying Open Source Friends 2024-07-29 13:18:26 -06:00
Simon Larsen
df8d2f25ee feat: Enable two-factor authentication on login page 2024-07-28 19:37:33 -06:00
Simon Larsen
ee3de663b5 feat: Add two-factor authentication support to login page
This commit adds support for two-factor authentication on the login page. It includes the necessary code changes to display the two-factor authentication UI elements when the user has enabled it. The login form now includes a field for entering the two-factor authentication code. Additionally, the API endpoint for verifying the two-factor authentication code has been implemented. This feature enhances the security of the login process by adding an extra layer of authentication.

Files modified:
- Accounts/src/Pages/Login.tsx
- App/FeatureSet/Identity/API/Authentication.ts
- CommonServer/Utils/TwoFactorAuth.ts
2024-07-28 12:29:55 -06:00
Simon Larsen
a4d1ed7f01 feat: Add BadDataException for two-factor authentication
This commit adds the BadDataException class to handle errors related to two-factor authentication. It is imported and used in the UserService and UserTwoFactorAuthService files to throw an exception when necessary. This improves the error handling and provides more specific error messages for two-factor authentication related issues.

Files modified:
- CommonServer/Services/UserService.ts
- CommonServer/Services/UserTwoFactorAuthService.ts
2024-07-28 11:49:59 -06:00
Simon Larsen
05a26d0b3f feat: Add VERIFY_TWO_FACTOR_AUTH_API_URL constant
This commit adds the VERIFY_TWO_FACTOR_AUTH_API_URL constant to the ApiPaths module in order to provide a URL for verifying two-factor authentication. This constant is used in the Authentication module to make API requests for verifying the user's two-factor authentication. The constant is constructed using the IDENTITY_URL and a new route "/verify-two-factor-auth". This addition enables the implementation of the two-factor authentication verification feature.

Files modified:
- Accounts/src/Utils/ApiPaths.ts
2024-07-28 10:52:11 -06:00
Simon Larsen
0a5094db37 feat: Enable lazy loading of QR code generation in QR component 2024-07-28 09:52:38 -06:00
Simon Larsen
2f2c4891e3 feat: Enable lazy loading of QR code generation in QR component 2024-07-27 10:43:14 -06:00
Simon Larsen
83cb3b66e0 feat: Enable lazy loading of QR code generation in QR component
This commit updates the QR component to use React hooks and lazy load the QR code generation. By utilizing functional components and the useState and useEffect hooks, the QR code is now only generated when needed, improving performance by reducing unnecessary computations. The code changes also include error handling to display an error message if there is an issue generating the QR code.

Files modified:
- CommonUI/src/Components/QR/QR.tsx
2024-07-27 10:18:02 -06:00
Simon Larsen
63575f3065 Update QR component to use React hooks and lazy load QR code generation. This improves performance by only generating the QR code when needed, reducing unnecessary computations. The code changes include replacing class components with functional components and utilizing the useState and useEffect hooks. The QR code generation is now triggered when the props.text value changes. Additionally, error handling has been added to display an error message if there is an issue generating the QR code.
Files modified:
- CommonUI/src/Components/QR/QR.tsx
2024-07-27 09:25:01 -06:00
Simon Larsen
bf031f64fa feat: Add support for two-factor authentication in user profile
This commit adds support for two-factor authentication in the user profile. It includes the necessary code changes to enable the "Two Factor Auth Enabled" feature in the User model, as well as the addition of the "USER_TWO_FACTOR_AUTH" page in the PageMap and the corresponding route in the RouteMap. The UserTwoFactorAuth model, service, and controller have also been added to handle the logic and API endpoints related to two-factor authentication.

See the following files for more details:
- Common/Types/Icon/IconProp.ts
- Dashboard/src/Utils/PageMap.ts
- Dashboard/src/Utils/RouteMap.ts
- Model/Models/Index.ts
- Model/Models/User.ts
- CommonServer/Services/Index.ts
- CommonServer/package.json
- CommonUI/package.json
- CommonServer/Infrastructure/Postgres/SchemaMigrations/Index.ts
- Dashboard/src/App.tsx
2024-07-26 19:55:40 -06:00
Simon Larsen
04f1cfe414 chore: Remove unused ChartGroupInterval enum
The ChartGroupInterval enum was removed from the ChartGroup component in order to simplify the code and remove unnecessary complexity. This enum was not being used anywhere in the codebase.
2024-07-26 13:57:42 -06:00
Simon Larsen
f11863df0f chore: Add startsAt and endsAt fields to MonitorGroupService 2024-07-26 11:02:39 -06:00
Simon Larsen
599fc23c1a Merge branch 'master' of github.com:OneUptime/oneuptime 2024-07-26 10:48:47 -06:00
Simon Larsen
fa03d9296c increase mem on ingestor 2024-07-26 10:48:45 -06:00
Simon Larsen
df9bb5184f Merge pull request #1606 from OneUptime/snyk-upgrade-3639c2517f779bcc4d9569e58993034b
[Snyk] Upgrade reactflow from 11.11.3 to 11.11.4
2024-07-26 10:37:34 -06:00
Simon Larsen
ca7b06d4bc chore: Update StatusPageSubscriberReport template
The StatusPageSubscriberReport template has been updated to display a more detailed report instead of listing the monitored resources. This change improves the clarity and usefulness of the report.

See this file in the repository:
`App/FeatureSet/Notification/Templates/StatusPageSubscriberReport.hbs`
2024-07-26 10:36:11 -06:00
Simon Larsen
59d6ef240f chore: Add error handling for missing SMTP configuration
This commit adds error handling to the `getGlobalSMTPConfig` function in the `Config.ts` file. If any required SMTP configuration values are missing, a `BadDataException` is thrown with a message instructing the user to set the missing values in the Admin Dashboard.

See this file in the repository:
`App/FeatureSet/Notification/Config.ts`
2024-07-26 10:20:47 -06:00
Simon Larsen
5ae034ffdf chore: Add iputils-ping package to Dockerfile
The Dockerfile has been modified to include the installation of the `iputils-ping` package. This change ensures that the `ping` command is available within the Docker container.

See this file in the repository:
`Probe/Dockerfile.tpl`
2024-07-26 10:03:26 -06:00
Simon Larsen
be75960aff Merge pull request #1603 from OneUptime/snyk-upgrade-c18c73e17c875fc14eb8aef47fdb9cd3
[Snyk] Upgrade react-router-dom from 6.23.1 to 6.24.1
2024-07-26 08:37:36 -06:00
Simon Larsen
708f104dfc Merge pull request #1604 from OneUptime/snyk-upgrade-a8c089139458fb3596d95f5fecc84367
[Snyk] Upgrade react-spinners from 0.13.8 to 0.14.1
2024-07-26 08:37:30 -06:00
Simon Larsen
23c34cc71a Merge pull request #1605 from OneUptime/snyk-upgrade-4502b9e038edcb78602d9e97157e6fb9
[Snyk] Upgrade @opentelemetry/instrumentation-fetch from 0.52.0 to 0.52.1
2024-07-26 08:37:22 -06:00
Simon Larsen
3bf76168f1 Merge pull request #1607 from OneUptime/snyk-upgrade-5a4c450f5a959cd973684a5461ecf859
[Snyk] Upgrade playwright from 1.44.1 to 1.45.1
2024-07-26 08:36:36 -06:00
snyk-bot
3499850c6d fix: upgrade playwright from 1.44.1 to 1.45.1
Snyk has created this PR to upgrade playwright from 1.44.1 to 1.45.1.

See this package in npm:
playwright

See this project in Snyk:
https://app.snyk.io/org/oneuptime-RsC2nshvQ2Vnr35jHvMnMP/project/49c81d9c-12c2-4e8e-b9e8-72f98b1b595c?utm_source=github&utm_medium=referral&page=upgrade-pr
2024-07-26 06:41:49 +00:00
snyk-bot
273a153311 fix: upgrade reactflow from 11.11.3 to 11.11.4
Snyk has created this PR to upgrade reactflow from 11.11.3 to 11.11.4.

See this package in npm:
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-07-26 06:30:58 +00:00
snyk-bot
b248dc324d fix: upgrade @opentelemetry/instrumentation-fetch from 0.52.0 to 0.52.1
Snyk has created this PR to upgrade @opentelemetry/instrumentation-fetch from 0.52.0 to 0.52.1.

See this package in npm:
@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-07-26 06:30:54 +00:00
snyk-bot
7d7b4110a7 fix: upgrade react-spinners from 0.13.8 to 0.14.1
Snyk has created this PR to upgrade react-spinners from 0.13.8 to 0.14.1.

See this package in npm:
react-spinners

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-07-26 06:30:49 +00:00
snyk-bot
262436f906 fix: upgrade react-router-dom from 6.23.1 to 6.24.1
Snyk has created this PR to upgrade react-router-dom from 6.23.1 to 6.24.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-07-26 06:30:46 +00:00
Simon Larsen
2c7b845cb6 refactor: Initialize countPositive with a default value of 0 in AnalyticsDatabaseService
This commit modifies the AnalyticsDatabaseService by initializing the countPositive variable with a default value of 0 when the strResult is null or undefined. This change ensures that countPositive is always assigned a value, even when there is no valid strResult.

The modification improves the reliability of the countPositive variable and prevents potential errors when using it in subsequent calculations.

Co-authored-by: [Author Name]
2024-07-25 17:57:33 -06:00
Simon Larsen
3c9284915a Merge branch 'release' of github.com:OneUptime/oneuptime into release 2024-07-25 17:25:48 -06:00
Simon Larsen
ba97a1e14b refactor: Update npm dependency to latest stable version 2024-07-25 17:25:16 -06:00
Simon Larsen
e552a8130f Merge pull request #1602 from OneUptime/master
Release
2024-07-25 16:21:30 -06:00
Simon Larsen
1ed2548be2 refactor: Improve handling of status page resources in subscriber report
This commit refactors the code related to the status page subscriber report. The changes include updating the email template and resource handling in the `StatusPageSubscriberReport.hbs` file. The resource table is now rendered based on whether there are any resources to display. If there are no resources, a message indicating the absence of resources is shown.

Additionally, the `SendReportsToSubscribers.ts` file in the `Workers/Jobs/StatusPage` directory has been modified to handle the case where there are no status page resources. If there are no resources, the email report is not sent, and an error is logged.

These changes improve the handling of resources in the status page subscriber report and ensure that the email report is only sent when there are resources to include.
2024-07-25 15:30:10 -06:00
Simon Larsen
5c697105f3 refactor: Update email template and resource handling in StatusPageSubscriberReport
The code changes in the `StatusPageSubscriberReport.hbs` template file update the rendering of the resource table based on whether there are any resources to display. If there are resources, the table is rendered with the resource details. If there are no resources, a message is displayed indicating that no resources have been added yet.

In addition, the `SendReportsToSubscribers.ts` file in the `Workers/Jobs/StatusPage` directory has been modified to handle the case where there are no status page resources. If there are no resources, the email report is not sent and an error is logged.

These changes improve the handling of resources in the status page subscriber report and ensure that the email report is only sent when there are resources to include.
2024-07-25 15:23:56 -06:00
Simon Larsen
b2bdd5d1af refactor: Update import paths for UptimeEvent and CommonMonitorEvent 2024-07-25 15:00:10 -06:00
Simon Larsen
72e0f200f7 refactor: Update Monitor model and EmailTemplateType enum 2024-07-25 14:46:15 -06:00
Simon Larsen
3f0d75d799 refactor: Update Monitor model and EmailTemplateType enum
- Add 'canReadOnRelationQuery' property to the 'Monitor' model in order to allow reading on relation queries.
- Rename 'StatusPageReport' email template to 'StatusPageSubscriberReport' in the 'EmailTemplateType' enum.
2024-07-25 14:39:53 -06:00
Simon Larsen
519f2ef312 chore: Update dependencies in CommonProject package.json 2024-07-25 10:53:24 -06:00
Simon Larsen
cfbe92e40a refactor: Update MailService to handle JSON objects in vars parameter 2024-07-25 07:56:20 -06:00
Simon Larsen
8ef66650fb chore: Update package.json dependencies for CommonProject 2024-07-25 07:42:45 -06:00
Simon Larsen
07973e85a3 chore: Update package.json dependencies for CommonProject 2024-07-24 19:10:40 -06:00
Simon Larsen
34ca901007 refactor: Update import paths for UptimeEvent and CommonMonitorEvent 2024-07-24 19:09:39 -06:00
Simon Larsen
09883b1129 chore: Update Dockerfile templates to include CommonProject dependencies 2024-07-24 19:04:25 -06:00
Simon Larsen
b94b775e46 Merge remote-tracking branch 'origin/snyk-upgrade-aba1a472386457b0d6d03fface45e612' 2024-07-24 17:36:02 -06:00
Simon Larsen
1c3b7d9982 update otel api 2024-07-24 17:34:53 -06:00
Simon Larsen
ff062cb6a2 Merge branch 'master' of github.com:OneUptime/oneuptime 2024-07-24 17:33:26 -06:00
Simon Larsen
2cabc922a0 Merge pull request #1581 from OneUptime/snyk-upgrade-0283fc9cc9679e8dddceee913aa83b7d
[Snyk] Upgrade protobufjs from 7.3.0 to 7.3.2
2024-07-24 17:30:24 -06:00
Simon Larsen
b6aaea8ae4 Merge pull request #1576 from OneUptime/oneuptime-app-oneuptime-app-improve-comments-KWwHc
[OneUptime Copilot] Improve Comments on /App/FeatureSet/Docs/Index.ts
2024-07-24 17:27:41 -06:00
Simon Larsen
886aa086ec Merge pull request #1584 from OneUptime/snyk-upgrade-fa996be2aefbed98f1693310998c2799
[Snyk] Upgrade @opentelemetry/instrumentation-xml-http-request from 0.52.0 to 0.52.1
2024-07-24 17:27:12 -06:00
Simon Larsen
6c44201e1c Merge pull request #1583 from OneUptime/snyk-upgrade-b91af40dda1ae21dd8df7c2e11b2673d
[Snyk] Upgrade posthog-js from 1.139.3 to 1.139.6
2024-07-24 17:26:25 -06:00
Simon Larsen
3a72c5d04f Merge pull request #1585 from OneUptime/oneuptime-copilot-oneuptime-copilot-improve-comments-xTNiR
[OneUptime Copilot] Improve Comments on /App/Index.ts
2024-07-24 17:26:16 -06:00
Simon Larsen
ea162322d2 Merge pull request #1587 from OneUptime/oneuptime-copilot-oneuptime-copilot-improve-comments-CXUJA
[OneUptime Copilot] Improve Comments on /App/FeatureSet/ApiReference/Index.ts
2024-07-24 17:25:53 -06:00
Simon Larsen
222c857354 Merge pull request #1588 from OneUptime/oneuptime-copilot-oneuptime-copilot-improve-comments-fjDHl
[OneUptime Copilot] Improve Comments on /App/FeatureSet/ApiReference/Service/Authentication.ts
2024-07-24 17:25:30 -06:00
Simon Larsen
d2d705783e Merge pull request #1589 from OneUptime/oneuptime-copilot-oneuptime-copilot-improve-comments-ZbMDm
[OneUptime Copilot] Improve Comments on /App/FeatureSet/ApiReference/Service/Errors.ts
2024-07-24 17:25:13 -06:00
Simon Larsen
75a7308647 Merge pull request #1595 from OneUptime/snyk-fix-cd71497a021e2dc5ca5ae7a982b1e2b4
[Snyk] Security upgrade node from 22.3.0 to 22.5
2024-07-24 17:24:47 -06:00
Simon Larsen
d61ade1eb4 Merge branch 'master' into snyk-fix-cd71497a021e2dc5ca5ae7a982b1e2b4 2024-07-24 17:24:25 -06:00
Simon Larsen
55e1f6b504 Merge pull request #1597 from OneUptime/snyk-fix-93589e9f7114ade2a7233d978fd63baa
[Snyk] Security upgrade node from 22.3.0 to 22.4.1
2024-07-24 17:23:58 -06:00
Simon Larsen
8b95f2887c Merge branch 'master' into snyk-fix-93589e9f7114ade2a7233d978fd63baa 2024-07-24 17:23:49 -06:00
Simon Larsen
2bd1693d1f Merge pull request #1598 from OneUptime/snyk-fix-75abf0e36ba39e30ccfc89f6bf348215
[Snyk] Security upgrade node from 22.3.0 to 22.5.0
2024-07-24 17:23:26 -06:00
Simon Larsen
b1eaded3fd refactor: Update StatusPageSubscriberReport template to display downtime in hours and minutes
This commit updates the StatusPageSubscriberReport template to display the downtime in hours and minutes instead of seconds. The fields "totalDowntime" and "averageUptime" are replaced with "totalDowntimeInHoursAndMinutes" and "averageUptimePercent" respectively. This change improves the readability and usability of the report for users.
2024-07-24 16:29:46 -06:00
Simon Larsen
7e486d34ae ```text
refactor: Update UptimeUtil and MonitorEvent imports

This commit updates the imports in the UptimeUtil and MonitorEvent files to use double quotes instead of single quotes. This change ensures consistency in the codebase and follows the established import style.
2024-07-24 16:18:22 -06:00
Simon Larsen
c930caa2bb refactor: Add support for reportDataInDays and isReportEnabled in StatusPageSubscriberService 2024-07-24 13:23:38 -06:00
Simon Larsen
e654b65e71 refactor: Add support for reportDataInDays and isReportEnabled in StatusPageSubscriberService 2024-07-24 12:53:18 -06:00
Simon Larsen
a145b346a4 refactor: Add support for reportDataInDays in StatusPage model
This commit adds the `reportDataInDays` property to the `StatusPage` model in the `StatusPage.ts` file. The `reportDataInDays` property allows users to specify the number of days of data to include in the report. This change enhances the reporting functionality of the application by providing more flexibility in generating reports for status pages.
2024-07-23 19:43:10 -06:00
Simon Larsen
f090654ab6 refactor: Add support for StatusPage reports 2024-07-23 17:56:45 -06:00
Simon Larsen
c2e14c378b refactor: Update StatusPageService to calculate and set the next report date
This commit modifies the StatusPageService in the StatusPageService.ts file. It adds logic to calculate and set the next report date based on the report start date and recurring interval. This change enhances the functionality of the StatusPage report feature by ensuring that the next report is scheduled correctly.
2024-07-23 13:29:02 -06:00
Simon Larsen
77996b2066 refactor: Add support for StatusPage reports
This commit adds support for generating and managing reports for the StatusPage feature. It includes database changes, such as adding new columns to the "StatusPage" table, and updates to various components and routes. The new functionality allows users to configure and schedule reports, enhancing the reporting capabilities of the application.
2024-07-23 13:06:12 -06:00
Simon Larsen
5fce72fe59 refactor: Add migration for StatusPage report functionality
This commit adds a migration file (1721754545771-MigrationName.ts) to implement the necessary database changes for the StatusPage report functionality. It adds new columns to the "StatusPage" table, including "isReportEnabled" (boolean), "reportStartDateTime" (timestamp with time zone), "reportRecurringInterval" (JSON), and "sendNextReportBy" (timestamp with time zone). These columns enable the configuration and scheduling of reports for the StatusPage feature. This change enhances the functionality and flexibility of the application when generating and managing reports for status pages.
2024-07-23 11:15:57 -06:00
Simon Larsen
9f8764d741 refactor: Add canReadOnRelationQuery property to TelemetryService's serviceColor
This commit adds the `canReadOnRelationQuery` property to the `serviceColor` field in the `TelemetryService` model. The `canReadOnRelationQuery` property allows for reading the `serviceColor` field when querying related data. This change enhances the functionality and flexibility of the `TelemetryService` model when working with related data.
2024-07-23 09:50:15 -06:00
Simon Larsen
9ce44cc416 refactor: Update BlogTitleAndDescription styling for better readability
This commit updates the styling of the BlogTitleAndDescription component in the BlogTitleAndDescription.ejs file. The font size, font weight, and line height of the title and description elements are adjusted to improve readability and visual hierarchy. This change enhances the overall user experience when viewing blog titles and descriptions on the home page.
2024-07-22 20:09:27 -06:00
Simon Larsen
f5f542cae6 refactor: Remove unnecessary whitespace in StatusAPI 2024-07-22 15:29:26 -06:00
Simon Larsen
de4eea4d24 refactor: Round metric values to integers in MetricView component 2024-07-22 15:24:08 -06:00
Simon Larsen
104535b723 ```text
refactor: Round metric values to integers in MetricView component

This commit modifies the MetricView component in the MetricView.tsx file. It adds logic to round the metric values to integers using the Math.round() function. This change improves the accuracy and readability of the displayed metric values.
2024-07-22 15:09:31 -06:00
Simon Larsen
6f5dfceb34 refactor: Enable real-time updates in LogsViewer components
This commit enables real-time updates in the LogsViewer components by setting the `enableRealtime` prop to `true` in the `Logs.tsx` and `Index.tsx` files. Previously, real-time updates were disabled (`enableRealtime` set to `false`), but this change allows for immediate updates of logs when new data is available. This enhancement improves the usability and responsiveness of the LogsViewer feature.
2024-07-22 14:47:01 -06:00
Simon Larsen
1ec61a473a refactor: Update LogItem component to display service name and color
This commit updates the LogItem component in the LogItem.tsx file. It adds functionality to display the service name and color based on the serviceId provided. The serviceMap dictionary is used to retrieve the service name and color, improving the readability and usability of the component. This change enhances the overall quality and user experience of the LogsViewer feature.
2024-07-22 14:33:18 -06:00
Simon Larsen
abf4faade7 refactor: Update TraceTable component to use React hooks and improve performance
This commit updates the TraceTable component in the TraceTable.tsx file. The component is refactored to use React hooks instead of class components, resulting in cleaner and more concise code. Additionally, the update improves the performance of the component by removing unused code and optimizing rendering. These changes enhance the overall quality and maintainability of the TraceTable component.
2024-07-22 13:50:04 -06:00
Simon Larsen
6a9ee5ba75 refactor: Add jsonKeys property to Filter interfaces
This commit adds the `jsonKeys` property to the `Filter` interface in two different files: `Filter.ts` and `ModelFilter/Filter.ts`. The `jsonKeys` property is an array of strings and is used to specify the JSON keys associated with a filter. This addition allows for more flexibility and customization when working with filters in the application.
2024-07-22 13:48:33 -06:00
Simon Larsen
b696e52145 refactor: Update SpanStatusElement component to handle SpanStatus
This commit updates the SpanStatusElement component to handle the new SpanStatus type. The title prop of the component is modified to accept a SpanStatus value in addition to a string. This change allows for more accurate and descriptive rendering of the span status in the TraceExplorer and TraceTable components. The update improves the overall consistency and usability of the application when displaying span status information.
2024-07-21 17:23:00 -06:00
Simon Larsen
8af8eb34ad refactor: Update TelemetryLayout component and add TraceTable
This commit updates the TelemetryLayout component to improve performance and readability. Unused code is removed, including imports, variables, and functions that are no longer needed. The component is also refactored to use React hooks instead of class components, resulting in cleaner and more concise code.

Additionally, a new TraceTable component is added, which replaces the TelemetryServiceTable component in the Telemetry/Traces.tsx file. The TraceTable component provides enhanced functionality for displaying and filtering trace data.

These changes enhance the overall quality, maintainability, and functionality of the TelemetryLayout component and improve the user experience when viewing telemetry data.
2024-07-21 17:10:09 -06:00
Simon Larsen
e600fac4fd refactor: Update TelemetryLayout component and add TraceTable 2024-07-21 17:02:51 -06:00
Simon Larsen
1772953b34 refactor: Update TelemetryLayout component and add TraceTable
This commit updates the TelemetryLayout component to improve performance and readability. Unused code is removed, including imports, variables, and functions that are no longer needed. The component is also refactored to use React hooks instead of class components, resulting in cleaner and more concise code.

Additionally, a new TraceTable component is added, which replaces the TelemetryServiceTable component in the Telemetry/Traces.tsx file. The TraceTable component provides enhanced functionality for displaying and filtering trace data.

These changes enhance the overall quality, maintainability, and functionality of the TelemetryLayout component and improve the user experience when viewing telemetry data.
2024-07-21 15:37:40 -06:00
Simon Larsen
44e3c99da8 refactor: Remove unused code and update TelemetryLayout component 2024-07-21 14:30:45 -06:00
Simon Larsen
5fa0f23689 refactor: Remove unused code and update TelemetryLayout component
This commit removes unused code in the TelemetryLayout component and updates it to improve performance and readability. The unused code includes imports, variables, and functions that are no longer needed. The component is also refactored to use React hooks instead of class components, resulting in cleaner and more concise code. These changes enhance the overall quality and maintainability of the TelemetryLayout component.
2024-07-21 13:09:00 -06:00
Simon Larsen
5a9a53dfea refactor: Add TelemetryAttributeService and update BaseAPIFeatureSet 2024-07-21 10:54:56 -06:00
Simon Larsen
9dae8e1764 refactor: Remove commented out code for empty formula configuration 2024-07-21 10:06:08 -06:00
Simon Larsen
2c8b58c293 refactor: Remove commented out code for empty formula configuration 2024-07-21 10:05:55 -06:00
Simon Larsen
57686c87e3 refactor: Remove commented out code for empty formula configuration 2024-07-21 09:18:03 -06:00
snyk-bot
738fb77773 fix: Probe/Dockerfile.tpl to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-DEBIAN12-GIT-6846203
- https://snyk.io/vuln/SNYK-DEBIAN12-GIT-6846203
- https://snyk.io/vuln/SNYK-DEBIAN12-ZLIB-6008963
- https://snyk.io/vuln/SNYK-DEBIAN12-ZLIB-6008963
- https://snyk.io/vuln/SNYK-DEBIAN12-KRB5-7411314
2024-07-21 06:22:59 +00:00
Simon Larsen
51a714f4bd refactor: Add jsonKeys prop to Filter and JSONFilter components
This commit adds the jsonKeys prop to the Filter and JSONFilter components in order to support filtering by JSON keys. The jsonKeys prop is an array of string values that represents the available JSON keys for filtering. This enhancement improves the flexibility and functionality of the filter components, allowing users to filter data based on specific JSON keys.
2024-07-20 09:25:34 -06:00
Simon Larsen
358b785fe0 refactor: Remove TelemetryAttribute model and service
This commit removes the TelemetryAttribute model and service from the codebase. The TelemetryAttribute model and service were no longer needed and were causing unnecessary complexity. Removing them simplifies the codebase and improves maintainability.
2024-07-20 08:08:00 -06:00
snyk-bot
a464723729 fix: Probe/Dockerfile.tpl to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-DEBIAN12-GIT-6846203
- https://snyk.io/vuln/SNYK-DEBIAN12-GIT-6846203
- https://snyk.io/vuln/SNYK-DEBIAN12-ZLIB-6008963
- https://snyk.io/vuln/SNYK-DEBIAN12-ZLIB-6008963
- https://snyk.io/vuln/SNYK-DEBIAN12-KRB5-7411314
2024-07-20 06:22:55 +00:00
Simon Larsen
5ab959cec5 refactor: Add TelemetryAttributeService and update BaseAPIFeatureSet
This commit adds the TelemetryAttributeService to the AnalyticsServices array in the CommonServer/Services/Index.ts file. It also updates the BaseAPIFeatureSet in the App/FeatureSet/BaseAPI/Index.ts file to include a new route for handling telemetry attribute operations. These changes improve the functionality and flexibility of the analytics module, allowing users to work with telemetry attributes effectively.
2024-07-19 18:59:50 -06:00
Simon Larsen
97bb269ccf refactor: Update TelemetryAttribute model and service
This commit updates the TelemetryAttribute model and service to align with the changes made in the AnalyticsModels/TelemetryAttribute.ts file. The model's tableName, singularName, pluralName, and crudApiPath properties have been modified to reflect the new naming convention for telemetry attributes. Additionally, the TelemetryAttributeService has been added to the AnalyticsServices array in the CommonServer/Services/Index.ts file. These changes improve the consistency and functionality of the telemetry attribute module, allowing users to work with telemetry attributes effectively.
2024-07-19 16:57:19 -06:00
Simon Larsen
85c70bbc17 refactor: Add TelemetryAttributeService to AnalyticsServices
This commit adds the TelemetryAttributeService to the AnalyticsServices array in the CommonServer/Services/Index.ts file. By including the TelemetryAttributeService, we ensure that the service is available for handling telemetry attribute-related operations in the analytics module. This enhancement improves the functionality and flexibility of the analytics services, allowing users to work with telemetry attributes effectively.
2024-07-19 16:48:12 -06:00
Simon Larsen
7effd05896 refactor: Update MetricQueryConfig and MetricQuery components
This commit updates the MetricQueryConfig and MetricQuery components to include the metricNames prop. The metricNames prop is an array of string values that represents the available metric names for filtering and querying. This change improves the flexibility and functionality of the components, allowing users to select from a predefined list of metric names.
2024-07-19 15:57:21 -06:00
Simon Larsen
3123b5304d refactor: Update StartAndEndDate component to use boolean type for time interval variables
This commit refactors the StartAndEndDate component to use the boolean type for the time interval variables (is1Hour, is3Hours, is1Day, etc.). This change improves code readability and ensures consistent typing, making it easier to understand and maintain the component.
2024-07-19 15:37:10 -06:00
Simon Larsen
6ea6f94694 getAggregationInterval 2024-07-19 15:25:29 -06:00
Simon Larsen
4b91e598ce refactor: Update StatementGenerator.ts and AnalyticsDatabaseService.ts
The code changes in StatementGenerator.ts and AnalyticsDatabaseService.ts refactor the import statements for the AggregateBy module. The changes ensure consistent formatting and improve code readability.
2024-07-19 14:02:54 -06:00
Simon Larsen
07293006c3 refactor: Update MetricView component to render charts for metric results 2024-07-19 13:58:46 -06:00
snyk-bot
8f86a4651e fix: Probe/Dockerfile.tpl to reduce vulnerabilities
The following vulnerabilities are fixed with an upgrade:
- https://snyk.io/vuln/SNYK-DEBIAN12-GIT-6846203
- https://snyk.io/vuln/SNYK-DEBIAN12-GIT-6846203
- https://snyk.io/vuln/SNYK-DEBIAN12-ZLIB-6008963
- https://snyk.io/vuln/SNYK-DEBIAN12-ZLIB-6008963
- https://snyk.io/vuln/SNYK-DEBIAN12-KRB5-7411315
2024-07-19 07:47:19 +00:00
Simon Larsen
74857d58d8 refactor: Update MetricView component to render charts for metric results 2024-07-18 18:03:37 -06:00
Simon Larsen
e93b74665b refactor: Remove unused code and update types in AggregateBy.ts, StatementGenerator.ts, and MetricView.tsx 2024-07-18 17:58:26 -06:00
Simon Larsen
3c0eeeb81d refactor: Update ModelAPI to return AggregatedResult in aggregate method 2024-07-18 17:22:36 -06:00
Simon Larsen
8de13e75f2 refactor: Add aggregate endpoint to BaseAnalyticsAPI
This commit adds the aggregate endpoint to the BaseAnalyticsAPI class. The endpoint allows users to perform aggregation operations on the analytics data. It includes a POST and GET route for aggregating data based on specified criteria. This enhancement improves the functionality and flexibility of the analytics API, enabling users to retrieve aggregated results efficiently.
2024-07-18 17:15:47 -06:00
Simon Larsen
f57a487b13 refactor: Update BaseDatabase types and components
This commit updates the BaseDatabase types and components to include new interfaces and enums for handling aggregation, sorting, and querying of data. It improves the flexibility and functionality of the database operations, enhancing the overall performance and usability of the application.
2024-07-18 17:00:46 -06:00
Simon Larsen
2eb0f51636 refactor: Update DateFilter component to handle FieldType.DateTime
This commit updates the DateFilter component to handle the FieldType.DateTime in addition to FieldType.Date. It ensures that the component can correctly handle both date and date-time filters, improving the flexibility and functionality of the filtering feature.
2024-07-18 14:35:54 -06:00
Simon Larsen
4741d8f9e7 refactor: Update TracesList component to use FieldType.DateTime for "Seen At" field
This commit updates the TracesList component to use the FieldType.DateTime instead of FieldType.Date for the "Seen At" field. This change ensures that the field accurately represents the date and time of when the trace was seen, improving the accuracy and clarity of the telemetry data.
2024-07-18 14:13:43 -06:00
Simon Larsen
4ce5abc918 refactor: Update TelemetryIngest to include serviceName in TelemetryRequest
This commit updates the TelemetryIngest middleware to include the serviceName property in the TelemetryRequest interface. It improves the accuracy and completeness of the telemetry data handling.
2024-07-17 17:50:50 -06:00
Simon Larsen
f041a6cbbb refactor: Update TelemetryIngest to include serviceName in TelemetryRequest
This commit updates the TelemetryIngest middleware to include the serviceName property in the TelemetryRequest interface. This change allows the middleware to access and use the service name when processing telemetry data. It improves the accuracy and completeness of the telemetry data handling.
2024-07-17 17:27:04 -06:00
Simon Larsen
394e5460b5 refactor: Update MetricView and MetricViewPage components
This commit updates the MetricView and MetricViewPage components to include the MetricsAggregationType enum and use it for setting the default aggregation type in the filterData object. This change ensures consistency and clarity in the codebase, improving the maintainability and readability of the application.
2024-07-17 16:50:13 -06:00
Simon Larsen
7a8043f4db refactor: Update MetricAlias component to use title and description instead of metricAlias
This commit updates the MetricAlias component in the Metrics folder to use the properties "title" and "description" instead of "metricAlias". This change improves the clarity and consistency of the codebase, aligning with the naming conventions used throughout the application.
2024-07-17 15:17:18 -06:00
Simon Larsen
7fe26603fd refactor: Update FieldLabelElement component to use consistent text color
This commit updates the FieldLabelElement component in the CommonUI project to use a consistent text color of text-gray-500 instead of text-gray-700. This change improves the visual consistency and readability of the form fields throughout the application.
2024-07-17 14:58:01 -06:00
Simon Larsen
a50cce6c6f refactor: Update MetricsAggregationType enum values to uppercase
This commit updates the MetricsAggregationType enum values to uppercase for consistency and clarity. The previous lowercase values were inconsistent with the naming convention used throughout the codebase. This change improves the readability and maintainability of the code.
2024-07-17 14:50:15 -06:00
Simon Larsen
3c839799da refactor: Update LastRunMessage and TelemetryServices components 2024-07-17 13:42:12 -06:00
Simon Larsen
5a11df0153 refactor: Update LastRunMessage and TelemetryServices components
This commit updates the LastRunMessage component to display a more accurate message about the data update. It also updates the TelemetryServices component to use a clearer title and description. These changes improve the clarity and user experience of the Copilot and Service Catalog pages.
2024-07-16 17:12:05 -06:00
Simon Larsen
bb8b4430cf refactor: Update ServiceFileTypesUtil to use TechStack instead of ServiceLanguage
This commit updates the ServiceFileTypesUtil class to use the TechStack enum instead of the ServiceLanguage enum. It modifies the method names and parameters accordingly, ensuring consistency and clarity in the codebase. This refactoring improves the maintainability and extensibility of the application.
2024-07-16 16:52:40 -06:00
Simon Larsen
c6961b9a0b refactor: Update TelemetryServiceTable component
This commit refactors the Services page by replacing the ModelTable component with the TelemetryServiceTable component. The TelemetryServiceTable component provides a more specialized and optimized table for displaying telemetry services. This change improves the performance and user experience of the Services page.
2024-07-16 16:28:54 -06:00
Simon Larsen
754e6b165e refactor: Update Monitor component props and imports
This commit updates the Monitor component in the Monitor.tsx file to include an optional showIcon prop. It also updates the import paths in various files to reflect the changes. These refactorings improve the flexibility and maintainability of the codebase.
2024-07-16 16:19:36 -06:00
Simon Larsen
5f2430ff06 feat: Add routes for Service Catalog view pages
This commit adds routes for the Monitors, Incidents, and Telemetry Services pages in the Service Catalog view. These routes allow users to navigate to specific sections of the Service Catalog and access relevant information. The addition of these routes enhances the usability and functionality of the application.
2024-07-16 15:08:26 -06:00
Simon Larsen
80b9961bd8 feat: Add breadcrumb links for Monitors, Incidents, and Telemetry Services in Service Catalog view 2024-07-16 15:07:10 -06:00
Simon Larsen
886f753422 refactor: Update TechStack enum and related imports 2024-07-16 14:50:24 -06:00
Simon Larsen
9ea0c6389c refactor: Update repository URL in package.json 2024-07-16 14:44:47 -06:00
Simon Larsen
f29bcc6641 refactor: Update TechStack enum and related imports 2024-07-16 14:43:59 -06:00
Simon Larsen
60aa7032c5 refactor: Update TechStack enum and related imports
This commit updates the TechStack enum in the TechStack.ts file to include a comprehensive list of technology stacks. It also updates the import paths in various files to reflect the changes from using ServiceLanguage to TechStack. This refactoring improves the clarity and consistency of the codebase.
2024-07-16 14:07:47 -06:00
Simon Larsen
4d8ba7d3a3 fix: Update import path for ServiceCatalogTelemetryService model 2024-07-16 13:30:27 -06:00
Simon Larsen
c87744c51e feat: Add ServiceCatalogMonitor and ServiceCatalogTelemetryService models
This commit adds the ServiceCatalogMonitor and ServiceCatalogTelemetryService models to the application. These models are necessary for managing and monitoring service catalog dependencies and telemetry services. The addition of these models enhances the functionality and flexibility of the application.
2024-07-16 11:52:08 -06:00
Simon Larsen
9841ba52a9 feat: Add MetricsAggregationType enum and MetricsQuery interface
This commit adds the MetricsAggregationType enum to represent different types of metrics aggregations such as max, min, sum, avg, and count. It also introduces the MetricsQuery interface, which defines the structure of a metrics query including the metric name, attributes, aggregation type, aggregate by, start time, and end time. These changes enable the implementation of metrics queries and aggregations in the application.
2024-07-15 17:51:19 -06:00
Simon Larsen
b16df022ed chore: Update npm dependency to latest stable version 2024-07-15 15:23:11 -06:00
Simon Larsen
c3d8acc61a feat: Add SquareStack3D icon to IconProp enum and update SideMenu component
This commit adds the SquareStack3D icon to the IconProp enum in the IconProp.ts file. It also updates the SideMenu component in the SideMenu.tsx file to use the SquareStack3D icon instead of the SquareStack icon. This change ensures that the correct icon is displayed in the SideMenu for the specified modelId.
2024-07-15 15:16:26 -06:00
Simon Larsen
04fbb15405 feat: Add Service Catalog Dependency model and routes 2024-07-15 14:49:10 -06:00
Simon Larsen
2cd61dbbac ```text
refactor: Add Service Catalog Dependency permissions

This commit adds new permissions for creating, deleting, editing, and reading Service Catalog Dependencies. These permissions allow users to manage dependencies within the project.
2024-07-15 14:29:05 -06:00
Simon Larsen
e6bc8e4b30 chore: Update Docker configuration for Copilot debugging
This commit updates the Docker configuration in the `.github/workflows/reliability-copilot.yml` file to fix the environment variable values for `ONEUPTIME_REPOSITORY_SECRET_KEY` and `CODE_REPOSITORY_PASSWORD`. The values are now properly enclosed in double quotes to ensure consistency and prevent any issues with special characters. This change ensures the correct configuration for running the reliability copilot workflow.
2024-07-15 14:13:00 -06:00
Simon Larsen
e9f0510d3c chore: Update Docker configuration for Copilot debugging 2024-07-15 14:10:22 -06:00
Simon Larsen
9c0cf6a3db ```text
chore: Update Docker configuration for Copilot debugging

This commit updates the Docker configuration in the `.github/workflows/reliability-copilot.yml` file to fix the environment variable values for `ONEUPTIME_REPOSITORY_SECRET_KEY` and `CODE_REPOSITORY_PASSWORD`. The values are now properly enclosed in single quotes to prevent any issues with special characters. This change ensures the correct configuration for running the reliability copilot workflow.
2024-07-15 14:04:49 -06:00
Simon Larsen
bca58a58ae chore: Fix formatting in InitUtil code
This commit fixes the formatting in the InitUtil code by removing unnecessary whitespace and aligning the code properly. The changes improve the readability and maintainability of the code.
2024-07-15 13:57:37 -06:00
Simon Larsen
2c0fbfef19 feat: Update Docker configuration for Copilot debugging
This commit updates the Docker configuration in the `.vscode/launch.json` file to improve the debugging experience for Copilot. It modifies the `Debug: Copilot Locally` configuration by changing the `localRoot` to `${workspaceFolder}/TestServer` and updating the `name` to `Copilot: Debug with Docker`. Additionally, it sets the `port` to `9985`, `remoteRoot` to `/usr/src/app`, and enables `restart` and `autoAttachChildProcesses` for better debugging capabilities. These changes enhance the development workflow and make it easier to debug Copilot locally with Docker.
2024-07-15 13:52:00 -06:00
Simon Larsen
395f9bcdb7 chore: Update Docker configuration for Copilot debugging 2024-07-15 13:51:35 -06:00
Simon Larsen
4587e3136b feat: Update Docker configuration for Copilot debugging
This commit updates the Docker configuration in the `.vscode/launch.json` file to improve the debugging experience for Copilot. It modifies the `Debug: Copilot Locally` configuration by changing the `localRoot` to `${workspaceFolder}/TestServer` and updating the `name` to `Copilot: Debug with Docker`. Additionally, it sets the `port` to `9985`, `remoteRoot` to `/usr/src/app`, and enables `restart` and `autoAttachChildProcesses` for better debugging capabilities. These changes enhance the development workflow and make it easier to debug Copilot locally with Docker.
2024-07-15 13:31:49 -06:00
Simon Larsen
2a458ec7e6 chore: Update Docker configuration for Copilot debugging 2024-07-15 09:49:21 -06:00
Simon Larsen
2c02a62e63 feat: Update Docker configuration for Copilot debugging
This commit updates the Docker configuration in the `.vscode/launch.json` file to improve the debugging experience for Copilot. It modifies the `Debug: Copilot Locally` configuration by changing the `localRoot` to `${workspaceFolder}/TestServer` and updating the `name` to `Copilot: Debug with Docker`. Additionally, it sets the `port` to `9985`, `remoteRoot` to `/usr/src/app`, and enables `restart` and `autoAttachChildProcesses` for better debugging capabilities. These changes enhance the development workflow and make it easier to debug Copilot locally with Docker.
2024-07-15 09:47:53 -06:00
Simon Larsen
1afd76b080 ```text
refactor: Update Alert component styles

This commit updates the styles of the Alert component to use a common background color of "bg-gray-700" instead of different colors for each alert type. This change simplifies the code and improves consistency in the UI.
2024-07-15 09:15:10 -06:00
Simon Larsen
5fae51fa01 chore: Update CodeRepositoryPage form fields
This commit updates the CodeRepositoryPage form fields by removing the "Main Branch Name" field and adding a "Select Service" dropdown with a description. The "Main Branch Name" field is no longer necessary and the "Select Service" dropdown provides a better user experience by allowing users to choose a service from the Service Catalog. These changes improve the usability and clarity of the form.
2024-07-15 09:13:15 -06:00
Simon Larsen
d8366efee8 feat: Improve MarkdownViewer styles for headings and code blocks 2024-07-15 09:06:15 -06:00
Simon Larsen
5f3cfa3f0d feat: Update Docker configuration for Copilot debugging
This commit updates the Docker configuration in the `.vscode/launch.json` file to improve the debugging experience for Copilot. It modifies the `Debug: Copilot Locally` configuration by changing the `localRoot` to `${workspaceFolder}/TestServer` and updating the `name` to `Copilot: Debug with Docker`. Additionally, it sets the `port` to `9985`, `remoteRoot` to `/usr/src/app`, and enables `restart` and `autoAttachChildProcesses` for better debugging capabilities. These changes enhance the development workflow and make it easier to debug Copilot locally with Docker.
2024-07-15 08:36:23 -06:00
OneUptime Copilot
84740444ec OneUptime Copilot: Improve Comments on /App/FeatureSet/ApiReference/Service/Errors.ts 2024-07-15 14:31:34 +00:00
OneUptime Copilot
3881ad163c OneUptime Copilot: Improve Comments on /App/FeatureSet/ApiReference/Service/Authentication.ts 2024-07-15 14:27:15 +00:00
OneUptime Copilot
f7f43ed16c OneUptime Copilot: Improve Comments on /App/FeatureSet/ApiReference/Index.ts 2024-07-15 14:26:24 +00:00
Simon Larsen
39b5982d67 feat: Improve MarkdownViewer styles for headings and code blocks
This commit updates the styles in the MarkdownViewer component to improve the visual hierarchy of headings and code blocks. It adds margin-bottom to h3, h4, and h5 headings to create better spacing between them and the content. Additionally, it removes unnecessary code in the code block rendering logic to simplify the component. These changes enhance the readability and aesthetics of the rendered Markdown content.
2024-07-15 07:36:16 -06:00
Simon Larsen
0f0f2c1b81 feat: Update react-syntax-highlighter to latest version and use a11yDark style
This commit updates the react-syntax-highlighter package to the latest version and switches to the a11yDark style for syntax highlighting in the MarkdownViewer component. This update ensures compatibility with the latest features and improvements of react-syntax-highlighter and enhances the accessibility of the code snippets in the MarkdownViewer.
2024-07-14 15:40:10 -06:00
OneUptime Copilot
7e05939977 OneUptime Copilot: Improve Comments on /App/Index.ts 2024-07-14 21:37:48 +00:00
Simon Larsen
c5062b5bc5 feat: Add @types/react-syntax-highlighter dependency
This commit adds the "@types/react-syntax-highlighter" dependency to the package.json file in the CommonUI directory. This is necessary to provide TypeScript type definitions for the "react-syntax-highlighter" library, ensuring proper type checking and improved development experience.
2024-07-14 14:44:06 -06:00
Simon Larsen
90355ae7ed feat: Add lazy loading for images in PullRequestView 2024-07-14 14:20:04 -06:00
Simon Larsen
da67dc6930 feat: Add network_mode: host to docker-compose.base.yml
This commit adds the `network_mode: host` configuration to the `docker-compose.base.yml` file. This configuration allows the container to share the host network stack, enabling direct access to the host's network interfaces. This change is made to improve network performance and connectivity for the application.
2024-07-14 13:58:48 -06:00
Simon Larsen
71151ea92e feat: Add serviceCatalogId and serviceRepositoryId to CopilotPullRequestAPI and CopilotActionAPI
This commit adds the `serviceCatalogId` and `serviceRepositoryId` fields to the `CopilotPullRequestAPI` and `CopilotActionAPI` classes. These fields are included in the API response to provide additional information about the service catalog and service repository associated with a pull request or action. This change enhances the data returned by the APIs and improves the overall functionality of the application.
2024-07-12 22:04:18 +01:00
Simon Larsen
d97211d52c feat: Set default model name if HF_MODEL_NAME environment variable is not set 2024-07-12 20:40:46 +00:00
Simon Larsen
d0e31ad95e feat: Set default model name if HF_MODEL_NAME environment variable is not set
This commit updates the `app.py` file to set a default model name if the `HF_MODEL_NAME` environment variable is not set. The default model name is `meta-llama/Meta-Llama-3-8B-Instruct`. This change ensures that the application uses a valid model name even if the environment variable is not provided.
2024-07-12 20:39:18 +00:00
Simon Larsen
7c796e110b feat: Add environment variables for Hugging Face token and model name
This commit adds the necessary environment variables for the Hugging Face token and model name in the `docker-compose.yml` file. The `HF_TOKEN` environment variable is used to store the Hugging Face API token, which can be obtained by signing up on Hugging Face and creating a new API token. The `HF_MODEL_NAME` environment variable is optional and allows specifying the model name from Hugging Face. If not set, the default model `meta-llama/Meta-Llama-3-8B-Instruct` will be used.
2024-07-12 20:37:03 +00:00
Simon Larsen
137cdb7716 refactor: Remove unused code and comments in LLMServer.ts 2024-07-12 20:18:34 +00:00
Simon Larsen
0a02aba790 feat: Add lazy loading for images in PullRequestView 2024-07-12 20:17:57 +00:00
Simon Larsen
652e81e984 feat: Add lazy loading for images in PullRequestView
This commit adds lazy loading for images in the PullRequestView component. By implementing lazy loading, the images will only load when they are in the viewport, improving the page load performance and user experience.
2024-07-12 21:13:05 +01:00
Simon Larsen
4dacd9b8b4 chore: Delete all data from CopilotAction table in MigrationName1720785305192
This commit deletes all data from the "CopilotAction" table in the "MigrationName1720785305192" migration. This is done to ensure a clean state before renaming the "pullRequestId" column to "copilotPullRequestId".
2024-07-12 20:43:31 +01:00
Simon Larsen
71fb83e698 feat: Update CopilotAction table to allow nullable copilotPullRequestId
This commit modifies the `CopilotAction` table in the `CopilotAction.ts` file to allow the `copilotPullRequestId` column to be nullable. This change provides flexibility in the data model by allowing the column to have null values.
2024-07-12 20:38:33 +01:00
Simon Larsen
d514059d5d chore: Setup Git LFS in workflows
This commit adds a step to the GitHub workflows (`test-release.yaml` and `release.yml`) to setup Git LFS. Git LFS is necessary for handling large files in the repository. By installing Git LFS, we ensure that the repository can handle large files properly during the CI/CD process.
2024-07-12 20:28:46 +01:00
Simon Larsen
3c29278cc1 run on self hosted runner 2024-07-12 20:14:37 +01:00
Simon Larsen
5d1ad931fc chore: Remove unused Copilot configuration variables
This commit removes the unused Copilot configuration variables from the `config.example.env` file. The `COPILOT_OPENAI_API_KEY` and `COPILOT_OPENAI_MODEL` variables are no longer needed and have been removed. This cleanup improves the clarity and maintainability of the codebase.
2024-07-12 19:36:33 +01:00
Simon Larsen
4e0d56de54 feat: Add setup pull request flag to CopilotPullRequestAPI.ts
This commit adds the `isSetupPullRequest` flag to the `CopilotPullRequestAPI.ts` file. The flag is set to true when creating a pull request for setting up the repository with OneUptime Copilot. This flag will be used to identify setup pull requests in the application.
2024-07-12 19:02:47 +01:00
Simon Larsen
a33b1f20f8 feat: Add migration for dropping NOT NULL constraint on serviceCatalogId and serviceRepositoryId in CopilotPullRequest
This commit adds a migration file (1720806196274-MigrationName.ts) that drops the NOT NULL constraint on the columns "serviceCatalogId" and "serviceRepositoryId" in the "CopilotPullRequest" table. This change allows these columns to have nullable values, providing flexibility in the data model.
2024-07-12 18:46:41 +01:00
Simon Larsen
9fa61dac31 feat: Add OneUptimeDate import in CopilotCodeRepositoryAPI
This commit adds an import statement for the `OneUptimeDate` module in the `CopilotCodeRepositoryAPI.ts` file. The `OneUptimeDate` module is used to update the last run time of the code repository.
2024-07-12 18:36:30 +01:00
Simon Larsen
263c1ee613 feat: Update CopilotPullRequest.ts and PageMap.ts
Update the table description in CopilotPullRequest.ts to fix a typo. Also, add a new entry in PageMap.ts for the "AI_COPILOT_CODE_REPOSITORY_VIEW_PULL_REQUESTS" page.
2024-07-12 13:38:19 +01:00
Simon Larsen
c648a6bf79 feat: Add CopilotPullRequestStatus enum
This commit adds the `CopilotPullRequestStatus` enum to the `CopilotPullRequestStatus.ts` file in the `Common/Types/Copilot` directory. This enum defines the possible statuses of a Copilot pull request, including "Created", "Merged", and "Closed". This enum will be used to track the status of Copilot pull requests throughout the application.
2024-07-12 13:07:59 +01:00
Simon Larsen
ed954d79a4 fix ingress 2024-07-12 12:05:29 +01:00
Simon Larsen
113e95a059 add fluentd host to ingress 2024-07-12 11:29:37 +01:00
Simon Larsen
4d31b85c4d add otel collector to ingress 2024-07-12 11:26:54 +01:00
Simon Larsen
58cf3abda9 Merge branch 'master' of github.com:OneUptime/oneuptime 2024-07-12 11:23:00 +01:00
Simon Larsen
9227324ac3 fix port name on ingress 2024-07-12 11:21:53 +01:00
snyk-bot
e5c608e20b fix: upgrade @opentelemetry/instrumentation-xml-http-request from 0.52.0 to 0.52.1
Snyk has created this PR to upgrade @opentelemetry/instrumentation-xml-http-request from 0.52.0 to 0.52.1.

See this package in npm:
@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-07-12 04:41:38 +00:00
snyk-bot
8a41d48941 fix: upgrade posthog-js from 1.139.3 to 1.139.6
Snyk has created this PR to upgrade posthog-js from 1.139.3 to 1.139.6.

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-07-12 04:37:12 +00:00
Simon Larsen
eb19465e56 Merge pull request #1580 from OneUptime/snyk-upgrade-94a17e29c2b95dff68863238e84f80f4
[Snyk] Upgrade eslint-plugin-react from 7.34.2 to 7.34.3
2024-07-11 17:13:14 +01:00
Simon Larsen
93ee819457 Merge pull request #1582 from OneUptime/snyk-upgrade-6b6d73fe55c776290de78e647adb1b35
[Snyk] Upgrade @opentelemetry/instrumentation-fetch from 0.51.1 to 0.52.0
2024-07-11 17:13:06 +01:00
snyk-bot
7931ac475e fix: upgrade @opentelemetry/instrumentation-fetch from 0.51.1 to 0.52.0
Snyk has created this PR to upgrade @opentelemetry/instrumentation-fetch from 0.51.1 to 0.52.0.

See this package in npm:
@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-07-11 06:55:27 +00:00
snyk-bot
6286c203fe fix: upgrade protobufjs from 7.3.0 to 7.3.2
Snyk has created this PR to upgrade protobufjs from 7.3.0 to 7.3.2.

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-07-11 06:53:35 +00:00
snyk-bot
9d43a2d98b fix: upgrade eslint-plugin-react from 7.34.2 to 7.34.3
Snyk has created this PR to upgrade eslint-plugin-react from 7.34.2 to 7.34.3.

See this package in npm:
eslint-plugin-react

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-07-11 06:34:56 +00:00
snyk-bot
5271bcd49f fix: upgrade @types/lodash from 4.17.4 to 4.17.5
Snyk has created this PR to upgrade @types/lodash from 4.17.4 to 4.17.5.

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-07-11 06:34:52 +00:00
Simon Larsen
54db88dd96 feat: Add git commands to add and commit changes in CodeRepositoryUtil
The CodeRepositoryUtil class now includes two new methods: `addAllChangedFilesToGit` and `commitChanges`. These methods allow for adding all changed files to the git repository and committing the changes with a specified message. This will make it easier to manage and track changes in the code repository.
2024-07-10 22:53:31 +01:00
Simon Larsen
dd336896d2 chore: Remove unused configuration files and scripts 2024-07-10 22:07:52 +01:00
simlarsen
75ad6697cd OneUptime Copilot: Improve Comments on /App/FeatureSet/Docs/Index.ts 2024-07-10 21:00:05 +00:00
Simon Larsen
2862d1e69b Merge branch 'master' of github.com:OneUptime/oneuptime 2024-07-10 21:33:40 +01:00
Simon Larsen
5e486e4ce6 chore: Update LlmType enum and related code 2024-07-10 21:33:38 +01:00
Simon Larsen
6b17d6d6dc Merge pull request #1574 from OneUptime/oneuptime-app-oneuptime-app-improve-comments-voNYL
[OneUptime Copilot] Improve Comments on /App/FeatureSet/ApiReference/Utils/Resources.ts
2024-07-10 21:32:05 +01:00
simlarsen
272a29aad1 OneUptime Copilot: Improve Comments on /App/FeatureSet/ApiReference/Utils/Resources.ts 2024-07-10 20:31:24 +00:00
Simon Larsen
d21e333c9e Update config.example.env to disable copilot 2024-07-10 21:05:47 +01:00
Simon Larsen
b5195c27c0 chore: Add OpenAI configuration to Copilot
- Update config.example.env to include OpenAI API key and model.
- Update docker-compose.base.yml to include OpenAI environment variables.
- Update Copilot configuration files to handle OpenAI LLM responses.
2024-07-10 20:59:46 +01:00
Simon Larsen
3f436861ad Merge pull request #1569 from OneUptime/oneuptime-app-oneuptime-app-improve-comments-ewnDg
[OneUptime Copilot] Improve Comments on /App/FeatureSet/ApiReference/Service/Model.ts
2024-07-10 20:49:10 +01:00
Simon Larsen
3982d49136 Merge pull request #1570 from OneUptime/oneuptime-app-oneuptime-app-improve-comments-nHnSE
[OneUptime Copilot] Improve Comments on /App/FeatureSet/ApiReference/Service/PageNotFound.ts
2024-07-10 20:48:40 +01:00
Simon Larsen
e007fb1b72 Merge pull request #1571 from OneUptime/oneuptime-app-oneuptime-app-improve-comments-Mrwii
[OneUptime Copilot] Improve Comments on /App/FeatureSet/ApiReference/Service/Pagination.ts
2024-07-10 20:48:31 +01:00
Simon Larsen
ccba9482de Merge pull request #1572 from OneUptime/oneuptime-app-oneuptime-app-improve-comments-ooCrw
[OneUptime Copilot] Improve Comments on /App/FeatureSet/ApiReference/Service/Permissions.ts
2024-07-10 20:48:15 +01:00
Simon Larsen
8dfa8c2e09 Merge pull request #1573 from OneUptime/oneuptime-app-oneuptime-app-improve-comments-yaNuN
[OneUptime Copilot] Improve Comments on /App/FeatureSet/ApiReference/Service/Status.ts
2024-07-10 20:47:57 +01:00
Simon Larsen
af0a5d1022 chore: Update LlmType enum and related code 2024-07-10 18:39:13 +01:00
Simon Larsen
43a22d9973 chore: Update LlmType enum and related code
- Update LlmType enum values to match the new naming convention.
- Update references to Llama to LLM in various files.
- Update CopilotActionsBase.ts to set the llmType to LLM in the constructor.
- Update Init.ts to use the llmServerUrl instead of llamaServerUrl.
- Update LLM.ts to use LLMServer class instead of Llama class.
- Add OpenAI class and update LLM.ts to handle OpenAI LLM type.
- Update Config.ts to handle OpenAI API key and model.
- Add OpenAI.ts file to handle OpenAI LLM responses.
2024-07-10 18:36:00 +01:00
Simon Larsen
d8c8a76c1d chore: Update Copilot configuration files
- Update Copilot Dockerfile.tpl to remove unnecessary code and fix formatting.
- Update config.example.env and Copilot/.env.example to correct the LLM server URL.
- Remove unused code and update documentation in Copilot/README.md.
- Update navigation links in App/FeatureSet/Docs/Utils/Nav.ts to include Copilot documentation.
- Update Copilot/Config.ts and Copilot/Utils/Init.ts to use the new LLM server URL.
- Add logger statements in Copilot/Service/CopilotActions/CopilotActionsBase.ts to log file content.
2024-07-10 18:19:09 +01:00
simlarsen
e40dc2e9ff OneUptime Copilot: Improve Comments on /App/FeatureSet/ApiReference/Service/Status.ts 2024-07-10 13:01:43 +00:00
simlarsen
e0769f1d2b OneUptime Copilot: Improve Comments on /App/FeatureSet/ApiReference/Service/Permissions.ts 2024-07-10 13:00:58 +00:00
simlarsen
e336d2ad38 OneUptime Copilot: Improve Comments on /App/FeatureSet/ApiReference/Service/Pagination.ts 2024-07-10 13:00:09 +00:00
simlarsen
6ca6daf38d OneUptime Copilot: Improve Comments on /App/FeatureSet/ApiReference/Service/PageNotFound.ts 2024-07-10 12:59:15 +00:00
simlarsen
ffa6f143ac OneUptime Copilot: Improve Comments on /App/FeatureSet/ApiReference/Service/Model.ts 2024-07-10 12:58:24 +00:00
Simon Larsen
04650f165f chore: Add logger to Execute.ts and fix formatting in Config.ts and Init.ts 2024-07-10 13:50:29 +01:00
Simon Larsen
214c4e4839 chore: Await discardAllChangesOnCurrentBranch in Copilot/Init.ts 2024-07-10 13:43:59 +01:00
Simon Larsen
fad530cf86 Merge branch 'master' of github.com:OneUptime/oneuptime 2024-07-10 13:39:46 +01:00
Simon Larsen
6b9e0c8b99 chore: Disable Copilot in development environment 2024-07-10 13:39:35 +01:00
Simon Larsen
5a66e9a393 Merge pull request #1568 from OneUptime/oneuptime-app-oneuptime-app-improve-comments-TJVih
[OneUptime Copilot] Improve Comments on /App/FeatureSet/ApiReference/Service/Introduction.ts
2024-07-10 13:23:50 +01:00
simlarsen
ddd5813266 OneUptime Copilot: Improve Comments on /App/FeatureSet/ApiReference/Service/Introduction.ts 2024-07-10 12:23:07 +00:00
Simon Larsen
e246e3fbcd Update npm aliases in .bash_profile 2024-07-10 12:18:14 +01:00
Simon Larsen
e1f4cc22ac chore: Add git and Kubernetes aliases 2024-07-10 12:12:46 +01:00
Simon Larsen
6911cf59f4 pin otel collector version 2024-07-10 11:56:26 +01:00
Simon Larsen
5172d7f349 chore: Add CORS headers to Telemetry and OTelCollector
This commit adds CORS headers to the Telemetry and OTelCollector components to allow cross-origin resource sharing. This enables the client to make requests to these components from different origins. The headers include "Access-Control-Allow-Credentials", "Access-Control-Allow-Origin", "Access-Control-Allow-Methods", and "Access-Control-Allow-Headers".
2024-07-10 11:48:22 +01:00
Simon Larsen
55e043f3bd Merge branch 'master' of github.com:OneUptime/oneuptime 2024-07-10 11:15:04 +01:00
Simon Larsen
bdee2f0585 Merge branch 'master' of github.com:OneUptime/oneuptime 2024-07-10 10:14:05 +00:00
Simon Larsen
833ca82cb7 Merge branch 'master' of github.com:OneUptime/oneuptime 2024-07-10 11:13:15 +01:00
Simon Larsen
6751972d7f Merge pull request #1564 from OneUptime/snyk-upgrade-3232471f850f8871f36776389f11aae2
[Snyk] Upgrade @opentelemetry/instrumentation-xml-http-request from 0.51.1 to 0.52.0
2024-07-10 11:11:18 +01:00
Simon Larsen
44ed919f95 Merge pull request #1565 from OneUptime/snyk-upgrade-7d66d03180c77c4ca697278c523089b6
[Snyk] Upgrade react-big-calendar from 1.12.2 to 1.13.0
2024-07-10 11:10:45 +01:00
Simon Larsen
c8ad2a1ac8 Merge pull request #1566 from OneUptime/snyk-upgrade-95f152c7f03c4ab700ab8a5a552aa96c
[Snyk] Upgrade posthog-js from 1.138.0 to 1.139.3
2024-07-10 11:10:36 +01:00
Simon Larsen
232b537969 Merge pull request #1567 from OneUptime/snyk-upgrade-7c8fb9ccde1fd7e55540a2005ae62b07
[Snyk] Upgrade globals from 15.4.0 to 15.6.0
2024-07-10 11:10:30 +01:00
Simon Larsen
d5c8e7836f Refactor MigrationName1720532068612 to delete all records from CopilotAction and drop a foreign key constraint 2024-07-10 11:09:44 +01:00
snyk-bot
e897955466 fix: upgrade globals from 15.4.0 to 15.6.0
Snyk has created this PR to upgrade globals from 15.4.0 to 15.6.0.

See this package in npm:
globals

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-07-10 06:13:29 +00:00
snyk-bot
4f3ae06e59 fix: upgrade posthog-js from 1.138.0 to 1.139.3
Snyk has created this PR to upgrade posthog-js from 1.138.0 to 1.139.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-07-10 06:12:11 +00:00
snyk-bot
e971bdaee9 fix: upgrade react-big-calendar from 1.12.2 to 1.13.0
Snyk has created this PR to upgrade react-big-calendar from 1.12.2 to 1.13.0.

See this package in npm:
react-big-calendar

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-07-10 06:06:23 +00:00
snyk-bot
d165ce86df fix: upgrade @opentelemetry/instrumentation-xml-http-request from 0.51.1 to 0.52.0
Snyk has created this PR to upgrade @opentelemetry/instrumentation-xml-http-request from 0.51.1 to 0.52.0.

See this package in npm:
@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-07-10 06:06:18 +00:00
snyk-bot
45d327e55d fix: upgrade @opentelemetry/instrumentation-fetch from 0.51.1 to 0.52.0
Snyk has created this PR to upgrade @opentelemetry/instrumentation-fetch from 0.51.1 to 0.52.0.

See this package in npm:
@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-07-10 06:06:13 +00:00
Simon Larsen
ec704cbe34 Refactor executeScript function to execute multiple commands sequentially 2024-07-09 21:06:40 +01:00
Simon Larsen
658cb9fee3 refactor: Update URL for validating secret key in app.py
The code changes in `app.py` update the URL for validating the secret key. The previous URL was using the endpoint `/api/code-repository/is-valid/{secretKey}`, and it has been changed to `/api/copilot-code-repository/is-valid/{secretKey}`. This change ensures that the correct endpoint is used for validating the secret key in the OneUptime service.
2024-07-09 19:38:29 +00:00
Simon Larsen
3234112644 Refactor CORS headers to allow all origins and additional headers 2024-07-09 20:08:45 +01:00
Simon Larsen
0c7db14e99 Refactor Telemetry and TelemetryIngest classes to use URL class from Common/Types/API/URL 2024-07-09 20:02:12 +01:00
Simon Larsen
34118d5892 chore: Fix typo in npm run command 2024-07-09 18:52:26 +01:00
Simon Larsen
2ee80ee2f9 chore: Refactor CopilotCodeRepositoryAPI to remove unnecessary onBeforeCommitScript, onBeforeRepositoryCloneScript, onAfterCommitScript, and onAfterRepositoryCloneScript properties 2024-07-09 18:12:08 +01:00
Simon Larsen
aaacaa654b chore: Refactor executeAction function to use typescript interfaces and types 2024-07-09 17:51:36 +01:00
Simon Larsen
d8c38a3564 chore: Add necessary configuration files for OneUptime service 2024-07-09 17:40:26 +01:00
Simon Larsen
add77694c3 chore: Add necessary configuration files for OneUptime service 2024-07-09 16:34:58 +01:00
Simon Larsen
66171e8035 chore: Remove unnecessary columns from CopilotCodeRepository table 2024-07-09 16:33:06 +01:00
Simon Larsen
932d218455 chore: Update import paths for CodeRepository to CopilotCodeRepository 2024-07-09 14:42:19 +01:00
Simon Larsen
33a295c191 chore: Update import paths for CodeRepository to CopilotCodeRepository 2024-07-09 14:17:05 +01:00
Simon Larsen
4c0f1b08c8 chore: Add onBeforeCommitScript, onBeforeRepositoryCloneScript, onAfterCommitScript, and onAfterRepositoryCloneScript properties to CopilotCodeRepository model 2024-07-09 14:14:04 +01:00
Simon Larsen
f58e935cb9 chore: Update import paths for CodeRepository to CopilotCodeRepository 2024-07-09 14:07:42 +01:00
Simon Larsen
ad48ea5a3f chore: Update import paths for CodeRepository to CopilotCodeRepository 2024-07-09 13:55:59 +01:00
Simon Larsen
3a4ae31872 chore: Update import paths for CodeRepository to CopilotCodeRepository 2024-07-09 13:53:50 +01:00
Simon Larsen
48996b0810 Merge remote-tracking branch 'origin/snyk-upgrade-cd470ff382f3ed998304bb88ef9afe7f' 2024-07-09 13:03:57 +01:00
Simon Larsen
d450c99560 Merge remote-tracking branch 'origin/snyk-upgrade-65126f8b570e3a8824e5969f0e718753' 2024-07-09 13:01:33 +01:00
Simon Larsen
51884a31cd Merge branch 'master' of github.com:OneUptime/oneuptime 2024-07-09 12:55:04 +01:00
Simon Larsen
5251b93fc9 refactor: Improve logging in Llama class 2024-07-09 12:54:49 +01:00
Simon Larsen
ac3635511c Merge pull request #1535 from OneUptime/snyk-upgrade-a5008561a01273d3fcf7af71de29b60d
[Snyk] Upgrade @opentelemetry/instrumentation from 0.51.1 to 0.52.0
2024-07-09 12:53:36 +01:00
Simon Larsen
0990ef0846 Merge pull request #1556 from OneUptime/oneuptime-app-oneuptime-app-improve-comments-csMvV
[OneUptime Copilot] Improve Comments on /App/FeatureSet/Docs/Utils/Render.ts
2024-07-09 12:52:44 +01:00
simlarsen
294b245d88 OneUptime Copilot: Improve Comments on /App/FeatureSet/Docs/Utils/Render.ts 2024-07-09 11:44:50 +00:00
Simon Larsen
3eb3564c57 Merge pull request #1548 from OneUptime/oneuptime-app-oneuptime-app-improve-comments-BFXsW
[OneUptime Copilot] Improve Comments on /App/FeatureSet/ApiReference/Service/Pagination.ts
2024-07-09 12:37:05 +01:00
Simon Larsen
851f061018 Merge pull request #1547 from OneUptime/oneuptime-app-oneuptime-app-improve-comments-eTbgL
[OneUptime Copilot] Improve Comments on /App/FeatureSet/ApiReference/Service/PageNotFound.ts
2024-07-09 12:36:18 +01:00
Simon Larsen
e9a2c64d67 Merge pull request #1555 from OneUptime/oneuptime-app-oneuptime-app-improve-comments-OeXvG
[OneUptime Copilot] Improve Comments on /App/FeatureSet/Docs/Utils/Nav.ts
2024-07-09 12:34:24 +01:00
simlarsen
f9b72e0155 OneUptime Copilot: Improve Comments on /App/FeatureSet/Docs/Utils/Nav.ts 2024-07-09 11:31:45 +00:00
simlarsen
834fd23542 OneUptime Copilot: Improve Comments on /App/FeatureSet/ApiReference/Service/Pagination.ts 2024-07-09 11:09:53 +00:00
simlarsen
14b45b95a4 OneUptime Copilot: Improve Comments on /App/FeatureSet/ApiReference/Service/PageNotFound.ts 2024-07-09 11:09:36 +00:00
Simon Larsen
74d4a6545e Merge branch 'master' of github.com:OneUptime/oneuptime 2024-07-08 20:00:01 +01:00
Simon Larsen
646c0f37d6 refactor: Improve logging in Llama class 2024-07-08 19:59:58 +01:00
Simon Larsen
1fdc36fea2 refactor: Update logging in Llama class for better debugging 2024-07-08 19:56:27 +01:00
Simon Larsen
a34a6657f0 feat: Add max_new_tokens parameter to job function
The code changes in `app.py` add a new parameter `max_new_tokens` to the `job` function. This parameter allows the maximum number of new tokens to be specified when calling the function. This change enhances the flexibility and control of the `job` function by allowing the maximum number of new tokens to be adjusted as needed.
2024-07-08 18:46:22 +00:00
Simon Larsen
95f87567e8 refactor: Improve logging in Llama class
This commit improves the logging in the Llama class by adding more detailed log messages. It modifies the log statements in the execute method to include the current file path and the type of Copilot action being executed. This change enhances the readability and debugging capabilities of the Llama service.
2024-07-08 18:15:27 +01:00
Simon Larsen
9ad97b1fe0 refactor: Add timeout handling to Llama prompt execution
This commit adds timeout handling to the Llama prompt execution in the Llama class. It introduces a timeoutInMinutes property in the CopilotActionPrompt interface and uses it to set a timeout for the prompt execution. If the prompt execution exceeds the specified timeout, a LLMTimeoutException is thrown, indicating that the prompt has timed out. This change enhances the reliability and responsiveness of the Llama service by preventing long-running prompts from blocking the execution flow.
2024-07-08 18:06:06 +01:00
Simon Larsen
9b9e6d666b refactor: Update CodeRepositoryUtil to set author identity 2024-07-08 16:36:22 +01:00
Simon Larsen
24845b267f refactor: Set author identity in CodeRepositoryUtil
This commit adds a new method, setAuthorIdentity, to the CodeRepositoryUtil class. The method sets the author's name and email in the global git configuration using the provided data. It executes the necessary git config command and logs the output. This change enhances the functionality of the CodeRepositoryUtil class by allowing the author's identity to be easily configured for git operations.
2024-07-08 16:19:19 +01:00
Simon Larsen
448326ee88 refactor: Add LOG_LEVEL=DEBUG environment variable to docker-compose.copilot.yml
This commit adds the LOG_LEVEL=DEBUG environment variable to the docker-compose.copilot.yml file. Setting the log level to DEBUG will enable more detailed logging for the Copilot service. This change is made to improve debugging and troubleshooting capabilities during development and testing.
2024-07-08 16:01:51 +01:00
Simon Larsen
12dab7bdda refactor: Update Docker Compose configuration for Copilot
This commit updates the Docker Compose configuration for Copilot. It removes the unnecessary volume mapping for the COPILOT_REPOSITORY_LOCAL_PATH in the docker-compose.copilot.yml file. This change improves the clarity and simplicity of the configuration file.
2024-07-08 15:48:05 +01:00
Simon Larsen
3eba4da4a8 refactor: Update CODE_REPOSITORY_PASSWORD and CODE_REPOSITORY_USERNAME environment variables
This commit updates the environment variables CODE_REPOSITORY_PASSWORD and CODE_REPOSITORY_USERNAME in the Copilot project. The previous variables GITHUB_TOKEN and GITHUB_USERNAME have been replaced with the new variables to improve clarity and consistency. The changes are made in multiple files, including .github/workflows/reliability-copilot.yml, Copilot/.env.example, Copilot/Config.ts, Copilot/Utils/CodeRepository.ts, Copilot/Utils/Init.ts, config.example.env, and docker-compose.base.yml. These updates ensure that the correct credentials are used for accessing the code repository in the Copilot project.
2024-07-08 15:45:14 +01:00
Simon Larsen
b947ed2ed1 refactor: Add cloneRepository method to CodeRepositoryUtil
This commit adds a new method, cloneRepository, to the CodeRepositoryUtil class. The method is responsible for cloning a repository from a given URL to a specified path. It uses the git clone command to perform the cloning operation. This method will be used to clone the repository to a temporary directory in the Copilot/Init.ts file. The method takes an object as a parameter, which includes the repoPath and repoUrl. It executes the git clone command using the Execute.executeCommand() method and logs the output using the logger.debug() method. This new method enhances the functionality of the CodeRepositoryUtil class and improves the codebase.
2024-07-08 15:40:16 +01:00
Simon Larsen
6eef29e4a3 refactor: Update Copilot configuration for local development 2024-07-08 14:05:09 +01:00
Simon Larsen
74c2de8adc refactor: Add npm scripts for running Copilot and LLM in development mode
This commit adds npm scripts for running Copilot and LLM in development mode. It introduces the "dev-copilot" and "dev-llm" scripts in the package.json file, which set up the necessary environment variables and start the respective services using docker-compose. These scripts enable developers to easily run and test Copilot and LLM locally during development.
2024-07-08 12:56:33 +01:00
Simon Larsen
f53b314b59 refactor: Update Copilot configuration for local development 2024-07-08 12:51:27 +01:00
Simon Larsen
e4bf81fcc1 refactor: Update Copilot configuration for local development
This commit updates the Copilot configuration for local development. It adds environment variables and services to the docker-compose.base.yml and package.json files to support running Copilot locally. The changes include adding the "copilot" service to the docker-compose.base.yml file with the necessary environment variables for Copilot functionality. Additionally, it adds new npm scripts in the package.json file to start, build, and force-build Copilot. These updates enable developers to easily run and build Copilot locally for testing and development purposes.
2024-07-08 12:11:52 +01:00
Simon Larsen
00b48b16ce refactor: Update NODE_OPTIONS stack trace limit to 30 in Dockerfile.tpl 2024-07-05 13:00:16 +01:00
Simon Larsen
5b00b5dac1 refactor: Update Monitor.ts to improve error handling and populate secrets
This commit refactors the Monitor.ts file to enhance error handling and populate secrets for monitors. It introduces try-catch blocks and proper logging to handle errors more effectively. Additionally, it populates secrets for monitors using the MonitorUtil.populateSecrets() function. These changes improve the reliability and security of the monitoring process.
2024-07-05 12:56:53 +01:00
Simon Larsen
97306d47fa refactor: Update default replica count for all deployments 2024-07-05 12:37:38 +01:00
Simon Larsen
5df9f9fd69 refactor: Refresh probe status when isEnabled is updated in MonitorProbeService.ts 2024-07-05 11:52:05 +01:00
Simon Larsen
d9ce813689 refactor: Update ingestor replica count based on configuration 2024-07-05 11:26:26 +01:00
Simon Larsen
93f1b97e88 refactor: Improve error handling in Monitor.ts
This commit refactors the Monitor.ts file to improve error handling. It removes commented out code and unused imports, ensuring a cleaner and more efficient codebase. This change enhances the maintainability and readability of the code.
2024-07-05 11:16:29 +01:00
Simon Larsen
c617e49a63 refactor: Update ingestor replica count based on configuration
This commit updates the ingestor replica count in the HelmChart/Public/oneuptime/templates/ingestor.yaml file based on the configuration. If the `$.Values.deployment.ingestor.replicaCount` value is provided, it sets the replicas to that value. Otherwise, it falls back to `$.Values.deployment.replicaCount`. This change ensures that the ingestor replica count is correctly configured, improving the scalability and performance of the application.
2024-07-05 10:51:19 +01:00
Simon Larsen
de7d06e5d7 refactor: Improve error handling in FetchListAndProbe
This commit refactors the FetchListAndProbe class to improve error handling. It adds try-catch blocks around the main logic and logs any errors that occur using the logger. Additionally, it includes a catch block to handle any errors thrown during the fetchListAndProbe function. This change ensures that errors are properly handled and logged, preventing potential issues with the monitoring process.
2024-07-05 10:18:03 +01:00
Simon Larsen
9b862162b6 refactor: Remove Hugging Face model download step from workflows
The Hugging Face model download step has been removed from the release and test workflows due to limited disk space on the runner. This step was causing issues and is no longer necessary for the current functionality of the project.
2024-07-05 10:05:19 +01:00
Simon Larsen
0ecf3fa1e0 refactor: Remove commented out code and unused imports in Monitor.ts 2024-07-05 09:54:34 +01:00
Simon Larsen
b5fa564cb3 refactor: Remove LLM/Models from .dockerignore 2024-07-05 09:29:05 +01:00
Simon Larsen
b771e1486e Update Hugging Face model download command in release and test workflows 2024-07-05 09:27:20 +01:00
Simon Larsen
3f1479d8f5 refactor: Improve error handling in Semaphore.lock()
This commit refactors the Semaphore.lock() function in the MonitorStatusTimelineService and Monitor API files to improve error handling. It adds try-catch blocks around the lock() function calls and logs any errors that occur using the logger. This change ensures that errors during the locking process are properly handled and logged, preventing potential issues with mutex locking.
2024-07-05 09:05:36 +01:00
Simon Larsen
dcdf1e21ae chore: Free up disk space in GitHub Actions runner 2024-07-04 22:40:38 +01:00
Simon Larsen
cc3f003be5 refactor: Improve error handling in FetchListAndProbe
This commit refactors the FetchListAndProbe class to improve error handling. It adds try-catch blocks around the main logic and logs any errors that occur using the logger. Additionally, it includes a catch block to handle any errors thrown during the fetchListAndProbe function. This change ensures that errors are properly handled and logged, preventing potential issues with the monitoring process.
2024-07-04 22:22:37 +01:00
Simon Larsen
0e53e26695 refactor: Update PROBE_MONITOR_FETCH_LIMIT default value to 10
This commit updates the default value of the PROBE_MONITOR_FETCH_LIMIT variable in the Config.ts file from 1 to 10. This change ensures that the monitor fetch limit is set to a more reasonable value, improving the efficiency of the monitoring process.
2024-07-04 21:05:03 +01:00
Simon Larsen
ad1e5fefc6 refactor: Improve error handling in Semaphore.lock()
This commit refactors the Semaphore.lock() function in the MonitorStatusTimelineService and Monitor API files to improve error handling. It adds try-catch blocks around the lock() function calls and logs any errors that occur using the logger. This change ensures that errors during the locking process are properly handled and logged, preventing potential issues with mutex locking.
2024-07-04 20:52:19 +01:00
Simon Larsen
8ea77dc6d1 chore: Update BillingInvoiceAPI to check for userAuthorization.isMasterAdmin when userPermissions is empty 2024-07-04 10:50:40 +01:00
Simon Larsen
2222ca301f feat: Update count property in docker-compose.llm.yml to use 'all'
This commit updates the count property in the docker-compose.llm.yml file to use the value 'all' instead of the previous value of '1'. This change allows for the allocation of all available devices with the 'gpu' capability, improving the utilization of resources.
2024-07-03 17:48:43 +01:00
Simon Larsen
0f66c70205 refactor: Update issue template titles
This commit removes the redundant "Bug:" and "Enhancement:" prefixes from the issue template titles. The prefixes are unnecessary as the labels already indicate the type of issue. This change simplifies the issue creation process and improves the clarity of the issue templates.
2024-07-03 17:37:10 +01:00
Simon Larsen
88dc64f182 feat: Add new migration for SchemaMigrations
This commit adds a new migration file, MigrationName1720024126646, to the SchemaMigrations directory. This migration will be used to make changes to the database schema.
2024-07-03 17:35:24 +01:00
Simon Larsen
94c50b980a feat: Add disableCreate prop to MonitorTable component 2024-07-03 17:26:33 +01:00
Simon Larsen
9866919873 feat: Add new icons for NoSignal and EyeSlash
This commit adds two new icons, NoSignal and EyeSlash, to the IconProp enum. It also includes the necessary code changes in the Icon component to render these icons. These icons will be used in the Monitor SideMenu to represent monitors with all probes disconnected and monitors with all probes disabled, respectively.
2024-07-03 16:55:31 +01:00
Simon Larsen
e025f996e4 feat: Add Monitor Groups and Not Being Monitored sections to Dashboard SideMenu 2024-07-03 16:43:39 +01:00
Simon Larsen
cd4c326f6e refactor: Update PermissionHelper to use access control permissions for probe actions
This commit updates the PermissionHelper class to use access control permissions for probe actions. Previously, the isAccessControlPermission property was set to false for all probe-related permissions. Now, it has been changed to true, aligning with the intention of these permissions. This change improves the clarity and consistency of the codebase.
2024-07-03 14:58:11 +01:00
Simon Larsen
c668731389 chore: Add new monitor notification settings for probe status changes and no probes monitoring the monitor 2024-07-03 14:56:57 +01:00
Simon Larsen
e6a10edca6 chore: Add new monitor notification settings for probe status changes and no probes monitoring the monitor 2024-07-02 19:42:28 +01:00
Simon Larsen
847f7fa5c9 chore: Update MonitorTypeHelper function names to be more descriptive
This commit updates the function names in the MonitorTypeHelper class to be more descriptive and accurately reflect their purpose. The function isProbableMonitors has been renamed to isProbableMonitor, and doesMonitorTypeHaveInterval has been renamed to doesMonitorTypeRequireInterval. This change improves the clarity and maintainability of the codebase.
2024-07-02 18:58:06 +01:00
Simon Larsen
03cb9a67b4 chore: Update server monitor criteria to evaluate over time
This commit updates the ServerMonitorCriteria class to include the option to evaluate criteria over time. It adds a new condition to check if the criteria filter includes the evaluateOverTimeOptions property. If it does, the criteria will be evaluated based on the specified time value in minutes. This change allows for more flexible and customizable monitoring criteria.
2024-07-02 17:14:58 +01:00
Simon Larsen
9791aa1259 chore: Add CPU core count to CPUMetrics
This commit adds the `cores` field to the `CPUMetrics` struct in order to include the number of CPU cores in the collected metrics. This information is useful for understanding the processing power of the server.
2024-07-02 13:54:04 +01:00
Simon Larsen
0df7209723 feat: Add basic infrastructure metrics to server monitor summary view 2024-07-02 13:06:23 +01:00
Simon Larsen
0de8e2d818 chore: Add hostname to server monitor report
This commit adds the hostname field to the server monitor report in order to include the hostname of the server in the collected metrics. This information is useful for identifying and distinguishing between different servers in the monitoring system.
2024-07-02 13:04:02 +01:00
Simon Larsen
5f9a1091de chore: Update Dockerfile paths in release and test-release workflows
This commit updates the paths to the Dockerfile in the release.yml and test-release.yaml workflows. The paths have been changed to ./LLM/Dockerfile to ensure that the correct Dockerfile is used for building and pushing the image. This change is necessary because the base image of the LLM does not support arm64 platforms.
2024-07-02 12:55:52 +01:00
Simon Larsen
6ef17b1720 chore: Update Dockerfile to set stack trace limit to 0
This commit updates the Dockerfile to set the stack trace limit to 0, allowing full stack traces to be shown. This change ensures that developers have access to complete stack trace information when debugging the application.
2024-07-02 12:29:31 +01:00
Simon Larsen
9c41a20ebb chore: Update Dockerfile paths in release and test-release workflows
This commit updates the paths to the Dockerfile in the release.yml and test-release.yaml workflows. The paths have been changed to ./LLM/Dockerfile to ensure that the correct Dockerfile is used for building and pushing the image. This change is necessary because the base image of the LLM does not support arm64 platforms.
2024-07-02 12:23:03 +01:00
Simon Larsen
eddb5a81c9 Merge branch 'master' of github.com:OneUptime/oneuptime 2024-07-02 12:20:47 +01:00
Simon Larsen
3861d09930 Merge branch 'master' of github.com:OneUptime/oneuptime 2024-07-02 11:20:24 +00:00
Simon Larsen
733901a870 refactor: Use array of messages in CopilotActionsBase.ts, RefactorCode.ts, ImproveReadme.ts, ImproveVariableNames.ts, FixGrammarAndSpelling.ts, and WriteUnitTests.ts
This refactor changes the code in CopilotActionsBase.ts, RefactorCode.ts, ImproveReadme.ts, ImproveVariableNames.ts, FixGrammarAndSpelling.ts, and WriteUnitTests.ts to use an array of messages instead of a single prompt. Each message in the array contains the content and role of the prompt, improving flexibility and readability.
2024-07-02 11:19:53 +00:00
Simon Larsen
131c3034d6 chore: Update installation script to add binary to path
The installation script has been updated to add the binary to the user's path. This ensures that the oneuptime-infrastructure-agent command can be accessed from anywhere in the shell.
2024-07-02 12:19:14 +01:00
Simon Larsen
0c9175c728 fix install script for mac 2024-07-02 12:11:21 +01:00
Simon Larsen
e2eff652e3 chore: Update notification method description in NotificationSettings.tsx 2024-07-02 11:25:36 +01:00
Simon Larsen
43e9530fdb chore: Update notification method description in NotificationSettings.tsx
This commit updates the description of the notification methods in the NotificationSettings.tsx file. The previous description mentioned "custom porbe" instead of "custom probe". This change improves the accuracy and clarity of the description, ensuring that it correctly reflects the purpose of the notification methods.
2024-07-02 11:23:24 +01:00
Simon Larsen
0000cbc53e chore: Add migration for new SchemaMigrations
This commit adds a new migration file, MigrationName1719915433542, to the SchemaMigrations directory. The migration is necessary to update the database schema and ensure compatibility with the latest changes in the codebase.
2024-07-02 11:19:31 +01:00
Simon Larsen
8b26cac8f0 ```text
chore: Update ProbeAPI.test.ts to include connectionStatus field in select query

This commit modifies the ProbeAPI.test.ts file to include the connectionStatus field in the select query. The connectionStatus field was missing from the original query, and this change ensures that it is now included, providing complete information about the probe's connection status.
2024-07-02 11:14:42 +01:00
Simon Larsen
e8417b23d9 chore: Update ProbeConnectionStatusChange template to display "Status Since" instead of "Date / Time" 2024-07-01 22:45:10 +01:00
Simon Larsen
1bd5671d17 chore: Update lastAlive field to Status Since in ProbeConnectionStatusChange template
This commit updates the ProbeConnectionStatusChange template to display the last connection status change as "Status Since" instead of "Date / Time". The change improves the clarity and accuracy of the displayed information, providing a better user experience.
2024-07-01 22:22:51 +01:00
Simon Larsen
56d3e7e1f2 chore: Update probeKey type to string in CustomProbeDocumentation and ProbeView components
This commit updates the probeKey prop type from ObjectID to string in the CustomProbeDocumentation and ProbeView components. The probeKey is used to identify the probe and was previously defined as ObjectID, but it should be a string. This change ensures that the probeKey is correctly passed and used throughout the components, improving the accuracy and reliability of the application.
2024-07-01 20:00:16 +01:00
Simon Larsen
34888e9b7f chore: Update CustomProbeDocumentation component title
This commit updates the title of the CustomProbeDocumentation component from "Set up your Server Monitor (Linux/Mac)" to "Set up your Custom Probe". The new title accurately reflects the purpose of the component and improves the clarity of the user interface.
2024-07-01 17:51:28 +01:00
Simon Larsen
7c09423766 chore: Update ProbeStatusElement component to use connectionStatus field 2024-07-01 17:34:04 +01:00
Simon Larsen
9ba8251c58 chore: Update ProbeStatusElement component to use connectionStatus field 2024-07-01 17:19:27 +01:00
Simon Larsen
7a5efd99ca chore: Update ProbeStatusElement component to use connectionStatus field
This commit updates the ProbeStatusElement component to use the new connectionStatus field from the Probe model. The component previously relied on the lastAlive field to determine the probe's connection status, but now it directly checks the connectionStatus field. This change ensures that the component accurately reflects the probe's current connection status, improving the reliability of the application.
2024-07-01 17:12:33 +01:00
Simon Larsen
1e595be586 feat: Add notification settings for probe owner added event
This commit adds notification settings for the "probe owner added" event. It includes updates to the EmailTemplateType enum, NotificationSettingEventType enum, UserNotificationSettingService, and NotificationSettings.tsx. The new settings allow users to receive notifications when they are added as owners to a probe. This enhancement improves the user experience by providing timely notifications for ownership changes.
2024-07-01 17:06:35 +01:00
Simon Larsen
1d63168606 chore: Add connectionStatus field to Probe model and update related components 2024-07-01 16:52:16 +01:00
Simon Larsen
82601a3e8f chore: Disable editing and deleting of probes in ProbePage component
This commit disables the editing and deleting functionality for probes in the ProbePage component. The isEditable and isDeleteable props are set to false, preventing users from modifying or removing probes. This change ensures that probes cannot be accidentally modified or deleted, improving the data integrity of the application.
2024-07-01 14:41:25 +01:00
Simon Larsen
17bf63e83b chore: Add missing commas in Index.ts files
This commit adds missing commas in the Index.ts files of the Model/Models and CommonServer/Infrastructure/Postgres/SchemaMigrations directories. The missing commas were causing syntax errors in the code. This fix ensures that the code is valid and can be executed without errors.
2024-07-01 14:12:06 +01:00
Simon Larsen
885a6ca36e feat: Add ProbeOwnerTeam and ProbeOwnerUser APIs
This commit adds the APIs for ProbeOwnerTeam and ProbeOwnerUser, allowing users to manage ownership of probes within the application. The APIs are implemented in the BaseAPI/Index.ts file and include routes for creating, deleting, editing, and reading probe owner teams and users. This enhancement improves the functionality of the application by providing a way to manage probe ownership.
2024-07-01 14:02:49 +01:00
Simon Larsen
dec35bbc03 chore: Update model-inline-code styles for consistency
This commit updates the model-inline-code styles in the model.ejs and head.ejs files to ensure consistency throughout the application. The model-inline-code class is now defined with rounded corners, smaller text size, and a gray background color. This change improves the visual presentation of code snippets in the application.
2024-07-01 13:52:49 +01:00
Simon Larsen
77dcb16e8b feat: Add permissions for creating, deleting, editing, and reading probe owner teams and users 2024-07-01 13:42:17 +01:00
Simon Larsen
b10a4c7db8 feat: Add permissions for creating, deleting, editing, and reading probe owner teams and users
This commit adds new permissions for creating, deleting, editing, and reading probe owner teams and users. These permissions allow users to manage ownership of probes within the application. The permissions are defined in the Permission enum and are accompanied by titles and descriptions for clarity. This enhancement improves the access control functionality of the application.
2024-07-01 13:39:07 +01:00
Simon Larsen
8d82f1128b chore: Add ProbeConnectionStatusChange email template
This commit adds a new email template, "ProbeConnectionStatusChange.hbs", to the EmailTemplateType enum in the EmailTemplateType.ts file. The template is used for sending emails related to changes in probe connection status. This addition enhances the email functionality of the application.
2024-07-01 13:07:11 +01:00
Simon Larsen
056c069c69 chore: Add migration for new ProbeStatus column
This commit adds a new migration file, "1719827175832-MigrationName", to the SchemaMigrations directory. The migration file includes the necessary changes to add a new column, "connectionStatus", to the Probe model in the Models directory. The column is of type "ShortText" and has access control settings for create and read permissions. This migration enables the storage and retrieval of the connection status of a probe in the database.
2024-07-01 10:47:24 +01:00
Simon Larsen
0466950c2d chore: Update axios and posthog-js dependencies
This commit updates the axios and posthog-js dependencies in the package-lock.json file. The axios dependency is updated from version 1.6.8 to 1.7.2, and the posthog-js dependency is updated from version 1.131.4 to 1.138.0. These updates ensure that the latest stable versions of these libraries are used in the project.
2024-07-01 10:43:11 +01:00
Simon Larsen
4442437ad7 refactor: Improve comments and error handling in Llama.ts and ImproveComments.ts 2024-07-01 10:39:27 +01:00
snyk-bot
1192c4b6f0 fix: upgrade @opentelemetry/instrumentation from 0.51.1 to 0.52.0
Snyk has created this PR to upgrade @opentelemetry/instrumentation from 0.51.1 to 0.52.0.

See this package in npm:
@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-06-29 05:38:32 +00:00
Simon Larsen
08f39af9ec refactor: Improve comments and handle bad operations in Llama.ts and ImproveComments.ts
This commit refactors the code in Llama.ts and ImproveComments.ts to improve comments and handle bad operations. In Llama.ts, a new import statement for the BadOperationException class is added, and if the result object contains an error string, a BadOperationException is thrown. In ImproveComments.ts, an unused variable declaration is removed. These changes enhance code readability and error handling.
2024-06-28 19:25:53 +01:00
Simon Larsen
7bf58d23bc chore: Update CopilotActionsBase.ts, RefactorCode.ts, ImproveReadme.ts, ImproveVariableNames.ts, FixGrammarAndSpelling.ts, and WriteUnitTests.ts
Refactor CopilotActionsBase.ts, RefactorCode.ts, ImproveReadme.ts, ImproveVariableNames.ts, FixGrammarAndSpelling.ts, and WriteUnitTests.ts to use an array of messages instead of a single prompt. Each message in the array contains the content and role of the prompt. This change improves the flexibility and readability of the code.
2024-06-28 19:15:53 +01:00
Simon Larsen
afb0cbcc2a chore: Update Dockerfile and docker-compose.llm.yml for LLM models 2024-06-28 18:00:27 +00:00
Simon Larsen
7393d9c2bc chore: Update Dockerfile and docker-compose.llm.yml for LLM models
This commit updates the Dockerfile and docker-compose.llm.yml files to include the LLM Models directory. The Dockerfile now uses the `ADD .` command to copy the entire repository into the container at `/app`, and the docker-compose.llm.yml file has been modified to set the context to the `./LLM` directory. These changes ensure that the LLM Models directory is included in the Docker image and that the correct context is used for building the image.
2024-06-28 17:59:43 +00:00
Simon Larsen
7b8efb2785 Update Dockerfile to set stack trace limit to 0 2024-06-28 17:52:57 +01:00
Simon Larsen
efea6f4c11 chore: Add Redis service to docker-compose.llm.yml
The Redis service has been added to the docker-compose.llm.yml file. This service is responsible for caching and cluster state. It extends the configuration from the docker-compose.base.yml file and uses the "redis" service defined there.
2024-06-28 17:42:43 +01:00
Simon Larsen
8dbf724f36 chore: Update Dockerfile in llm-docker-image-deploy workflow to use the correct volume mount path 2024-06-28 17:37:47 +01:00
Simon Larsen
fa4c705023 chore: Update Dockerfile in reliability-copilot.yml to use the correct volume mount path 2024-06-28 15:10:19 +01:00
Simon Larsen
106e41206e Update nav menu styling and product menu layout 2024-06-28 14:55:58 +01:00
Simon Larsen
dc0c71b063 Remove unused GitHub workflow files for Dependabot Automerge and Playwright Tests. These files are no longer needed and can be safely deleted.
Update the Dockerfile in the Copilot directory to use the correct volume mount path. This ensures that the Copilot tool can access the repository files correctly when running in a Docker container.
2024-06-28 14:47:27 +01:00
Simon Larsen
0cadb54117 chore: Update AI Copilot references to "Reliability Copilot" 2024-06-28 14:20:56 +01:00
Simon Larsen
0ba315342c Update product tabs and features table content 2024-06-28 14:08:49 +01:00
Simon Larsen
d87b292691 chore: Update Hugging Face clone URL in test-release.yaml
Fix a typo in the Hugging Face clone URL in the test-release.yaml file, which was causing the cloning process to fail. The "@" symbol was missing in the URL. This commit adds the missing "@" symbol to the URL.
2024-06-28 13:53:26 +01:00
Simon Larsen
ea3abf2ca0 chore: Update Banner component to handle optional link and openInNewTab props
The Banner component has been updated to handle optional link and openInNewTab props. If a link is provided, it will be wrapped in a Link component. If no link is provided, the content will be rendered directly. This change allows for more flexibility in using the Banner component.
2024-06-28 13:16:58 +01:00
Simon Larsen
3e507c0259 chore: Update Hugging Face clone URL in test-release.yaml
Fix a typo in the Hugging Face clone URL in the test-release.yaml file, which was causing the cloning process to fail. The "@" symbol was missing in the URL. This commit adds the missing "@" symbol to the URL.
2024-06-28 13:09:54 +01:00
Simon Larsen
5385c8e65c chore: Update AI Copilot references to "Reliability Copilot" 2024-06-28 13:05:35 +01:00
Simon Larsen
771ad54110 chore: Update reliability feature name to "Reliability Copilot" 2024-06-28 13:03:31 +01:00
Simon Larsen
6743193872 chore: Update LLM Dockerfile and build process 2024-06-28 12:18:01 +01:00
Simon Larsen
b94d862cae chore: Update LLM Dockerfile and build process 2024-06-28 12:14:49 +01:00
Simon Larsen
77d9b2f98f chore: Fix typo in Hugging Face clone URL
The Hugging Face clone URL in the test-release.yaml file had a missing "@" symbol, causing the cloning process to fail. This commit fixes the typo by adding the "@" symbol to the URL.

```
2024-06-28 12:00:10 +01:00
Simon Larsen
2565087dba Merge branch 'master' of github.com:OneUptime/oneuptime 2024-06-28 11:59:16 +01:00
Simon Larsen
5f330b5ea6 chore: Update Dockerfile and build process for LLM deployment
This commit updates the Dockerfile and build process for deploying the LLM (Llama Models) service. The Dockerfile has been generated from the Dockerfile.tpl file, and the build process now includes pulling the model from Hugging Face and setting up QEMU and Docker Buildx. Additionally, the login actions for Docker Hub and GitHub Container Registry have been added, and the build and push steps have been configured to use the updated tags and labels from the metadata action.

```
2024-06-28 11:59:13 +01:00
Simon Larsen
c5f6816d7b chore: Update Llama Models directory name to LLM 2024-06-28 11:53:09 +01:00
Simon Larsen
585b98c83d Merge pull request #1530 from OneUptime/copilot
Copilot
2024-06-28 11:35:03 +01:00
Simon Larsen
40635d5b07 Merge pull request #1531 from OneUptime/snyk-upgrade-7358ffa5d00ca86f76a1a45e96b3c33d
[Snyk] Upgrade posthog-js from 1.136.7 to 1.138.0
2024-06-28 11:34:55 +01:00
Simon Larsen
fd96f7a1ec Merge pull request #1533 from OneUptime/snyk-upgrade-28d9d373998545ed12a47fad19fc0238
[Snyk] Upgrade @opentelemetry/resources from 1.24.1 to 1.25.0
2024-06-28 11:34:47 +01:00
Simon Larsen
f585ffe756 chore: Update npm scripts for LLM deployment
The npm scripts for starting, building, and force-building the LLM (Llama Models) service have been updated in the package.json file. The new scripts use the docker-compose.llm.yml file instead of the docker-compose.ai.yml file. This change ensures that the correct configuration is used for deploying the LLM service.
2024-06-28 11:33:48 +01:00
Simon Larsen
9a86978c9d chore: Update Llama Models directory name to LLM
The directory name for Llama Models has been updated from "Llama/Models" to "LLM/Models". This change ensures consistency and aligns with the updated file paths in the codebase.
2024-06-28 11:32:44 +01:00
Simon Larsen
3bf87cf9eb Merge branch 'master' of github.com:OneUptime/oneuptime 2024-06-28 10:51:48 +01:00
Simon Larsen
b7b5288f9c ```text
chore: Set oneuptimeSecret and encryptionSecret to long random strings

The `oneuptimeSecret` and `encryptionSecret` values in the `values.yaml` file have been updated to be set to long random strings. This change ensures better security for OneUptime in production environments.
2024-06-28 10:51:45 +01:00
snyk-bot
2833dbb474 fix: upgrade @opentelemetry/resources from 1.24.1 to 1.25.0
Snyk has created this PR to upgrade @opentelemetry/resources from 1.24.1 to 1.25.0.

See this package in npm:
@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-06-28 06:07:03 +00:00
snyk-bot
2a6dda5fe2 fix: upgrade posthog-js from 1.136.7 to 1.138.0
Snyk has created this PR to upgrade posthog-js from 1.136.7 to 1.138.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-06-28 05:58:30 +00:00
Simon Larsen
e9e5b5a329 chore: Add error handling for item processing
This commit adds error handling for item processing in the `job` function of `app.py`. When an error occurs while processing an item, the error is stored in the `errors` dictionary. This ensures that errors are captured and can be handled appropriately. The `queue-status` endpoint now includes the `errors` dictionary in the response, providing visibility into any processing errors that occurred.
2024-06-27 20:23:24 +00:00
Simon Larsen
c0e055343e chore: Remove unused import of json in app.py 2024-06-27 20:19:56 +00:00
Simon Larsen
c657397d3b chore: Convert messages from JSON string to list in create_item endpoint 2024-06-27 20:19:44 +00:00
Simon Larsen
91cf4995b1 chore: Convert messages from JSON string to list in create_item endpoint 2024-06-27 20:11:57 +00:00
Simon Larsen
7b7c1e5951 chore: Convert messages from JSON string to list in create_item endpoint 2024-06-27 18:37:02 +00:00
Simon Larsen
b67583f8d3 refactor: Update Llama.ts to fix API route for prompt result 2024-06-27 19:16:49 +01:00
Simon Larsen
460b8459d4 chore: Update Llama Readme with GPU usage instructions 2024-06-27 17:51:46 +00:00
Simon Larsen
8328ece011 chore: Update docker-compose command in test.e2e.yaml 2024-06-27 17:48:41 +00:00
Simon Larsen
6f4045ffe9 refactor: Update SubscriptionPlan method name to getPlanType 2024-06-27 18:00:08 +01:00
Simon Larsen
54ce2c71c0 chore: Update docker-compose command in test.e2e.yaml 2024-06-27 16:27:59 +00:00
Simon Larsen
0a00cd9581 refactor: Update SubscriptionPlan method name to getPlanType 2024-06-27 16:00:21 +01:00
Simon Larsen
162c5d9db9 add queue to process responses 2024-06-27 14:56:22 +00:00
Simon Larsen
8be8c23ed9 refactor: Refactor code into smaller functions/methods 2024-06-27 15:48:52 +01:00
Simon Larsen
f2b6fffb4c chore: Add error handling for item processing
This commit adds error handling for item processing in the `job` function of `app.py`. When an error occurs while processing an item, the error is stored in the `errors` dictionary. This ensures that errors are captured and can be handled appropriately. The `queue-status` endpoint now includes the `errors` dictionary in the response, providing visibility into any processing errors that occurred.
2024-06-27 13:57:05 +00:00
Simon Larsen
626312d495 refactor: Refactor code into smaller functions/methods 2024-06-27 14:33:25 +01:00
Simon Larsen
77287868c4 refactor: Improve variable names in codebase 2024-06-27 14:15:18 +01:00
Simon Larsen
f7d221900a chore: Add error handling to ServerMonitor:CheckOnlineStatus 2024-06-27 13:40:07 +01:00
Simon Larsen
d51a420532 chore: Update docker-compose command in test.e2e.yaml
The `docker-compose` command in the `test.e2e.yaml` file has been updated to use `docker compose` instead. This change ensures compatibility with the latest version of Docker and improves the consistency of command usage across the project.
2024-06-27 13:18:57 +01:00
Simon Larsen
0567f92ddd chore: Update docker-compose command in test.e2e.yaml
The `docker-compose` command in the `test.e2e.yaml` file has been updated to use `docker compose` instead. This change ensures compatibility with the latest version of Docker and improves the consistency of command usage across the project.
2024-06-27 13:10:25 +01:00
Simon Larsen
e88e29f9e5 refactor: Update install.sh to support Windows OS 2024-06-27 11:58:14 +01:00
Simon Larsen
e50f6e14f0 chore: Update Server Monitor documentation for Linux/Mac and Windows
The Server Monitor documentation in the `Documentation.tsx` file has been updated to provide separate instructions for setting up the monitor on Linux/Mac and Windows. The title of the Linux/Mac section has been modified to reflect this change. Additionally, the Windows section has been added with detailed steps for downloading, configuring, starting, and stopping the agent. This update improves the clarity and usability of the Server Monitor documentation.
2024-06-27 11:57:35 +01:00
Simon Larsen
933b3e96a1 chore: Update pricing page with new features and descriptions 2024-06-27 11:36:53 +01:00
Simon Larsen
00b67974ed chore: Update pricing page with new headline
The pricing page has been updated to replace the previous headline with a new one that better highlights the value proposition of OneUptime. The new headline emphasizes that OneUptime is a comprehensive platform that combines 8+ tools into one, providing users with a complete SRE toolchain. This change improves the clarity and effectiveness of the messaging on the pricing page.
2024-06-27 11:18:06 +01:00
Simon Larsen
a05a7d9122 chore: Fix typos in code comments and UI text 2024-06-27 11:17:26 +01:00
Simon Larsen
fdf440f308 chore: Update HomeFeatureSet in Index.ts
The `HomeFeatureSet` object in `Index.ts` has been updated to modify the values for the `Public Status Page` and `Subscribers` features. The `free` plan for `Public Status Page` has been changed from "Unlimited" to "1", and the `free` plan for `Subscribers` has been changed from "Unlimited" to "100". Additionally, a new feature called `Synthetic Monitoring (with Playwright)` has been added to the `HomeFeatureSet` object.
2024-06-27 11:16:40 +01:00
Simon Larsen
34c6a32c48 refactor: Update install.sh to support Windows OS 2024-06-27 10:50:32 +01:00
Simon Larsen
0b078226f3 Merge branch 'master' of github.com:OneUptime/oneuptime 2024-06-27 10:29:38 +01:00
Simon Larsen
e0a5927bd1 refactor: Improve CopilotActionService file handling
This commit refactors the `CopilotActionService` class in the `Index.ts` file to improve file handling. It updates the logic for obtaining the result from the Copilot action and committing the changes to the repository. Additionally, it removes unused code and improves the readability of the file. This refactoring enhances the overall efficiency and maintainability of the `CopilotActionService` class.
2024-06-27 10:29:35 +01:00
Simon Larsen
bed1f0dbb5 Merge pull request #1528 from OneUptime/snyk-upgrade-81e090968d72376d6229e5d49596cc79
[Snyk] Upgrade @opentelemetry/semantic-conventions from 1.24.1 to 1.25.0
2024-06-27 10:29:18 +01:00
Simon Larsen
4fef8ccfb5 Merge pull request #1526 from OneUptime/snyk-upgrade-274375204ccf65ed6f3d939f4cd74fda
[Snyk] Upgrade @opentelemetry/context-zone from 1.24.1 to 1.25.0
2024-06-27 10:29:07 +01:00
Simon Larsen
bb29b4be4b Merge pull request #1524 from OneUptime/snyk-upgrade-579a7cc9445a00c813ed17b2ba523e50
[Snyk] Upgrade posthog-js from 1.136.2 to 1.136.7
2024-06-27 10:29:00 +01:00
snyk-bot
e649a6f25a fix: upgrade @opentelemetry/exporter-trace-otlp-http from 0.51.1 to 0.52.0
Snyk has created this PR to upgrade @opentelemetry/exporter-trace-otlp-http from 0.51.1 to 0.52.0.

See this package in npm:
@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-06-27 06:02:00 +00:00
snyk-bot
078d89d8ae fix: upgrade @opentelemetry/semantic-conventions from 1.24.1 to 1.25.0
Snyk has created this PR to upgrade @opentelemetry/semantic-conventions from 1.24.1 to 1.25.0.

See this package in npm:
@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-06-27 06:01:55 +00:00
snyk-bot
a13c172d6d fix: upgrade @opentelemetry/api from 1.8.0 to 1.9.0
Snyk has created this PR to upgrade @opentelemetry/api from 1.8.0 to 1.9.0.

See this package in npm:
@opentelemetry/api

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-27 06:01:50 +00:00
snyk-bot
6b4727bc9f fix: upgrade @opentelemetry/context-zone from 1.24.1 to 1.25.0
Snyk has created this PR to upgrade @opentelemetry/context-zone from 1.24.1 to 1.25.0.

See this package in npm:
@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-06-27 06:01:45 +00:00
Simon Larsen
95aaa68010 refactor: Update install.sh to support Windows OS 2024-06-26 22:05:09 +01:00
Simon Larsen
976686b5af refactor: Update install.sh to support Windows OS
The `install.sh` script has been updated to support the Windows operating system. This includes changes to the URL construction and the addition of logic to handle downloading and unzipping the binary for Windows. This enhancement improves the installation process for Windows users.
2024-06-26 22:02:12 +01:00
Simon Larsen
f59064108e refactor: Add isActionComplete method to CopilotActionsBase.ts
This commit adds a new method, `isActionComplete`, to the `CopilotActionsBase.ts` file. The method returns a boolean value indicating whether the action is complete. By default, the method returns `true`, but it can be overridden in derived classes to provide custom logic for determining the action's completion status. This enhancement improves the flexibility and extensibility of the `CopilotActionsBase` class.
2024-06-26 21:47:20 +01:00
Simon Larsen
44d8254e7d refactor: Remove unused getNextFilePath method in CopilotActionsBase.ts 2024-06-26 21:43:13 +01:00
Simon Larsen
d284a6ff54 refactor: Remove unused getNextFilePath method in CopilotActionsBase.ts 2024-06-26 21:40:39 +01:00
Simon Larsen
1908f02447 refactor: Extract code from CopilotActionBase to separate functions 2024-06-26 21:40:07 +01:00
Simon Larsen
f50e20d896 refactor: Extract code from CopilotActionBase to separate functions 2024-06-26 20:55:14 +01:00
Simon Larsen
bd8ed04e1b refactor: Extract code from CopilotActionBase to separate functions
This commit extracts code from the `CopilotActionBase.ts` file into separate functions for better code organization and readability. The extracted code includes the logic for ordering SSL certificates, checking the order status, and handling domain removal. This refactoring improves the maintainability and modularity of the codebase.
2024-06-26 19:33:01 +01:00
Simon Larsen
27c54221cb feat: Mark domain as not ordered and update SSL status
This commit updates the `StatusPageDomainService.ts` file to mark a domain as not ordered and update the SSL status when it is removed. The `notifyDomainRemoved` function now includes logic to update the `isSslOrdered` and `isSslProvisioned` properties to `false` for the specified domain. This ensures that the SSL certificate is not ordered or provisioned for the removed domain.
2024-06-26 14:42:17 +01:00
Simon Larsen
cf589ba0c6 refactor: Remove invalid domain and notify removal
The code changes in GreenlockUtil.ts remove the domain if the CNAME is not valid and notify the removal. This ensures that only valid domains are processed for ordering SSL certificates.
2024-06-26 14:38:26 +01:00
Simon Larsen
43eaff3a6d feat: Add logic to order SSL certificate for valid domains
The code changes in `StatusPageDomainService.ts` add logic to order an SSL certificate for valid domains. If the CNAME is valid, the code attempts to order the certificate using the `orderCert` function. This ensures that all valid domains have the necessary SSL protection.
2024-06-26 14:31:08 +01:00
Simon Larsen
30e96de2d9 refactor: Check order status for SSL certificates
This commit adds a new cron job in the `StatusPageCerts.ts` file to check the order status of SSL certificates for domains that have already ordered them. If a certificate does not exist for a domain, the code will attempt to order the certificate again. This ensures that all domains with ordered certificates have the necessary SSL protection.
2024-06-26 14:25:35 +01:00
Simon Larsen
43c4f44f1f refactor: Check order status for SSL certificates
This commit adds a new cron job in the `StatusPageCerts.ts` file to check the order status of SSL certificates for domains that have already ordered them. If a certificate does not exist for a domain, the code will attempt to order the certificate again. This ensures that all domains with ordered certificates have the necessary SSL protection.
2024-06-26 14:24:49 +01:00
Simon Larsen
af6f5af11d Update phone number placeholders in registration and subscription forms 2024-06-26 12:36:27 +01:00
snyk-bot
79603c9bb4 fix: upgrade posthog-js from 1.136.2 to 1.136.7
Snyk has created this PR to upgrade posthog-js from 1.136.2 to 1.136.7.

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-26 05:31:20 +00:00
2004 changed files with 76990 additions and 98904 deletions

68
.bash_profile Normal file
View File

@@ -0,0 +1,68 @@
# These are aliases that will make your life simple when you're building OneUptime
# Make directory and change directory at the same time.
mkcdir ()
{
mkdir -p -- "$1" &&
cd -P -- "$1"
}
# Git aliases
alias g="git"
alias gs="git status"
alias ga="git add"
alias gc="git checkout"
alias gb="git branch"
alias gp="git pull"
alias gpo="git push origin"
alias gl="git log"
alias gd="git diff"
alias gm="git merge"
# Kubernetes aliases
alias k="kubectl"
alias kg="kubectl get"
alias kd="kubectl describe"
alias kc="kubectl create"
alias kdel="kubectl delete"
alias klo="kubectl logs"
alias klof="kubectl logs -f"
alias kex="kubectl exec"
alias kexi="kubectl exec -it"
# Docker aliases
alias d="docker"
alias dc="docker compose"
alias dcu="docker compose up"
alias dcd="docker compose down"
# Node aliases
alias n="npm"
alias ni="npm install"
alias nis="npm install --save"
alias nid="npm install --save-dev"
alias nr="npm run"
alias nt="npm test"
alias ns="npm start"
alias nb="npm build"
# Rust aliases
alias c="cargo"
alias cb="cargo build"
alias cr="cargo run"
# OneUptime Specific Aliases
# --------------------------
alias nrd="npm run dev"
alias nrl="npm run logs"
alias nrb="npm run build"
alias nrfb="npm run force-build"
alias nrps="npm run ps-dev"
# OneUptime LLM Server
alias nrfbl="npm run force-build-llm"
alias nrdl="npm run dev-llm"
alias nrll="npm run logs-llm"
alias nrbl="npm run build-llm"

View File

@@ -56,5 +56,4 @@ settings.json
GoSDK/tester/
Llama/Models/*

View File

@@ -1,7 +1,7 @@
---
name: Bug report
about: Create a report to help us improve
title: 'Bug: <Title of the issue>'
title: '<Title of the issue>'
labels: 'bug'
assignees: ''

View File

@@ -1,7 +1,7 @@
---
name: Feature request
about: Suggest an idea for this project
title: 'Enhancement: <Title of the issue>'
title: '<Title of the issue>'
labels: 'enhancement'
assignees: ''

View File

@@ -20,9 +20,6 @@ jobs:
with:
node-version: 18.3.0
- run: cd Common && npm install
- run: cd Model && npm install
- run: cd CommonServer && npm install
- run: cd CommonUI && npm install --force
- run: cd Accounts && npm install && npm run compile && npm run dep-check
compile-isolated-vm:
@@ -35,35 +32,8 @@ jobs:
with:
node-version: 18.3.0
- run: cd Common && npm install
- run: cd CommonServer && npm install
- run: cd IsolatedVM && npm install && npm run compile && npm run dep-check
compile-common-server:
runs-on: ubuntu-latest
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 && npm run compile && npm run dep-check
compile-common-ui:
runs-on: ubuntu-latest
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 CommonUI && npm install --force && npm run compile && npm run dep-check
compile-common:
runs-on: ubuntu-latest
env:
@@ -73,8 +43,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 18.3.0
- run: cd Common && npm install
- run: cd Model && npm install && npm run compile && npm run dep-check
- run: cd Common && npm install && npm run compile && npm run dep-check
compile-app:
runs-on: ubuntu-latest
@@ -86,9 +55,7 @@ jobs:
with:
node-version: 18.3.0
- run: cd Common && npm install
- run: cd Model && npm install
- run: cd CommonServer && npm install
- run: cd CommonUI && npm install --force
- run: cd App && npm install && npm run compile && npm run dep-check
compile-copilot:
@@ -101,8 +68,6 @@ jobs:
with:
node-version: 18.3.0
- run: cd Common && npm install
- run: cd Model && npm install
- run: cd CommonServer && npm install
- run: cd Copilot && npm install && npm run compile && npm run dep-check
compile-nginx:
@@ -115,9 +80,7 @@ jobs:
with:
node-version: 18.3.0
- run: cd Common && npm install
- run: cd Model && npm install
- run: cd CommonServer && npm install
- run: cd CommonUI && npm install --force
- run: cd Nginx && npm install && npm run compile && npm run dep-check
compile-infrastructure-agent:
@@ -141,9 +104,7 @@ jobs:
with:
node-version: 18.3.0
- run: cd Common && npm install
- run: cd Model && npm install
- run: cd CommonServer && npm install
- run: cd CommonUI && npm install --force
- run: cd AdminDashboard && npm install && npm run compile && npm run dep-check
compile-dashboard:
@@ -156,25 +117,10 @@ jobs:
with:
node-version: 18.3.0
- run: cd Common && npm install
- run: cd Model && npm install
- run: cd CommonServer && npm install
- run: cd CommonUI && npm install --force
- run: cd Dashboard && npm install && npm run compile && npm run dep-check
compile-model:
runs-on: ubuntu-latest
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 Model && npm install && npm run compile && npm run dep-check
compile-e2e:
runs-on: ubuntu-latest
env:
@@ -197,8 +143,6 @@ jobs:
with:
node-version: 18.3.0
- run: cd Common && npm install
- run: cd Model && npm install
- run: cd CommonServer && npm install
- run: cd Probe && npm install && npm run compile && npm run dep-check
compile-ingestor:
@@ -211,8 +155,6 @@ jobs:
with:
node-version: 18.3.0
- run: cd Common && npm install
- run: cd Model && npm install
- run: cd CommonServer && npm install
- run: cd Ingestor && npm install && npm run compile && npm run dep-check
@@ -226,9 +168,7 @@ jobs:
with:
node-version: 18.3.0
- run: cd Common && npm install
- run: cd Model && npm install
- run: cd CommonServer && npm install
- run: cd CommonUI && npm install --force
- run: cd StatusPage && npm install && npm run compile && npm run dep-check
compile-test-server:
@@ -241,6 +181,4 @@ jobs:
with:
node-version: 18.3.0
- run: cd Common && npm install
- run: cd Model && npm install
- run: cd CommonServer && npm install
- run: cd TestServer && npm install && npm run compile && npm run dep-check

View File

@@ -1,16 +0,0 @@
name: Misc / Dependabot Automerge
on:
pull_request:
jobs:
merge:
runs-on: ubuntu-latest
env:
CI_PIPELINE_ID: ${{github.run_number}}
steps:
- uses: actions/checkout@v2
- uses: ahmadnassri/action-dependabot-auto-merge@v2
with:
target: minor
github-token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,31 +0,0 @@
name: Playwright Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
env:
BASE_URL: http://localhost
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Run Server in Docker
run: npm run dev
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: cd Playwright && npm install && npx playwright install && npx playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30

View File

@@ -988,6 +988,93 @@ jobs:
run: npm run prerun
- name: Publish Infrastructure Agent
run: bash ./Scripts/NPM/PublishAllPackages.sh
llm-docker-image-deploy:
needs: generate-build-number
strategy:
fail-fast: false
runs-on: ubuntu-latest
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
- name: Docker Meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
oneuptime/llm
ghcr.io/oneuptime/llm
tags: |
type=raw,value=release,enable=true
type=semver,value=7.0.${{needs.generate-build-number.outputs.build_number}},pattern={{version}},enable=true
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: actions/setup-node@v2
with:
node-version: 18.3.0
# - name: Setup Git LFS
# run: git lfs install
# # Cannot do this, no space on the gitHub standard runner. We need to use the large runner which is selfhosted
# - name: Download the Model from Hugging Face
# run: mkdir -p ./LLM/Models && cd ./LLM/Models && git clone https://${{ secrets.HUGGING_FACE_USERNAME }}:${{ secrets.HUGGING_FACE_PASSWORD }}@huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct
- 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 nginx.
- 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: ./LLM/Dockerfile
context: ./LLM
# arm64 is not supported by the base image of the LLM
platforms: linux/amd64
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}}
@@ -1020,7 +1107,7 @@ jobs:
- name: Wait for server to start
run: bash ./Tests/Scripts/status-check.sh http://localhost
- name: Run E2E Tests. Run docker container e2e in docker compose file
run: export $(grep -v '^#' config.env | xargs) && docker-compose -f docker-compose.dev.yml up --exit-code-from e2e --abort-on-container-exit e2e || (docker-compose -f docker-compose.dev.yml logs e2e && exit 1)
run: export $(grep -v '^#' config.env | xargs) && docker compose -f docker-compose.dev.yml up --exit-code-from e2e --abort-on-container-exit e2e || (docker compose -f docker-compose.dev.yml logs e2e && exit 1)
- name: Upload test results
uses: actions/upload-artifact@v4
# Run this on failure
@@ -1046,7 +1133,7 @@ jobs:
test-e2e-release-self-hosted:
runs-on: ubuntu-latest
# After all the jobs runs
needs: [copilot-docker-image-deploy, accounts-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, dashboard-docker-image-deploy, haraka-docker-image-deploy, ingestor-docker-image-deploy, isolated-vm-docker-image-deploy, otel-collector-docker-image-deploy, probe-docker-image-deploy, status-page-docker-image-deploy, test-docker-image-deploy, test-server-docker-image-deploy, publish-npm-packages, e2e-docker-image-deploy, helm-chart-deploy, generate-build-number, nginx-docker-image-deploy]
needs: [copilot-docker-image-deploy, llm-docker-image-deploy, accounts-docker-image-deploy, admin-dashboard-docker-image-deploy, app-docker-image-deploy, dashboard-docker-image-deploy, haraka-docker-image-deploy, ingestor-docker-image-deploy, isolated-vm-docker-image-deploy, otel-collector-docker-image-deploy, probe-docker-image-deploy, status-page-docker-image-deploy, test-docker-image-deploy, test-server-docker-image-deploy, publish-npm-packages, e2e-docker-image-deploy, helm-chart-deploy, generate-build-number, nginx-docker-image-deploy]
env:
CI_PIPELINE_ID: ${{github.run_number}}
steps:
@@ -1073,7 +1160,7 @@ jobs:
- name: Wait for server to start
run: bash ./Tests/Scripts/status-check.sh http://localhost
- name: Run E2E Tests. Run docker container e2e in docker compose file
run: export $(grep -v '^#' config.env | xargs) && docker-compose -f docker-compose.dev.yml up --exit-code-from e2e --abort-on-container-exit e2e || (docker-compose -f docker-compose.dev.yml logs e2e && exit 1)
run: export $(grep -v '^#' config.env | xargs) && docker compose -f docker-compose.dev.yml up --exit-code-from e2e --abort-on-container-exit e2e || (docker compose -f docker-compose.dev.yml logs e2e && exit 1)
- name: Upload test results
uses: actions/upload-artifact@v4
# Run this on failure

View File

@@ -0,0 +1,32 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
name: "OneUptime Reliability Copilot"
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
# Run every day at midnight UTC
- cron: '0 0 * * *'
jobs:
analyze:
name: Analyze Code
runs-on: ubuntu-latest
steps:
# Run Reliability Copilot in Docker Container
- name: Run Copilot
run: |
docker run --rm \
-e ONEUPTIME_URL="https://test.oneuptime.com" \
-e ONEUPTIME_REPOSITORY_SECRET_KEY="${{ secrets.COPILOT_ONEUPTIME_REPOSITORY_SECRET_KEY }}" \
-e CODE_REPOSITORY_PASSWORD="${{ github.token }}" \
-e CODE_REPOSITORY_USERNAME="simlarsen" \
-e OPENAI_API_KEY="${{ secrets.OPENAI_API_KEY }}" \
--net=host oneuptime/copilot:test

View File

@@ -6,6 +6,7 @@ on:
- "master"
jobs:
generate-build-number:
runs-on: ubuntu-latest
outputs:
@@ -18,6 +19,92 @@ jobs:
token: ${{secrets.github_token}}
- run: echo "Build number is ${{ steps.buildnumber.outputs.build_number }}"
llm-docker-image-deploy:
needs: generate-build-number
strategy:
fail-fast: false
runs-on: ubuntu-latest
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
- name: Docker Meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
oneuptime/llm
ghcr.io/oneuptime/llm
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: Setup Git LFS
# run: git lfs install
# # Cannot do this, no space on the gitHub standard runner. We need to use the large runner which is selfhosted
# - name: Download the Model from Hugging Face
# run: mkdir -p ./LLM/Models && cd ./LLM/Models && git clone https://${{ secrets.HUGGING_FACE_USERNAME }}:${{ secrets.HUGGING_FACE_PASSWORD }}@huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct
- 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 nginx.
- 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: ./LLM/Dockerfile
context: ./LLM
# arm64 is not supported by the base image of the LLM
platforms: linux/amd64
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}}
nginx-docker-image-deploy:
needs: generate-build-number
@@ -941,7 +1028,7 @@ jobs:
test-helm-chart:
runs-on: ubuntu-latest
needs: [copilot-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: [llm-docker-image-deploy, copilot-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]
env:
CI_PIPELINE_ID: ${{github.run_number}}
steps:
@@ -980,7 +1067,7 @@ jobs:
- name: Wait for server to start
run: bash ./Tests/Scripts/status-check.sh http://localhost
- name: Run E2E Tests. Run docker container e2e in docker compose file
run: export $(grep -v '^#' config.env | xargs) && docker-compose -f docker-compose.dev.yml up --exit-code-from e2e --abort-on-container-exit e2e || (docker-compose -f docker-compose.dev.yml logs e2e && exit 1)
run: export $(grep -v '^#' config.env | xargs) && docker compose -f docker-compose.dev.yml up --exit-code-from e2e --abort-on-container-exit e2e || (docker compose -f docker-compose.dev.yml logs e2e && exit 1)
- name: Upload test results
uses: actions/upload-artifact@v4
# Run this on failure
@@ -1033,7 +1120,7 @@ jobs:
- name: Wait for server to start
run: bash ./Tests/Scripts/status-check.sh http://localhost
- name: Run E2E Tests. Run docker container e2e in docker compose file
run: export $(grep -v '^#' config.env | xargs) && docker-compose -f docker-compose.dev.yml up --exit-code-from e2e --abort-on-container-exit e2e || (docker-compose -f docker-compose.dev.yml logs e2e && exit 1)
run: export $(grep -v '^#' config.env | xargs) && docker compose -f docker-compose.dev.yml up --exit-code-from e2e --abort-on-container-exit e2e || (docker compose -f docker-compose.dev.yml logs e2e && exit 1)
- name: Upload test results
uses: actions/upload-artifact@v4
# Run this on failure

View File

@@ -1,24 +0,0 @@
name: Common Server Test
on:
pull_request:
push:
branches-ignore:
- 'hotfix-*' # excludes hotfix branches
- 'release'
jobs:
test:
runs-on: ubuntu-latest
env:
CI_PIPELINE_ID: ${{github.run_number}}
steps:
- uses: actions/checkout@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 CommonServer && bash test-setup.sh
- run: export $(grep -v '^#' config.env | xargs) && cd CommonServer && rm -rf build && npm run test

View File

@@ -12,11 +12,12 @@ jobs:
runs-on: ubuntu-latest
env:
CI_PIPELINE_ID: ${{github.run_number}}
BILLING_PRIVATE_KEY: ${{secrets.TEST_BILLING_PRIVATE_KEY}}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 18.3.0
- run: cd Model && npm install
- run: cd Common && npm install && npm run test
node-version: 18.3.0
- run: cd Common && bash test-setup.sh
- run: cd Common && npm install && rm -rf build && npm run test

View File

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

View File

@@ -35,7 +35,7 @@ jobs:
- name: Wait for server to start
run: bash ./Tests/Scripts/status-check.sh http://localhost
- name: Run E2E Tests. Run docker container e2e in docker compose file
run: export $(grep -v '^#' config.env | xargs) && docker-compose -f docker-compose.dev.yml up --exit-code-from e2e --abort-on-container-exit e2e || (docker-compose -f docker-compose.dev.yml logs e2e && exit 1)
run: export $(grep -v '^#' config.env | xargs) && docker compose -f docker-compose.dev.yml up --exit-code-from e2e --abort-on-container-exit e2e || (docker compose -f docker-compose.dev.yml logs e2e && exit 1)
- name: Upload test results
uses: actions/upload-artifact@v4
# Run this on failure

View File

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

View File

@@ -18,7 +18,6 @@ jobs:
with:
node-version: 18.3.0
- run: cd Common && npm install
- run: cd CommonServer && npm install
- run: cd Probe && npm install
- run: cd Probe && npm run test

7
.gitignore vendored
View File

@@ -93,12 +93,9 @@ Haraka/dkim/keys/public_base64.txt
HelmChart/Values/*.values.yaml
Llama/Models/tokenizer*
Llama/Models/llama*
LLM/__pycache__/*
Llama/__pycache__/*
Llama/Models/*
LLM/Models/*
Examples/otel-dotnet/obj/*

15
.oneuptime/README.md Normal file
View File

@@ -0,0 +1,15 @@
## OneUptime Copilot
This folder contains the configuration files for the OneUptime Copilot. The Copilot is a tool that automatically improves your code. It can fix issues, improve code quality, and help you ship faster.
This folder has the following structure:
- `config.js`: The configuration file for the Copilot. You can customize the Copilot's behavior by changing this file.
- `scripts`: A folder containing scripts that the Copilot runs. These are hooks that run at different stages of the Copilot's process.
- `on-after-clone.sh`: A script that runs after the Copilot clones your repository.
- `on-before-code-change.sh`: A script that runs before the Copilot makes changes to your code.
- `on-after-code-change.sh`: A script that runs after the Copilot makes changes to your code.
- `on-before-commit.sh`: A script that runs before the Copilot commits changes to your repository.
- `on-after-commit.sh`: A script that runs after the Copilot commits changes to your repository.

10
.oneuptime/config.js Normal file
View File

@@ -0,0 +1,10 @@
// This is the configuration file for the oneuptime copilot.
const getCopilotConfig = () => {
return {
// The version of the schema for this configuration file.
schemaVersion: '1.0',
}
}
export default getCopilotConfig;

View File

@@ -0,0 +1,16 @@
# Description: Copilot clones your repository and to improve your code.
# This scirpt runs after the clone process is completed.
# Some of the common tasks you can do here are:
# 1. Install dependencies
# 2. Run linting
# 3. Run tests
# 4. Run build
# 5. Run any other command that you want to run after the clone process is completed.
# If this script fails, copilot will not proceed with the next steps to improve your code.
# This step is to ensure that the code is in a good state before we start improving it.
# If you want to skip this script, you can keep this file empty.
# It's highly recommended to run linting and tests in this script to ensure the code is in a good state.
# This scirpt will run on ubuntu machine. So, make sure the commands you run are compatible with ubuntu.
npm install
npm run lint

View File

@@ -0,0 +1,13 @@
# Description: Copilot will run this script after we make improvements to your code and write it to disk.
# Some of the common tasks you can do here are:
# 1. Run linting
# 2. Run tests
# 3. Run build
# 4. Run any other command that you want to run after the code is changed.
# If this script fails, copilot will not commit the changes to your repository.
# This step is to ensure that the code is in a good state before we commit the changes.
# If you want to skip this script, you can keep this file empty.
# It's highly recommended to run linting and tests in this script to ensure the code is in a good state.
# This scirpt will run on ubuntu machine. So, make sure the commands you run are compatible with ubuntu.
npm run fix

View File

@@ -0,0 +1 @@
# Description: Copilot will run this script after the commit process is completed.

View File

@@ -0,0 +1,9 @@
# Description: Copilot will run this script before we make changes to your code.
# Some of the common tasks you can do here are:
# 1. Install dependencies
# 2. Run any other command that you want to run before the code is changed.
# If this script fails, copilot will not make any changes to the code.
# This step is to ensure that the code is in a good state before we start making changes.
# If you want to skip this script, you can keep this file empty.
# It's highly recommended to run things like installing dependencies in this script.
# This scirpt will run on ubuntu machine. So, make sure the commands you run are compatible with ubuntu.

View File

@@ -0,0 +1 @@
# Description: Copilot will run this script before we commit the changes to your repository.

View File

@@ -51,6 +51,3 @@ licenses/*
certifications/*
ApiReference/public/assets/*
JavaScriptSDK/src/cli/server-monitor/out/scripts/prettify/*
CommonServer/Tests/TestingUtils/__mocks__/Stripe.mock.ts

22
.vscode/launch.json vendored
View File

@@ -20,18 +20,18 @@
],
"configurations": [
{
"name": "Debug: Copilot Locally",
"request": "launch",
"localRoot": "${workspaceFolder}/Copilot",
"runtimeArgs": [
"run-script",
"start"
],
"runtimeExecutable": "npm",
"address": "127.0.0.1",
"localRoot": "${workspaceFolder}/TestServer",
"name": "Copilot: Debug with Docker",
"port": 9985,
"remoteRoot": "/usr/src/app",
"request": "attach",
"skipFiles": [
"<node_internals>/**"
],
"type": "node"
"type": "node",
"restart": true,
"autoAttachChildProcesses": true
},
{
"name": "Debug Infrastructure Agent",
@@ -218,12 +218,12 @@
"autoAttachChildProcesses": true
},
{
"name": "CommonServer: Debug Tests",
"name": "Common: Debug Tests",
"type": "node",
"restart": true,
"autoAttachChildProcesses": true,
"request": "launch",
"cwd": "${workspaceRoot}/CommonServer",
"cwd": "${workspaceRoot}/Common",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run-script",

View File

@@ -36,33 +36,17 @@ COPY ./Common /usr/src/Common
WORKDIR /usr/src/Model
COPY ./Model/package*.json /usr/src/Model/
# Set version in ./Model/package.json to the APP_VERSION
RUN sed -i "s/\"version\": \".*\"/\"version\": \"$APP_VERSION\"/g" /usr/src/Model/package.json
RUN npm install
COPY ./Model /usr/src/Model
WORKDIR /usr/src/CommonServer
COPY ./CommonServer/package*.json /usr/src/CommonServer/
# Set version in ./CommonServer/package.json to the APP_VERSION
RUN sed -i "s/\"version\": \".*\"/\"version\": \"$APP_VERSION\"/g" /usr/src/CommonServer/package.json
RUN npm install
COPY ./CommonServer /usr/src/CommonServer
# Install CommonUI
WORKDIR /usr/src/CommonUI
COPY ./CommonUI/package*.json /usr/src/CommonUI/
# Set version in ./CommonUI/package.json to the APP_VERSION
RUN sed -i "s/\"version\": \".*\"/\"version\": \"$APP_VERSION\"/g" /usr/src/CommonUI/package.json
RUN npm install --force
COPY ./CommonUI /usr/src/CommonUI

View File

@@ -1,7 +1,7 @@
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";
import Express, { ExpressApplication } from "Common/Server/Utils/Express";
import logger from "Common/Server/Utils/Logger";
import App from "Common/Server/Utils/StartServer";
export const APP_NAME: string = "accounts";

View File

@@ -9,13 +9,11 @@
"version": "0.1.0",
"dependencies": {
"Common": "file:../Common",
"CommonServer": "file:../CommonServer",
"CommonUI": "file:../CommonUI",
"css-loader": "^6.11.0",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"file-loader": "^6.2.0",
"Model": "file:../Model",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.23.1",
@@ -39,25 +37,81 @@
"version": "1.0.0",
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.24.6",
"@monaco-editor/react": "^4.4.6",
"@nivo/core": "^0.87.0",
"@nivo/line": "^0.87.0",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/context-zone": "^1.25.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.52.0",
"@opentelemetry/instrumentation": "^0.52.0",
"@opentelemetry/instrumentation-fetch": "^0.52.1",
"@opentelemetry/instrumentation-xml-http-request": "^0.52.1",
"@opentelemetry/resources": "^1.25.0",
"@opentelemetry/sdk-trace-web": "^1.23.0",
"@opentelemetry/semantic-conventions": "^1.25.0",
"@tippyjs/react": "^4.2.6",
"@types/crypto-js": "^4.2.2",
"@types/qrcode": "^1.5.5",
"@types/react-highlight": "^0.12.8",
"@types/react-syntax-highlighter": "^15.5.13",
"@types/uuid": "^8.3.4",
"axios": "^1.6.8",
"axios": "^1.7.2",
"Common": "file:../Common",
"crypto-js": "^4.1.1",
"formik": "^2.4.6",
"history": "^5.3.0",
"json5": "^2.2.3",
"jwt-decode": "^4.0.0",
"lodash": "^4.17.21",
"moment": "^2.30.1",
"moment-timezone": "^0.5.45",
"posthog-js": "^1.116.6",
"posthog-js": "^1.139.6",
"prop-types": "^15.8.1",
"qrcode": "^1.5.3",
"react": "^18.3.1",
"react-beautiful-dnd": "^13.1.1",
"react-big-calendar": "^1.13.0",
"react-color": "^2.19.3",
"react-dom": "^18.3.1",
"react-dropzone": "^14.2.2",
"react-error-boundary": "^4.0.13",
"react-highlight": "^0.15.0",
"react-markdown": "^8.0.3",
"react-router-dom": "^6.24.1",
"react-select": "^5.4.0",
"react-spinners": "^0.14.1",
"react-syntax-highlighter": "^15.5.0",
"react-toggle": "^4.1.3",
"reactflow": "^11.11.4",
"reflect-metadata": "^0.2.2",
"remark-gfm": "^3.0.1",
"slugify": "^1.6.5",
"socket.io-client": "^4.7.5",
"tippy.js": "^6.3.7",
"typeorm": "^0.3.20",
"universal-cookie": "^4.0.4",
"use-async-effect": "^2.2.6",
"uuid": "^8.3.2"
},
"devDependencies": {
"@faker-js/faker": "^8.0.2",
"@types/jest": "^27.5.2",
"@types/node": "^17.0.22",
"jest": "^27.5.1",
"ts-jest": "^27.1.4"
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^28.1.4",
"@types/lodash": "^4.14.202",
"@types/node": "^17.0.45",
"@types/react": "^18.2.38",
"@types/react-beautiful-dnd": "^13.1.2",
"@types/react-big-calendar": "^1.8.5",
"@types/react-color": "^3.0.6",
"@types/react-test-renderer": "^18.0.0",
"@types/react-toggle": "^4.0.3",
"jest": "^28.1.1",
"jest-environment-jsdom": "^29.7.0",
"react-test-renderer": "^18.2.0",
"ts-jest": "^28.0.5"
}
},
"../CommonServer": {
@@ -78,6 +132,7 @@
"@opentelemetry/sdk-metrics": "^1.21.0",
"@opentelemetry/sdk-node": "^0.48.0",
"@opentelemetry/sdk-trace-node": "^1.21.0",
"@types/crypto-js": "^4.2.2",
"acme-client": "^5.3.0",
"airtable": "^0.12.2",
"bullmq": "^5.3.3",
@@ -85,17 +140,19 @@
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"cron-parser": "^4.8.1",
"crypto-js": "^4.2.0",
"dotenv": "^16.4.4",
"ejs": "^3.1.10",
"express": "^4.19.2",
"ioredis": "^5.3.2",
"json2csv": "^5.0.7",
"jsonwebtoken": "^9.0.0",
"markdown-it": "^13.0.1",
"Model": "file:../Model",
"marked": "^12.0.2",
"node-cron": "^3.0.3",
"nodemailer": "^6.9.10",
"otpauth": "^9.3.1",
"pg": "^8.7.3",
"redis-semaphore": "^5.5.1",
"socket.io": "^4.7.4",
"stripe": "^10.17.0",
"twilio": "^4.22.0",
@@ -111,7 +168,6 @@
"@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",
@@ -123,44 +179,49 @@
"../CommonUI": {
"name": "@oneuptime/common-ui",
"version": "1.0.0",
"extraneous": true,
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.24.1",
"@babel/runtime": "^7.24.6",
"@monaco-editor/react": "^4.4.6",
"@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",
"@nivo/core": "^0.87.0",
"@nivo/line": "^0.87.0",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/context-zone": "^1.25.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.52.0",
"@opentelemetry/instrumentation": "^0.52.0",
"@opentelemetry/instrumentation-fetch": "^0.52.0",
"@opentelemetry/instrumentation-xml-http-request": "^0.52.1",
"@opentelemetry/resources": "^1.25.0",
"@opentelemetry/sdk-trace-web": "^1.23.0",
"@opentelemetry/semantic-conventions": "^1.25.0",
"@tippyjs/react": "^4.2.6",
"@types/react-highlight": "^0.12.8",
"@types/react-syntax-highlighter": "^15.5.13",
"Common": "file:../Common",
"formik": "^2.2.9",
"CommonProject": "file:../CommonProject",
"formik": "^2.4.6",
"history": "^5.3.0",
"jwt-decode": "^4.0.0",
"lodash": "^4.17.21",
"Model": "file:../Model",
"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.11.2",
"react-big-calendar": "^1.13.0",
"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.13",
"react-highlight": "^0.15.0",
"react-markdown": "^8.0.3",
"react-router-dom": "^6.22.3",
"react-router-dom": "^6.23.1",
"react-select": "^5.4.0",
"react-spinners": "^0.13.6",
"react-syntax-highlighter": "^15.5.0",
"react-toggle": "^4.1.3",
"reactflow": "^11.10.4",
"reactflow": "^11.11.1",
"remark-gfm": "^3.0.1",
"socket.io-client": "^4.7.5",
"tippy.js": "^6.3.7",
@@ -190,6 +251,7 @@
"../Model": {
"name": "@oneuptime/model",
"version": "1.0.0",
"extraneous": true,
"license": "Apache-2.0",
"dependencies": {
"Common": "file:../Common",
@@ -898,10 +960,6 @@
"resolved": "../CommonServer",
"link": true
},
"node_modules/CommonUI": {
"resolved": "../CommonUI",
"link": true
},
"node_modules/concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
@@ -1742,10 +1800,6 @@
"node": "*"
}
},
"node_modules/Model": {
"resolved": "../Model",
"link": true
},
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",

View File

@@ -27,13 +27,10 @@
},
"dependencies": {
"Common": "file:../Common",
"CommonServer": "file:../CommonServer",
"CommonUI": "file:../CommonUI",
"css-loader": "^6.11.0",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"file-loader": "^6.2.0",
"Model": "file:../Model",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.23.1",

View File

@@ -5,7 +5,7 @@ import NotFound from "./Pages/NotFound";
import RegisterPage from "./Pages/Register";
import ResetPasswordPage from "./Pages/ResetPassword";
import VerifyEmail from "./Pages/VerifyEmail";
import Navigation from "CommonUI/src/Utils/Navigation";
import Navigation from "Common/UI/Utils/Navigation";
import React, { ReactElement } from "react";
import {
Route,

View File

@@ -1,11 +1,11 @@
import App from "./App";
import Telemetry from "CommonUI/src/Utils/Telemetry";
import Telemetry from "Common/UI/Utils/Telemetry";
import React from "react";
import ReactDOM from "react-dom/client";
import { BrowserRouter } from "react-router-dom";
Telemetry.init({
serviceName: "Accounts",
serviceName: "accounts",
});
const root: any = ReactDOM.createRoot(

View File

@@ -1,11 +1,11 @@
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 ModelForm, { FormType } from "Common/UI/Components/Forms/ModelForm";
import FormFieldSchemaType from "Common/UI/Components/Forms/Types/FormFieldSchemaType";
import Link from "Common/UI/Components/Link/Link";
import OneUptimeLogo from "Common/UI/Images/logos/OneUptimeSVG/3-transparent.svg";
import User from "Common/Models/DatabaseModels/User";
import React, { useState } from "react";
const ForgotPassword: () => JSX.Element = () => {

View File

@@ -1,19 +1,28 @@
import { LOGIN_API_URL } from "../Utils/ApiPaths";
import {
LOGIN_API_URL,
VERIFY_TWO_FACTOR_AUTH_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 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 { JSONArray, JSONObject } from "Common/Types/JSON";
import ModelForm, { FormType } from "Common/UI/Components/Forms/ModelForm";
import FormFieldSchemaType from "Common/UI/Components/Forms/Types/FormFieldSchemaType";
import Link from "Common/UI/Components/Link/Link";
import { DASHBOARD_URL } from "Common/UI/Config";
import OneUptimeLogo from "Common/UI/Images/logos/OneUptimeSVG/3-transparent.svg";
import UiAnalytics from "Common/UI/Utils/Analytics";
import LoginUtil from "Common/UI/Utils/Login";
import UserTwoFactorAuth from "Common/Models/DatabaseModels/UserTwoFactorAuth";
import Navigation from "Common/UI/Utils/Navigation";
import UserUtil from "Common/UI/Utils/User";
import User from "Common/Models/DatabaseModels/User";
import React from "react";
import useAsyncEffect from "use-async-effect";
import StaticModelList from "Common/UI/Components/ModelList/StaticModelList";
import BasicForm from "Common/UI/Components/Forms/BasicForm";
import API from "Common/UI/Utils/API/API";
import HTTPErrorResponse from "Common/Types/API/HTTPErrorResponse";
import HTTPResponse from "Common/Types/API/HTTPResponse";
const LoginPage: () => JSX.Element = () => {
const apiUrl: URL = LOGIN_API_URL;
@@ -24,6 +33,22 @@ const LoginPage: () => JSX.Element = () => {
const [initialValues, setInitialValues] = React.useState<JSONObject>({});
const [showTwoFactorAuth, setShowTwoFactorAuth] =
React.useState<boolean>(false);
const [twoFactorAuthList, setTwoFactorAuthList] = React.useState<
UserTwoFactorAuth[]
>([]);
const [selectedTwoFactorAuth, setSelectedTwoFactorAuth] = React.useState<
UserTwoFactorAuth | undefined
>(undefined);
const [isTwoFactorAuthLoading, setIsTwoFactorAuthLoading] =
React.useState<boolean>(false);
const [twofactorAuthError, setTwoFactorAuthError] =
React.useState<string>("");
useAsyncEffect(async () => {
if (Navigation.getQueryStringByName("email")) {
setInitialValues({
@@ -32,6 +57,20 @@ const LoginPage: () => JSX.Element = () => {
}
}, []);
type LoginFunction = (user: User, miscData: JSONObject) => void;
const login: LoginFunction = (user: User, miscData: JSONObject): void => {
if (user instanceof User && user && user.email) {
UiAnalytics.userAuth(user.email);
UiAnalytics.capture("accounts/login");
}
LoginUtil.login({
user: user,
token: miscData ? miscData["token"] : undefined,
});
};
return (
<div className="flex min-h-full flex-col justify-center py-12 sm:px-6 lg:px-8">
<div className="">
@@ -40,89 +79,211 @@ const LoginPage: () => JSX.Element = () => {
src={OneUptimeLogo}
alt="OneUptime"
/>
<h2 className="mt-6 text-center text-2xl tracking-tight text-gray-900">
Sign in to your account
</h2>
<p className="mt-2 text-center text-sm text-gray-600">
Join thousands of business that use OneUptime to help them stay online
all the time.
</p>
{!showTwoFactorAuth && (
<>
<h2 className="mt-6 text-center text-2xl tracking-tight text-gray-900">
Sign in to your account
</h2>
<p className="mt-2 text-center text-sm text-gray-600">
Join thousands of business that use OneUptime to help them stay
online all the time.
</p>
</>
)}
{showTwoFactorAuth && (
<>
<h2 className="mt-6 text-center text-2xl tracking-tight text-gray-900">
Two Factor Authentication
</h2>
<p className="mt-2 text-center text-sm text-gray-600">
Select two factor authentication method. You will be asked to
enter a code from the selected method.
</p>
</>
)}
</div>
<div className="mt-8 sm:mx-auto sm:w-full sm:max-w-md">
<div className="bg-white py-8 px-4 shadow sm:rounded-lg sm:px-10">
<ModelForm<User>
modelType={User}
id="login-form"
name="Login"
fields={[
{
field: {
email: true,
{!showTwoFactorAuth && (
<ModelForm<User>
modelType={User}
id="login-form"
name="Login"
fields={[
{
field: {
email: true,
},
fieldType: FormFieldSchemaType.Email,
placeholder: "jeff@example.com",
required: true,
disabled: Boolean(initialValues && initialValues["email"]),
title: "Email",
dataTestId: "email",
},
fieldType: FormFieldSchemaType.Email,
placeholder: "jeff@example.com",
required: true,
disabled: Boolean(initialValues && initialValues["email"]),
title: "Email",
dataTestId: "email",
},
{
field: {
password: true,
{
field: {
password: true,
},
title: "Password",
required: true,
validation: {
minLength: 6,
},
fieldType: FormFieldSchemaType.Password,
sideLink: {
text: "Forgot password?",
url: new Route("/accounts/forgot-password"),
openLinkInNewTab: false,
},
dataTestId: "password",
},
title: "Password",
required: true,
validation: {
minLength: 6,
},
fieldType: FormFieldSchemaType.Password,
sideLink: {
text: "Forgot password?",
url: new Route("/accounts/forgot-password"),
openLinkInNewTab: false,
},
dataTestId: "password",
},
]}
createOrUpdateApiUrl={apiUrl}
formType={FormType.Create}
submitButtonText={"Login"}
onSuccess={(value: User, miscData: JSONObject | undefined) => {
if (value && value.email) {
UiAnalytics.userAuth(value.email);
UiAnalytics.capture("accounts/login");
}
]}
createOrUpdateApiUrl={apiUrl}
formType={FormType.Create}
submitButtonText={"Login"}
onBeforeCreate={(data: User) => {
setInitialValues(User.toJSON(data, User));
return Promise.resolve(data);
}}
onSuccess={(
value: User | JSONObject,
miscData: JSONObject | undefined,
) => {
if (
miscData &&
(miscData as JSONObject)["twoFactorAuth"] === true
) {
const twoFactorAuthList: Array<UserTwoFactorAuth> =
UserTwoFactorAuth.fromJSONArray(
(miscData as JSONObject)[
"twoFactorAuthList"
] as JSONArray,
UserTwoFactorAuth,
);
setTwoFactorAuthList(twoFactorAuthList);
setShowTwoFactorAuth(true);
return;
}
LoginUtil.login({
user: value,
token: miscData ? miscData["token"] : undefined,
});
}}
maxPrimaryButtonWidth={true}
footer={
<div className="actions text-center mt-4 hover:underline fw-semibold">
<div>
<Link to={new Route("/accounts/sso")}>
<div className="text-indigo-500 hover:text-indigo-900 cursor-pointer text-sm">
Use single sign-on (SSO) instead
</div>
</Link>
login(value as User, miscData as JSONObject);
}}
maxPrimaryButtonWidth={true}
footer={
<div className="actions text-center mt-4 hover:underline fw-semibold">
<div>
<Link to={new Route("/accounts/sso")}>
<div className="text-indigo-500 hover:text-indigo-900 cursor-pointer text-sm">
Use single sign-on (SSO) instead
</div>
</Link>
</div>
</div>
</div>
}
/>
}
/>
)}
{showTwoFactorAuth && !selectedTwoFactorAuth && (
<StaticModelList<UserTwoFactorAuth>
titleField="name"
descriptionField=""
selectedItems={[]}
list={twoFactorAuthList}
onClick={(item: UserTwoFactorAuth) => {
setSelectedTwoFactorAuth(item);
}}
/>
)}
{showTwoFactorAuth && selectedTwoFactorAuth && (
<BasicForm
id="two-factor-auth-form"
name="Two Factor Auth"
fields={[
{
field: {
code: true,
},
title: "Code",
description: "Enter the code from your authenticator app",
required: true,
dataTestId: "code",
fieldType: FormFieldSchemaType.Text,
},
]}
submitButtonText={"Login"}
maxPrimaryButtonWidth={true}
isLoading={isTwoFactorAuthLoading}
error={twofactorAuthError}
onSubmit={async (data: JSONObject) => {
setIsTwoFactorAuthLoading(true);
try {
const code: string = data["code"] as string;
const twoFactorAuthId: string =
selectedTwoFactorAuth.id?.toString() as string;
const result: HTTPErrorResponse | HTTPResponse<JSONObject> =
await API.post(VERIFY_TWO_FACTOR_AUTH_API_URL, {
data: {
...initialValues,
code: code,
twoFactorAuthId: twoFactorAuthId,
},
});
if (result instanceof HTTPErrorResponse) {
throw result;
}
const user: User = User.fromJSON(
result["data"] as JSONObject,
User,
) as User;
const miscData: JSONObject = (result["data"] as JSONObject)[
"miscData"
] as JSONObject;
login(user as User, miscData as JSONObject);
} catch (error) {
setTwoFactorAuthError(
API.getFriendlyErrorMessage(error as Error),
);
}
setIsTwoFactorAuthLoading(false);
}}
/>
)}
</div>
<div className="mt-10 text-center">
<div className="text-muted mb-0 text-gray-500">
Don&apos;t have an account?{" "}
<Link
to={new Route("/accounts/register")}
className="text-indigo-500 hover:text-indigo-900 cursor-pointer"
>
Register.
</Link>
</div>
{!selectedTwoFactorAuth && (
<div className="text-muted mb-0 text-gray-500">
Don&apos;t have an account?{" "}
<Link
to={new Route("/accounts/register")}
className="text-indigo-500 hover:text-indigo-900 cursor-pointer"
>
Register.
</Link>
</div>
)}
{selectedTwoFactorAuth ? (
<div className="text-muted mb-0 text-gray-500">
<Link
onClick={() => {
setSelectedTwoFactorAuth(undefined);
}}
className="text-indigo-500 hover:text-indigo-900 cursor-pointer"
>
Select a different two factor authentication method
</Link>
</div>
) : (
<></>
)}
</div>
</div>
</div>

View File

@@ -2,22 +2,22 @@ import { SERVICE_PROVIDER_LOGIN_URL } from "../Utils/ApiPaths";
import Route from "Common/Types/API/Route";
import URL from "Common/Types/API/URL";
import { JSONArray, JSONObject } from "Common/Types/JSON";
import FormFieldSchemaType from "CommonUI/src/Components/Forms/Types/FormFieldSchemaType";
import Link from "CommonUI/src/Components/Link/Link";
import { DASHBOARD_URL, IDENTITY_URL } from "CommonUI/src/Config";
import OneUptimeLogo from "CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg";
import Navigation from "CommonUI/src/Utils/Navigation";
import UserUtil from "CommonUI/src/Utils/User";
import User from "Model/Models/User";
import FormFieldSchemaType from "Common/UI/Components/Forms/Types/FormFieldSchemaType";
import Link from "Common/UI/Components/Link/Link";
import { DASHBOARD_URL, IDENTITY_URL } from "Common/UI/Config";
import OneUptimeLogo from "Common/UI/Images/logos/OneUptimeSVG/3-transparent.svg";
import Navigation from "Common/UI/Utils/Navigation";
import UserUtil from "Common/UI/Utils/User";
import User from "Common/Models/DatabaseModels/User";
import React, { ReactElement, useState } from "react";
import ProjectSSO from "Model/Models/ProjectSso";
import PageLoader from "CommonUI/src/Components/Loader/PageLoader";
import API from "CommonUI/src/Utils/API/API";
import BasicForm from "CommonUI/src/Components/Forms/BasicForm";
import ProjectSSO from "Common/Models/DatabaseModels/ProjectSso";
import PageLoader from "Common/UI/Components/Loader/PageLoader";
import API from "Common/UI/Utils/API/API";
import BasicForm from "Common/UI/Components/Forms/BasicForm";
import Email from "Common/Types/Email";
import HTTPErrorResponse from "Common/Types/API/HTTPErrorResponse";
import HTTPResponse from "Common/Types/API/HTTPResponse";
import StaticModelList from "CommonUI/src/Components/ModelList/StaticModelList";
import StaticModelList from "Common/UI/Components/ModelList/StaticModelList";
const LoginPage: () => JSX.Element = () => {
const apiUrl: URL = SERVICE_PROVIDER_LOGIN_URL;

View File

@@ -3,23 +3,23 @@ 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 LoginUtil from "CommonUI/src/Utils/Login";
import ModelAPI, { ListResult } from "CommonUI/src/Utils/ModelAPI/ModelAPI";
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 ErrorMessage from "Common/UI/Components/ErrorMessage/ErrorMessage";
import ModelForm, { FormType } from "Common/UI/Components/Forms/ModelForm";
import Fields from "Common/UI/Components/Forms/Types/Fields";
import FormFieldSchemaType from "Common/UI/Components/Forms/Types/FormFieldSchemaType";
import Link from "Common/UI/Components/Link/Link";
import PageLoader from "Common/UI/Components/Loader/PageLoader";
import { BILLING_ENABLED, DASHBOARD_URL } from "Common/UI/Config";
import OneUptimeLogo from "Common/UI/Images/logos/OneUptimeSVG/3-transparent.svg";
import BaseAPI from "Common/UI/Utils/API/API";
import UiAnalytics from "Common/UI/Utils/Analytics";
import LocalStorage from "Common/UI/Utils/LocalStorage";
import LoginUtil from "Common/UI/Utils/Login";
import ModelAPI, { ListResult } from "Common/UI/Utils/ModelAPI/ModelAPI";
import Navigation from "Common/UI/Utils/Navigation";
import UserUtil from "Common/UI/Utils/User";
import Reseller from "Common/Models/DatabaseModels/Reseller";
import User from "Common/Models/DatabaseModels/User";
import React, { useState } from "react";
import useAsyncEffect from "use-async-effect";

View File

@@ -1,12 +1,12 @@
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 ModelForm, { FormType } from "Common/UI/Components/Forms/ModelForm";
import FormFieldSchemaType from "Common/UI/Components/Forms/Types/FormFieldSchemaType";
import Link from "Common/UI/Components/Link/Link";
import OneUptimeLogo from "Common/UI/Images/logos/OneUptimeSVG/3-transparent.svg";
import Navigation from "Common/UI/Utils/Navigation";
import User from "Common/Models/DatabaseModels/User";
import React, { useState } from "react";
const RegisterPage: () => JSX.Element = () => {

View File

@@ -3,14 +3,14 @@ import Route from "Common/Types/API/Route";
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 OneUptimeLogo from "CommonUI/src/Images/logos/OneUptimeSVG/3-transparent.svg";
import API from "CommonUI/src/Utils/API/API";
import ModelAPI from "CommonUI/src/Utils/ModelAPI/ModelAPI";
import Navigation from "CommonUI/src/Utils/Navigation";
import EmailVerificationToken from "Model/Models/EmailVerificationToken";
import { FormType } from "Common/UI/Components/Forms/ModelForm";
import Link from "Common/UI/Components/Link/Link";
import PageLoader from "Common/UI/Components/Loader/PageLoader";
import OneUptimeLogo from "Common/UI/Images/logos/OneUptimeSVG/3-transparent.svg";
import API from "Common/UI/Utils/API/API";
import ModelAPI from "Common/UI/Utils/ModelAPI/ModelAPI";
import Navigation from "Common/UI/Utils/Navigation";
import EmailVerificationToken from "Common/Models/DatabaseModels/EmailVerificationToken";
import React, { useEffect, useState } from "react";
const VerifyEmail: () => JSX.Element = () => {

View File

@@ -1,6 +1,6 @@
import Route from "Common/Types/API/Route";
import URL from "Common/Types/API/URL";
import { IDENTITY_URL } from "CommonUI/src/Config";
import { IDENTITY_URL } from "Common/UI/Config";
export const SIGNUP_API_URL: URL = URL.fromURL(IDENTITY_URL).addRoute(
new Route("/signup"),
@@ -9,6 +9,10 @@ export const LOGIN_API_URL: URL = URL.fromURL(IDENTITY_URL).addRoute(
new Route("/login"),
);
export const VERIFY_TWO_FACTOR_AUTH_API_URL: URL = URL.fromURL(
IDENTITY_URL,
).addRoute(new Route("/verify-two-factor-auth"));
export const SERVICE_PROVIDER_LOGIN_URL: URL = URL.fromURL(
IDENTITY_URL,
).addRoute(new Route("/service-provider-login"));

View File

@@ -35,33 +35,17 @@ RUN npm install
COPY ./Common /usr/src/Common
WORKDIR /usr/src/Model
COPY ./Model/package*.json /usr/src/Model/
# Set version in ./Model/package.json to the APP_VERSION
RUN sed -i "s/\"version\": \".*\"/\"version\": \"$APP_VERSION\"/g" /usr/src/Model/package.json
RUN npm install
COPY ./Model /usr/src/Model
WORKDIR /usr/src/CommonServer
COPY ./CommonServer/package*.json /usr/src/CommonServer/
# Set version in ./CommonServer/package.json to the APP_VERSION
RUN sed -i "s/\"version\": \".*\"/\"version\": \"$APP_VERSION\"/g" /usr/src/CommonServer/package.json
RUN npm install
COPY ./CommonServer /usr/src/CommonServer
# Install CommonUI
WORKDIR /usr/src/CommonUI
COPY ./CommonUI/package*.json /usr/src/CommonUI/
# Set version in ./CommonUI/package.json to the APP_VERSION
RUN sed -i "s/\"version\": \".*\"/\"version\": \"$APP_VERSION\"/g" /usr/src/CommonUI/package.json
RUN npm install --force
COPY ./CommonUI /usr/src/CommonUI

View File

@@ -1,7 +1,7 @@
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";
import Express, { ExpressApplication } from "Common/Server/Utils/Express";
import logger from "Common/Server/Utils/Logger";
import App from "Common/Server/Utils/StartServer";
export const APP_NAME: string = "admin";

View File

@@ -9,11 +9,9 @@
"version": "0.1.0",
"dependencies": {
"Common": "file:../Common",
"CommonServer": "file:../CommonServer",
"CommonUI": "file:../CommonUI",
"dotenv": "^16.4.5",
"file-loader": "^6.2.0",
"Model": "file:../Model",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.23.1",
@@ -39,25 +37,81 @@
"version": "1.0.0",
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.24.6",
"@monaco-editor/react": "^4.4.6",
"@nivo/core": "^0.87.0",
"@nivo/line": "^0.87.0",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/context-zone": "^1.25.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.52.0",
"@opentelemetry/instrumentation": "^0.52.0",
"@opentelemetry/instrumentation-fetch": "^0.52.1",
"@opentelemetry/instrumentation-xml-http-request": "^0.52.1",
"@opentelemetry/resources": "^1.25.0",
"@opentelemetry/sdk-trace-web": "^1.23.0",
"@opentelemetry/semantic-conventions": "^1.25.0",
"@tippyjs/react": "^4.2.6",
"@types/crypto-js": "^4.2.2",
"@types/qrcode": "^1.5.5",
"@types/react-highlight": "^0.12.8",
"@types/react-syntax-highlighter": "^15.5.13",
"@types/uuid": "^8.3.4",
"axios": "^1.6.8",
"axios": "^1.7.2",
"Common": "file:../Common",
"crypto-js": "^4.1.1",
"formik": "^2.4.6",
"history": "^5.3.0",
"json5": "^2.2.3",
"jwt-decode": "^4.0.0",
"lodash": "^4.17.21",
"moment": "^2.30.1",
"moment-timezone": "^0.5.45",
"posthog-js": "^1.130.1",
"posthog-js": "^1.139.6",
"prop-types": "^15.8.1",
"qrcode": "^1.5.3",
"react": "^18.3.1",
"react-beautiful-dnd": "^13.1.1",
"react-big-calendar": "^1.13.0",
"react-color": "^2.19.3",
"react-dom": "^18.3.1",
"react-dropzone": "^14.2.2",
"react-error-boundary": "^4.0.13",
"react-highlight": "^0.15.0",
"react-markdown": "^8.0.3",
"react-router-dom": "^6.24.1",
"react-select": "^5.4.0",
"react-spinners": "^0.14.1",
"react-syntax-highlighter": "^15.5.0",
"react-toggle": "^4.1.3",
"reactflow": "^11.11.4",
"reflect-metadata": "^0.2.2",
"remark-gfm": "^3.0.1",
"slugify": "^1.6.5",
"socket.io-client": "^4.7.5",
"tippy.js": "^6.3.7",
"typeorm": "^0.3.20",
"universal-cookie": "^4.0.4",
"use-async-effect": "^2.2.6",
"uuid": "^8.3.2"
},
"devDependencies": {
"@faker-js/faker": "^8.0.2",
"@types/jest": "^27.5.2",
"@types/node": "^17.0.22",
"jest": "^27.5.1",
"ts-jest": "^27.1.4"
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^14.4.3",
"@types/jest": "^28.1.4",
"@types/lodash": "^4.14.202",
"@types/node": "^17.0.45",
"@types/react": "^18.2.38",
"@types/react-beautiful-dnd": "^13.1.2",
"@types/react-big-calendar": "^1.8.5",
"@types/react-color": "^3.0.6",
"@types/react-test-renderer": "^18.0.0",
"@types/react-toggle": "^4.0.3",
"jest": "^28.1.1",
"jest-environment-jsdom": "^29.7.0",
"react-test-renderer": "^18.2.0",
"ts-jest": "^28.0.5"
}
},
"../CommonServer": {
@@ -78,6 +132,7 @@
"@opentelemetry/sdk-metrics": "^1.21.0",
"@opentelemetry/sdk-node": "^0.48.0",
"@opentelemetry/sdk-trace-node": "^1.21.0",
"@types/crypto-js": "^4.2.2",
"acme-client": "^5.3.0",
"airtable": "^0.12.2",
"bullmq": "^5.3.3",
@@ -85,6 +140,7 @@
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"cron-parser": "^4.8.1",
"crypto-js": "^4.2.0",
"dotenv": "^16.4.4",
"ejs": "^3.1.10",
"express": "^4.19.2",
@@ -92,9 +148,9 @@
"json2csv": "^5.0.7",
"jsonwebtoken": "^9.0.0",
"marked": "^12.0.2",
"Model": "file:../Model",
"node-cron": "^3.0.3",
"nodemailer": "^6.9.10",
"otpauth": "^9.3.1",
"pg": "^8.7.3",
"redis-semaphore": "^5.5.1",
"socket.io": "^4.7.4",
@@ -123,42 +179,47 @@
"../CommonUI": {
"name": "@oneuptime/common-ui",
"version": "1.0.0",
"extraneous": true,
"license": "Apache-2.0",
"dependencies": {
"@babel/runtime": "^7.24.1",
"@babel/runtime": "^7.24.6",
"@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",
"@nivo/core": "^0.87.0",
"@nivo/line": "^0.87.0",
"@opentelemetry/api": "^1.9.0",
"@opentelemetry/context-zone": "^1.25.0",
"@opentelemetry/exporter-trace-otlp-http": "^0.52.0",
"@opentelemetry/instrumentation": "^0.52.0",
"@opentelemetry/instrumentation-fetch": "^0.52.0",
"@opentelemetry/instrumentation-xml-http-request": "^0.52.1",
"@opentelemetry/resources": "^1.25.0",
"@opentelemetry/sdk-trace-web": "^1.23.0",
"@opentelemetry/semantic-conventions": "^1.23.0",
"@opentelemetry/semantic-conventions": "^1.25.0",
"@tippyjs/react": "^4.2.6",
"@types/react-highlight": "^0.12.8",
"@types/react-syntax-highlighter": "^15.5.13",
"Common": "file:../Common",
"CommonProject": "file:../CommonProject",
"formik": "^2.4.6",
"history": "^5.3.0",
"jwt-decode": "^4.0.0",
"lodash": "^4.17.21",
"Model": "file:../Model",
"moment-timezone": "^0.5.45",
"prop-types": "^15.8.1",
"react": "^18.3.1",
"react-beautiful-dnd": "^13.1.1",
"react-big-calendar": "^1.11.2",
"react-big-calendar": "^1.13.0",
"react-color": "^2.19.3",
"react-dom": "^18.3.1",
"react-dropzone": "^14.2.2",
"react-error-boundary": "^4.0.13",
"react-highlight": "^0.15.0",
"react-markdown": "^8.0.3",
"react-router-dom": "^6.22.3",
"react-router-dom": "^6.23.1",
"react-select": "^5.4.0",
"react-spinners": "^0.13.6",
"react-syntax-highlighter": "^15.5.0",
"react-toggle": "^4.1.3",
"reactflow": "^11.11.1",
"remark-gfm": "^3.0.1",
@@ -190,6 +251,7 @@
"../Model": {
"name": "@oneuptime/model",
"version": "1.0.0",
"extraneous": true,
"license": "Apache-2.0",
"dependencies": {
"Common": "file:../Common",
@@ -6874,10 +6936,6 @@
"resolved": "../CommonServer",
"link": true
},
"node_modules/CommonUI": {
"resolved": "../CommonUI",
"link": true
},
"node_modules/compressible": {
"version": "2.0.18",
"resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz",
@@ -14250,10 +14308,6 @@
"mkdirp": "bin/cmd.js"
}
},
"node_modules/Model": {
"resolved": "../Model",
"link": true
},
"node_modules/ms": {
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",

View File

@@ -4,11 +4,9 @@
"private": false,
"dependencies": {
"Common": "file:../Common",
"CommonServer": "file:../CommonServer",
"CommonUI": "file:../CommonUI",
"dotenv": "^16.4.5",
"file-loader": "^6.2.0",
"Model": "file:../Model",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.23.1",

View File

@@ -12,9 +12,9 @@ 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 { ACCOUNTS_URL, DASHBOARD_URL } from "Common/UI/Config";
import Navigation from "Common/UI/Utils/Navigation";
import User from "Common/UI/Utils/User";
import React from "react";
import {
Route as PageRoute,
@@ -23,6 +23,10 @@ import {
useNavigate,
useParams,
} from "react-router-dom";
import UserView from "./Pages/Users/View/Index";
import UserDelete from "./Pages/Users/View/Delete";
import ProjectView from "./Pages/Projects/View/Index";
import ProjectDelete from "./Pages/Projects/View/Delete";
const App: () => JSX.Element = () => {
Navigation.setNavigateHook(useNavigate());
@@ -61,6 +65,26 @@ const App: () => JSX.Element = () => {
element={<Users />}
/>
<PageRoute
path={RouteMap[PageMap.USER_VIEW]?.toString() || ""}
element={<UserView />}
/>
<PageRoute
path={RouteMap[PageMap.USER_DELETE]?.toString() || ""}
element={<UserDelete />}
/>
<PageRoute
path={RouteMap[PageMap.PROJECT_VIEW]?.toString() || ""}
element={<ProjectView />}
/>
<PageRoute
path={RouteMap[PageMap.PROJECT_DELETE]?.toString() || ""}
element={<ProjectDelete />}
/>
<PageRoute
path={RouteMap[PageMap.LOGOUT]?.toString() || ""}
element={<Logout />}

View File

@@ -5,9 +5,9 @@ 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 Footer from "Common/UI/Components/Footer/Footer";
import ConfirmModal from "Common/UI/Components/Modal/ConfirmModal";
import { HOST, HTTP_PROTOCOL } from "Common/UI/Config";
import React from "react";
const DashboardFooter: () => JSX.Element = () => {

View File

@@ -1,10 +1,10 @@
import Help from "./Help";
import Logo from "./Logo";
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 Button, { ButtonStyleType } from "Common/UI/Components/Button/Button";
import Header from "Common/UI/Components/Header/Header";
import { DASHBOARD_URL } from "Common/UI/Config";
import Navigation from "Common/UI/Utils/Navigation";
import React, { FunctionComponent, ReactElement } from "react";
const DashboardHeader: FunctionComponent = (): ReactElement => {

View File

@@ -1,9 +1,9 @@
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 HeaderIconDropdownButton from "Common/UI/Components/Header/HeaderIconDropdownButton";
import IconDropdownItem from "Common/UI/Components/Header/IconDropdown/IconDropdownItem";
import IconDropdownMenu from "Common/UI/Components/Header/IconDropdown/IconDropdownMenu";
import IconDropdownRow from "Common/UI/Components/Header/IconDropdown/IconDropdownRow";
import React, { ReactElement, useState } from "react";
const Help: () => JSX.Element = (): ReactElement => {

View File

@@ -1,7 +1,7 @@
// Tailwind
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 Image from "Common/UI/Components/Image/Image";
import OneUptimeLogo from "Common/UI/Images/logos/OneUptimeSVG/3-transparent.svg";
import React, { FunctionComponent, ReactElement } from "react";
export interface ComponentProps {

View File

@@ -1,7 +1,7 @@
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 HeaderIconDropdownButton from "Common/UI/Components/Header/HeaderIconDropdownButton";
import NotificationItem from "Common/UI/Components/Header/Notifications/NotificationItem";
import Notifications from "Common/UI/Components/Header/Notifications/Notifications";
import React, { ReactElement, useState } from "react";
const DashboardHeader: () => JSX.Element = (): ReactElement => {

View File

@@ -1,16 +1,16 @@
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 { FormType } from "Common/UI/Components/Forms/ModelForm";
import Field from "Common/UI/Components/Forms/Types/Field";
import FormFieldSchemaType from "Common/UI/Components/Forms/Types/FormFieldSchemaType";
import ProjectPicker from "Common/UI/Components/Header/ProjectPicker/ProjectPicker";
import ModelFormModal from "Common/UI/Components/ModelFormModal/ModelFormModal";
import { RadioButton } from "Common/UI/Components/RadioButtons/GroupRadioButtons";
import Toggle from "Common/UI/Components/Toggle/Toggle";
import { BILLING_ENABLED, getAllEnvVars } from "Common/UI/Config";
import { GetReactElementFunction } from "Common/UI/Types/FunctionTypes";
import ProjectUtil from "Common/UI/Utils/Project";
import Project from "Common/Models/DatabaseModels/Project";
import React, {
FunctionComponent,
ReactElement,

View File

@@ -1,5 +1,5 @@
import SearchBox from "CommonUI/src/Components/Header/SearchBox";
import Project from "Model/Models/Project";
import SearchBox from "Common/UI/Components/Header/SearchBox";
import Project from "Common/Models/DatabaseModels/Project";
import React, { FunctionComponent, ReactElement } from "react";
export interface ComponentProps {

View File

@@ -2,13 +2,13 @@ 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 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 { 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 HeaderIconDropdownButton from "Common/UI/Components/Header/HeaderIconDropdownButton";
import IconDropdownItem from "Common/UI/Components/Header/IconDropdown/IconDropdownItem";
import IconDropdownMenu from "Common/UI/Components/Header/IconDropdown/IconDropdownMenu";
import { DASHBOARD_URL } from "Common/UI/Config";
import BlankProfilePic from "Common/UI/Images/users/blank-profile.svg";
import Navigation from "Common/UI/Utils/Navigation";
import User from "Common/UI/Utils/User";
import React, { FunctionComponent, ReactElement, useState } from "react";
const DashboardUserProfile: FunctionComponent = (): ReactElement => {

View File

@@ -1,8 +1,8 @@
import Footer from "../Footer/Footer";
import Header from "../Header/Header";
import NavBar from "../NavBar/NavBar";
import MasterPage from "CommonUI/src/Components/MasterPage/MasterPage";
import TopAlert from "CommonUI/src/Components/TopAlert/TopAlert";
import MasterPage from "Common/UI/Components/MasterPage/MasterPage";
import TopAlert from "Common/UI/Components/TopAlert/TopAlert";
import React, { FunctionComponent, ReactElement } from "react";
export interface ComponentProps {

View File

@@ -2,8 +2,8 @@ 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 NavBar from "Common/UI/Components/Navbar/NavBar";
import NavBarItem from "Common/UI/Components/Navbar/NavBarItem";
import React, { FunctionComponent, ReactElement } from "react";
const DashboardNavbar: FunctionComponent = (): ReactElement => {

View File

@@ -1,11 +1,11 @@
import App from "./App";
import Telemetry from "CommonUI/src/Utils/Telemetry";
import Telemetry from "Common/UI/Utils/Telemetry";
import React from "react";
import ReactDOM from "react-dom/client";
import { BrowserRouter } from "react-router-dom";
Telemetry.init({
serviceName: "AdminDashboard",
serviceName: "admin-dashboard",
});
const root: any = ReactDOM.createRoot(

View File

@@ -1,8 +1,8 @@
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 PageLoader from "Common/UI/Components/Loader/PageLoader";
import Page from "Common/UI/Components/Page/Page";
import Navigation from "Common/UI/Utils/Navigation";
import React, { FunctionComponent, ReactElement, useEffect } from "react";
const Init: FunctionComponent = (): ReactElement => {

View File

@@ -2,13 +2,13 @@ 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 Page from "CommonUI/src/Components/Page/Page";
import { ACCOUNTS_URL } from "CommonUI/src/Config";
import UiAnalytics from "CommonUI/src/Utils/Analytics";
import Navigation from "CommonUI/src/Utils/Navigation";
import UserUtil from "CommonUI/src/Utils/User";
import ErrorMessage from "Common/UI/Components/ErrorMessage/ErrorMessage";
import PageLoader from "Common/UI/Components/Loader/PageLoader";
import Page from "Common/UI/Components/Page/Page";
import { ACCOUNTS_URL } from "Common/UI/Config";
import UiAnalytics from "Common/UI/Utils/Analytics";
import Navigation from "Common/UI/Utils/Navigation";
import UserUtil from "Common/UI/Utils/User";
import React, { FunctionComponent, ReactElement, useEffect } from "react";
const Logout: FunctionComponent = (): ReactElement => {

View File

@@ -3,18 +3,18 @@ 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 Field from "Common/UI/Components/Forms/Types/Field";
import FormFieldSchemaType from "Common/UI/Components/Forms/Types/FormFieldSchemaType";
import ModelTable from "Common/UI/Components/ModelTable/ModelTable";
import Page from "Common/UI/Components/Page/Page";
import { RadioButton } from "Common/UI/Components/RadioButtons/GroupRadioButtons";
import Toggle from "Common/UI/Components/Toggle/Toggle";
import FieldType from "Common/UI/Components/Types/FieldType";
import { BILLING_ENABLED, getAllEnvVars } from "Common/UI/Config";
import { GetReactElementFunction } from "Common/UI/Types/FunctionTypes";
import Navigation from "Common/UI/Utils/Navigation";
import Project from "Common/Models/DatabaseModels/Project";
import User from "Common/Models/DatabaseModels/User";
import React, {
FunctionComponent,
ReactElement,
@@ -187,7 +187,7 @@ const Projects: FunctionComponent = (): ReactElement => {
isEditable={false}
isCreateable={true}
name="Projects"
isViewable={false}
isViewable={true}
cardProps={{
title: "Projects",
description: "Here is a list of proejcts in OneUptime.",

View File

@@ -0,0 +1,52 @@
import PageMap from "../../../Utils/PageMap";
import RouteMap, { RouteUtil } from "../../../Utils/RouteMap";
import Route from "Common/Types/API/Route";
import ObjectID from "Common/Types/ObjectID";
import ModelDelete from "Common/UI/Components/ModelDelete/ModelDelete";
import Navigation from "Common/UI/Utils/Navigation";
import React, { FunctionComponent, ReactElement } from "react";
import SideMenuComponent from "./SideMenu";
import Project from "Common/Models/DatabaseModels/Project";
import ModelPage from "Common/UI/Components/Page/ModelPage";
const DeletePage: FunctionComponent = (): ReactElement => {
const modelId: ObjectID = Navigation.getLastParamAsObjectID(1);
return (
<ModelPage<Project>
modelId={modelId}
modelNameField="name"
modelType={Project}
title={"Project"}
breadcrumbLinks={[
{
title: "Admin Dashboard",
to: RouteUtil.populateRouteParams(RouteMap[PageMap.HOME] as Route),
},
{
title: "Projects",
to: RouteUtil.populateRouteParams(
RouteMap[PageMap.PROJECTS] as Route,
),
},
{
title: "Project",
to: RouteUtil.populateRouteParams(
RouteMap[PageMap.PROJECT_VIEW] as Route,
),
},
]}
sideMenu={<SideMenuComponent modelId={modelId} />}
>
<ModelDelete
modelType={Project}
modelId={modelId}
onDeleteSuccess={() => {
Navigation.navigate(RouteMap[PageMap.PROJECTS] as Route);
}}
/>
</ModelPage>
);
};
export default DeletePage;

View File

@@ -0,0 +1,90 @@
import ObjectID from "Common/Types/ObjectID";
import PageMap from "../../../Utils/PageMap";
import RouteMap, { RouteUtil } from "../../../Utils/RouteMap";
import Route from "Common/Types/API/Route";
import Navigation from "Common/UI/Utils/Navigation";
import Project from "Common/Models/DatabaseModels/Project";
import React, { FunctionComponent, ReactElement } from "react";
import CardModelDetail from "Common/UI/Components/ModelDetail/CardModelDetail";
import FormFieldSchemaType from "Common/UI/Components/Forms/Types/FormFieldSchemaType";
import FieldType from "Common/UI/Components/Types/FieldType";
import ModelPage from "Common/UI/Components/Page/ModelPage";
import SideMenuComponent from "./SideMenu";
const Projects: FunctionComponent = (): ReactElement => {
const modelId: ObjectID = Navigation.getLastParamAsObjectID();
return (
<ModelPage
modelId={modelId}
modelNameField="name"
modelType={Project}
title={"Project"}
breadcrumbLinks={[
{
title: "Admin Dashboard",
to: RouteUtil.populateRouteParams(RouteMap[PageMap.HOME] as Route),
},
{
title: "Projects",
to: RouteUtil.populateRouteParams(
RouteMap[PageMap.PROJECTS] as Route,
),
},
{
title: "Project",
to: RouteUtil.populateRouteParams(
RouteMap[PageMap.PROJECT_VIEW] as Route,
),
},
]}
sideMenu={<SideMenuComponent modelId={modelId} />}
>
<div>
<CardModelDetail<Project>
name="Project"
cardProps={{
title: "Project",
description: "Project details",
}}
isEditable={true}
editButtonText="Edit Project"
formFields={[
{
field: {
name: true,
},
title: "Name",
fieldType: FormFieldSchemaType.Text,
required: true,
},
]}
modelDetailProps={{
modelType: Project,
id: "model-detail-user",
fields: [
{
field: {
_id: true,
},
title: "Project ID",
fieldType: FieldType.Text,
placeholder: "-",
},
{
field: {
name: true,
},
title: "Name",
fieldType: FieldType.Text,
},
],
modelId: modelId,
}}
/>
</div>
</ModelPage>
);
};
export default Projects;

View File

@@ -0,0 +1,53 @@
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 ObjectID from "Common/Types/ObjectID";
import SideMenu from "Common/UI/Components/SideMenu/SideMenu";
import SideMenuItem from "Common/UI/Components/SideMenu/SideMenuItem";
import SideMenuSection from "Common/UI/Components/SideMenu/SideMenuSection";
import React, { FunctionComponent, ReactElement } from "react";
export interface SideMenuProps {
modelId: ObjectID;
}
const SideMenuComponent: FunctionComponent<SideMenuProps> = (
props: SideMenuProps,
): ReactElement => {
return (
<SideMenu>
<SideMenuSection title="Basic">
<SideMenuItem
link={{
title: "Overview",
to: RouteUtil.populateRouteParams(
RouteMap[PageMap.PROJECT_VIEW] as Route,
{
modelId: props.modelId,
},
),
}}
icon={IconProp.Info}
/>
</SideMenuSection>
<SideMenuSection title="Advanced">
<SideMenuItem
link={{
title: "Delete",
to: RouteUtil.populateRouteParams(
RouteMap[PageMap.PROJECT_DELETE] as Route,
{
modelId: props.modelId,
},
),
}}
icon={IconProp.Trash}
/>
</SideMenuSection>
</SideMenu>
);
};
export default SideMenuComponent;

View File

@@ -3,11 +3,11 @@ import RouteMap, { RouteUtil } from "../../../Utils/RouteMap";
import DashboardSideMenu from "../SideMenu";
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 FormFieldSchemaType from "Common/UI/Components/Forms/Types/FormFieldSchemaType";
import CardModelDetail from "Common/UI/Components/ModelDetail/CardModelDetail";
import Page from "Common/UI/Components/Page/Page";
import FieldType from "Common/UI/Components/Types/FieldType";
import GlobalConfig from "Common/Models/DatabaseModels/GlobalConfig";
import React, { FunctionComponent, ReactElement } from "react";
const Settings: FunctionComponent = (): ReactElement => {

View File

@@ -3,11 +3,11 @@ import RouteMap, { RouteUtil } from "../../../Utils/RouteMap";
import DashboardSideMenu from "../SideMenu";
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 FormFieldSchemaType from "Common/UI/Components/Forms/Types/FormFieldSchemaType";
import CardModelDetail from "Common/UI/Components/ModelDetail/CardModelDetail";
import Page from "Common/UI/Components/Page/Page";
import FieldType from "Common/UI/Components/Types/FieldType";
import GlobalConfig from "Common/Models/DatabaseModels/GlobalConfig";
import React, { FunctionComponent, ReactElement } from "react";
const Settings: FunctionComponent = (): ReactElement => {

View File

@@ -3,11 +3,11 @@ import RouteMap, { RouteUtil } from "../../../Utils/RouteMap";
import DashboardSideMenu from "../SideMenu";
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 FormFieldSchemaType from "Common/UI/Components/Forms/Types/FormFieldSchemaType";
import CardModelDetail from "Common/UI/Components/ModelDetail/CardModelDetail";
import Page from "Common/UI/Components/Page/Page";
import FieldType from "Common/UI/Components/Types/FieldType";
import GlobalConfig from "Common/Models/DatabaseModels/GlobalConfig";
import React, { FunctionComponent, ReactElement } from "react";
const Settings: FunctionComponent = (): ReactElement => {

View File

@@ -5,16 +5,18 @@ 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 ErrorMessage from "Common/UI/Components/ErrorMessage/ErrorMessage";
import FormFieldSchemaType from "Common/UI/Components/Forms/Types/FormFieldSchemaType";
import PageLoader from "Common/UI/Components/Loader/PageLoader";
import CardModelDetail from "Common/UI/Components/ModelDetail/CardModelDetail";
import Page from "Common/UI/Components/Page/Page";
import Pill from "Common/UI/Components/Pill/Pill";
import FieldType from "Common/UI/Components/Types/FieldType";
import DropdownUtil from "Common/UI/Utils/Dropdown";
import ModelAPI from "Common/UI/Utils/ModelAPI/ModelAPI";
import GlobalConfig, {
EmailServerType,
} from "Common/Models/DatabaseModels/GlobalConfig";
import React, { FunctionComponent, ReactElement, useEffect } from "react";
const Settings: FunctionComponent = (): ReactElement => {

View File

@@ -7,16 +7,16 @@ import IsNull from "Common/Types/BaseDatabase/IsNull";
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 Banner from "Common/UI/Components/Banner/Banner";
import { ButtonStyleType } from "Common/UI/Components/Button/Button";
import FormFieldSchemaType from "Common/UI/Components/Forms/Types/FormFieldSchemaType";
import ConfirmModal from "Common/UI/Components/Modal/ConfirmModal";
import ModelTable from "Common/UI/Components/ModelTable/ModelTable";
import Page from "Common/UI/Components/Page/Page";
import ProbeElement from "Common/UI/Components/Probe/Probe";
import Statusbubble from "Common/UI/Components/StatusBubble/StatusBubble";
import FieldType from "Common/UI/Components/Types/FieldType";
import Probe from "Common/Models/DatabaseModels/Probe";
import React, { FunctionComponent, ReactElement, useState } from "react";
const Settings: FunctionComponent = (): ReactElement => {

View File

@@ -2,9 +2,9 @@ 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 SideMenu from "Common/UI/Components/SideMenu/SideMenu";
import SideMenuItem from "Common/UI/Components/SideMenu/SideMenuItem";
import SideMenuSection from "Common/UI/Components/SideMenu/SideMenuSection";
import React, { ReactElement } from "react";
const DashboardSideMenu: () => JSX.Element = (): ReactElement => {

View File

@@ -1,31 +1,15 @@
import PageMap from "../../Utils/PageMap";
import RouteMap, { RouteUtil } from "../../Utils/RouteMap";
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";
import FormFieldSchemaType from "Common/UI/Components/Forms/Types/FormFieldSchemaType";
import ModelTable from "Common/UI/Components/ModelTable/ModelTable";
import Page from "Common/UI/Components/Page/Page";
import FieldType from "Common/UI/Components/Types/FieldType";
import Navigation from "Common/UI/Utils/Navigation";
import User from "Common/Models/DatabaseModels/User";
import React, { FunctionComponent, ReactElement } 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"}
@@ -46,38 +30,13 @@ const Users: FunctionComponent = (): ReactElement => {
isDeleteable={false}
isEditable={false}
showViewIdButton={true}
refreshToggle={refreshItemsTrigger}
isCreateable={true}
name="Users"
isViewable={false}
isViewable={true}
cardProps={{
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={[
{
@@ -164,53 +123,6 @@ 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

@@ -0,0 +1,50 @@
import PageMap from "../../../Utils/PageMap";
import RouteMap, { RouteUtil } from "../../../Utils/RouteMap";
import Route from "Common/Types/API/Route";
import ObjectID from "Common/Types/ObjectID";
import ModelDelete from "Common/UI/Components/ModelDelete/ModelDelete";
import Navigation from "Common/UI/Utils/Navigation";
import React, { FunctionComponent, ReactElement } from "react";
import SideMenuComponent from "./SideMenu";
import User from "Common/Models/DatabaseModels/User";
import ModelPage from "Common/UI/Components/Page/ModelPage";
const DeletePage: FunctionComponent = (): ReactElement => {
const modelId: ObjectID = Navigation.getLastParamAsObjectID(1);
return (
<ModelPage
modelId={modelId}
modelNameField="email"
modelType={User}
title={"User"}
breadcrumbLinks={[
{
title: "Admin Dashboard",
to: RouteUtil.populateRouteParams(RouteMap[PageMap.HOME] as Route),
},
{
title: "Users",
to: RouteUtil.populateRouteParams(RouteMap[PageMap.USERS] as Route),
},
{
title: "User",
to: RouteUtil.populateRouteParams(
RouteMap[PageMap.USER_VIEW] as Route,
),
},
]}
sideMenu={<SideMenuComponent modelId={modelId} />}
>
<ModelDelete
modelType={User}
modelId={modelId}
onDeleteSuccess={() => {
Navigation.navigate(RouteMap[PageMap.USERS] as Route);
}}
/>
</ModelPage>
);
};
export default DeletePage;

View File

@@ -0,0 +1,136 @@
import ObjectID from "Common/Types/ObjectID";
import PageMap from "../../../Utils/PageMap";
import RouteMap, { RouteUtil } from "../../../Utils/RouteMap";
import Route from "Common/Types/API/Route";
import Navigation from "Common/UI/Utils/Navigation";
import User from "Common/Models/DatabaseModels/User";
import React, { FunctionComponent, ReactElement } from "react";
import CardModelDetail from "Common/UI/Components/ModelDetail/CardModelDetail";
import FormFieldSchemaType from "Common/UI/Components/Forms/Types/FormFieldSchemaType";
import FieldType from "Common/UI/Components/Types/FieldType";
import ModelPage from "Common/UI/Components/Page/ModelPage";
import SideMenuComponent from "./SideMenu";
const Users: FunctionComponent = (): ReactElement => {
const modelId: ObjectID = Navigation.getLastParamAsObjectID();
return (
<ModelPage
modelId={modelId}
modelNameField="email"
modelType={User}
title={"User"}
breadcrumbLinks={[
{
title: "Admin Dashboard",
to: RouteUtil.populateRouteParams(RouteMap[PageMap.HOME] as Route),
},
{
title: "Users",
to: RouteUtil.populateRouteParams(RouteMap[PageMap.USERS] as Route),
},
{
title: "User",
to: RouteUtil.populateRouteParams(
RouteMap[PageMap.USER_VIEW] as Route,
),
},
]}
sideMenu={<SideMenuComponent modelId={modelId} />}
>
<div>
<CardModelDetail<User>
name="User"
cardProps={{
title: "User",
description: "User details",
}}
isEditable={true}
editButtonText="Edit User"
formFields={[
{
field: {
name: true,
},
title: "Name",
fieldType: FormFieldSchemaType.Text,
required: true,
},
{
field: {
email: true,
},
title: "Email",
fieldType: FormFieldSchemaType.Email,
required: true,
},
{
field: {
isEmailVerified: true,
},
title: "Email Verified",
fieldType: FormFieldSchemaType.Toggle,
required: false,
},
{
field: {
enableTwoFactorAuth: true,
},
title: "Two Factor Auth Enabled",
fieldType: FormFieldSchemaType.Toggle,
required: false,
},
]}
modelDetailProps={{
modelType: User,
id: "model-detail-user",
fields: [
{
field: {
_id: true,
},
title: "User ID",
fieldType: FieldType.Text,
placeholder: "-",
},
{
field: {
name: true,
},
title: "Name",
fieldType: FieldType.Text,
},
{
field: {
email: true,
},
title: "Email",
fieldType: FieldType.Email,
placeholder: "-",
},
{
field: {
isEmailVerified: true,
},
title: "Email Verified",
fieldType: FieldType.Boolean,
placeholder: "No",
},
{
field: {
enableTwoFactorAuth: true,
},
title: "Two Factor Auth Enabled",
fieldType: FieldType.Boolean,
placeholder: "No",
},
],
modelId: modelId,
}}
/>
</div>
</ModelPage>
);
};
export default Users;

View File

@@ -0,0 +1,53 @@
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 ObjectID from "Common/Types/ObjectID";
import SideMenu from "Common/UI/Components/SideMenu/SideMenu";
import SideMenuItem from "Common/UI/Components/SideMenu/SideMenuItem";
import SideMenuSection from "Common/UI/Components/SideMenu/SideMenuSection";
import React, { FunctionComponent, ReactElement } from "react";
export interface SideMenuProps {
modelId: ObjectID;
}
const SideMenuComponent: FunctionComponent<SideMenuProps> = (
props: SideMenuProps,
): ReactElement => {
return (
<SideMenu>
<SideMenuSection title="Basic">
<SideMenuItem
link={{
title: "Overview",
to: RouteUtil.populateRouteParams(
RouteMap[PageMap.USER_VIEW] as Route,
{
modelId: props.modelId,
},
),
}}
icon={IconProp.Info}
/>
</SideMenuSection>
<SideMenuSection title="Advanced">
<SideMenuItem
link={{
title: "Delete",
to: RouteUtil.populateRouteParams(
RouteMap[PageMap.USER_DELETE] as Route,
{
modelId: props.modelId,
},
),
}}
icon={IconProp.Trash}
/>
</SideMenuSection>
</SideMenu>
);
};
export default SideMenuComponent;

View File

@@ -1,5 +1,5 @@
import Dictionary from "Common/Types/Dictionary";
import ModelAPI from "CommonUI/src/Utils/ModelAPI/ModelAPI";
import ModelAPI from "Common/UI/Utils/ModelAPI/ModelAPI";
export default class AdminModelAPI extends ModelAPI {
public static override getCommonHeaders(): Dictionary<string> {

View File

@@ -3,8 +3,14 @@ enum PageMap {
HOME = "HOME",
LOGOUT = "LOGOUT",
SETTINGS = "SETTINGS",
USERS = "USERS",
USER_VIEW = "USER_VIEW",
USER_DELETE = "USER_DELETE",
PROJECTS = "PROJECTS",
PROJECT_VIEW = "PROJECT_VIEW",
PROJECT_DELETE = "PROJECT_DELETE",
SETTINGS_HOST = "SETTINGS_HOST",
SETTINGS_SMTP = "SETTINGS_SMTP",

View File

@@ -9,8 +9,19 @@ const RouteMap: Dictionary<Route> = {
[PageMap.HOME]: new Route(`/admin`),
[PageMap.LOGOUT]: new Route(`/admin/logout`),
[PageMap.SETTINGS]: new Route(`/admin/settings/host`),
[PageMap.PROJECTS]: new Route(`/admin/projects`),
[PageMap.PROJECT_VIEW]: new Route(`/admin/projects/${RouteParams.ModelID}`),
[PageMap.PROJECT_DELETE]: new Route(
`/admin/projects/${RouteParams.ModelID}/delete`,
),
[PageMap.USERS]: new Route(`/admin/users`),
[PageMap.USER_VIEW]: new Route(`/admin/users/${RouteParams.ModelID}`),
[PageMap.USER_DELETE]: new Route(
`/admin/users/${RouteParams.ModelID}/delete`,
),
[PageMap.SETTINGS_HOST]: new Route(`/admin/settings/host`),
[PageMap.SETTINGS_SMTP]: new Route(`/admin/settings/smtp`),
[PageMap.SETTINGS_CALL_AND_SMS]: new Route(`/admin/settings/call-and-sms`),

View File

@@ -38,25 +38,6 @@ RUN sed -i "s/\"version\": \".*\"/\"version\": \"$APP_VERSION\"/g" /usr/src/Comm
RUN npm install
COPY ./Common /usr/src/Common
WORKDIR /usr/src/Model
COPY ./Model/package*.json /usr/src/Model/
# Set version in ./Model/package.json to the APP_VERSION
RUN sed -i "s/\"version\": \".*\"/\"version\": \"$APP_VERSION\"/g" /usr/src/Model/package.json
RUN npm install
COPY ./Model /usr/src/Model
WORKDIR /usr/src/CommonServer
COPY ./CommonServer/package*.json /usr/src/CommonServer/
# Set version in ./CommonServer/package.json to the APP_VERSION
RUN sed -i "s/\"version\": \".*\"/\"version\": \"$APP_VERSION\"/g" /usr/src/CommonServer/package.json
RUN npm install
COPY ./CommonServer /usr/src/CommonServer
ENV PRODUCTION=true
WORKDIR /usr/src/app

View File

@@ -10,13 +10,13 @@ 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 FeatureSet from "Common/Server/Types/FeatureSet";
import Express, {
ExpressApplication,
ExpressRequest,
ExpressResponse,
ExpressStatic,
} from "CommonServer/Utils/Express";
} from "Common/Server/Utils/Express";
const APIReferenceFeatureSet: FeatureSet = {
init: async (): Promise<void> => {
@@ -25,13 +25,15 @@ const APIReferenceFeatureSet: FeatureSet = {
const app: ExpressApplication = Express.getExpressApp();
// Serve static files for the API reference with a cache max age of 30 days
app.use("/reference", ExpressStatic(StaticPath, { maxAge: 2592000 }));
// Index page
// Redirect index page to the introduction page
app.get(["/reference"], (_req: ExpressRequest, res: ExpressResponse) => {
return res.redirect("/reference/introduction");
});
// Handle "Page Not Found" page
app.get(
["/reference/page-not-found"],
(req: ExpressRequest, res: ExpressResponse) => {
@@ -39,7 +41,7 @@ const APIReferenceFeatureSet: FeatureSet = {
},
);
// All Pages
// Handle all other pages based on the "page" parameter
app.get(
["/reference/:page"],
(req: ExpressRequest, res: ExpressResponse) => {
@@ -52,6 +54,7 @@ const APIReferenceFeatureSet: FeatureSet = {
const currentResource: ModelDocumentation | undefined =
ResourceDictionary[page];
// Execute the appropriate service handler based on the "page" parameter
if (req.params["page"] === "permissions") {
return PermissionServiceHandler.executeResponse(req, res);
} else if (req.params["page"] === "authentication") {

View File

@@ -1,7 +1,8 @@
import { ViewsPath } from "../Utils/Config";
import ResourceUtil, { ModelDocumentation } from "../Utils/Resources";
import { ExpressRequest, ExpressResponse } from "CommonServer/Utils/Express";
import { ExpressRequest, ExpressResponse } from "Common/Server/Utils/Express";
// Retrieve resources documentation
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
export default class ServiceHandler {
@@ -11,12 +12,16 @@ export default class ServiceHandler {
): Promise<void> {
let pageTitle: string = "";
let pageDescription: string = "";
// Extract page parameter from request
const page: string | undefined = req.params["page"];
const pageData: any = {};
// Set default page title and description for the authentication page
pageTitle = "Authentication";
pageDescription = "Learn how to authenticate requests with OneUptime API";
// Render the index page with the specified parameters
return res.render(`${ViewsPath}/pages/index`, {
page: page,
resources: Resources,

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 LocalCache from "Common/Server/Infrastructure/LocalCache";
import { ExpressRequest, ExpressResponse } from "Common/Server/Utils/Express";
import LocalFile from "Common/Server/Utils/LocalFile";
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();

View File

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

View File

@@ -1,25 +1,34 @@
import { ViewsPath } from "../Utils/Config";
import ResourceUtil, { ModelDocumentation } from "../Utils/Resources";
import { ExpressRequest, ExpressResponse } from "CommonServer/Utils/Express";
import { ExpressRequest, ExpressResponse } from "Common/Server/Utils/Express";
// Get all resources and featured resources from ResourceUtil
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
const FeaturedResources: Array<ModelDocumentation> =
ResourceUtil.getFeaturedResources();
export default class ServiceHandler {
// Handle the API request
public static async executeResponse(
req: ExpressRequest,
res: ExpressResponse,
): Promise<void> {
// Initialize page title and description
let pageTitle: string = "";
let pageDescription: string = "";
// Get the requested page from the URL parameters
const page: string | undefined = req.params["page"];
const pageData: any = {};
// Set featured resources for the page
pageData.featuredResources = FeaturedResources;
// Set page title and description
pageTitle = "Introduction";
pageDescription = "API Reference for OneUptime";
// Render the index page with the required data
return res.render(`${ViewsPath}/pages/index`, {
page: page,
resources: Resources,

View File

@@ -10,18 +10,21 @@ import Permission, {
PermissionHelper,
PermissionProps,
} from "Common/Types/Permission";
import LocalCache from "CommonServer/Infrastructure/LocalCache";
import { ExpressRequest, ExpressResponse } from "CommonServer/Utils/Express";
import LocalFile from "CommonServer/Utils/LocalFile";
import LocalCache from "Common/Server/Infrastructure/LocalCache";
import { ExpressRequest, ExpressResponse } from "Common/Server/Utils/Express";
import LocalFile from "Common/Server/Utils/LocalFile";
// Get all resources and resource dictionary
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
const ResourceDictionary: Dictionary<ModelDocumentation> =
ResourceUtil.getResourceDictionaryByPath();
// Get all permission props
const PermissionDictionary: Dictionary<PermissionProps> =
PermissionHelper.getAllPermissionPropsAsDictionary();
export default class ServiceHandler {
// Execute response for a given page
public static async executeResponse(
req: ExpressRequest,
res: ExpressResponse,
@@ -31,31 +34,35 @@ export default class ServiceHandler {
let page: string | undefined = req.params["page"];
const pageData: any = {};
// Check if page is provided
if (!page) {
return PageNotFoundServiceHandler.executeResponse(req, res);
}
// Get current resource
const currentResource: ModelDocumentation | undefined =
ResourceDictionary[page];
// Check if current resource exists
if (!currentResource) {
return PageNotFoundServiceHandler.executeResponse(req, res);
}
// Resource Page.
// Set page title and description
pageTitle = currentResource.name;
pageDescription = currentResource.description;
page = "model";
// Get table columns for current resource
const tableColumns: any = getTableColumns(currentResource.model);
// Filter out columns with no access
for (const key in tableColumns) {
const accessControl: ColumnAccessControl | null =
currentResource.model.getColumnAccessControlFor(key);
if (!accessControl) {
// remove columns with no access
delete tableColumns[key];
continue;
}
@@ -65,7 +72,6 @@ export default class ServiceHandler {
accessControl?.read.length === 0 &&
accessControl?.update.length === 0
) {
// remove columns with no access
delete tableColumns[key];
continue;
}
@@ -73,14 +79,17 @@ export default class ServiceHandler {
tableColumns[key].permissions = accessControl;
}
// Remove unnecessary columns
delete tableColumns["deletedAt"];
delete tableColumns["deletedByUserId"];
delete tableColumns["deletedByUser"];
delete tableColumns["version"];
// Set page data
pageData.title = currentResource.model.singularName;
pageData.description = currentResource.model.tableDescription;
pageData.columns = tableColumns;
pageData.tablePermissions = {
read: currentResource.model.readRecordPermissions.map(
(permission: Permission) => {
@@ -104,46 +113,56 @@ export default class ServiceHandler {
),
};
// Cache the list request data
pageData.listRequest = await LocalCache.getOrSetString(
"model",
"list-request",
async () => {
// Read the list request data from a file
return await LocalFile.read(`${CodeExamplesPath}/Model/ListRequest.md`);
},
);
// Cache the item request data
pageData.itemRequest = await LocalCache.getOrSetString(
"model",
"item-request",
async () => {
// Read the item request data from a file
return await LocalFile.read(`${CodeExamplesPath}/Model/ItemRequest.md`);
},
);
// Cache the item response data
pageData.itemResponse = await LocalCache.getOrSetString(
"model",
"item-response",
async () => {
// Read the item response data from a file
return await LocalFile.read(
`${CodeExamplesPath}/Model/ItemResponse.md`,
);
},
);
// Cache the count request data
pageData.countRequest = await LocalCache.getOrSetString(
"model",
"count-request",
async () => {
// Read the count request data from a file
return await LocalFile.read(
`${CodeExamplesPath}/Model/CountRequest.md`,
);
},
);
// Cache the count response data
pageData.countResponse = await LocalCache.getOrSetString(
"model",
"count-response",
async () => {
// Read the CountResponse.md file
return await LocalFile.read(
`${CodeExamplesPath}/Model/CountResponse.md`,
);
@@ -154,6 +173,7 @@ export default class ServiceHandler {
"model",
"update-request",
async () => {
// Read the UpdateRequest.md file
return await LocalFile.read(
`${CodeExamplesPath}/Model/UpdateRequest.md`,
);
@@ -164,6 +184,7 @@ export default class ServiceHandler {
"model",
"update-response",
async () => {
// Read the UpdateResponse.md file
return await LocalFile.read(
`${CodeExamplesPath}/Model/UpdateResponse.md`,
);
@@ -174,6 +195,7 @@ export default class ServiceHandler {
"model",
"create-request",
async () => {
// Read the CreateRequest.md file
return await LocalFile.read(
`${CodeExamplesPath}/Model/CreateRequest.md`,
);
@@ -184,6 +206,7 @@ export default class ServiceHandler {
"model",
"create-response",
async () => {
// Read the CreateResponse.md file
return await LocalFile.read(
`${CodeExamplesPath}/Model/CreateResponse.md`,
);
@@ -194,6 +217,7 @@ export default class ServiceHandler {
"model",
"delete-request",
async () => {
// Read the DeleteRequest.md file
return await LocalFile.read(
`${CodeExamplesPath}/Model/DeleteRequest.md`,
);
@@ -204,29 +228,36 @@ export default class ServiceHandler {
"model",
"delete-response",
async () => {
// Read the DeleteResponse.md file
return await LocalFile.read(
`${CodeExamplesPath}/Model/DeleteResponse.md`,
);
},
);
// Get list response from cache or set it if it's not available
pageData.listResponse = await LocalCache.getOrSetString(
"model",
"list-response",
async () => {
// Read the list response from a file
return await LocalFile.read(
`${CodeExamplesPath}/Model/ListResponse.md`,
);
},
);
// Generate a unique ID for the example object
pageData.exampleObjectID = ObjectID.generate();
// Construct the API path for the current resource
pageData.apiPath =
AppApiRoute.toString() + currentResource.model.crudApiPath?.toString();
// Check if the current resource is a master admin API
pageData.isMasterAdminApiDocs = currentResource.model.isMasterAdminApiDocs;
// Render the index page with the required data
return res.render(`${ViewsPath}/pages/index`, {
page: page,
resources: Resources,

View File

@@ -1,21 +1,25 @@
import { ViewsPath } from "../Utils/Config";
import ResourceUtil, { ModelDocumentation } from "../Utils/Resources";
import { ExpressRequest, ExpressResponse } from "CommonServer/Utils/Express";
import { ExpressRequest, ExpressResponse } from "Common/Server/Utils/Express";
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources(); // Get an array of model documentation resources
export default class ServiceHandler {
// This is a static method that handles the response
public static async executeResponse(
_req: ExpressRequest,
res: ExpressResponse,
): Promise<void> {
// Set the HTTP status code to 404 (Not Found)
res.status(404);
// Render the 'index' page with the given data
return res.render(`${ViewsPath}/pages/index`, {
page: "404",
pageTitle: "Page Not Found",
pageDescription: "Page you're looking for is not found.",
resources: Resources,
pageData: {},
page: "404", // The page type (404 in this case)
pageTitle: "Page Not Found", // The page title
pageDescription: "Page you're looking for is not found.", // The page description
resources: Resources, // The array of model documentation resources
pageData: {}, // An empty object to hold any additional page data
});
}
}

View File

@@ -1,28 +1,31 @@
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 LocalCache from "Common/Server/Infrastructure/LocalCache";
import { ExpressRequest, ExpressResponse } from "Common/Server/Utils/Express";
import LocalFile from "Common/Server/Utils/LocalFile";
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources(); // Get all resources from ResourceUtil
export default class ServiceHandler {
public static async executeResponse(
req: ExpressRequest,
res: ExpressResponse,
): Promise<void> {
let pageTitle: string = "";
let pageDescription: string = "";
const page: string | undefined = req.params["page"];
const pageData: any = {};
let pageTitle: string = ""; // Initialize page title
let pageDescription: string = ""; // Initialize page description
const page: string | undefined = req.params["page"]; // Get the page parameter from the request
const pageData: any = {}; // Initialize page data object
// Set page title and description
pageTitle = "Pagination";
pageDescription = "Learn how to paginate requests with OneUptime API";
// Get response and request code from LocalCache or LocalFile
pageData.responseCode = await LocalCache.getOrSetString(
"pagination",
"response",
async () => {
// Read Response.md file from CodeExamplesPath
return await LocalFile.read(
`${CodeExamplesPath}/Pagination/Response.md`,
);
@@ -33,18 +36,20 @@ export default class ServiceHandler {
"pagination",
"request",
async () => {
// Read Request.md file from CodeExamplesPath
return await LocalFile.read(
`${CodeExamplesPath}/Pagination/Request.md`,
);
},
);
// Render the page with the page data
return res.render(`${ViewsPath}/pages/index`, {
page: page,
resources: Resources,
pageTitle: pageTitle,
pageDescription: pageDescription,
pageData: pageData,
page: page, // Pass the page parameter
resources: Resources, // Pass all resources
pageTitle: pageTitle, // Pass the page title
pageDescription: pageDescription, // Pass the page description
pageData: pageData, // Pass the page data
});
}
}

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 { ExpressRequest, ExpressResponse } from "Common/Server/Utils/Express";
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
@@ -10,20 +10,26 @@ export default class ServiceHandler {
req: ExpressRequest,
res: ExpressResponse,
): Promise<void> {
// Initialize page title and description
let pageTitle: string = "";
let pageDescription: string = "";
// Get the requested page
const page: string | undefined = req.params["page"];
const pageData: any = {};
// Set page title and description
pageTitle = "Permissions";
pageDescription = "Learn how permissions work with OneUptime";
// Filter permissions to only include those assignable to tenants
pageData.permissions = PermissionHelper.getAllPermissionProps().filter(
(i: PermissionProps) => {
return i.isAssignableToTenant;
},
);
// Render the page
return res.render(`${ViewsPath}/pages/index`, {
page: page,
resources: Resources,

View File

@@ -1,21 +1,23 @@
import { ViewsPath } from "../Utils/Config";
import ResourceUtil, { ModelDocumentation } from "../Utils/Resources";
import { ExpressRequest, ExpressResponse } from "CommonServer/Utils/Express";
import { ExpressRequest, ExpressResponse } from "Common/Server/Utils/Express";
const Resources: Array<ModelDocumentation> = ResourceUtil.getResources();
const resources: Array<ModelDocumentation> = ResourceUtil.getResources(); // Get resources from ResourceUtil
export default class ServiceHandler {
public static async executeResponse(
_req: ExpressRequest,
_req: ExpressRequest, // Ignore request object
res: ExpressResponse,
): Promise<void> {
// Set HTTP status to 200
res.status(200);
return res.render(`${ViewsPath}/pages/index`, {
// Render index page with necessary data
page: "status",
pageTitle: "Status",
pageDescription: "200 - Success",
resources: Resources,
pageData: {},
resources: resources, // Pass resources to the template
pageData: {}, // Pass empty data to the template
});
}
}

View File

@@ -1,8 +1,8 @@
import BaseModel from "Common/Models/BaseModel";
import BaseModel from "Common/Models/DatabaseModels/DatabaseBaseModel/DatabaseBaseModel";
import ArrayUtil from "Common/Types/ArrayUtil";
import Dictionary from "Common/Types/Dictionary";
import { IsBillingEnabled } from "CommonServer/EnvironmentConfig";
import Models from "Model/Models/Index";
import { IsBillingEnabled } from "Common/Server/EnvironmentConfig";
import Models from "Common/Models/DatabaseModels/Index";
export interface ModelDocumentation {
name: string;
@@ -12,12 +12,14 @@ export interface ModelDocumentation {
}
export default class ResourceUtil {
// Get all resources that should have documentation enabled
public static getResources(): Array<ModelDocumentation> {
const resources: Array<ModelDocumentation> = Models.filter(
(model: typeof BaseModel) => {
const modelInstance: BaseModel = new model();
let showDocs: boolean = modelInstance.enableDocumentation;
// If billing is enabled, do not show master admin API docs
if (modelInstance.isMasterAdminApiDocs && IsBillingEnabled) {
showDocs = false;
}
@@ -40,6 +42,7 @@ export default class ResourceUtil {
return resources;
}
// Get featured resources that are pre-selected
public static getFeaturedResources(): Array<ModelDocumentation> {
const featuredResources: Array<string> = [
"Monitor",
@@ -59,6 +62,7 @@ export default class ResourceUtil {
);
}
// Create a dictionary of resources indexed by their path
public static getResourceDictionaryByPath(): Dictionary<ModelDocumentation> {
const dict: Dictionary<ModelDocumentation> = {};

File diff suppressed because it is too large Load Diff

View File

@@ -16,6 +16,7 @@
applyStylesTo("h3", "mb-5 scroll-mt-24 mt-10 font-bold text-base")
applyStylesTo("p", "mb-5")
applyStylesTo("link", "text-emerald-500 hover:text-emerald-600")
applyStylesTo("model-inline-code", "rounded p-0.5 px-1 text-sm text-gray-50 bg-gray-600 border-2 border-gray-600 shadow")
applyStylesTo("inline-code", "rounded p-0.5 px-1 text-sm text-gray-500 bg-gray-100 border-2 border-gray-200")
}

View File

@@ -1,382 +1,430 @@
import BaseAPI from "CommonServer/API/BaseAPI";
import BaseAnalyticsAPI from "CommonServer/API/BaseAnalyticsAPI";
import BillingInvoiceAPI from "CommonServer/API/BillingInvoiceAPI";
import BillingPaymentMethodAPI from "CommonServer/API/BillingPaymentMethodAPI";
import CodeRepositoryAPI from "CommonServer/API/CodeRepositoryAPI";
import CopilotActionAPI from "CommonServer/API/CopilotActionAPI";
import FileAPI from "CommonServer/API/FileAPI";
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 BaseAPI from "Common/Server/API/BaseAPI";
import BaseAnalyticsAPI from "Common/Server/API/BaseAnalyticsAPI";
import BillingInvoiceAPI from "Common/Server/API/BillingInvoiceAPI";
import BillingPaymentMethodAPI from "Common/Server/API/BillingPaymentMethodAPI";
import CopilotCodeRepositoryAPI from "Common/Server/API/CopilotCodeRepositoryAPI";
import CopilotActionAPI from "Common/Server/API/CopilotActionAPI";
import CopilotPullRequestAPI from "Common/Server/API/CopilotPullRequestAPI";
import FileAPI from "Common/Server/API/FileAPI";
import GlobalConfigAPI from "Common/Server/API/GlobalConfigAPI";
import MonitorGroupAPI from "Common/Server/API/MonitorGroupAPI";
import NotificationAPI from "Common/Server/API/NotificationAPI";
import TelemetryAPI from "Common/Server/API/TelemetryAPI";
import Ingestor from "Common/Server/API/ProbeAPI";
import ProjectAPI from "Common/Server/API/ProjectAPI";
import ProjectSsoAPI from "Common/Server/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";
import ResellerPlanAPI from "Common/Server/API/ResellerPlanAPI";
import ShortLinkAPI from "Common/Server/API/ShortLinkAPI";
import StatusPageAPI from "Common/Server/API/StatusPageAPI";
import StatusPageDomainAPI from "Common/Server/API/StatusPageDomainAPI";
import StatusPageSubscriberAPI from "Common/Server/API/StatusPageSubscriberAPI";
import UserCallAPI from "Common/Server/API/UserCallAPI";
import UserTwoFactorAuthAPI from "Common/Server/API/UserTwoFactorAuthAPI";
// User Notification methods.
import UserEmailAPI from "CommonServer/API/UserEmailAPI";
import UserNotificationLogTimelineAPI from "CommonServer/API/UserOnCallLogTimelineAPI";
import UserSMSAPI from "CommonServer/API/UserSmsAPI";
import UserEmailAPI from "Common/Server/API/UserEmailAPI";
import UserNotificationLogTimelineAPI from "Common/Server/API/UserOnCallLogTimelineAPI";
import UserSMSAPI from "Common/Server/API/UserSmsAPI";
import ApiKeyPermissionService, {
Service as ApiKeyPermissionServiceType,
} from "CommonServer/Services/ApiKeyPermissionService";
} from "Common/Server/Services/ApiKeyPermissionService";
import ApiKeyService, {
Service as ApiKeyServiceType,
} from "CommonServer/Services/ApiKeyService";
} from "Common/Server/Services/ApiKeyService";
import CallLogService, {
Service as CallLogServiceType,
} from "CommonServer/Services/CallLogService";
} from "Common/Server/Services/CallLogService";
import DomainService, {
Service as DomainServiceType,
} from "CommonServer/Services/DomainService";
} from "Common/Server/Services/DomainService";
import EmailLogService, {
Service as EmailLogServiceType,
} from "CommonServer/Services/EmailLogService";
} from "Common/Server/Services/EmailLogService";
import TelemetryIngestionKeyService, {
Service as TelemetryIngestionKeyServiceType,
} from "Common/Server/Services/TelemetryIngestionKeyService";
import EmailVerificationTokenService, {
Service as EmailVerificationTokenServiceType,
} from "CommonServer/Services/EmailVerificationTokenService";
} from "Common/Server/Services/EmailVerificationTokenService";
import IncidentCustomFieldService, {
Service as IncidentCustomFieldServiceType,
} from "CommonServer/Services/IncidentCustomFieldService";
} from "Common/Server/Services/IncidentCustomFieldService";
import IncidentInternalNoteService, {
Service as IncidentInternalNoteServiceType,
} from "CommonServer/Services/IncidentInternalNoteService";
} from "Common/Server/Services/IncidentInternalNoteService";
import IncidentNoteTemplateService, {
Service as IncidentNoteTemplateServiceType,
} from "CommonServer/Services/IncidentNoteTemplateService";
} from "Common/Server/Services/IncidentNoteTemplateService";
import IncidentOwnerTeamService, {
Service as IncidentOwnerTeamServiceType,
} from "CommonServer/Services/IncidentOwnerTeamService";
} from "Common/Server/Services/IncidentOwnerTeamService";
import IncidentOwnerUserService, {
Service as IncidentOwnerUserServiceType,
} from "CommonServer/Services/IncidentOwnerUserService";
} from "Common/Server/Services/IncidentOwnerUserService";
import IncidentPublicNoteService, {
Service as IncidentPublicNoteServiceType,
} from "CommonServer/Services/IncidentPublicNoteService";
} from "Common/Server/Services/IncidentPublicNoteService";
import IncidentService, {
Service as IncidentServiceType,
} from "CommonServer/Services/IncidentService";
} from "Common/Server/Services/IncidentService";
import IncidentSeverityService, {
Service as IncidentSeverityServiceType,
} from "CommonServer/Services/IncidentSeverityService";
} from "Common/Server/Services/IncidentSeverityService";
import IncidentStateService, {
Service as IncidentStateServiceType,
} from "CommonServer/Services/IncidentStateService";
} from "Common/Server/Services/IncidentStateService";
import IncidentStateTimelineService, {
Service as IncidentStateTimelineServiceType,
} from "CommonServer/Services/IncidentStateTimelineService";
} from "Common/Server/Services/IncidentStateTimelineService";
import IncidentTemplateOwnerTeamService, {
Service as IncidentTemplateOwnerTeamServiceType,
} from "CommonServer/Services/IncidentTemplateOwnerTeamService";
} from "Common/Server/Services/IncidentTemplateOwnerTeamService";
import IncidentTemplateOwnerUserService, {
Service as IncidentTemplateOwnerUserServiceType,
} from "CommonServer/Services/IncidentTemplateOwnerUserService";
} from "Common/Server/Services/IncidentTemplateOwnerUserService";
import IncidentTemplateService, {
Service as IncidentTemplateServiceType,
} from "CommonServer/Services/IncidentTemplateService";
} from "Common/Server/Services/IncidentTemplateService";
import LabelService, {
Service as LabelServiceType,
} from "CommonServer/Services/LabelService";
} from "Common/Server/Services/LabelService";
import LogService, {
LogService as LogServiceType,
} from "CommonServer/Services/LogService";
} from "Common/Server/Services/LogService";
import TelemetryAttributeService, {
TelemetryAttributeService as TelemetryAttributeServiceType,
} from "Common/Server/Services/TelemetryAttributeService";
import MetricService, {
MetricService as MetricServiceType,
} from "CommonServer/Services/MetricService";
} from "Common/Server/Services/MetricService";
import MonitorCustomFieldService, {
Service as MonitorCustomFieldServiceType,
} from "CommonServer/Services/MonitorCustomFieldService";
} from "Common/Server/Services/MonitorCustomFieldService";
import MonitorGroupOwnerTeamService, {
Service as MonitorGroupOwnerTeamServiceType,
} from "CommonServer/Services/MonitorGroupOwnerTeamService";
} from "Common/Server/Services/MonitorGroupOwnerTeamService";
import MonitorGroupOwnerUserService, {
Service as MonitorGroupOwnerUserServiceType,
} from "CommonServer/Services/MonitorGroupOwnerUserService";
} from "Common/Server/Services/MonitorGroupOwnerUserService";
import MonitorGroupResourceService, {
Service as MonitorGroupResourceServiceType,
} from "CommonServer/Services/MonitorGroupResourceService";
} from "Common/Server/Services/MonitorGroupResourceService";
import MonitorMetricsByMinuteService, {
MonitorMetricsByMinuteService as MonitorMetricsByMinuteServiceType,
} from "CommonServer/Services/MonitorMetricsByMinuteService";
} from "Common/Server/Services/MonitorMetricsByMinuteService";
import MonitorOwnerTeamService, {
Service as MonitorOwnerTeamServiceType,
} from "CommonServer/Services/MonitorOwnerTeamService";
} from "Common/Server/Services/MonitorOwnerTeamService";
import MonitorOwnerUserService, {
Service as MonitorOwnerUserServiceType,
} from "CommonServer/Services/MonitorOwnerUserService";
} from "Common/Server/Services/MonitorOwnerUserService";
import MonitorProbeService, {
Service as MonitorProbeServiceType,
} from "CommonServer/Services/MonitorProbeService";
} from "Common/Server/Services/MonitorProbeService";
import MonitorSecretService, {
Service as MonitorSecretServiceType,
} from "CommonServer/Services/MonitorSecretService";
} from "Common/Server/Services/MonitorSecretService";
import MonitorService, {
Service as MonitorServiceType,
} from "CommonServer/Services/MonitorService";
} from "Common/Server/Services/MonitorService";
import MonitorStatusService, {
Service as MonitorStatusServiceType,
} from "CommonServer/Services/MonitorStatusService";
} from "Common/Server/Services/MonitorStatusService";
import MonitorTimelineStatusService, {
Service as MonitorTimelineStatusServiceType,
} from "CommonServer/Services/MonitorStatusTimelineService";
} from "Common/Server/Services/MonitorStatusTimelineService";
import OnCallDutyPolicyCustomFieldService, {
Service as OnCallDutyPolicyCustomFieldServiceType,
} from "CommonServer/Services/OnCallDutyPolicyCustomFieldService";
} from "Common/Server/Services/OnCallDutyPolicyCustomFieldService";
import OnCallDutyPolicyEscalationRuleScheduleService, {
Service as OnCallDutyPolicyEscalationRuleScheduleServiceType,
} from "CommonServer/Services/OnCallDutyPolicyEscalationRuleScheduleService";
} from "Common/Server/Services/OnCallDutyPolicyEscalationRuleScheduleService";
import OnCallDutyPolicyEscalationRuleService, {
Service as OnCallDutyPolicyEscalationRuleServiceType,
} from "CommonServer/Services/OnCallDutyPolicyEscalationRuleService";
} from "Common/Server/Services/OnCallDutyPolicyEscalationRuleService";
import OnCallDutyPolicyEscalationRuleTeamService, {
Service as OnCallDutyPolicyEscalationRuleTeamServiceType,
} from "CommonServer/Services/OnCallDutyPolicyEscalationRuleTeamService";
} from "Common/Server/Services/OnCallDutyPolicyEscalationRuleTeamService";
import OnCallDutyPolicyEscalationRuleUserService, {
Service as OnCallDutyPolicyEscalationRuleUserServiceType,
} from "CommonServer/Services/OnCallDutyPolicyEscalationRuleUserService";
} from "Common/Server/Services/OnCallDutyPolicyEscalationRuleUserService";
import OnCallDutyPolicyExecutionLogService, {
Service as OnCallDutyPolicyExecutionLogServiceType,
} from "CommonServer/Services/OnCallDutyPolicyExecutionLogService";
} from "Common/Server/Services/OnCallDutyPolicyExecutionLogService";
import OnCallDutyPolicyExecutionLogTimelineService, {
Service as OnCallDutyPolicyExecutionLogTimelineServiceType,
} from "CommonServer/Services/OnCallDutyPolicyExecutionLogTimelineService";
} from "Common/Server/Services/OnCallDutyPolicyExecutionLogTimelineService";
import OnCallDutyPolicyScheduleLayerService, {
Service as OnCallDutyPolicyScheduleLayerServiceType,
} from "CommonServer/Services/OnCallDutyPolicyScheduleLayerService";
} from "Common/Server/Services/OnCallDutyPolicyScheduleLayerService";
import OnCallDutyPolicyScheduleLayerUserService, {
Service as OnCallDutyPolicyScheduleLayerUserServiceType,
} from "CommonServer/Services/OnCallDutyPolicyScheduleLayerUserService";
} from "Common/Server/Services/OnCallDutyPolicyScheduleLayerUserService";
import OnCallDutyPolicyScheduleService, {
Service as OnCallDutyPolicyScheduleServiceType,
} from "CommonServer/Services/OnCallDutyPolicyScheduleService";
} from "Common/Server/Services/OnCallDutyPolicyScheduleService";
import OnCallDutyPolicyService, {
Service as OnCallDutyPolicyServiceType,
} from "CommonServer/Services/OnCallDutyPolicyService";
} from "Common/Server/Services/OnCallDutyPolicyService";
import ProjectCallSMSConfigService, {
Service as ProjectCallSMSConfigServiceType,
} from "CommonServer/Services/ProjectCallSMSConfigService";
} from "Common/Server/Services/ProjectCallSMSConfigService";
import ProjectSmtpConfigService, {
Service as ProjectSMTPConfigServiceType,
} from "CommonServer/Services/ProjectSmtpConfigService";
} from "Common/Server/Services/ProjectSmtpConfigService";
import PromoCodeService, {
Service as PromoCodeServiceType,
} from "CommonServer/Services/PromoCodeService";
} from "Common/Server/Services/PromoCodeService";
import ResellerService, {
Service as ResellerServiceType,
} from "CommonServer/Services/ResellerService";
} from "Common/Server/Services/ResellerService";
import ScheduledMaintenanceCustomFieldService, {
Service as ScheduledMaintenanceCustomFieldServiceType,
} from "CommonServer/Services/ScheduledMaintenanceCustomFieldService";
} from "Common/Server/Services/ScheduledMaintenanceCustomFieldService";
import ScheduledMaintenanceInternalNoteService, {
Service as ScheduledMaintenanceInternalNoteServiceType,
} from "CommonServer/Services/ScheduledMaintenanceInternalNoteService";
} from "Common/Server/Services/ScheduledMaintenanceInternalNoteService";
import ScheduledMaintenanceNoteTemplateService, {
Service as ScheduledMaintenanceNoteTemplateServiceType,
} from "CommonServer/Services/ScheduledMaintenanceNoteTemplateService";
} from "Common/Server/Services/ScheduledMaintenanceNoteTemplateService";
import ScheduledMaintenanceOwnerTeamService, {
Service as ScheduledMaintenanceOwnerTeamServiceType,
} from "CommonServer/Services/ScheduledMaintenanceOwnerTeamService";
} from "Common/Server/Services/ScheduledMaintenanceOwnerTeamService";
import ScheduledMaintenanceOwnerUserService, {
Service as ScheduledMaintenanceOwnerUserServiceType,
} from "CommonServer/Services/ScheduledMaintenanceOwnerUserService";
} from "Common/Server/Services/ScheduledMaintenanceOwnerUserService";
import ScheduledMaintenancePublicNoteService, {
Service as ScheduledMaintenancePublicNoteServiceType,
} from "CommonServer/Services/ScheduledMaintenancePublicNoteService";
} from "Common/Server/Services/ScheduledMaintenancePublicNoteService";
import ScheduledMaintenanceService, {
Service as ScheduledMaintenanceServiceType,
} from "CommonServer/Services/ScheduledMaintenanceService";
} from "Common/Server/Services/ScheduledMaintenanceService";
import ScheduledMaintenanceStateService, {
Service as ScheduledMaintenanceStateServiceType,
} from "CommonServer/Services/ScheduledMaintenanceStateService";
} from "Common/Server/Services/ScheduledMaintenanceStateService";
import ScheduledMaintenanceStateTimelineService, {
Service as ScheduledMaintenanceStateTimelineServiceType,
} from "CommonServer/Services/ScheduledMaintenanceStateTimelineService";
} from "Common/Server/Services/ScheduledMaintenanceStateTimelineService";
import ServiceCatalogOwnerTeamService, {
Service as ServiceCatalogOwnerTeamServiceType,
} from "CommonServer/Services/ServiceCatalogOwnerTeamService";
} from "Common/Server/Services/ServiceCatalogOwnerTeamService";
import ServiceCatalogOwnerUserService, {
Service as ServiceCatalogOwnerUserServiceType,
} from "CommonServer/Services/ServiceCatalogOwnerUserService";
} from "Common/Server/Services/ServiceCatalogOwnerUserService";
import ServiceCatalogService, {
Service as ServiceCatalogServiceType,
} from "CommonServer/Services/ServiceCatalogService";
import ServiceRepositoryService, {
Service as ServiceRepositoryType,
} from "CommonServer/Services/ServiceRepositoryService";
} from "Common/Server/Services/ServiceCatalogService";
import ServiceCopilotCodeRepositoryService, {
Service as ServiceCopilotCodeRepositoryType,
} from "Common/Server/Services/ServiceCopilotCodeRepositoryService";
import ServiceCatalogDependencyService, {
Service as ServiceCatalogDependencyServiceType,
} from "Common/Server/Services/ServiceCatalogDependencyService";
import ServiceCatalogMonitor from "Common/Models/DatabaseModels/ServiceCatalogMonitor";
import ServiceCatalogMonitorService, {
Service as ServiceCatalogMonitorServiceType,
} from "Common/Server/Services/ServiceCatalogMonitorService";
import ServiceCatalogTelemetryService from "Common/Models/DatabaseModels/ServiceCatalogTelemetryService";
import ServiceCatalogTelemetryServiceService, {
Service as ServiceCatalogTelemetryServiceServiceType,
} from "Common/Server/Services/ServiceCatalogTelemetryServiceService";
import ShortLinkService, {
Service as ShortLinkServiceType,
} from "CommonServer/Services/ShortLinkService";
} from "Common/Server/Services/ShortLinkService";
import SmsLogService, {
Service as SmsLogServiceType,
} from "CommonServer/Services/SmsLogService";
} from "Common/Server/Services/SmsLogService";
import SpanService, {
SpanService as SpanServiceType,
} from "CommonServer/Services/SpanService";
} from "Common/Server/Services/SpanService";
import StatusPageAnnouncementService, {
Service as StatusPageAnnouncementServiceType,
} from "CommonServer/Services/StatusPageAnnouncementService";
} from "Common/Server/Services/StatusPageAnnouncementService";
import StatusPageCustomFieldService, {
Service as StatusPageCustomFieldServiceType,
} from "CommonServer/Services/StatusPageCustomFieldService";
} from "Common/Server/Services/StatusPageCustomFieldService";
import StatusPageFooterLinkService, {
Service as StatusPageFooterLinkServiceType,
} from "CommonServer/Services/StatusPageFooterLinkService";
} from "Common/Server/Services/StatusPageFooterLinkService";
import StatusPageGroupService, {
Service as StatusPageGroupServiceType,
} from "CommonServer/Services/StatusPageGroupService";
} from "Common/Server/Services/StatusPageGroupService";
import StatusPageHeaderLinkService, {
Service as StatusPageHeaderLinkServiceType,
} from "CommonServer/Services/StatusPageHeaderLinkService";
} from "Common/Server/Services/StatusPageHeaderLinkService";
import StatusPageHistoryChartBarColorRuleService, {
Service as StatusPageHistoryChartBarColorRuleServiceType,
} from "CommonServer/Services/StatusPageHistoryChartBarColorRuleService";
} from "Common/Server/Services/StatusPageHistoryChartBarColorRuleService";
import StatusPageOwnerTeamService, {
Service as StatusPageOwnerTeamServiceType,
} from "CommonServer/Services/StatusPageOwnerTeamService";
} from "Common/Server/Services/StatusPageOwnerTeamService";
import StatusPageOwnerUserService, {
Service as StatusPageOwnerUserServiceType,
} from "CommonServer/Services/StatusPageOwnerUserService";
} from "Common/Server/Services/StatusPageOwnerUserService";
import StatusPagePrivateUserService, {
Service as StatusPagePrivateUserServiceType,
} from "CommonServer/Services/StatusPagePrivateUserService";
} from "Common/Server/Services/StatusPagePrivateUserService";
import StatusPageResourceService, {
Service as StatusPageResourceServiceType,
} from "CommonServer/Services/StatusPageResourceService";
} from "Common/Server/Services/StatusPageResourceService";
import StatusPageSSOService, {
Service as StatusPageSSOServiceType,
} from "CommonServer/Services/StatusPageSsoService";
} from "Common/Server/Services/StatusPageSsoService";
import TeamMemberService, {
TeamMemberService as TeamMemberServiceType,
} from "CommonServer/Services/TeamMemberService";
} from "Common/Server/Services/TeamMemberService";
import TeamPermissionService, {
Service as TeamPermissionServiceType,
} from "CommonServer/Services/TeamPermissionService";
} from "Common/Server/Services/TeamPermissionService";
import TeamService, {
Service as TeamServiceType,
} from "CommonServer/Services/TeamService";
} from "Common/Server/Services/TeamService";
import TelemetryServiceService, {
Service as TelemetryServiceServiceType,
} from "CommonServer/Services/TelemetryServiceService";
} from "Common/Server/Services/TelemetryServiceService";
import TelemetryUsageBillingService, {
Service as TelemetryUsageBillingServiceType,
} from "CommonServer/Services/TelemetryUsageBillingService";
} from "Common/Server/Services/TelemetryUsageBillingService";
import UserNotificationRuleService, {
Service as UserNotificationRuleServiceType,
} from "CommonServer/Services/UserNotificationRuleService";
} from "Common/Server/Services/UserNotificationRuleService";
import UserNotificationSettingService, {
Service as UserNotificationSettingServiceType,
} from "CommonServer/Services/UserNotificationSettingService";
} from "Common/Server/Services/UserNotificationSettingService";
import UserOnCallLogService, {
Service as UserNotificationLogServiceType,
} from "CommonServer/Services/UserOnCallLogService";
} from "Common/Server/Services/UserOnCallLogService";
import UserService, {
Service as UserServiceType,
} from "CommonServer/Services/UserService";
} from "Common/Server/Services/UserService";
import WorkflowLogService, {
Service as WorkflowLogServiceType,
} from "CommonServer/Services/WorkflowLogService";
} from "Common/Server/Services/WorkflowLogService";
import WorkflowService, {
Service as WorkflowServiceType,
} from "CommonServer/Services/WorkflowService";
} from "Common/Server/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 ServiceCatalog from "Model/Models/ServiceCatalog";
import ServiceCatalogOwnerTeam from "Model/Models/ServiceCatalogOwnerTeam";
import ServiceCatalogOwnerUser from "Model/Models/ServiceCatalogOwnerUser";
import ServiceRepository from "Model/Models/ServiceRepository";
import ShortLink from "Model/Models/ShortLink";
import SmsLog from "Model/Models/SmsLog";
import StatusPageAnnouncement from "Model/Models/StatusPageAnnouncement";
} from "Common/Server/Services/WorkflowVariableService";
import ProbeOwnerTeamService, {
Service as ProbeOwnerTeamServiceType,
} from "Common/Server/Services/ProbeOwnerTeamService";
import ProbeOwnerUserService, {
Service as ProbeOwnerUserServiceType,
} from "Common/Server/Services/ProbeOwnerUserService";
import TelemetryExceptionService, {
Service as TelemetryExceptionServiceType,
} from "Common/Server/Services/TelemetryExceptionService";
import ExceptionInstanceService, {
ExceptionInstanceService as ExceptionInstanceServiceType,
} from "Common/Server/Services/ExceptionInstanceService";
import FeatureSet from "Common/Server/Types/FeatureSet";
import Express, { ExpressApplication } from "Common/Server/Utils/Express";
import Log from "Common/Models/AnalyticsModels/Log";
import Metric from "Common/Models/AnalyticsModels/Metric";
import MonitorMetricsByMinute from "Common/Models/AnalyticsModels/MonitorMetricsByMinute";
import Span from "Common/Models/AnalyticsModels/Span";
import ApiKey from "Common/Models/DatabaseModels/ApiKey";
import ApiKeyPermission from "Common/Models/DatabaseModels/ApiKeyPermission";
import CallLog from "Common/Models/DatabaseModels/CallLog";
import Domain from "Common/Models/DatabaseModels/Domain";
import EmailLog from "Common/Models/DatabaseModels/EmailLog";
import EmailVerificationToken from "Common/Models/DatabaseModels/EmailVerificationToken";
import Incident from "Common/Models/DatabaseModels/Incident";
import IncidentCustomField from "Common/Models/DatabaseModels/IncidentCustomField";
import IncidentInternalNote from "Common/Models/DatabaseModels/IncidentInternalNote";
import IncidentNoteTemplate from "Common/Models/DatabaseModels/IncidentNoteTemplate";
import IncidentOwnerTeam from "Common/Models/DatabaseModels/IncidentOwnerTeam";
import IncidentOwnerUser from "Common/Models/DatabaseModels/IncidentOwnerUser";
import IncidentPublicNote from "Common/Models/DatabaseModels/IncidentPublicNote";
import IncidentSeverity from "Common/Models/DatabaseModels/IncidentSeverity";
import IncidentState from "Common/Models/DatabaseModels/IncidentState";
import IncidentStateTimeline from "Common/Models/DatabaseModels/IncidentStateTimeline";
import IncidentTemplate from "Common/Models/DatabaseModels/IncidentTemplate";
import IncidentTemplateOwnerTeam from "Common/Models/DatabaseModels/IncidentTemplateOwnerTeam";
import IncidentTemplateOwnerUser from "Common/Models/DatabaseModels/IncidentTemplateOwnerUser";
import Label from "Common/Models/DatabaseModels/Label";
import Monitor from "Common/Models/DatabaseModels/Monitor";
import MonitorCustomField from "Common/Models/DatabaseModels/MonitorCustomField";
import MonitorGroupOwnerTeam from "Common/Models/DatabaseModels/MonitorGroupOwnerTeam";
import MonitorGroupOwnerUser from "Common/Models/DatabaseModels/MonitorGroupOwnerUser";
import MonitorGroupResource from "Common/Models/DatabaseModels/MonitorGroupResource";
import MonitorOwnerTeam from "Common/Models/DatabaseModels/MonitorOwnerTeam";
import MonitorOwnerUser from "Common/Models/DatabaseModels/MonitorOwnerUser";
import MonitorProbe from "Common/Models/DatabaseModels/MonitorProbe";
import MonitorSecret from "Common/Models/DatabaseModels/MonitorSecret";
import MonitorStatus from "Common/Models/DatabaseModels/MonitorStatus";
import MonitorTimelineStatus from "Common/Models/DatabaseModels/MonitorStatusTimeline";
import OnCallDutyPolicy from "Common/Models/DatabaseModels/OnCallDutyPolicy";
import OnCallDutyPolicyCustomField from "Common/Models/DatabaseModels/OnCallDutyPolicyCustomField";
import OnCallDutyPolicyEscalationRule from "Common/Models/DatabaseModels/OnCallDutyPolicyEscalationRule";
import OnCallDutyPolicyEscalationRuleSchedule from "Common/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleSchedule";
import OnCallDutyPolicyEscalationRuleTeam from "Common/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleTeam";
import OnCallDutyPolicyEscalationRuleUser from "Common/Models/DatabaseModels/OnCallDutyPolicyEscalationRuleUser";
import OnCallDutyPolicyExecutionLog from "Common/Models/DatabaseModels/OnCallDutyPolicyExecutionLog";
import OnCallDutyPolicyExecutionLogTimeline from "Common/Models/DatabaseModels/OnCallDutyPolicyExecutionLogTimeline";
import OnCallDutyPolicySchedule from "Common/Models/DatabaseModels/OnCallDutyPolicySchedule";
import OnCallDutyPolicyScheduleLayer from "Common/Models/DatabaseModels/OnCallDutyPolicyScheduleLayer";
import OnCallDutyPolicyScheduleLayerUser from "Common/Models/DatabaseModels/OnCallDutyPolicyScheduleLayerUser";
import ProjectCallSMSConfig from "Common/Models/DatabaseModels/ProjectCallSMSConfig";
import ProjectSmtpConfig from "Common/Models/DatabaseModels/ProjectSmtpConfig";
import PromoCode from "Common/Models/DatabaseModels/PromoCode";
import Reseller from "Common/Models/DatabaseModels/Reseller";
import ScheduledMaintenance from "Common/Models/DatabaseModels/ScheduledMaintenance";
import ScheduledMaintenanceCustomField from "Common/Models/DatabaseModels/ScheduledMaintenanceCustomField";
import ScheduledMaintenanceInternalNote from "Common/Models/DatabaseModels/ScheduledMaintenanceInternalNote";
import ScheduledMaintenanceNoteTemplate from "Common/Models/DatabaseModels/ScheduledMaintenanceNoteTemplate";
import ScheduledMaintenanceOwnerTeam from "Common/Models/DatabaseModels/ScheduledMaintenanceOwnerTeam";
import ScheduledMaintenanceOwnerUser from "Common/Models/DatabaseModels/ScheduledMaintenanceOwnerUser";
import ScheduledMaintenancePublicNote from "Common/Models/DatabaseModels/ScheduledMaintenancePublicNote";
import ScheduledMaintenanceState from "Common/Models/DatabaseModels/ScheduledMaintenanceState";
import ScheduledMaintenanceStateTimeline from "Common/Models/DatabaseModels/ScheduledMaintenanceStateTimeline";
import ServiceCatalog from "Common/Models/DatabaseModels/ServiceCatalog";
import ServiceCatalogOwnerTeam from "Common/Models/DatabaseModels/ServiceCatalogOwnerTeam";
import ServiceCatalogOwnerUser from "Common/Models/DatabaseModels/ServiceCatalogOwnerUser";
import ServiceCopilotCodeRepository from "Common/Models/DatabaseModels/ServiceCopilotCodeRepository";
import ShortLink from "Common/Models/DatabaseModels/ShortLink";
import SmsLog from "Common/Models/DatabaseModels/SmsLog";
import StatusPageAnnouncement from "Common/Models/DatabaseModels/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";
import StatusPageCustomField from "Common/Models/DatabaseModels/StatusPageCustomField";
import StatusPageFooterLink from "Common/Models/DatabaseModels/StatusPageFooterLink";
import StatusPageGroup from "Common/Models/DatabaseModels/StatusPageGroup";
import StatusPageHeaderLink from "Common/Models/DatabaseModels/StatusPageHeaderLink";
import TelemetryIngestionKey from "Common/Models/DatabaseModels/TelemetryIngestionKey";
import StatusPageHistoryChartBarColorRule from "Common/Models/DatabaseModels/StatusPageHistoryChartBarColorRule";
import StatusPageOwnerTeam from "Common/Models/DatabaseModels/StatusPageOwnerTeam";
import StatusPageOwnerUser from "Common/Models/DatabaseModels/StatusPageOwnerUser";
import StatusPagePrivateUser from "Common/Models/DatabaseModels/StatusPagePrivateUser";
import StatusPageResource from "Common/Models/DatabaseModels/StatusPageResource";
import StatusPageSSO from "Common/Models/DatabaseModels/StatusPageSso";
import Team from "Common/Models/DatabaseModels/Team";
import TeamMember from "Common/Models/DatabaseModels/TeamMember";
import TeamPermission from "Common/Models/DatabaseModels/TeamPermission";
import TelemetryService from "Common/Models/DatabaseModels/TelemetryService";
import TelemetryUsageBilling from "Common/Models/DatabaseModels/TelemetryUsageBilling";
import User from "Common/Models/DatabaseModels/User";
import UserNotificationRule from "Common/Models/DatabaseModels/UserNotificationRule";
import UserNotificationSetting from "Common/Models/DatabaseModels/UserNotificationSetting";
import UserOnCallLog from "Common/Models/DatabaseModels/UserOnCallLog";
import Workflow from "Common/Models/DatabaseModels/Workflow";
import WorkflowLog from "Common/Models/DatabaseModels/WorkflowLog";
import WorkflowVariable from "Common/Models/DatabaseModels/WorkflowVariable";
import ProbeOwnerTeam from "Common/Models/DatabaseModels/ProbeOwnerTeam";
import ProbeOwnerUser from "Common/Models/DatabaseModels/ProbeOwnerUser";
import ServiceCatalogDependency from "Common/Models/DatabaseModels/ServiceCatalogDependency";
import TelemetryAttribute from "Common/Models/AnalyticsModels/TelemetryAttribute";
import ExceptionInstance from "Common/Models/AnalyticsModels/ExceptionInstance";
import TelemetyException from "Common/Models/DatabaseModels/TelemetryException";
const BaseAPIFeatureSet: FeatureSet = {
init: async (): Promise<void> => {
@@ -384,6 +432,30 @@ const BaseAPIFeatureSet: FeatureSet = {
const APP_NAME: string = "api";
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAnalyticsAPI<TelemetryAttribute, TelemetryAttributeServiceType>(
TelemetryAttribute,
TelemetryAttributeService,
).getRouter(),
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAnalyticsAPI<ExceptionInstance, ExceptionInstanceServiceType>(
ExceptionInstance,
ExceptionInstanceService,
).getRouter(),
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<TelemetyException, TelemetryExceptionServiceType>(
TelemetyException,
TelemetryExceptionService,
).getRouter(),
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAnalyticsAPI<Log, LogServiceType>(Log, LogService).getRouter(),
@@ -405,6 +477,14 @@ const BaseAPIFeatureSet: FeatureSet = {
>(MonitorMetricsByMinute, MonitorMetricsByMinuteService).getRouter(),
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<TelemetryIngestionKey, TelemetryIngestionKeyServiceType>(
TelemetryIngestionKey,
TelemetryIngestionKeyService,
).getRouter(),
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAnalyticsAPI<Span, SpanServiceType>(
@@ -429,6 +509,14 @@ const BaseAPIFeatureSet: FeatureSet = {
).getRouter(),
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<
ServiceCatalogDependency,
ServiceCatalogDependencyServiceType
>(ServiceCatalogDependency, ServiceCatalogDependencyService).getRouter(),
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<
@@ -440,6 +528,25 @@ const BaseAPIFeatureSet: FeatureSet = {
).getRouter(),
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<ServiceCatalogMonitor, ServiceCatalogMonitorServiceType>(
ServiceCatalogMonitor,
ServiceCatalogMonitorService,
).getRouter(),
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<
ServiceCatalogTelemetryService,
ServiceCatalogTelemetryServiceServiceType
>(
ServiceCatalogTelemetryService,
ServiceCatalogTelemetryServiceService,
).getRouter(),
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<MonitorProbe, MonitorProbeServiceType>(
@@ -448,6 +555,22 @@ const BaseAPIFeatureSet: FeatureSet = {
).getRouter(),
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<ProbeOwnerUser, ProbeOwnerUserServiceType>(
ProbeOwnerUser,
ProbeOwnerUserService,
).getRouter(),
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<ProbeOwnerTeam, ProbeOwnerTeamServiceType>(
ProbeOwnerTeam,
ProbeOwnerTeamService,
).getRouter(),
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<MonitorSecret, MonitorSecretServiceType>(
@@ -471,9 +594,12 @@ const BaseAPIFeatureSet: FeatureSet = {
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new BaseAPI<ServiceRepository, ServiceRepositoryType>(
ServiceRepository,
ServiceRepositoryService,
new BaseAPI<
ServiceCopilotCodeRepository,
ServiceCopilotCodeRepositoryType
>(
ServiceCopilotCodeRepository,
ServiceCopilotCodeRepositoryService,
).getRouter(),
);
@@ -1009,7 +1135,7 @@ const BaseAPIFeatureSet: FeatureSet = {
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new CodeRepositoryAPI().getRouter(),
new CopilotCodeRepositoryAPI().getRouter(),
);
app.use(
@@ -1017,11 +1143,20 @@ const BaseAPIFeatureSet: FeatureSet = {
new CopilotActionAPI().getRouter(),
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new CopilotPullRequestAPI().getRouter(),
);
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new UserNotificationLogTimelineAPI().getRouter(),
);
app.use(`/${APP_NAME.toLocaleLowerCase()}`, new UserCallAPI().getRouter());
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,
new UserTwoFactorAuthAPI().getRouter(),
);
app.use(`/${APP_NAME.toLocaleLowerCase()}`, new UserEmailAPI().getRouter());
app.use(`/${APP_NAME.toLocaleLowerCase()}`, new UserSMSAPI().getRouter());
app.use(`/${APP_NAME.toLocaleLowerCase()}`, new Ingestor().getRouter());
@@ -1200,6 +1335,8 @@ const BaseAPIFeatureSet: FeatureSet = {
app.use(`/${APP_NAME.toLocaleLowerCase()}`, NotificationAPI);
app.use(`/${APP_NAME.toLocaleLowerCase()}`, TelemetryAPI);
//attach api's
app.use(
`/${APP_NAME.toLocaleLowerCase()}`,

View File

@@ -0,0 +1,67 @@
## Deploy LLM Server
This step is optional. You need to deploy LLM Server only if you want to use Copilot with LLM Server on your infrastructure for data privacy reasons. If you are comfortable with OpenAI's privacy policy, you can skip this step and use OpenAI directly.
### Pre-requisites
Before you deploy LLM Server, you need to make sure you have the following:
- **Docker**: You need to have Docker installed on your machine.
- **Docker Compose**: You need to have Docker Compose installed on your machine.
- **System Requirements**: You need to have at least 64 GB of RAM, 32 GB GPU (compitable with CUDA & Docker), 8 CPU cores, and 100 GB of disk space. You could get away with less resources, but we recommend the above configuration for optimal performance.
- **GPU is accessible by Docker**: You need to make sure that the GPU is accessible by Docker. Please read this [guide](https://docs.docker.com/compose/gpu-support/) for more information.
### Environment Variables
You need to set the following environment variables in the `docker-compose.yml` file:
- `HF_TOKEN`: This is the Hugging Face API token. You can get this token by signing up on Hugging Face and creating a new API token.
- `HF_MODEL_NAME` (optional): This is the model name from Hugging Face. You can get this model name from the Hugging Face model hub. If you do not set this, we will use `meta-llama/Meta-Llama-3-8B-Instruct` as the default model.
### Installation
To deploy LLM Server, you need to follow the following steps with docker-compose:
Create a `docker-compose.yml` file with the following content:
```yaml
llm:
extends:
file: ./docker-compose.base.yml
service: llm
ports:
- '8547:8547'
image: 'oneuptime/llm:release'
environment:
- HF_TOKEN=<TOKEN_FROM_HUGGINGFACE>
- HF_MODEL_NAME=<MODEL_NAME_FROM_HUGGING_FACE>
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
```
Run the following command to start the LLM Server:
```bash
docker compose up -d
```
You can now access the LLM Server at `http://localhost:8547`.
### TLS/SSL Configuration
You can set up TLS/SSL by having a reverse proxy in front of the LLM Server. This is recommended for production deployments and is beyond the scope of this document.
### Public Access
Please make sure this server is publicly accessible. So, it can be accessed by Copilot.
### Security
Please also make sure to secure the server by setting up a firewall so only copilot can access it.

View File

@@ -0,0 +1,140 @@
## OneUptime Copilot
OneUptime Copilot is a tool that helps you improve your codebase automatically. Copilot can fix following issues automatically:
- **Performance Issues**: Improve database queries, optimize code, reduce memory usage, decrease API response time, etc.
- **Security Issues**: Fix security vulnerabilities, prevent SQL injection, XSS, CSRF, etc.
- **Code Quality Issues**: Improve code readability, maintainability, and scalability. Improve comments, naming conventions, refactor code, etc.
- **Error Handling Issues**: Improve error handling, exception handling, logging, etc.
- **Testing Issues**: Improve test coverage, test quality, test performance, etc.
- **Documentation Issues**: Improve documentation quality, comments, README, etc.
### Architecture
Copilot can be installed as a CI/CD tool and can be run on every merge to master / main branch. Copilot can also be scheduled to run as a cron on the CI/CD pipeline. We recommend you run Copilot atleast once/day.
There are three services when running copilot:
- **OneUptime**: You need to deploy or use OneUptime Cloud (https://oneuptime.com) to run Copilot. When you deploy OneUptime, url should be publicily accessible.
- **Copilot**: Copilot is the main service that runs the Copilot engine. Copilot engine is responsible for analyzing the codebase and fixing issues.
- **LLM Server** (Optional): Copilot sends your code to LLM Server to analyze and fix issues. The source-code and docker-image is [open-source](https://github.com/OneUptime/oneuptime/tree/master/LLM) and can be found at [Docker Hub](https://hub.docker.com/r/oneuptime/llm). This can be self-deployed if you want to run Copilot on-premises or you can use the hosted version.
### FAQ
**Is my code sent to OneUptime?**
No, your code is not sent to OneUptime. Copilot runs on your CI/CD pipeline and sends the code to LLM Server for analysis. LLM Server can be self-hosted.
**Is my code sent to Self-Hosted LLM Server?**
Yes, but you can self host LLM server so code is not sent outside of your infrastructure. Your code is sent to LLM Server for analysis. LLM Server is responsible for analyzing the code and fixing issues.
**Is my code sent to any third-party?**
No. We strictly do not send any telemetry data or code to any third-party.
**Is my code sent to OpenAI?**
No, If you host LLM Server yourself.
Yes, if you choose to use OpenAI by setting `OPENAI_API_KEY`. We recommend you to use OpenAI only if you are comfortable with OpenAI's privacy policy. We're not responsible for any data sent to OpenAI or how your code is analyzed / used by OpenAI.
### Pre-requisites
Before you install Copilot, you need to make sure you have the following:
- **OneUptime Account**: You need to have a OneUptime account to use Copilot. You can sign up for a free account at [OneUptime](https://oneuptime.com). You can either use OneUptime Cloud or deploy OneUptime on your infrastructure.
- **GitHub Account**: You need to have a GitHub account to use Copilot. You can sign up for a free account at [GitHub](https://github.com). You can also use GitLab, Bitbucket, etc.
You also need either of the following:
- **LLM Server** (Optional): You need to have LLM Server to run Copilot. [Please check this guide to deploy LLM Server](https://oneuptime.com/docs/copilot/deploy-llm-server).
or
- **OpenAI** (Optional): You need to have OpenAI API Key and Model to run Copilot. Please check env vars for more information.
### Installation
To install Copilot, you need to follow the following steps:
#### Environment Variables
You need to set the following environment variables to run Copilot:
**Required Environment Variables**:
- **ONEUPTIME_REPOSITORY_SECRET_KEY**: The secret key of the repository. You can get this key from OneUptime Dashboard -> Reliability Copilot -> View Repository. If you don't have a repository, you can create a new repository, then click on "View Repository" to get the secret key.
- **CODE_REPOSITORY_USERNAME**: OneUptime uses this username to commit and push changes to GitHub / GitLab / etc. This should be the username of the existing user on GitHub that has access to the repository.
- **CODE_REPOSITORY_PASSWORD**: OneUptime uses this password to commit and push changes to GitHub / GitLab / etc. This should be the password of the existing user on GitHub that has access to the repository. You can also use Personal Access Tokens instead of Password. Please make sure the token has write permissions to the repo.
**Optional Environment Variables**:
- **ONEUPTIME_URL**: The URL of OneUptime Cloud. If left empty, Copilot will default to `https://oneuptime.com`.
If you are using LLM Server, you need to set the following environment variables:
- **ONEUPTIME_LLM_SERVER_URL**: The URL of LLM Server. (For example: https://your-llm-server.com:8547)
If you are using OpenAI, you need to set the following environment variables:
- **OPENAI_API_KEY**: The API key of OpenAI. You can get this key from OpenAI Dashboard.
**Important**: You need to provide either `ONEUPTIME_LLM_SERVER_URL` or `OPENAI_API_KEY` in order to use Copilot.
#### GitHub Actions
You can use GitHub Actions to run Copilot on every merge to master / main branch.
```yaml
name: "OneUptime Reliability Copilot"
on:
push:
# change this to main if you are using main branch.
branches: [ master ]
schedule:
# Run every day at midnight UTC
- cron: '0 0 * * *'
jobs:
analyze:
name: Analyze Code
runs-on: ubuntu-latest
steps:
# Run Reliability Copilot in Docker Container
- name: Run Copilot
run: |
docker run --rm \
-e CODE_REPOSITORY_PASSWORD='<YOUR_GITHUB_PASSWORD>' \ # Required. Please make sure to use GitHub secrets.
-e CODE_REPOSITORY_USERNAME='<YOUR_GITHUB_USERNAME>' \ # Required.
-e ONEUPTIME_URL='https://oneuptime.com' \ # Optional. Leave empty to use OneUptime Cloud.
-e ONEUPTIME_REPOSITORY_SECRET_KEY='<ONEUPTIME_REPOSITORY_SECRET_KEY>' \ # Required. Please make sure to use GitHub secrets.
-e ONEUPTIME_LLM_SERVER_URL='<YOUR_ONEUPTIME_LLM_SERVER>' \ # Optional. Leave empty to use OneUptime LLM Server.
-e OPENAI_API_KEY='<YOUR_OPENAI_API_KEY>' \ # Optional. Leave empty to not use OpenAI.
--net=host oneuptime/copilot:release
```
#### Docker
You can also run Copilot using docker. You can run this in any CI/CD of your choice.
```bash
docker run --rm \
-e CODE_REPOSITORY_PASSWORD='<YOUR_GITHUB_PASSWORD>' \ # Required. Please make sure to use GitHub secrets.
-e CODE_REPOSITORY_USERNAME='<YOUR_GITHUB_USERNAME>' \ # Required.
-e ONEUPTIME_URL='https://oneuptime.com' \ # Optional. Leave empty to use OneUptime Cloud.
-e ONEUPTIME_REPOSITORY_SECRET_KEY='<ONEUPTIME_REPOSITORY_SECRET_KEY>' \ # Required. Please make sure to use GitHub secrets.
-e ONEUPTIME_LLM_SERVER_URL='<YOUR_ONEUPTIME_LLM_SERVER>' \ # Optional. Leave empty to use OneUptime LLM Server.
-e OPENAI_API_KEY='<YOUR_OPENAI_API_KEY>' \ # Optional. Leave empty to not use OpenAI.
--net=host oneuptime/copilot:release
```
### Support
If you have any questions or need help, please contact us at support@oneuptime.com

View File

@@ -49,7 +49,7 @@ npm start
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.
# Read env vars from config.env file and run docker compose up.
(export $(grep -v '^#' config.env | xargs) && docker compose up --remove-orphans -d)
# Use sudo if you're having permission issues with binding ports.
@@ -74,6 +74,16 @@ If you need to use SSL/TLS certificates, follow these steps:
- Set `HTTP_PROTOCOL` env var to `https`.
- Change `HOST` env var to the domain name of the server where the reverse proxy is hosted.
## Production Readiness Checklist
Ideally do not deploy OneUptime in production with docker-compose. We highly recommend using Kubernetes. There's a helm chart available for OneUptime [here](https://artifacthub.io/packages/helm/oneuptime/oneuptime).
If you still want to deploy OneUptime in production with docker-compose, please consider the following:
- **SSL/TLS**: Set up SSL/TLS certificates. OneUptime does not support setting up SSL/TLS certificates. You need to set up SSL/TLS certificates on your own. Please see above.
- **Secrets**: Make sure you have random secrets in your `config.env` file. There are some default secrets in that file. Please replace them with random long strings.
- **Backups**: Regularly backup your databases (Clickhouse, Postgres). Redis is used as a cache and is stateless and can be safely ignored.
- **Updates**: Please regularly update OneUptime. We release updates every day. We recommend you to update the software aleast once a week if you're running in production.
### Updating OneUptime
@@ -87,6 +97,4 @@ npm run update
### Things to consider
- In our Docker setup, we employ a local logging driver. OneUptime, particularly within the probe and ingestor containers, generates a substantial amount of logs. To prevent your storage from becoming full, it's crucial to limit the logging storage in Docker. For detailed instructions on how to do this, please refer to the official Docker documentation [here](https://docs.docker.com/config/containers/logging/local/).
- In our Docker setup, we employ a local logging driver. OneUptime, particularly within the probe and ingestor containers, generates a substantial amount of logs. To prevent your storage from becoming full, it's crucial to limit the logging storage in Docker. For detailed instructions on how to do this, please refer to the official Docker documentation [here](https://docs.docker.com/config/containers/logging/local/).

View File

@@ -43,7 +43,7 @@ Measure and optimize the performance of your online apps and services. Track key
Detect and diagnose errors in your online services. Get detailed error reports with stack traces, context, and user feedback. Replace tools like Sentry.
##### Reliability Autopilot
##### Reliability Copilot
Scan your code and fix performance issues and errors automatically. Get recommendations for improving the reliability of your online services.

View File

@@ -1,21 +1,86 @@
## Setting up Custom Probes
You can set up custom probes inside your network to monitor resources in your private network or resources that are behind your firewall.
You can set up custom probes inside your network to monitor resources in your private network or resources that are behind your firewall.
To begin with you need to create a custom probe in your Project Settings > Probe. Once you have created the custom probe on your OneUptime Dashboard. You should have the `PROBE_ID` and `PROBE_KEY`
### Deploy Probe
### Run the probe
#### Docker
To run a probe, please make sure you have docker installed. You can run custom probe by:
To run a probe, please make sure you have docker installed. You can run custom probe by:
```
docker run --name oneuptime-probe --network host -e PROBE_KEY=<probe-key> -e PROBE_ID=<probe-id> -e ONEUPTIME_URL=https://oneuptime.com -d oneuptime/probe:release
```
If you are self hosting OneUptime, you can change `INGESTOR_URL` to your custom self hosted instance.
If you are self hosting OneUptime, you can change `ONEUPTIME_URL` to your custom self hosted instance.
### Verify
#### Docker Compose
You can also run the probe using docker-compose. Create a `docker-compose.yml` file with the following content:
```yaml
version: "3"
services:
oneuptime-probe:
image: oneuptime/probe:release
container_name: oneuptime-probe
environment:
- PROBE_KEY=<probe-key>
- PROBE_ID=<probe-id>
- ONEUPTIME_URL=https://oneuptime.com
network_mode: host
restart: always
```
Then run the following command:
```
docker compose up -d
```
If you are self hosting OneUptime, you can change `ONEUPTIME_URL` to your custom self hosted instance.
#### Kubernetes
You can also run the probe using Kubernetes. Create a `oneuptime-probe.yaml` file with the following content:
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: oneuptime-probe
spec:
selector:
matchLabels:
app: oneuptime-probe
template:
metadata:
labels:
app: oneuptime-probe
spec:
containers:
image: oneuptime/probe:release
env:
- name: PROBE_KEY
value: "<probe-key>"
- name: PROBE_ID
value: "<probe-id>"
- name: ONEUPTIME_URL
value: "https://oneuptime.com"
```
Then run the following command:
```bash
kubectl apply -f oneuptime-probe.yaml
```
If you are self hosting OneUptime, you can change `ONEUPTIME_URL` to your custom self hosted instance.
### Verify
If the probe is running successfully. It should show as `Connected` on your OneUptime dashboard. If it does not show as connected. You need to check logs of the container. If you're still having trouble. Please create an issue on [GitHub](https://github.com/oneuptime/oneuptime) or [contact support](https://oneuptime.com/support)

View File

@@ -32,23 +32,25 @@ You can find the full list of supported sources [here](https://www.fluentd.org/d
- **Step 1: Install Fluentd on your system** - You can install Fluentd using the instructions provided [here](https://docs.fluentd.org/installation)
- **Step 2: Sign up for OneUptime account** - You can sign up for a free account [here](https://oneuptime.com). Please note while the account is free, log ingestion is a paid feature. You can find more details about the pricing [here](https://oneuptime.com/pricing).
- **Step 3: Create OneUptime Project** - Once you have the account, you can create a project from the OneUptime dashboard. If you need any help with creating a project or have any questions, please reach out to us at support@oneuptime.com
- **Step 4: Create a OneUptime Telemetry Service on OneUptime Dashboard**
- **Step 4: Create Telemetry Ingestion Token** - Once you have created a OneUptime account, you can create a telemetry ingestion token to ingest logs, metrics and traces from your application.
On the telemetry service page, click on "Create Telemetry Service" button.
After you sign up to OneUptime and create a project. Click on "More" in the Navigation bar and click on "Project Settings".
![Create Service](/docs/static/images/CreateService.png)
On the Telemetry Ingestion Key page, click on "Create Ingestion Key" to create a token.
Once you create a telemetry service, click on "View Service" and you will be redirected to the telemetry service page.
![Create Service](/docs/static/images/TelemetryIngestionKeys.png)
Click on View Service Token and copy the token. You will need this token to configure the telemetry service. **Please keep this token safe.**
Once you created a token, click on "View" to view the token.
![View Service](/docs/static/images/ViewServiceToken.png)
![View Service](/docs/static/images/TelemetryIngestionKeyView.png)
## Configuration
You can use the following configuration to send the telemetry data to the OneUptime HTTP Source. You can add this configuration to the fluentd configuration file. The configuration file is usually located at `/etc/fluentd/fluent.conf` or `/etc/td-agent/td-agent.conf`.
You need to replace the `YOUR_SERVICE_TOKEN` with the token you created in the previous step. You also need to replace the `YOUR_SERVICE_NAME` with the name of your service. name of the service can be any name you like. If the service does not exist in OneUptime, it will be created automatically.
```yaml
# Match all patterns
<match **>
@@ -57,7 +59,7 @@ You can use the following configuration to send the telemetry data to the OneUpt
endpoint https://oneuptime.com/fluentd/logs
open_timeout 2
headers {"x-oneuptime-service-token":"<YOUR_SERVICE_TOKEN>"}
headers {"x-oneuptime-token":"YOUR_SERVICE_TOKEN", "x-oneuptime-service-name":"YOUR_SERVICE_NAME"}
content_type application/json
json_array true
@@ -93,7 +95,7 @@ An example of full configuration file is shown below:
endpoint https://oneuptime.com/fluentd/logs
open_timeout 2
headers {"x-oneuptime-service-token":"<YOUR_SERVICE_TOKEN>"}
headers {"x-oneuptime-token":"YOUR_SERVICE_TOKEN", "x-oneuptime-service-name":"YOUR_SERVICE_NAME"}
content_type application/json
json_array true

View File

@@ -1,20 +1,18 @@
# Integrate OpenTelemetry (logging, metrics and traces) with OneUptime.
### Step 1 - Create a OneUptime Telemetry Service.
### Step 1 - Create Telemetry Ingestion Token.
Once you have created a OneUptime account, you can create a telemetry service by clicking on the "Add Service" button.
Once you have created a OneUptime account, you can create a telemetry ingestion token to ingest logs, metrics and traces from your application.
After you sign up to OneUptime and create a project. Click on more in the Navigation bar and click on "Telemetry".
After you sign up to OneUptime and create a project. Click on "More" in the Navigation bar and click on "Project Settings".
On the telemetry service page, click on "Create Telemetry Service" button.
On the Telemetry Ingestion Key page, click on "Create Ingestion Key" to create a token.
![Create Service](/docs/static/images/CreateService.png)
![Create Service](/docs/static/images/TelemetryIngestionKeys.png)
Once you create a telemetry service, click on "View Service" and you will be redirected to the telemetry service page.
Once you created a token, click on "View" to view the token.
Click on View Service Token and copy the token. You will need this token to configure the telemetry service. Please keep this token safe.
![View Service](/docs/static/images/ViewServiceToken.png)
![View Service](/docs/static/images/TelemetryIngestionKeyView.png)
### Step 2 - Configure the telemetry service in your application.
@@ -42,14 +40,17 @@ Once you have configured the telemetry service in your application, you can inte
| Environment Variable | Value |
| --- | --- |
| OTEL_EXPORTER_OTLP_HEADERS | x-oneuptime-service-token=<YOUR_ONEUPTIME_SERVICE_TOKEN> |
| OTEL_EXPORTER_OTLP_HEADERS | x-oneuptime-token=YOUR_ONEUPTIME_SERVICE_TOKEN |
| OTEL_EXPORTER_OTLP_ENDPOINT | https://otlp.oneuptime.com |
| OTEL_SERVICE_NAME | NAME_OF_YOUR_SERVICE |
**Example**
```bash
export OTEL_EXPORTER_OTLP_HEADERS=x-oneuptime-service-token=9c8806e0-a4aa-11ee-be95-010d5967b068
export OTEL_EXPORTER_OTLP_HEADERS=x-oneuptime-token=9c8806e0-a4aa-11ee-be95-010d5967b068
export OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp.oneuptime.com
export OTEL_SERVICE_NAME=my-service
```
If you're self-hosting oneuptime, this can be changed to your self hosted OpenTelemetry collector endpoint (eg: `http(s)://<your-oneuptime-host>/otlp`)

View File

@@ -1,15 +1,16 @@
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 FeatureSet from "Common/Server/Types/FeatureSet";
import Express, {
ExpressApplication,
ExpressRequest,
ExpressResponse,
ExpressStatic,
} from "CommonServer/Utils/Express";
import LocalFile from "CommonServer/Utils/LocalFile";
import logger from "CommonServer/Utils/Logger";
} from "Common/Server/Utils/Express";
import Response from "Common/Server/Utils/Response";
import LocalFile from "Common/Server/Utils/LocalFile";
import logger from "Common/Server/Utils/Logger";
import "ejs";
const DocsFeatureSet: FeatureSet = {
@@ -20,6 +21,28 @@ const DocsFeatureSet: FeatureSet = {
res.redirect("/docs/introduction/getting-started");
});
// Handle requests to specific documentation pages
app.get(
"/docs/as-markdown/:categorypath/:pagepath",
async (req: ExpressRequest, res: ExpressResponse) => {
try {
const fullPath: string =
`${req.params["categorypath"]}/${req.params["pagepath"]}`.toLowerCase();
// read file from Content folder.
const contentInMarkdown: string = await LocalFile.read(
`${ContentPath}/${fullPath}.md`,
);
return Response.sendMarkdownResponse(req, res, contentInMarkdown);
} catch (err) {
logger.error(err);
res.status(500);
return res.send("Internal Server Error");
}
},
);
app.get(
"/docs/:categorypath/:pagepath",
async (_req: ExpressRequest, res: ExpressResponse) => {
@@ -27,18 +50,19 @@ const DocsFeatureSet: FeatureSet = {
const fullPath: string =
`${_req.params["categorypath"]}/${_req.params["pagepath"]}`.toLowerCase();
// read file from Content folder.
// Read Markdown file from content folder
let contentInMarkdown: string = await LocalFile.read(
`${ContentPath}/${fullPath}.md`,
);
// remove first line from content because we dont want to show title in content. Title is already in nav.
// Remove first line (title) from content as it is already present in the navigation
contentInMarkdown = contentInMarkdown.split("\n").slice(1).join("\n");
// Render Markdown content to HTML
const renderedContent: string =
await DocsRender.render(contentInMarkdown);
// Find the current category and link from DocsNav
const currentCategory: NavGroup | undefined = DocsNav.find(
(category: NavGroup) => {
return category.links.find((link: NavLink) => {
@@ -52,6 +76,7 @@ const DocsFeatureSet: FeatureSet = {
return link.url.toLocaleLowerCase().includes(fullPath);
});
// If no category or nav link matches the path, render 'not found'
if (!currentCategory || !currrentNavLink) {
// render not found.

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 KiB

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