dce-reactkit 3.9.4-beta-logreviewer.11 → 3.9.4-beta-logreviewer.12
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/dist/cjs/index.js +97 -97
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +97 -97
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/LogReviewer.tsx +239 -148
package/dist/cjs/index.js
CHANGED
|
@@ -4046,14 +4046,6 @@ const LogReviewer = (props) => {
|
|
|
4046
4046
|
/*----------------------------------------*/
|
|
4047
4047
|
/* --------------- Main UI -------------- */
|
|
4048
4048
|
/*----------------------------------------*/
|
|
4049
|
-
// Body that will be filled with the contents of the panel
|
|
4050
|
-
let body;
|
|
4051
|
-
/* ------------- Loading ------------ */
|
|
4052
|
-
if (showSpinner) {
|
|
4053
|
-
body = (React__default["default"].createElement("div", { className: "text-center p-5" },
|
|
4054
|
-
React__default["default"].createElement(LoadingSpinner, null)));
|
|
4055
|
-
}
|
|
4056
|
-
/* ------------ Review UI ----------- */
|
|
4057
4049
|
/*----------------------------------------*/
|
|
4058
4050
|
/* ------------ Pagination -------------- */
|
|
4059
4051
|
/*----------------------------------------*/
|
|
@@ -4189,10 +4181,10 @@ const LogReviewer = (props) => {
|
|
|
4189
4181
|
if (expandedFilterDrawer === FilterDrawer.Date) {
|
|
4190
4182
|
filterDrawer = (React__default["default"].createElement(TabBox, { title: "Date" },
|
|
4191
4183
|
React__default["default"].createElement(SimpleDateChooser, { ariaLabel: "filter start date", name: "filter-start-date", year: pendingDateFilterState.startDate.year, month: pendingDateFilterState.startDate.month, day: pendingDateFilterState.startDate.day, chooseFromPast: true, numMonthsToShow: 36, onChange: (month, day, year) => {
|
|
4192
|
-
|
|
4184
|
+
const newDateFilterState = Object.assign(Object.assign({}, pendingDateFilterState), { startDate: { month, day, year } });
|
|
4193
4185
|
dispatch({
|
|
4194
4186
|
type: ActionType$6.UpdateDateFilterState,
|
|
4195
|
-
dateFilterState:
|
|
4187
|
+
dateFilterState: newDateFilterState,
|
|
4196
4188
|
});
|
|
4197
4189
|
} }),
|
|
4198
4190
|
' ',
|
|
@@ -4205,12 +4197,12 @@ const LogReviewer = (props) => {
|
|
|
4205
4197
|
|| (year === pendingDateFilterState.startDate.year
|
|
4206
4198
|
&& month === pendingDateFilterState.startDate.month
|
|
4207
4199
|
&& day < pendingDateFilterState.startDate.day)) {
|
|
4208
|
-
return alert('Invalid
|
|
4200
|
+
return alert('Invalid End Date', 'The end date cannot be before the start date.');
|
|
4209
4201
|
}
|
|
4210
|
-
|
|
4202
|
+
const newDateFilterState = Object.assign(Object.assign({}, pendingDateFilterState), { endDate: { month, day, year } });
|
|
4211
4203
|
dispatch({
|
|
4212
4204
|
type: ActionType$6.UpdateDateFilterState,
|
|
4213
|
-
dateFilterState:
|
|
4205
|
+
dateFilterState: newDateFilterState,
|
|
4214
4206
|
});
|
|
4215
4207
|
} })));
|
|
4216
4208
|
}
|
|
@@ -4250,7 +4242,7 @@ const LogReviewer = (props) => {
|
|
|
4250
4242
|
const children = (Object.keys(value)
|
|
4251
4243
|
// Remove parent name
|
|
4252
4244
|
.filter((subcontext) => {
|
|
4253
|
-
return subcontext !== '_';
|
|
4245
|
+
return (subcontext !== '_');
|
|
4254
4246
|
})
|
|
4255
4247
|
// Create child pickable items
|
|
4256
4248
|
.map((subcontext) => {
|
|
@@ -4269,7 +4261,7 @@ const LogReviewer = (props) => {
|
|
|
4269
4261
|
};
|
|
4270
4262
|
pickableItems.push(item);
|
|
4271
4263
|
});
|
|
4272
|
-
// Add built-in contexts to end
|
|
4264
|
+
// Add built-in contexts to end of list
|
|
4273
4265
|
pickableItems.push(builtInPickableItem);
|
|
4274
4266
|
// Create filter UI
|
|
4275
4267
|
filterDrawer = (React__default["default"].createElement(ItemPicker, { title: "Context", items: pickableItems, onChanged: (updatedItems) => {
|
|
@@ -4281,28 +4273,36 @@ const LogReviewer = (props) => {
|
|
|
4281
4273
|
// Built-in
|
|
4282
4274
|
// Treat as if these were top-level contexts
|
|
4283
4275
|
pickableItem.children.forEach((subcontextItem) => {
|
|
4284
|
-
pendingContextFilterState[subcontextItem.id]
|
|
4285
|
-
|
|
4276
|
+
const newContextFilterState = Object.assign(Object.assign({}, pendingContextFilterState), { [subcontextItem.id]: 'checked' in subcontextItem
|
|
4277
|
+
&& subcontextItem.checked });
|
|
4278
|
+
dispatch({
|
|
4279
|
+
type: ActionType$6.UpdateContextFilterState,
|
|
4280
|
+
contextFilterState: newContextFilterState,
|
|
4281
|
+
});
|
|
4286
4282
|
});
|
|
4287
4283
|
}
|
|
4288
4284
|
else {
|
|
4289
4285
|
// Not built-in
|
|
4290
4286
|
pickableItem.children.forEach((subcontextItem) => {
|
|
4291
4287
|
if (!subcontextItem.isGroup) {
|
|
4292
|
-
pendingContextFilterState[pickableItem.id][
|
|
4288
|
+
const newContextFilterState = Object.assign(Object.assign({}, pendingContextFilterState), { [pickableItem.id]: Object.assign(Object.assign({}, pendingContextFilterState[pickableItem.id]), { [subcontextItem.id]: subcontextItem.checked }) });
|
|
4289
|
+
dispatch({
|
|
4290
|
+
type: ActionType$6.UpdateContextFilterState,
|
|
4291
|
+
contextFilterState: newContextFilterState,
|
|
4292
|
+
});
|
|
4293
4293
|
}
|
|
4294
4294
|
});
|
|
4295
4295
|
}
|
|
4296
4296
|
}
|
|
4297
4297
|
else {
|
|
4298
4298
|
// No subcontexts
|
|
4299
|
-
pendingContextFilterState[pickableItem.id]
|
|
4299
|
+
const newContextFilterState = Object.assign(Object.assign({}, pendingContextFilterState), { [pickableItem.id]: pickableItem.checked });
|
|
4300
|
+
dispatch({
|
|
4301
|
+
type: ActionType$6.UpdateContextFilterState,
|
|
4302
|
+
contextFilterState: newContextFilterState,
|
|
4303
|
+
});
|
|
4300
4304
|
}
|
|
4301
4305
|
});
|
|
4302
|
-
dispatch({
|
|
4303
|
-
type: ActionType$6.UpdateContextFilterState,
|
|
4304
|
-
contextFilterState: pendingContextFilterState,
|
|
4305
|
-
});
|
|
4306
4306
|
} }));
|
|
4307
4307
|
}
|
|
4308
4308
|
else if (expandedFilterDrawer === FilterDrawer.Tag) {
|
|
@@ -4313,10 +4313,10 @@ const LogReviewer = (props) => {
|
|
|
4313
4313
|
.map((tag) => {
|
|
4314
4314
|
const description = genHumanReadableName(tag);
|
|
4315
4315
|
return (React__default["default"].createElement(CheckboxButton, { key: tag, id: `LogReviewer-tag-${tag}-checkbox`, text: description, ariaLabel: `require that logs be tagged with "${description}" or any other selected tag`, checked: pendingTagFilterState[tag], onChanged: (checked) => {
|
|
4316
|
-
pendingTagFilterState[tag]
|
|
4316
|
+
const newTagFilterState = Object.assign(Object.assign({}, pendingTagFilterState), { [tag]: checked });
|
|
4317
4317
|
dispatch({
|
|
4318
4318
|
type: ActionType$6.UpdateTagFilterState,
|
|
4319
|
-
tagFilterState:
|
|
4319
|
+
tagFilterState: newTagFilterState,
|
|
4320
4320
|
});
|
|
4321
4321
|
}, checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Light }));
|
|
4322
4322
|
}))));
|
|
@@ -4326,24 +4326,24 @@ const LogReviewer = (props) => {
|
|
|
4326
4326
|
filterDrawer = (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
4327
4327
|
React__default["default"].createElement(TabBox, { title: "Log Type" },
|
|
4328
4328
|
React__default["default"].createElement(RadioButton, { id: "LogReviewer-type-all", text: "All Logs", onSelected: () => {
|
|
4329
|
-
pendingActionErrorFilterState
|
|
4329
|
+
const newActionErrorFilterState = Object.assign(Object.assign({}, pendingActionErrorFilterState), { type: undefined });
|
|
4330
4330
|
dispatch({
|
|
4331
4331
|
type: ActionType$6.UpdateActionErrorFilterState,
|
|
4332
|
-
actionErrorFilterState:
|
|
4332
|
+
actionErrorFilterState: newActionErrorFilterState,
|
|
4333
4333
|
});
|
|
4334
4334
|
}, ariaLabel: "show logs of all types", selected: pendingActionErrorFilterState.type === undefined, unselectedVariant: Variant$1.Light }),
|
|
4335
4335
|
React__default["default"].createElement(RadioButton, { id: "LogReviewer-type-action-only", text: "Action Logs Only", onSelected: () => {
|
|
4336
|
-
pendingActionErrorFilterState
|
|
4336
|
+
const newActionErrorFilterState = Object.assign(Object.assign({}, pendingActionErrorFilterState), { type: LogType$1.Action });
|
|
4337
4337
|
dispatch({
|
|
4338
4338
|
type: ActionType$6.UpdateActionErrorFilterState,
|
|
4339
|
-
actionErrorFilterState:
|
|
4339
|
+
actionErrorFilterState: newActionErrorFilterState,
|
|
4340
4340
|
});
|
|
4341
4341
|
}, ariaLabel: "only show action logs", selected: pendingActionErrorFilterState.type === LogType$1.Action, unselectedVariant: Variant$1.Light }),
|
|
4342
4342
|
React__default["default"].createElement(RadioButton, { id: "LogReviewer-type-error-only", text: "Action Error Only", onSelected: () => {
|
|
4343
|
-
pendingActionErrorFilterState
|
|
4343
|
+
const newActionErrorFilterState = Object.assign(Object.assign({}, pendingActionErrorFilterState), { type: LogType$1.Error });
|
|
4344
4344
|
dispatch({
|
|
4345
4345
|
type: ActionType$6.UpdateActionErrorFilterState,
|
|
4346
|
-
actionErrorFilterState:
|
|
4346
|
+
actionErrorFilterState: newActionErrorFilterState,
|
|
4347
4347
|
});
|
|
4348
4348
|
}, ariaLabel: "only show error logs", selected: pendingActionErrorFilterState.type === LogType$1.Error, noMarginOnRight: true, selectedVariant: Variant$1.Light, unselectedVariant: Variant$1.Light })),
|
|
4349
4349
|
(pendingActionErrorFilterState.type === undefined
|
|
@@ -4352,10 +4352,10 @@ const LogReviewer = (props) => {
|
|
|
4352
4352
|
.map((action) => {
|
|
4353
4353
|
const description = genHumanReadableName(action);
|
|
4354
4354
|
return (React__default["default"].createElement(CheckboxButton, { key: action, id: `LogReviewer-action-${action}-checkbox`, text: description, ariaLabel: `include logs with action type "${description}" in results`, noMarginOnRight: true, checked: pendingActionErrorFilterState.action[action], onChanged: (checked) => {
|
|
4355
|
-
pendingActionErrorFilterState.action[action]
|
|
4355
|
+
const newActionErrorFilterState = Object.assign(Object.assign({}, pendingActionErrorFilterState), { action: Object.assign(Object.assign({}, pendingActionErrorFilterState.action), { [action]: checked }) });
|
|
4356
4356
|
dispatch({
|
|
4357
4357
|
type: ActionType$6.UpdateActionErrorFilterState,
|
|
4358
|
-
actionErrorFilterState:
|
|
4358
|
+
actionErrorFilterState: newActionErrorFilterState,
|
|
4359
4359
|
});
|
|
4360
4360
|
}, checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Light }));
|
|
4361
4361
|
})),
|
|
@@ -4363,10 +4363,10 @@ const LogReviewer = (props) => {
|
|
|
4363
4363
|
.map((target) => {
|
|
4364
4364
|
const description = genHumanReadableName(target);
|
|
4365
4365
|
return (React__default["default"].createElement(CheckboxButton, { key: target, id: `LogReviewer-target-${target}-checkbox`, text: description, ariaLabel: `include logs with target "${description}" in results`, checked: pendingActionErrorFilterState.target[target], noMarginOnRight: true, onChanged: (checked) => {
|
|
4366
|
-
pendingActionErrorFilterState.target[target]
|
|
4366
|
+
const newActionErrorFilterState = Object.assign(Object.assign({}, pendingActionErrorFilterState), { target: Object.assign(Object.assign({}, pendingActionErrorFilterState.target), { [target]: checked }) });
|
|
4367
4367
|
dispatch({
|
|
4368
4368
|
type: ActionType$6.UpdateActionErrorFilterState,
|
|
4369
|
-
actionErrorFilterState:
|
|
4369
|
+
actionErrorFilterState: newActionErrorFilterState,
|
|
4370
4370
|
});
|
|
4371
4371
|
}, checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Light }));
|
|
4372
4372
|
})))),
|
|
@@ -4375,21 +4375,21 @@ const LogReviewer = (props) => {
|
|
|
4375
4375
|
React__default["default"].createElement("div", { className: "input-group mb-2" },
|
|
4376
4376
|
React__default["default"].createElement("span", { className: "input-group-text" }, "Error Message"),
|
|
4377
4377
|
React__default["default"].createElement("input", { type: "text", className: "form-control", "aria-label": "query for error message", value: pendingActionErrorFilterState.errorMessage, placeholder: "e.g. undefined is not a function", onChange: (e) => {
|
|
4378
|
-
pendingActionErrorFilterState
|
|
4378
|
+
const newActionErrorFilterState = Object.assign(Object.assign({}, pendingActionErrorFilterState), { errorMessage: e.target.value });
|
|
4379
4379
|
dispatch({
|
|
4380
4380
|
type: ActionType$6.UpdateActionErrorFilterState,
|
|
4381
|
-
actionErrorFilterState:
|
|
4381
|
+
actionErrorFilterState: newActionErrorFilterState,
|
|
4382
4382
|
});
|
|
4383
4383
|
} })),
|
|
4384
4384
|
React__default["default"].createElement("div", { className: "input-group mb-2" },
|
|
4385
4385
|
React__default["default"].createElement("span", { className: "input-group-text" }, "Error Code"),
|
|
4386
4386
|
React__default["default"].createElement("input", { type: "text", className: "form-control", "aria-label": "query for error code", value: pendingActionErrorFilterState.errorCode, placeholder: "e.g. GC22", onChange: (e) => {
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4387
|
+
const newActionErrorFilterState = Object.assign(Object.assign({}, pendingActionErrorFilterState), { errorCode: ((e.target.value)
|
|
4388
|
+
.trim()
|
|
4389
|
+
.toUpperCase()) });
|
|
4390
4390
|
dispatch({
|
|
4391
4391
|
type: ActionType$6.UpdateActionErrorFilterState,
|
|
4392
|
-
actionErrorFilterState:
|
|
4392
|
+
actionErrorFilterState: newActionErrorFilterState,
|
|
4393
4393
|
});
|
|
4394
4394
|
} }))))));
|
|
4395
4395
|
}
|
|
@@ -4400,29 +4400,29 @@ const LogReviewer = (props) => {
|
|
|
4400
4400
|
React__default["default"].createElement("div", { className: "input-group mb-2" },
|
|
4401
4401
|
React__default["default"].createElement("span", { className: "input-group-text" }, "User First Name"),
|
|
4402
4402
|
React__default["default"].createElement("input", { type: "text", className: "form-control", "aria-label": "query for user first name", value: pendingAdvancedFilterState.userFirstName, placeholder: "e.g. Divardo", onChange: (e) => {
|
|
4403
|
-
pendingAdvancedFilterState
|
|
4403
|
+
const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { userFirstName: e.target.value });
|
|
4404
4404
|
dispatch({
|
|
4405
4405
|
type: ActionType$6.UpdateAdvancedFilterState,
|
|
4406
|
-
advancedFilterState:
|
|
4406
|
+
advancedFilterState: newAdvancedFilterState,
|
|
4407
4407
|
});
|
|
4408
4408
|
} })),
|
|
4409
4409
|
React__default["default"].createElement("div", { className: "input-group mb-2" },
|
|
4410
4410
|
React__default["default"].createElement("span", { className: "input-group-text" }, "User Last Name"),
|
|
4411
4411
|
React__default["default"].createElement("input", { type: "text", className: "form-control", "aria-label": "query for user last name", value: pendingAdvancedFilterState.userLastName, placeholder: "e.g. Calicci", onChange: (e) => {
|
|
4412
|
-
pendingAdvancedFilterState
|
|
4412
|
+
const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { userLastName: e.target.value });
|
|
4413
4413
|
dispatch({
|
|
4414
4414
|
type: ActionType$6.UpdateAdvancedFilterState,
|
|
4415
|
-
advancedFilterState:
|
|
4415
|
+
advancedFilterState: newAdvancedFilterState,
|
|
4416
4416
|
});
|
|
4417
4417
|
} })),
|
|
4418
4418
|
React__default["default"].createElement("div", { className: "input-group mb-2" },
|
|
4419
4419
|
React__default["default"].createElement("span", { className: "input-group-text" }, "User Email"),
|
|
4420
4420
|
React__default["default"].createElement("input", { type: "text", className: "form-control", "aria-label": "query for user email", value: pendingAdvancedFilterState.userEmail, placeholder: "e.g. calicci@fas.harvard.edu", onChange: (e) => {
|
|
4421
|
-
|
|
4422
|
-
|
|
4421
|
+
const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { userEmail: ((e.target.value)
|
|
4422
|
+
.trim()) });
|
|
4423
4423
|
dispatch({
|
|
4424
4424
|
type: ActionType$6.UpdateAdvancedFilterState,
|
|
4425
|
-
advancedFilterState:
|
|
4425
|
+
advancedFilterState: newAdvancedFilterState,
|
|
4426
4426
|
});
|
|
4427
4427
|
} })),
|
|
4428
4428
|
React__default["default"].createElement("div", { className: "input-group mb-2" },
|
|
@@ -4431,44 +4431,44 @@ const LogReviewer = (props) => {
|
|
|
4431
4431
|
const { value } = e.target;
|
|
4432
4432
|
// Only update if value contains only numbers
|
|
4433
4433
|
if (/^\d+$/.test(value) || value === '') {
|
|
4434
|
-
|
|
4435
|
-
|
|
4434
|
+
const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { userId: ((e.target.value)
|
|
4435
|
+
.trim()) });
|
|
4436
|
+
dispatch({
|
|
4437
|
+
type: ActionType$6.UpdateAdvancedFilterState,
|
|
4438
|
+
advancedFilterState: newAdvancedFilterState,
|
|
4439
|
+
});
|
|
4436
4440
|
}
|
|
4437
|
-
dispatch({
|
|
4438
|
-
type: ActionType$6.UpdateAdvancedFilterState,
|
|
4439
|
-
advancedFilterState: pendingAdvancedFilterState,
|
|
4440
|
-
});
|
|
4441
4441
|
} })),
|
|
4442
4442
|
React__default["default"].createElement(ButtonInputGroup, { label: "Role" },
|
|
4443
4443
|
React__default["default"].createElement(CheckboxButton, { text: "Students", onChanged: (checked) => {
|
|
4444
|
-
pendingAdvancedFilterState
|
|
4444
|
+
const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { includeLearners: checked });
|
|
4445
4445
|
dispatch({
|
|
4446
4446
|
type: ActionType$6.UpdateAdvancedFilterState,
|
|
4447
|
-
advancedFilterState:
|
|
4447
|
+
advancedFilterState: newAdvancedFilterState,
|
|
4448
4448
|
});
|
|
4449
4449
|
}, checked: pendingAdvancedFilterState.includeLearners, ariaLabel: "show logs from students", checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Light }),
|
|
4450
4450
|
React__default["default"].createElement(CheckboxButton, { text: "Teaching Team Members", onChanged: (checked) => {
|
|
4451
|
-
pendingAdvancedFilterState
|
|
4451
|
+
const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { includeTTMs: checked });
|
|
4452
4452
|
dispatch({
|
|
4453
4453
|
type: ActionType$6.UpdateAdvancedFilterState,
|
|
4454
|
-
advancedFilterState:
|
|
4454
|
+
advancedFilterState: newAdvancedFilterState,
|
|
4455
4455
|
});
|
|
4456
4456
|
}, checked: pendingAdvancedFilterState.includeTTMs, ariaLabel: "show logs from teaching team members", checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Light }),
|
|
4457
4457
|
React__default["default"].createElement(CheckboxButton, { text: "Admins", onChanged: (checked) => {
|
|
4458
|
-
pendingAdvancedFilterState
|
|
4458
|
+
const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { includeAdmins: checked });
|
|
4459
4459
|
dispatch({
|
|
4460
4460
|
type: ActionType$6.UpdateAdvancedFilterState,
|
|
4461
|
-
advancedFilterState:
|
|
4461
|
+
advancedFilterState: newAdvancedFilterState,
|
|
4462
4462
|
});
|
|
4463
4463
|
}, checked: pendingAdvancedFilterState.includeAdmins, ariaLabel: "show logs from admins", checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Light }))),
|
|
4464
4464
|
React__default["default"].createElement(TabBox, { title: "Course" },
|
|
4465
4465
|
React__default["default"].createElement("div", { className: "input-group mb-2" },
|
|
4466
4466
|
React__default["default"].createElement("span", { className: "input-group-text" }, "Course Name"),
|
|
4467
4467
|
React__default["default"].createElement("input", { type: "text", className: "form-control", "aria-label": "query for course name", value: pendingAdvancedFilterState.courseName, placeholder: "e.g. GLC 200", onChange: (e) => {
|
|
4468
|
-
pendingAdvancedFilterState
|
|
4468
|
+
const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { courseName: e.target.value });
|
|
4469
4469
|
dispatch({
|
|
4470
4470
|
type: ActionType$6.UpdateAdvancedFilterState,
|
|
4471
|
-
advancedFilterState:
|
|
4471
|
+
advancedFilterState: newAdvancedFilterState,
|
|
4472
4472
|
});
|
|
4473
4473
|
} })),
|
|
4474
4474
|
React__default["default"].createElement("div", { className: "input-group mb-2" },
|
|
@@ -4477,79 +4477,79 @@ const LogReviewer = (props) => {
|
|
|
4477
4477
|
const { value } = e.target;
|
|
4478
4478
|
// Only update if value contains only numbers
|
|
4479
4479
|
if (/^\d+$/.test(value) || value === '') {
|
|
4480
|
-
|
|
4481
|
-
|
|
4480
|
+
const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { courseId: ((e.target.value)
|
|
4481
|
+
.trim()) });
|
|
4482
|
+
dispatch({
|
|
4483
|
+
type: ActionType$6.UpdateAdvancedFilterState,
|
|
4484
|
+
advancedFilterState: newAdvancedFilterState,
|
|
4485
|
+
});
|
|
4482
4486
|
}
|
|
4483
|
-
dispatch({
|
|
4484
|
-
type: ActionType$6.UpdateAdvancedFilterState,
|
|
4485
|
-
advancedFilterState: pendingAdvancedFilterState,
|
|
4486
|
-
});
|
|
4487
4487
|
} }))),
|
|
4488
4488
|
React__default["default"].createElement(TabBox, { title: "Device" },
|
|
4489
4489
|
React__default["default"].createElement(ButtonInputGroup, { label: "Device Type" },
|
|
4490
4490
|
React__default["default"].createElement(RadioButton, { text: "All Devices", ariaLabel: "show logs from all devices", selected: pendingAdvancedFilterState.isMobile === undefined, onSelected: () => {
|
|
4491
|
-
pendingAdvancedFilterState
|
|
4491
|
+
const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { isMobile: undefined });
|
|
4492
4492
|
dispatch({
|
|
4493
4493
|
type: ActionType$6.UpdateAdvancedFilterState,
|
|
4494
|
-
advancedFilterState:
|
|
4494
|
+
advancedFilterState: newAdvancedFilterState,
|
|
4495
4495
|
});
|
|
4496
4496
|
}, selectedVariant: Variant$1.Light, unselectedVariant: Variant$1.Light }),
|
|
4497
4497
|
React__default["default"].createElement(RadioButton, { text: "Mobile Only", ariaLabel: "show logs from mobile devices", selected: pendingAdvancedFilterState.isMobile === true, onSelected: () => {
|
|
4498
|
-
pendingAdvancedFilterState
|
|
4498
|
+
const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { isMobile: true });
|
|
4499
4499
|
dispatch({
|
|
4500
4500
|
type: ActionType$6.UpdateAdvancedFilterState,
|
|
4501
|
-
advancedFilterState:
|
|
4501
|
+
advancedFilterState: newAdvancedFilterState,
|
|
4502
4502
|
});
|
|
4503
4503
|
}, selectedVariant: Variant$1.Light, unselectedVariant: Variant$1.Light }),
|
|
4504
4504
|
React__default["default"].createElement(RadioButton, { text: "Desktop Only", ariaLabel: "show logs from desktop devices", selected: pendingAdvancedFilterState.isMobile === false, onSelected: () => {
|
|
4505
|
-
pendingAdvancedFilterState
|
|
4505
|
+
const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { isMobile: false });
|
|
4506
4506
|
dispatch({
|
|
4507
4507
|
type: ActionType$6.UpdateAdvancedFilterState,
|
|
4508
|
-
advancedFilterState:
|
|
4508
|
+
advancedFilterState: newAdvancedFilterState,
|
|
4509
4509
|
});
|
|
4510
4510
|
}, noMarginOnRight: true, selectedVariant: Variant$1.Light, unselectedVariant: Variant$1.Light }))),
|
|
4511
4511
|
React__default["default"].createElement(TabBox, { title: "Source" },
|
|
4512
4512
|
React__default["default"].createElement(ButtonInputGroup, { label: "Source Type" },
|
|
4513
4513
|
React__default["default"].createElement(RadioButton, { text: "Both", ariaLabel: "show logs from all sources", selected: pendingAdvancedFilterState.source === undefined, onSelected: () => {
|
|
4514
|
-
pendingAdvancedFilterState
|
|
4514
|
+
const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { source: undefined });
|
|
4515
4515
|
dispatch({
|
|
4516
4516
|
type: ActionType$6.UpdateAdvancedFilterState,
|
|
4517
|
-
advancedFilterState:
|
|
4517
|
+
advancedFilterState: newAdvancedFilterState,
|
|
4518
4518
|
});
|
|
4519
4519
|
}, selectedVariant: Variant$1.Light, unselectedVariant: Variant$1.Light }),
|
|
4520
4520
|
React__default["default"].createElement(RadioButton, { text: "Client Only", ariaLabel: "show logs from client source", selected: pendingAdvancedFilterState.source === LogSource$1.Client, onSelected: () => {
|
|
4521
|
-
pendingAdvancedFilterState
|
|
4521
|
+
const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { source: LogSource$1.Client });
|
|
4522
4522
|
dispatch({
|
|
4523
4523
|
type: ActionType$6.UpdateAdvancedFilterState,
|
|
4524
|
-
advancedFilterState:
|
|
4524
|
+
advancedFilterState: newAdvancedFilterState,
|
|
4525
4525
|
});
|
|
4526
4526
|
}, selectedVariant: Variant$1.Light, unselectedVariant: Variant$1.Light }),
|
|
4527
4527
|
React__default["default"].createElement(RadioButton, { text: "Server Only", ariaLabel: "show logs from server source", selected: pendingAdvancedFilterState.source === LogSource$1.Server, onSelected: () => {
|
|
4528
|
-
pendingAdvancedFilterState
|
|
4528
|
+
const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { source: LogSource$1.Server });
|
|
4529
4529
|
dispatch({
|
|
4530
4530
|
type: ActionType$6.UpdateAdvancedFilterState,
|
|
4531
|
-
advancedFilterState:
|
|
4531
|
+
advancedFilterState: newAdvancedFilterState,
|
|
4532
4532
|
});
|
|
4533
4533
|
}, noMarginOnRight: true, selectedVariant: Variant$1.Light, unselectedVariant: Variant$1.Light })),
|
|
4534
4534
|
pendingAdvancedFilterState.source !== LogSource$1.Client && (React__default["default"].createElement("div", { className: "mt-2" },
|
|
4535
4535
|
React__default["default"].createElement("div", { className: "input-group mb-2" },
|
|
4536
4536
|
React__default["default"].createElement("span", { className: "input-group-text" }, "Server Route Path"),
|
|
4537
4537
|
React__default["default"].createElement("input", { type: "text", className: "form-control", "aria-label": "query for server route path", value: pendingAdvancedFilterState.routePath, placeholder: "e.g. /api/ttm/courses/12345", onChange: (e) => {
|
|
4538
|
-
|
|
4539
|
-
|
|
4538
|
+
const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { routePath: ((e.target.value)
|
|
4539
|
+
.trim()) });
|
|
4540
4540
|
dispatch({
|
|
4541
4541
|
type: ActionType$6.UpdateAdvancedFilterState,
|
|
4542
|
-
advancedFilterState:
|
|
4542
|
+
advancedFilterState: newAdvancedFilterState,
|
|
4543
4543
|
});
|
|
4544
4544
|
} })),
|
|
4545
4545
|
React__default["default"].createElement("div", { className: "input-group mb-2" },
|
|
4546
4546
|
React__default["default"].createElement("span", { className: "input-group-text" }, "Server Route Template"),
|
|
4547
4547
|
React__default["default"].createElement("input", { type: "text", className: "form-control", "aria-label": "query for server route template", value: pendingAdvancedFilterState.routeTemplate, placeholder: "e.g. /api/ttm/courses/:courseId", onChange: (e) => {
|
|
4548
|
-
|
|
4549
|
-
|
|
4548
|
+
const newAdvancedFilterState = Object.assign(Object.assign({}, pendingAdvancedFilterState), { routeTemplate: ((e.target.value)
|
|
4549
|
+
.trim()) });
|
|
4550
4550
|
dispatch({
|
|
4551
4551
|
type: ActionType$6.UpdateAdvancedFilterState,
|
|
4552
|
-
advancedFilterState:
|
|
4552
|
+
advancedFilterState: newAdvancedFilterState,
|
|
4553
4553
|
});
|
|
4554
4554
|
} })))))));
|
|
4555
4555
|
}
|
|
@@ -4558,17 +4558,17 @@ const LogReviewer = (props) => {
|
|
|
4558
4558
|
const filters = (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
4559
4559
|
filterToggles,
|
|
4560
4560
|
filterDrawer && (React__default["default"].createElement(Drawer, { customBackgroundColor: "#eee" }, filterDrawer))));
|
|
4561
|
-
//
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4561
|
+
// Body that will be filled with the contents of the panel
|
|
4562
|
+
const body = (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
4563
|
+
showSpinner && (React__default["default"].createElement("div", { className: "text-center p-5" },
|
|
4564
|
+
React__default["default"].createElement(LoadingSpinner, null))),
|
|
4565
|
+
!showSpinner && (React__default["default"].createElement("div", null, filters)),
|
|
4566
|
+
!showSpinner && logs.length === 0 && (React__default["default"].createElement("div", { className: "alert alert-warning text-center mt-2" },
|
|
4567
|
+
React__default["default"].createElement("h4", { className: "m-1" }, "No Logs to Show"),
|
|
4568
|
+
React__default["default"].createElement("div", null, "Either your filters are too strict or no matching logs have been created yet."))),
|
|
4569
|
+
React__default["default"].createElement("div", { className: showSpinner || logs.length === 0 ? 'd-none' : undefined },
|
|
4570
|
+
React__default["default"].createElement(IntelliTable, { title: "Matching Logs", csvName: `Logs from ${getHumanReadableDate()}`, id: "logs", data: logs, columns: columns })),
|
|
4571
|
+
!showSpinner && logs.length > 0 && paginationControls));
|
|
4572
4572
|
/* ---------- Wrap in Modal --------- */
|
|
4573
4573
|
return (React__default["default"].createElement("div", { className: "LogReviewer-outer-container" },
|
|
4574
4574
|
React__default["default"].createElement("style", null, style$2),
|