@oneuptime/common 7.0.3480 → 7.0.3517
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Models/DatabaseModels/{AlertLog.ts → AlertFeed.ts} +157 -33
- package/Models/DatabaseModels/Incident.ts +6 -1
- package/Models/DatabaseModels/{IncidentLog.ts → IncidentFeed.ts} +169 -37
- package/Models/DatabaseModels/Index.ts +6 -6
- package/Models/DatabaseModels/{ScheduledMaintenanceLog.ts → ScheduledMaintenanceFeed.ts} +155 -31
- package/Server/Infrastructure/Postgres/SchemaMigrations/1736703138918-MigrationName.ts +29 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1736780194077-MigrationName.ts +137 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1736780194078-MigrationName.ts +16 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1736787495707-MigrationName.ts +29 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1736787985322-MigrationName.ts +83 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1736788706141-MigrationName.ts +39 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/1736856662868-MigrationName.ts +27 -0
- package/Server/Infrastructure/Postgres/SchemaMigrations/Index.ts +14 -0
- package/Server/Services/AlertFeedService.ts +81 -0
- package/Server/Services/IncidentFeedService.ts +89 -0
- package/Server/Services/IncidentInternalNoteService.ts +28 -0
- package/Server/Services/IncidentOwnerTeamService.ts +112 -0
- package/Server/Services/IncidentOwnerUserService.ts +114 -0
- package/Server/Services/IncidentPublicNoteService.ts +26 -0
- package/Server/Services/IncidentService.ts +121 -0
- package/Server/Services/IncidentStateTimelineService.ts +43 -19
- package/Server/Services/Index.ts +6 -6
- package/Server/Services/OnCallDutyPolicyExecutionLogService.ts +116 -1
- package/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.ts +169 -0
- package/Server/Services/ScheduledMaintenanceFeedService.ts +83 -0
- package/Server/Services/UserOnCallLogService.ts +2 -2
- package/Tests/Types/Database/ColumnLength.test.ts +1 -1
- package/Types/Database/ColumnLength.ts +1 -1
- package/Types/Database/LimitMax.ts +1 -1
- package/Types/Icon/IconProp.ts +1 -0
- package/Types/Permission.ts +32 -32
- package/UI/Components/CategoryCheckbox/Index.tsx +1 -1
- package/UI/Components/CustomFields/CustomFieldsDetail.tsx +3 -3
- package/UI/Components/ErrorMessage/ErrorMessage.tsx +2 -2
- package/UI/Components/Feed/Feed.tsx +31 -0
- package/UI/Components/Feed/FeedItem.tsx +176 -0
- package/UI/Components/Filters/FilterViewer.tsx +1 -1
- package/UI/Components/Filters/FiltersForm.tsx +1 -1
- package/UI/Components/FormModal/BasicFormModal.tsx +1 -1
- package/UI/Components/Forms/BasicForm.tsx +1 -1
- package/UI/Components/Icon/Icon.tsx +16 -0
- package/UI/Components/InfoCard/InfoCard.tsx +1 -3
- package/UI/Components/List/List.tsx +2 -2
- package/UI/Components/LogsViewer/LogsViewer.tsx +1 -1
- package/UI/Components/ModelDetail/ModelDetail.tsx +1 -1
- package/UI/Components/ModelList/ModelList.tsx +2 -2
- package/UI/Components/ModelProgress/ModelProgress.tsx +1 -1
- package/UI/Components/ModelTable/BaseModelTable.tsx +3 -3
- package/UI/Components/MonitorGraphs/Uptime.tsx +1 -1
- package/UI/Components/OrderedStatesList/OrderedStatesList.tsx +5 -2
- package/UI/Components/Page/Page.tsx +1 -1
- package/UI/Components/ProgressButtons/ProgressButtonItem.tsx +107 -0
- package/UI/Components/ProgressButtons/ProgressButtons.tsx +88 -0
- package/UI/Components/QR/QR.tsx +1 -1
- package/UI/Components/Table/Table.tsx +2 -2
- package/UI/Components/Workflow/ArgumentsForm.tsx +1 -1
- package/UI/Components/Workflow/ComponentArgumentsViewer.tsx +1 -1
- package/UI/Components/Workflow/ComponentPortViewer.tsx +1 -1
- package/UI/Components/Workflow/ComponentReturnValueViewer.tsx +1 -1
- package/UI/Components/Workflow/ComponentValuePickerModal.tsx +3 -3
- package/UI/Components/Workflow/ComponentsModal.tsx +1 -1
- package/UI/Components/Workflow/DocumentationViewer.tsx +1 -1
- package/UI/Components/Workflow/RunForm.tsx +1 -1
- package/UI/Components/Workflow/RunModal.tsx +1 -1
- package/UI/Utils/User.ts +1 -1
- package/UI/index.d.ts +4 -0
- package/build/dist/Models/DatabaseModels/{AlertLog.js → AlertFeed.js} +184 -57
- package/build/dist/Models/DatabaseModels/AlertFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Incident.js +6 -1
- package/build/dist/Models/DatabaseModels/Incident.js.map +1 -1
- package/build/dist/Models/DatabaseModels/{IncidentLog.js → IncidentFeed.js} +192 -57
- package/build/dist/Models/DatabaseModels/IncidentFeed.js.map +1 -0
- package/build/dist/Models/DatabaseModels/Index.js +6 -6
- package/build/dist/Models/DatabaseModels/Index.js.map +1 -1
- package/build/dist/Models/DatabaseModels/{ScheduledMaintenanceLog.js → ScheduledMaintenanceFeed.js} +182 -55
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceFeed.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736703138918-MigrationName.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736703138918-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736780194077-MigrationName.js +54 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736780194077-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736780194078-MigrationName.js +15 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736780194078-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736787495707-MigrationName.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736787495707-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736787985322-MigrationName.js +34 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736787985322-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736788706141-MigrationName.js +22 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736788706141-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736856662868-MigrationName.js +16 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/1736856662868-MigrationName.js.map +1 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js +14 -0
- package/build/dist/Server/Infrastructure/Postgres/SchemaMigrations/Index.js.map +1 -1
- package/build/dist/Server/Services/AlertFeedService.js +54 -0
- package/build/dist/Server/Services/AlertFeedService.js.map +1 -0
- package/build/dist/Server/Services/IncidentFeedService.js +60 -0
- package/build/dist/Server/Services/IncidentFeedService.js.map +1 -0
- package/build/dist/Server/Services/IncidentInternalNoteService.js +19 -0
- package/build/dist/Server/Services/IncidentInternalNoteService.js.map +1 -1
- package/build/dist/Server/Services/IncidentOwnerTeamService.js +86 -0
- package/build/dist/Server/Services/IncidentOwnerTeamService.js.map +1 -1
- package/build/dist/Server/Services/IncidentOwnerUserService.js +89 -0
- package/build/dist/Server/Services/IncidentOwnerUserService.js.map +1 -1
- package/build/dist/Server/Services/IncidentPublicNoteService.js +19 -0
- package/build/dist/Server/Services/IncidentPublicNoteService.js.map +1 -1
- package/build/dist/Server/Services/IncidentService.js +108 -4
- package/build/dist/Server/Services/IncidentService.js.map +1 -1
- package/build/dist/Server/Services/IncidentStateTimelineService.js +37 -15
- package/build/dist/Server/Services/IncidentStateTimelineService.js.map +1 -1
- package/build/dist/Server/Services/Index.js +6 -6
- package/build/dist/Server/Services/Index.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogService.js +93 -0
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogService.js.map +1 -1
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.js +129 -0
- package/build/dist/Server/Services/OnCallDutyPolicyExecutionLogTimelineService.js.map +1 -1
- package/build/dist/Server/Services/ScheduledMaintenanceFeedService.js +57 -0
- package/build/dist/Server/Services/ScheduledMaintenanceFeedService.js.map +1 -0
- package/build/dist/Server/Services/UserOnCallLogService.js +2 -2
- package/build/dist/Server/Services/UserOnCallLogService.js.map +1 -1
- package/build/dist/Tests/Types/Database/ColumnLength.test.js +1 -1
- package/build/dist/Tests/Types/Database/ColumnLength.test.js.map +1 -1
- package/build/dist/Types/Database/ColumnLength.js +1 -1
- package/build/dist/Types/Database/ColumnLength.js.map +1 -1
- package/build/dist/Types/Database/LimitMax.js +1 -1
- package/build/dist/Types/Database/LimitMax.js.map +1 -1
- package/build/dist/Types/Icon/IconProp.js +1 -0
- package/build/dist/Types/Icon/IconProp.js.map +1 -1
- package/build/dist/Types/Permission.js +32 -32
- package/build/dist/Types/Permission.js.map +1 -1
- package/build/dist/UI/Components/CategoryCheckbox/Index.js +1 -1
- package/build/dist/UI/Components/CategoryCheckbox/Index.js.map +1 -1
- package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js +3 -3
- package/build/dist/UI/Components/CustomFields/CustomFieldsDetail.js.map +1 -1
- package/build/dist/UI/Components/ErrorMessage/ErrorMessage.js +1 -1
- package/build/dist/UI/Components/ErrorMessage/ErrorMessage.js.map +1 -1
- package/build/dist/UI/Components/Feed/Feed.js +14 -0
- package/build/dist/UI/Components/Feed/Feed.js.map +1 -0
- package/build/dist/UI/Components/Feed/FeedItem.js +67 -0
- package/build/dist/UI/Components/Feed/FeedItem.js.map +1 -0
- package/build/dist/UI/Components/Filters/FilterViewer.js +1 -1
- package/build/dist/UI/Components/Filters/FilterViewer.js.map +1 -1
- package/build/dist/UI/Components/Filters/FiltersForm.js +1 -1
- package/build/dist/UI/Components/Filters/FiltersForm.js.map +1 -1
- package/build/dist/UI/Components/FormModal/BasicFormModal.js +1 -1
- package/build/dist/UI/Components/FormModal/BasicFormModal.js.map +1 -1
- package/build/dist/UI/Components/Forms/BasicForm.js +1 -1
- package/build/dist/UI/Components/Forms/BasicForm.js.map +1 -1
- package/build/dist/UI/Components/Icon/Icon.js +6 -0
- package/build/dist/UI/Components/Icon/Icon.js.map +1 -1
- package/build/dist/UI/Components/InfoCard/InfoCard.js +1 -1
- package/build/dist/UI/Components/InfoCard/InfoCard.js.map +1 -1
- package/build/dist/UI/Components/List/List.js +2 -2
- package/build/dist/UI/Components/List/List.js.map +1 -1
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js +1 -1
- package/build/dist/UI/Components/LogsViewer/LogsViewer.js.map +1 -1
- package/build/dist/UI/Components/ModelDetail/ModelDetail.js +1 -1
- package/build/dist/UI/Components/ModelDetail/ModelDetail.js.map +1 -1
- package/build/dist/UI/Components/ModelList/ModelList.js +2 -2
- package/build/dist/UI/Components/ModelList/ModelList.js.map +1 -1
- package/build/dist/UI/Components/ModelProgress/ModelProgress.js +1 -1
- package/build/dist/UI/Components/ModelProgress/ModelProgress.js.map +1 -1
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js +3 -3
- package/build/dist/UI/Components/ModelTable/BaseModelTable.js.map +1 -1
- package/build/dist/UI/Components/MonitorGraphs/Uptime.js +1 -1
- package/build/dist/UI/Components/MonitorGraphs/Uptime.js.map +1 -1
- package/build/dist/UI/Components/OrderedStatesList/OrderedStatesList.js +2 -2
- package/build/dist/UI/Components/OrderedStatesList/OrderedStatesList.js.map +1 -1
- package/build/dist/UI/Components/Page/Page.js +1 -1
- package/build/dist/UI/Components/Page/Page.js.map +1 -1
- package/build/dist/UI/Components/ProgressButtons/ProgressButtonItem.js +26 -0
- package/build/dist/UI/Components/ProgressButtons/ProgressButtonItem.js.map +1 -0
- package/build/dist/UI/Components/ProgressButtons/ProgressButtons.js +36 -0
- package/build/dist/UI/Components/ProgressButtons/ProgressButtons.js.map +1 -0
- package/build/dist/UI/Components/QR/QR.js +1 -1
- package/build/dist/UI/Components/QR/QR.js.map +1 -1
- package/build/dist/UI/Components/Table/Table.js +2 -2
- package/build/dist/UI/Components/Table/Table.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ArgumentsForm.js +1 -1
- package/build/dist/UI/Components/Workflow/ArgumentsForm.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentArgumentsViewer.js +1 -1
- package/build/dist/UI/Components/Workflow/ComponentArgumentsViewer.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentPortViewer.js +1 -1
- package/build/dist/UI/Components/Workflow/ComponentPortViewer.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentReturnValueViewer.js +1 -1
- package/build/dist/UI/Components/Workflow/ComponentReturnValueViewer.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentValuePickerModal.js +3 -3
- package/build/dist/UI/Components/Workflow/ComponentValuePickerModal.js.map +1 -1
- package/build/dist/UI/Components/Workflow/ComponentsModal.js +1 -1
- package/build/dist/UI/Components/Workflow/ComponentsModal.js.map +1 -1
- package/build/dist/UI/Components/Workflow/DocumentationViewer.js +1 -1
- package/build/dist/UI/Components/Workflow/DocumentationViewer.js.map +1 -1
- package/build/dist/UI/Components/Workflow/RunForm.js +1 -1
- package/build/dist/UI/Components/Workflow/RunForm.js.map +1 -1
- package/build/dist/UI/Components/Workflow/RunModal.js +1 -1
- package/build/dist/UI/Components/Workflow/RunModal.js.map +1 -1
- package/build/dist/UI/Utils/User.js +1 -1
- package/build/dist/UI/Utils/User.js.map +1 -1
- package/package.json +2 -2
- package/Server/Services/AlertLogService.ts +0 -10
- package/Server/Services/IncidentLogService.ts +0 -10
- package/Server/Services/ScheduledMaintenanceLogService.ts +0 -10
- package/build/dist/Models/DatabaseModels/AlertLog.js.map +0 -1
- package/build/dist/Models/DatabaseModels/IncidentLog.js.map +0 -1
- package/build/dist/Models/DatabaseModels/ScheduledMaintenanceLog.js.map +0 -1
- package/build/dist/Server/Services/AlertLogService.js +0 -9
- package/build/dist/Server/Services/AlertLogService.js.map +0 -1
- package/build/dist/Server/Services/IncidentLogService.js +0 -9
- package/build/dist/Server/Services/IncidentLogService.js.map +0 -1
- package/build/dist/Server/Services/ScheduledMaintenanceLogService.js +0 -9
- package/build/dist/Server/Services/ScheduledMaintenanceLogService.js.map +0 -1
package/Types/Permission.ts
CHANGED
|
@@ -420,20 +420,20 @@ enum Permission {
|
|
|
420
420
|
ReadIncidentStateTimeline = "ReadIncidentStateTimeline",
|
|
421
421
|
DeleteIncidentStateTimeline = "DeleteIncidentStateTimeline",
|
|
422
422
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
423
|
+
CreateIncidentFeed = "CreateIncidentFeed",
|
|
424
|
+
EditIncidentFeed = "EditIncidentFeed",
|
|
425
|
+
ReadIncidentFeed = "ReadIncidentFeed",
|
|
426
|
+
DeleteIncidentFeed = "DeleteIncidentFeed",
|
|
427
427
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
428
|
+
CreateScheduledMaintenanceFeed = "CreateScheduledMaintenanceFeed",
|
|
429
|
+
EditScheduledMaintenanceFeed = "EditScheduledMaintenanceFeed",
|
|
430
|
+
ReadScheduledMaintenanceFeed = "ReadScheduledMaintenanceFeed",
|
|
431
|
+
DeleteScheduledMaintenanceFeed = "DeleteScheduledMaintenanceFeed",
|
|
432
432
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
433
|
+
CreateAlertFeed = "CreateAlertFeed",
|
|
434
|
+
EditAlertFeed = "EditAlertFeed",
|
|
435
|
+
ReadAlertFeed = "ReadAlertFeed",
|
|
436
|
+
DeleteAlertFeed = "DeleteAlertFeed",
|
|
437
437
|
|
|
438
438
|
// Incident Status Permissions (Owner + Admin Permission by default)
|
|
439
439
|
CreateMonitorStatusTimeline = "CreateMonitorStatusTimeline",
|
|
@@ -1073,32 +1073,32 @@ export class PermissionHelper {
|
|
|
1073
1073
|
},
|
|
1074
1074
|
|
|
1075
1075
|
{
|
|
1076
|
-
permission: Permission.
|
|
1077
|
-
title: "Create Incident
|
|
1076
|
+
permission: Permission.CreateIncidentFeed,
|
|
1077
|
+
title: "Create Incident Feed",
|
|
1078
1078
|
description:
|
|
1079
1079
|
"This permission can create log of an incident in this project.",
|
|
1080
1080
|
isAssignableToTenant: true,
|
|
1081
1081
|
isAccessControlPermission: false,
|
|
1082
1082
|
},
|
|
1083
1083
|
{
|
|
1084
|
-
permission: Permission.
|
|
1085
|
-
title: "Delete Incident
|
|
1084
|
+
permission: Permission.DeleteIncidentFeed,
|
|
1085
|
+
title: "Delete Incident Feed",
|
|
1086
1086
|
description:
|
|
1087
1087
|
"This permission can delete log of an incident in this project.",
|
|
1088
1088
|
isAssignableToTenant: true,
|
|
1089
1089
|
isAccessControlPermission: false,
|
|
1090
1090
|
},
|
|
1091
1091
|
{
|
|
1092
|
-
permission: Permission.
|
|
1093
|
-
title: "Edit Incident
|
|
1092
|
+
permission: Permission.EditIncidentFeed,
|
|
1093
|
+
title: "Edit Incident Feed",
|
|
1094
1094
|
description:
|
|
1095
1095
|
"This permission can edit log of an incident in this project.",
|
|
1096
1096
|
isAssignableToTenant: true,
|
|
1097
1097
|
isAccessControlPermission: false,
|
|
1098
1098
|
},
|
|
1099
1099
|
{
|
|
1100
|
-
permission: Permission.
|
|
1101
|
-
title: "Read Incident
|
|
1100
|
+
permission: Permission.ReadIncidentFeed,
|
|
1101
|
+
title: "Read Incident Feed",
|
|
1102
1102
|
description:
|
|
1103
1103
|
"This permission can read log of an incident in this project.",
|
|
1104
1104
|
isAssignableToTenant: true,
|
|
@@ -1106,32 +1106,32 @@ export class PermissionHelper {
|
|
|
1106
1106
|
},
|
|
1107
1107
|
|
|
1108
1108
|
{
|
|
1109
|
-
permission: Permission.
|
|
1110
|
-
title: "Create Alert
|
|
1109
|
+
permission: Permission.CreateAlertFeed,
|
|
1110
|
+
title: "Create Alert Feed",
|
|
1111
1111
|
description:
|
|
1112
1112
|
"This permission can create log of an incident in this project.",
|
|
1113
1113
|
isAssignableToTenant: true,
|
|
1114
1114
|
isAccessControlPermission: false,
|
|
1115
1115
|
},
|
|
1116
1116
|
{
|
|
1117
|
-
permission: Permission.
|
|
1118
|
-
title: "Delete Alert
|
|
1117
|
+
permission: Permission.DeleteAlertFeed,
|
|
1118
|
+
title: "Delete Alert Feed",
|
|
1119
1119
|
description:
|
|
1120
1120
|
"This permission can delete log of an incident in this project.",
|
|
1121
1121
|
isAssignableToTenant: true,
|
|
1122
1122
|
isAccessControlPermission: false,
|
|
1123
1123
|
},
|
|
1124
1124
|
{
|
|
1125
|
-
permission: Permission.
|
|
1126
|
-
title: "Edit Alert
|
|
1125
|
+
permission: Permission.EditAlertFeed,
|
|
1126
|
+
title: "Edit Alert Feed",
|
|
1127
1127
|
description:
|
|
1128
1128
|
"This permission can edit log of an incident in this project.",
|
|
1129
1129
|
isAssignableToTenant: true,
|
|
1130
1130
|
isAccessControlPermission: false,
|
|
1131
1131
|
},
|
|
1132
1132
|
{
|
|
1133
|
-
permission: Permission.
|
|
1134
|
-
title: "Read Alert
|
|
1133
|
+
permission: Permission.ReadAlertFeed,
|
|
1134
|
+
title: "Read Alert Feed",
|
|
1135
1135
|
description:
|
|
1136
1136
|
"This permission can read log of an incident in this project.",
|
|
1137
1137
|
isAssignableToTenant: true,
|
|
@@ -1139,7 +1139,7 @@ export class PermissionHelper {
|
|
|
1139
1139
|
},
|
|
1140
1140
|
|
|
1141
1141
|
{
|
|
1142
|
-
permission: Permission.
|
|
1142
|
+
permission: Permission.CreateScheduledMaintenanceFeed,
|
|
1143
1143
|
title: "Create Scheduled Maintenance Log",
|
|
1144
1144
|
description:
|
|
1145
1145
|
"This permission can create log of a scheduled maintenance in this project.",
|
|
@@ -1147,7 +1147,7 @@ export class PermissionHelper {
|
|
|
1147
1147
|
isAccessControlPermission: false,
|
|
1148
1148
|
},
|
|
1149
1149
|
{
|
|
1150
|
-
permission: Permission.
|
|
1150
|
+
permission: Permission.DeleteScheduledMaintenanceFeed,
|
|
1151
1151
|
title: "Delete Scheduled Maintenance Log",
|
|
1152
1152
|
description:
|
|
1153
1153
|
"This permission can delete log of an scheduled maintenance in this project.",
|
|
@@ -1155,7 +1155,7 @@ export class PermissionHelper {
|
|
|
1155
1155
|
isAccessControlPermission: false,
|
|
1156
1156
|
},
|
|
1157
1157
|
{
|
|
1158
|
-
permission: Permission.
|
|
1158
|
+
permission: Permission.EditScheduledMaintenanceFeed,
|
|
1159
1159
|
title: "Edit Scheduled Maintenance Log",
|
|
1160
1160
|
description:
|
|
1161
1161
|
"This permission can edit log of an scheduled maintenance in this project.",
|
|
@@ -1163,7 +1163,7 @@ export class PermissionHelper {
|
|
|
1163
1163
|
isAccessControlPermission: false,
|
|
1164
1164
|
},
|
|
1165
1165
|
{
|
|
1166
|
-
permission: Permission.
|
|
1166
|
+
permission: Permission.ReadScheduledMaintenanceFeed,
|
|
1167
1167
|
title: "Read Scheduled Maintenance Log",
|
|
1168
1168
|
description:
|
|
1169
1169
|
"This permission can read log of an incident in this project.",
|
|
@@ -120,10 +120,10 @@ const CustomFieldsDetail: FunctionComponent<ComponentProps> = (
|
|
|
120
120
|
<div className="border-t border-gray-200 px-4 py-5 sm:px-6 -m-6 -mt-2">
|
|
121
121
|
{isLoading && !error && <ComponentLoader />}
|
|
122
122
|
{!isLoading && !error && schemaList.length === 0 && (
|
|
123
|
-
<ErrorMessage
|
|
123
|
+
<ErrorMessage message="No custom fields have been added for this resource. You may add custom fields in Project Settings." />
|
|
124
124
|
)}
|
|
125
|
-
{error && <ErrorMessage
|
|
126
|
-
{!model && <ErrorMessage
|
|
125
|
+
{error && <ErrorMessage message={error} />}
|
|
126
|
+
{!model && <ErrorMessage message={"Item not found"} />}
|
|
127
127
|
|
|
128
128
|
{!isLoading && !error && model && (
|
|
129
129
|
<Detail
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { FunctionComponent, ReactElement } from "react";
|
|
2
2
|
|
|
3
3
|
export interface ComponentProps {
|
|
4
|
-
|
|
4
|
+
message: string | ReactElement;
|
|
5
5
|
onRefreshClick?: undefined | (() => void);
|
|
6
6
|
}
|
|
7
7
|
|
|
@@ -10,7 +10,7 @@ const ErrorMessage: FunctionComponent<ComponentProps> = (
|
|
|
10
10
|
): ReactElement => {
|
|
11
11
|
return (
|
|
12
12
|
<div className="text-center my-10 text-gray-500 text-sm">
|
|
13
|
-
{props.
|
|
13
|
+
{props.message}
|
|
14
14
|
{props.onRefreshClick ? (
|
|
15
15
|
<div
|
|
16
16
|
role={"refresh-button"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React, { FunctionComponent, ReactElement } from "react";
|
|
2
|
+
import FeedItem, { FeedItemProps } from "./FeedItem";
|
|
3
|
+
import ErrorMessage from "../ErrorMessage/ErrorMessage";
|
|
4
|
+
|
|
5
|
+
export interface ComponentProps {
|
|
6
|
+
items: Array<FeedItemProps>;
|
|
7
|
+
noItemsMessage: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const Feed: FunctionComponent<ComponentProps> = (
|
|
11
|
+
props: ComponentProps,
|
|
12
|
+
): ReactElement => {
|
|
13
|
+
return (
|
|
14
|
+
<div className="flow-root">
|
|
15
|
+
<ul role="list">
|
|
16
|
+
{props.items.length === 0 && (
|
|
17
|
+
<div>
|
|
18
|
+
<ErrorMessage message={props.noItemsMessage} />
|
|
19
|
+
</div>
|
|
20
|
+
)}
|
|
21
|
+
{props.items.map((item: FeedItemProps, index: number) => {
|
|
22
|
+
return (
|
|
23
|
+
<FeedItem {...item} isLastItem={index === props.items.length - 1} />
|
|
24
|
+
);
|
|
25
|
+
})}
|
|
26
|
+
</ul>
|
|
27
|
+
</div>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default Feed;
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import React, { FunctionComponent, ReactElement, useState } from "react";
|
|
2
|
+
import User from "../../../Models/DatabaseModels/User";
|
|
3
|
+
import { GetReactElementFunction } from "../../Types/FunctionTypes";
|
|
4
|
+
import Image from "../Image/Image";
|
|
5
|
+
import Route from "../../../Types/API/Route";
|
|
6
|
+
import BlankProfilePic from "../../Images/users/blank-profile.svg";
|
|
7
|
+
import FileUtil from "../../Utils/File";
|
|
8
|
+
import ObjectID from "../../../Types/ObjectID";
|
|
9
|
+
import OneUptimeDate from "../../../Types/Date";
|
|
10
|
+
import Tooltip from "../Tooltip/Tooltip";
|
|
11
|
+
import MarkdownViewer from "../Markdown.tsx/MarkdownViewer";
|
|
12
|
+
import Button, { ButtonSize, ButtonStyleType } from "../Button/Button";
|
|
13
|
+
import ConfirmModal from "../Modal/ConfirmModal";
|
|
14
|
+
import Icon from "../Icon/Icon";
|
|
15
|
+
import IconProp from "../../../Types/Icon/IconProp";
|
|
16
|
+
import Color from "../../../Types/Color";
|
|
17
|
+
|
|
18
|
+
export interface FeedItemProps {
|
|
19
|
+
key: string;
|
|
20
|
+
textInMarkdown: string;
|
|
21
|
+
element?: ReactElement;
|
|
22
|
+
moreTextInMarkdown?: string;
|
|
23
|
+
user?: User | undefined;
|
|
24
|
+
itemDateTime: Date;
|
|
25
|
+
icon: IconProp;
|
|
26
|
+
color: Color;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface ComponentProps extends FeedItemProps {
|
|
30
|
+
isLastItem: boolean;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const FeedItem: FunctionComponent<ComponentProps> = (
|
|
34
|
+
props: ComponentProps,
|
|
35
|
+
): ReactElement => {
|
|
36
|
+
const [showMoreInformationModal, setShowMoreInformationModal] =
|
|
37
|
+
useState<boolean>(false);
|
|
38
|
+
|
|
39
|
+
const getMoreInformationModal: GetReactElementFunction = (): ReactElement => {
|
|
40
|
+
if (showMoreInformationModal) {
|
|
41
|
+
return (
|
|
42
|
+
<ConfirmModal
|
|
43
|
+
title={`More Information`}
|
|
44
|
+
description={
|
|
45
|
+
<div>
|
|
46
|
+
<MarkdownViewer text={props.moreTextInMarkdown || ""} />
|
|
47
|
+
</div>
|
|
48
|
+
}
|
|
49
|
+
isLoading={false}
|
|
50
|
+
submitButtonText={"Close"}
|
|
51
|
+
onSubmit={() => {
|
|
52
|
+
return setShowMoreInformationModal(false);
|
|
53
|
+
}}
|
|
54
|
+
submitButtonType={ButtonStyleType.NORMAL}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return <></>;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const getUserIcon: GetReactElementFunction = (): ReactElement => {
|
|
63
|
+
return (
|
|
64
|
+
<div>
|
|
65
|
+
{!props.user?.profilePictureId && (
|
|
66
|
+
<Image
|
|
67
|
+
className="h-10 w-10 rounded-full"
|
|
68
|
+
imageUrl={Route.fromString(`${BlankProfilePic}`)}
|
|
69
|
+
/>
|
|
70
|
+
)}
|
|
71
|
+
|
|
72
|
+
{props.user?.profilePictureId && (
|
|
73
|
+
<Image
|
|
74
|
+
className="flex size-10 items-center justify-center rounded-full bg-gray-400 ring-8 ring-white"
|
|
75
|
+
imageUrl={FileUtil.getFileRoute(
|
|
76
|
+
props.user!.profilePictureId as ObjectID,
|
|
77
|
+
)}
|
|
78
|
+
/>
|
|
79
|
+
)}
|
|
80
|
+
|
|
81
|
+
{props.icon && (
|
|
82
|
+
<span className="absolute -bottom-0.5 -right-1 rounded-tl bg-white px-0.5 py-px">
|
|
83
|
+
<Icon
|
|
84
|
+
className="size-5 text-gray-500"
|
|
85
|
+
icon={props.icon}
|
|
86
|
+
color={props.color}
|
|
87
|
+
/>
|
|
88
|
+
</span>
|
|
89
|
+
)}
|
|
90
|
+
</div>
|
|
91
|
+
);
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const getItem: GetReactElementFunction = (): ReactElement => {
|
|
95
|
+
return (
|
|
96
|
+
<li key={props.key}>
|
|
97
|
+
<div className="relative pb-8">
|
|
98
|
+
{!props.isLastItem && (
|
|
99
|
+
<span
|
|
100
|
+
className="absolute left-5 top-5 -ml-px h-full w-0.5 bg-gray-200"
|
|
101
|
+
aria-hidden="true"
|
|
102
|
+
></span>
|
|
103
|
+
)}
|
|
104
|
+
<div className="relative flex items-start space-x-3">
|
|
105
|
+
<div className="relative">
|
|
106
|
+
{props.user && getUserIcon()}
|
|
107
|
+
{!props.user && props.icon && getIconItem()}
|
|
108
|
+
</div>
|
|
109
|
+
<div className="min-w-0 flex-1">
|
|
110
|
+
<div>
|
|
111
|
+
{props.user?.name && (
|
|
112
|
+
<div className="text-sm">
|
|
113
|
+
<div className="font-medium text-gray-900">
|
|
114
|
+
{props.user?.name?.toString() || "Unknown User"}
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
)}
|
|
118
|
+
<div className="mt-0.5 text-sm text-gray-500 w-fit">
|
|
119
|
+
<Tooltip
|
|
120
|
+
text={OneUptimeDate.getDateAsLocalFormattedString(
|
|
121
|
+
props.itemDateTime,
|
|
122
|
+
)}
|
|
123
|
+
>
|
|
124
|
+
<div className="w-fit">
|
|
125
|
+
{OneUptimeDate.fromNow(props.itemDateTime)}
|
|
126
|
+
</div>
|
|
127
|
+
</Tooltip>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
<div className="mt-2 text-sm text-gray-700">
|
|
131
|
+
{props.textInMarkdown && (
|
|
132
|
+
<div>
|
|
133
|
+
<MarkdownViewer text={props.textInMarkdown} />
|
|
134
|
+
</div>
|
|
135
|
+
)}
|
|
136
|
+
{props.element && <div>{props.element}</div>}
|
|
137
|
+
{props.moreTextInMarkdown && (
|
|
138
|
+
<div className="-ml-3">
|
|
139
|
+
<Button
|
|
140
|
+
onClick={() => {
|
|
141
|
+
return setShowMoreInformationModal(true);
|
|
142
|
+
}}
|
|
143
|
+
title="More Information"
|
|
144
|
+
buttonStyle={ButtonStyleType.NORMAL}
|
|
145
|
+
buttonSize={ButtonSize.Small}
|
|
146
|
+
/>
|
|
147
|
+
</div>
|
|
148
|
+
)}
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
</div>
|
|
153
|
+
{getMoreInformationModal()}
|
|
154
|
+
</li>
|
|
155
|
+
);
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
const getIconItem: GetReactElementFunction = (): ReactElement => {
|
|
159
|
+
if (!props.icon) {
|
|
160
|
+
return <></>;
|
|
161
|
+
}
|
|
162
|
+
return (
|
|
163
|
+
<div className="flex size-10 items-center justify-center rounded-full bg-gray-100 ring-10 ring-white">
|
|
164
|
+
<Icon
|
|
165
|
+
className="size-5 text-gray-500"
|
|
166
|
+
icon={props.icon}
|
|
167
|
+
color={props.color}
|
|
168
|
+
/>
|
|
169
|
+
</div>
|
|
170
|
+
);
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
return getItem();
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export default FeedItem;
|
|
@@ -346,7 +346,7 @@ const FilterComponent: FilterComponentFunction = <T extends GenericObject>(
|
|
|
346
346
|
});
|
|
347
347
|
|
|
348
348
|
if (props.filterError) {
|
|
349
|
-
return <ErrorMessage
|
|
349
|
+
return <ErrorMessage message={props.filterError} />;
|
|
350
350
|
}
|
|
351
351
|
|
|
352
352
|
const showViewer: boolean = filterTexts.length > 0;
|
|
@@ -142,7 +142,7 @@ const FiltersForm: FiltersFormFunction = <T extends GenericObject>(
|
|
|
142
142
|
|
|
143
143
|
{props.showFilter && props.filterError && (
|
|
144
144
|
<ErrorMessage
|
|
145
|
-
|
|
145
|
+
message={props.filterError}
|
|
146
146
|
onRefreshClick={props.onFilterRefreshClick}
|
|
147
147
|
/>
|
|
148
148
|
)}
|
|
@@ -511,7 +511,7 @@ const BasicForm: ForwardRefExoticComponent<any> = forwardRef(
|
|
|
511
511
|
}
|
|
512
512
|
|
|
513
513
|
if (formError) {
|
|
514
|
-
return <ErrorMessage
|
|
514
|
+
return <ErrorMessage message={formError} />;
|
|
515
515
|
}
|
|
516
516
|
|
|
517
517
|
let showSubmitButton: boolean = !props.hideSubmitButton;
|
|
@@ -1075,6 +1075,22 @@ const Icon: FunctionComponent<ComponentProps> = ({
|
|
|
1075
1075
|
d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"
|
|
1076
1076
|
/>,
|
|
1077
1077
|
);
|
|
1078
|
+
} else if (icon === IconProp.WrenchScrewdriver) {
|
|
1079
|
+
return getSvgWrapper(
|
|
1080
|
+
<path
|
|
1081
|
+
strokeLinecap="round"
|
|
1082
|
+
strokeLinejoin="round"
|
|
1083
|
+
d="M11.42 15.17 17.25 21A2.652 2.652 0 0 0 21 17.25l-5.877-5.877M11.42 15.17l2.496-3.03c.317-.384.74-.626 1.208-.766M11.42 15.17l-4.655 5.653a2.548 2.548 0 1 1-3.586-3.586l6.837-5.63m5.108-.233c.55-.164 1.163-.188 1.743-.14a4.5 4.5 0 0 0 4.486-6.336l-3.276 3.277a3.004 3.004 0 0 1-2.25-2.25l3.276-3.276a4.5 4.5 0 0 0-6.336 4.486c.091 1.076-.071 2.264-.904 2.95l-.102.085m-1.745 1.437L5.909 7.5H4.5L2.25 3.75l1.5-1.5L7.5 4.5v1.409l4.26 4.26m-1.745 1.437 1.745-1.437m6.615 8.206L15.75 15.75M4.867 19.125h.008v.008h-.008v-.008Z"
|
|
1084
|
+
/>,
|
|
1085
|
+
);
|
|
1086
|
+
} else if (icon === IconProp.Text) {
|
|
1087
|
+
return getSvgWrapper(
|
|
1088
|
+
<path
|
|
1089
|
+
strokeLinecap="round"
|
|
1090
|
+
strokeLinejoin="round"
|
|
1091
|
+
d="M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 0 1 .865-.501 48.172 48.172 0 0 0 3.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0 0 12 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018Z"
|
|
1092
|
+
/>,
|
|
1093
|
+
);
|
|
1078
1094
|
} else if (icon === IconProp.SendMessage) {
|
|
1079
1095
|
return getSvgWrapper(
|
|
1080
1096
|
<path
|
|
@@ -12,9 +12,7 @@ const InfoCard: FunctionComponent<ComponentProps> = (
|
|
|
12
12
|
props: ComponentProps,
|
|
13
13
|
): ReactElement => {
|
|
14
14
|
return (
|
|
15
|
-
<div
|
|
16
|
-
className={`rounded-md bg-white shadow-md p-5 ${props.className || ""}`}
|
|
17
|
-
>
|
|
15
|
+
<div className={`rounded-md bg-white shadow p-5 ${props.className || ""}`}>
|
|
18
16
|
<div>
|
|
19
17
|
<FieldLabelElement title={props.title} />
|
|
20
18
|
</div>
|
|
@@ -61,7 +61,7 @@ const List: ListFunction = <T extends GenericObject>(
|
|
|
61
61
|
return (
|
|
62
62
|
<div className="p-6">
|
|
63
63
|
<ErrorMessage
|
|
64
|
-
|
|
64
|
+
message={props.error}
|
|
65
65
|
onRefreshClick={props.onRefreshClick}
|
|
66
66
|
/>
|
|
67
67
|
</div>
|
|
@@ -72,7 +72,7 @@ const List: ListFunction = <T extends GenericObject>(
|
|
|
72
72
|
return (
|
|
73
73
|
<div className="p-6">
|
|
74
74
|
<ErrorMessage
|
|
75
|
-
|
|
75
|
+
message={
|
|
76
76
|
props.noItemsMessage
|
|
77
77
|
? props.noItemsMessage
|
|
78
78
|
: `No ${props.singularLabel.toLocaleLowerCase()}`
|
|
@@ -218,12 +218,12 @@ const ModelList: <TBaseModel extends BaseModel>(
|
|
|
218
218
|
)}
|
|
219
219
|
</div>
|
|
220
220
|
<div className="max-h-96 mb-5 overflow-y-auto p-2">
|
|
221
|
-
{error ? <ErrorMessage
|
|
221
|
+
{error ? <ErrorMessage message={error} /> : <></>}
|
|
222
222
|
{isLoading ? <ComponentLoader /> : <></>}
|
|
223
223
|
|
|
224
224
|
{!isLoading && !error && searchedList.length === 0 ? (
|
|
225
225
|
<ErrorMessage
|
|
226
|
-
|
|
226
|
+
message={
|
|
227
227
|
searchText
|
|
228
228
|
? "No items match your search"
|
|
229
229
|
: props.noItemsMessage || "No items found."
|
|
@@ -661,8 +661,8 @@ const BaseModelTable: <TBaseModel extends BaseModel | AnalyticsBaseModel>(
|
|
|
661
661
|
| DatabaseBaseModelType
|
|
662
662
|
| AnalyticsBaseModelType,
|
|
663
663
|
query: {
|
|
664
|
-
...query,
|
|
665
664
|
...props.query,
|
|
665
|
+
...query,
|
|
666
666
|
},
|
|
667
667
|
limit: LIMIT_PER_PROJECT,
|
|
668
668
|
skip: 0,
|
|
@@ -700,8 +700,8 @@ const BaseModelTable: <TBaseModel extends BaseModel | AnalyticsBaseModel>(
|
|
|
700
700
|
| DatabaseBaseModelType
|
|
701
701
|
| AnalyticsBaseModelType,
|
|
702
702
|
query: {
|
|
703
|
-
...query,
|
|
704
703
|
...props.query,
|
|
704
|
+
...query,
|
|
705
705
|
},
|
|
706
706
|
groupBy: {
|
|
707
707
|
...props.groupBy,
|
|
@@ -1717,7 +1717,7 @@ const BaseModelTable: <TBaseModel extends BaseModel | AnalyticsBaseModel>(
|
|
|
1717
1717
|
>
|
|
1718
1718
|
{tableColumns.length === 0 && props.columns.length > 0 ? (
|
|
1719
1719
|
<ErrorMessage
|
|
1720
|
-
|
|
1720
|
+
message={`You are not authorized to view this table. You need any one of these permissions: ${PermissionHelper.getPermissionTitles(
|
|
1721
1721
|
model.getReadPermissions(),
|
|
1722
1722
|
).join(", ")}`}
|
|
1723
1723
|
/>
|
|
@@ -39,14 +39,17 @@ const OrderedStatesList: OrderedStatesListFunction = <T extends GenericObject>(
|
|
|
39
39
|
|
|
40
40
|
if (props.error) {
|
|
41
41
|
return (
|
|
42
|
-
<ErrorMessage
|
|
42
|
+
<ErrorMessage
|
|
43
|
+
message={props.error}
|
|
44
|
+
onRefreshClick={props.onRefreshClick}
|
|
45
|
+
/>
|
|
43
46
|
);
|
|
44
47
|
}
|
|
45
48
|
|
|
46
49
|
if (props.data.length === 0) {
|
|
47
50
|
return (
|
|
48
51
|
<ErrorMessage
|
|
49
|
-
|
|
52
|
+
message={
|
|
50
53
|
props.noItemsMessage
|
|
51
54
|
? props.noItemsMessage
|
|
52
55
|
: `No ${props.singularLabel.toLocaleLowerCase()}`
|