dce-reactkit 3.2.2-beta.47 → 3.2.2-beta.49
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 +43 -38
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +43 -38
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/LogReviewer.tsx +68 -53
package/package.json
CHANGED
|
@@ -719,8 +719,8 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
719
719
|
[
|
|
720
720
|
(LogMetadata.Context ?? {}),
|
|
721
721
|
LogBuiltInMetadata.Context,
|
|
722
|
-
].forEach((
|
|
723
|
-
Object.keys(
|
|
722
|
+
].forEach((partialContextMap) => {
|
|
723
|
+
Object.keys(partialContextMap).forEach((context) => {
|
|
724
724
|
// Add context
|
|
725
725
|
contextMap[context] = context;
|
|
726
726
|
|
|
@@ -738,8 +738,8 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
738
738
|
[
|
|
739
739
|
(LogMetadata.Target ?? {}),
|
|
740
740
|
LogBuiltInMetadata.Target,
|
|
741
|
-
].forEach((
|
|
742
|
-
Object.keys(
|
|
741
|
+
].forEach((partialTargetMap) => {
|
|
742
|
+
Object.keys(partialTargetMap).forEach((target) => {
|
|
743
743
|
targetMap[target] = target;
|
|
744
744
|
});
|
|
745
745
|
});
|
|
@@ -1128,6 +1128,10 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1128
1128
|
});
|
|
1129
1129
|
}}
|
|
1130
1130
|
>
|
|
1131
|
+
<FontAwesomeIcon
|
|
1132
|
+
icon={faTimes}
|
|
1133
|
+
/>
|
|
1134
|
+
{' '}
|
|
1131
1135
|
Reset
|
|
1132
1136
|
</button>
|
|
1133
1137
|
</div>
|
|
@@ -1388,58 +1392,61 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1388
1392
|
label="Action"
|
|
1389
1393
|
className="mb-2"
|
|
1390
1394
|
>
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
.
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1395
|
+
<div className="d-flex gap-1 flex-wrap">
|
|
1396
|
+
{
|
|
1397
|
+
Object.keys(LogAction)
|
|
1398
|
+
.map((action) => {
|
|
1399
|
+
const description = genHumanReadableName(action);
|
|
1400
|
+
return (
|
|
1401
|
+
<CheckboxButton
|
|
1402
|
+
key={action}
|
|
1403
|
+
id={`LogReviewer-action-${action}-checkbox`}
|
|
1404
|
+
text={description}
|
|
1405
|
+
ariaLabel={`include logs with action type "${description}" in results`}
|
|
1406
|
+
noMarginOnRight
|
|
1407
|
+
checked={actionErrorFilterState.action[action]}
|
|
1408
|
+
onChanged={(checked) => {
|
|
1409
|
+
actionErrorFilterState.action[action] = checked;
|
|
1410
|
+
console.log(actionErrorFilterState, action, checked);
|
|
1411
|
+
dispatch({
|
|
1412
|
+
type: ActionType.UpdateActionErrorFilterState,
|
|
1413
|
+
actionErrorFilterState,
|
|
1414
|
+
});
|
|
1415
|
+
}}
|
|
1416
|
+
/>
|
|
1417
|
+
);
|
|
1418
|
+
})
|
|
1419
|
+
}
|
|
1420
|
+
</div>
|
|
1415
1421
|
</ButtonInputGroup>
|
|
1416
1422
|
{/* Target */}
|
|
1417
1423
|
<ButtonInputGroup label="Target">
|
|
1418
1424
|
{/* List of targets */}
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
.
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1425
|
+
<div className="d-flex gap-1 flex-wrap">
|
|
1426
|
+
{
|
|
1427
|
+
Object.keys(targetMap)
|
|
1428
|
+
.map((target) => {
|
|
1429
|
+
const description = genHumanReadableName(target);
|
|
1430
|
+
return (
|
|
1431
|
+
<CheckboxButton
|
|
1432
|
+
key={target}
|
|
1433
|
+
id={`LogReviewer-target-${target}-checkbox`}
|
|
1434
|
+
text={description}
|
|
1435
|
+
ariaLabel={`include logs with target "${description}" in results`}
|
|
1436
|
+
checked={actionErrorFilterState.target[target]}
|
|
1437
|
+
onChanged={(checked) => {
|
|
1438
|
+
actionErrorFilterState.target[target] = checked;
|
|
1439
|
+
console.log(actionErrorFilterState, target, checked);
|
|
1440
|
+
dispatch({
|
|
1441
|
+
type: ActionType.UpdateActionErrorFilterState,
|
|
1442
|
+
actionErrorFilterState,
|
|
1443
|
+
});
|
|
1444
|
+
}}
|
|
1445
|
+
/>
|
|
1446
|
+
);
|
|
1447
|
+
})
|
|
1448
|
+
}
|
|
1449
|
+
</div>
|
|
1443
1450
|
</ButtonInputGroup>
|
|
1444
1451
|
</TabBox>
|
|
1445
1452
|
)
|
|
@@ -1461,6 +1468,7 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1461
1468
|
className="form-control"
|
|
1462
1469
|
aria-label="query for error message"
|
|
1463
1470
|
value={actionErrorFilterState.errorMessage}
|
|
1471
|
+
placeholder="e.g. undefined is not a function"
|
|
1464
1472
|
onChange={(e) => {
|
|
1465
1473
|
actionErrorFilterState.errorMessage = e.target.value;
|
|
1466
1474
|
dispatch({
|
|
@@ -1480,6 +1488,7 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1480
1488
|
className="form-control"
|
|
1481
1489
|
aria-label="query for error code"
|
|
1482
1490
|
value={actionErrorFilterState.errorCode}
|
|
1491
|
+
placeholder="e.g. GC22"
|
|
1483
1492
|
onChange={(e) => {
|
|
1484
1493
|
actionErrorFilterState.errorCode = (
|
|
1485
1494
|
(e.target.value)
|
|
@@ -1514,6 +1523,7 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1514
1523
|
className="form-control"
|
|
1515
1524
|
aria-label="query for user first name"
|
|
1516
1525
|
value={advancedFilterState.userFirstName}
|
|
1526
|
+
placeholder="e.g. Divardo"
|
|
1517
1527
|
onChange={(e) => {
|
|
1518
1528
|
advancedFilterState.userFirstName = e.target.value;
|
|
1519
1529
|
dispatch({
|
|
@@ -1533,6 +1543,7 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1533
1543
|
className="form-control"
|
|
1534
1544
|
aria-label="query for user last name"
|
|
1535
1545
|
value={advancedFilterState.userLastName}
|
|
1546
|
+
placeholder="e.g. Calicci"
|
|
1536
1547
|
onChange={(e) => {
|
|
1537
1548
|
advancedFilterState.userLastName = e.target.value;
|
|
1538
1549
|
dispatch({
|
|
@@ -1552,6 +1563,7 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1552
1563
|
className="form-control"
|
|
1553
1564
|
aria-label="query for user email"
|
|
1554
1565
|
value={advancedFilterState.userEmail}
|
|
1566
|
+
placeholder="e.g. calicci@fas.harvard.edu"
|
|
1555
1567
|
onChange={(e) => {
|
|
1556
1568
|
advancedFilterState.userEmail = (
|
|
1557
1569
|
(e.target.value)
|
|
@@ -1574,6 +1586,7 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1574
1586
|
className="form-control"
|
|
1575
1587
|
aria-label="query for user canvas id"
|
|
1576
1588
|
value={advancedFilterState.userId}
|
|
1589
|
+
placeholder="e.g. 104985"
|
|
1577
1590
|
onChange={(e) => {
|
|
1578
1591
|
const { value } = e.target;
|
|
1579
1592
|
// Only update if value contains only numbers
|
|
@@ -1643,6 +1656,7 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1643
1656
|
className="form-control"
|
|
1644
1657
|
aria-label="query for course name"
|
|
1645
1658
|
value={advancedFilterState.courseName}
|
|
1659
|
+
placeholder="e.g. GLC 200"
|
|
1646
1660
|
onChange={(e) => {
|
|
1647
1661
|
advancedFilterState.courseName = e.target.value;
|
|
1648
1662
|
dispatch({
|
|
@@ -1662,6 +1676,7 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1662
1676
|
className="form-control"
|
|
1663
1677
|
aria-label="query for course canvas id"
|
|
1664
1678
|
value={advancedFilterState.courseId}
|
|
1679
|
+
placeholder="e.g. 15948"
|
|
1665
1680
|
onChange={(e) => {
|
|
1666
1681
|
const { value } = e.target;
|
|
1667
1682
|
// Only update if value contains only numbers
|
|
@@ -1777,8 +1792,8 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1777
1792
|
type="text"
|
|
1778
1793
|
className="form-control"
|
|
1779
1794
|
aria-label="query for server route path"
|
|
1780
|
-
placeholder="e.g. /api/ttm/courses/12345"
|
|
1781
1795
|
value={advancedFilterState.routePath}
|
|
1796
|
+
placeholder="e.g. /api/ttm/courses/12345"
|
|
1782
1797
|
onChange={(e) => {
|
|
1783
1798
|
advancedFilterState.courseName = (
|
|
1784
1799
|
(e.target.value)
|