dce-reactkit 3.2.2-beta.47 → 3.2.2-beta.48
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 +39 -37
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +39 -37
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/LogReviewer.tsx +64 -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
|
});
|
|
@@ -1388,58 +1388,61 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1388
1388
|
label="Action"
|
|
1389
1389
|
className="mb-2"
|
|
1390
1390
|
>
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
.
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1391
|
+
<div className="grid gap-1">
|
|
1392
|
+
{
|
|
1393
|
+
Object.keys(LogAction)
|
|
1394
|
+
.map((action) => {
|
|
1395
|
+
const description = genHumanReadableName(action);
|
|
1396
|
+
return (
|
|
1397
|
+
<CheckboxButton
|
|
1398
|
+
key={action}
|
|
1399
|
+
id={`LogReviewer-action-${action}-checkbox`}
|
|
1400
|
+
text={description}
|
|
1401
|
+
ariaLabel={`include logs with action type "${description}" in results`}
|
|
1402
|
+
noMarginOnRight
|
|
1403
|
+
checked={actionErrorFilterState.action[action]}
|
|
1404
|
+
onChanged={(checked) => {
|
|
1405
|
+
actionErrorFilterState.action[action] = checked;
|
|
1406
|
+
console.log(actionErrorFilterState, action, checked);
|
|
1407
|
+
dispatch({
|
|
1408
|
+
type: ActionType.UpdateActionErrorFilterState,
|
|
1409
|
+
actionErrorFilterState,
|
|
1410
|
+
});
|
|
1411
|
+
}}
|
|
1412
|
+
/>
|
|
1413
|
+
);
|
|
1414
|
+
})
|
|
1415
|
+
}
|
|
1416
|
+
</div>
|
|
1415
1417
|
</ButtonInputGroup>
|
|
1416
1418
|
{/* Target */}
|
|
1417
1419
|
<ButtonInputGroup label="Target">
|
|
1418
1420
|
{/* 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
|
-
|
|
1421
|
+
<div className="grid gap-1">
|
|
1422
|
+
{
|
|
1423
|
+
Object.keys(targetMap)
|
|
1424
|
+
.map((target) => {
|
|
1425
|
+
const description = genHumanReadableName(target);
|
|
1426
|
+
return (
|
|
1427
|
+
<CheckboxButton
|
|
1428
|
+
key={target}
|
|
1429
|
+
id={`LogReviewer-target-${target}-checkbox`}
|
|
1430
|
+
text={description}
|
|
1431
|
+
ariaLabel={`include logs with target "${description}" in results`}
|
|
1432
|
+
checked={actionErrorFilterState.target[target]}
|
|
1433
|
+
onChanged={(checked) => {
|
|
1434
|
+
actionErrorFilterState.target[target] = checked;
|
|
1435
|
+
console.log(actionErrorFilterState, target, checked);
|
|
1436
|
+
dispatch({
|
|
1437
|
+
type: ActionType.UpdateActionErrorFilterState,
|
|
1438
|
+
actionErrorFilterState,
|
|
1439
|
+
});
|
|
1440
|
+
}}
|
|
1441
|
+
/>
|
|
1442
|
+
);
|
|
1443
|
+
})
|
|
1444
|
+
}
|
|
1445
|
+
</div>
|
|
1443
1446
|
</ButtonInputGroup>
|
|
1444
1447
|
</TabBox>
|
|
1445
1448
|
)
|
|
@@ -1461,6 +1464,7 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1461
1464
|
className="form-control"
|
|
1462
1465
|
aria-label="query for error message"
|
|
1463
1466
|
value={actionErrorFilterState.errorMessage}
|
|
1467
|
+
placeholder="e.g. undefined is not a function"
|
|
1464
1468
|
onChange={(e) => {
|
|
1465
1469
|
actionErrorFilterState.errorMessage = e.target.value;
|
|
1466
1470
|
dispatch({
|
|
@@ -1480,6 +1484,7 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1480
1484
|
className="form-control"
|
|
1481
1485
|
aria-label="query for error code"
|
|
1482
1486
|
value={actionErrorFilterState.errorCode}
|
|
1487
|
+
placeholder="e.g. GC22"
|
|
1483
1488
|
onChange={(e) => {
|
|
1484
1489
|
actionErrorFilterState.errorCode = (
|
|
1485
1490
|
(e.target.value)
|
|
@@ -1514,6 +1519,7 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1514
1519
|
className="form-control"
|
|
1515
1520
|
aria-label="query for user first name"
|
|
1516
1521
|
value={advancedFilterState.userFirstName}
|
|
1522
|
+
placeholder="e.g. Divardo"
|
|
1517
1523
|
onChange={(e) => {
|
|
1518
1524
|
advancedFilterState.userFirstName = e.target.value;
|
|
1519
1525
|
dispatch({
|
|
@@ -1533,6 +1539,7 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1533
1539
|
className="form-control"
|
|
1534
1540
|
aria-label="query for user last name"
|
|
1535
1541
|
value={advancedFilterState.userLastName}
|
|
1542
|
+
placeholder="e.g. Calicci"
|
|
1536
1543
|
onChange={(e) => {
|
|
1537
1544
|
advancedFilterState.userLastName = e.target.value;
|
|
1538
1545
|
dispatch({
|
|
@@ -1552,6 +1559,7 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1552
1559
|
className="form-control"
|
|
1553
1560
|
aria-label="query for user email"
|
|
1554
1561
|
value={advancedFilterState.userEmail}
|
|
1562
|
+
placeholder="e.g. calicci@fas.harvard.edu"
|
|
1555
1563
|
onChange={(e) => {
|
|
1556
1564
|
advancedFilterState.userEmail = (
|
|
1557
1565
|
(e.target.value)
|
|
@@ -1574,6 +1582,7 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1574
1582
|
className="form-control"
|
|
1575
1583
|
aria-label="query for user canvas id"
|
|
1576
1584
|
value={advancedFilterState.userId}
|
|
1585
|
+
placeholder="e.g. 104985"
|
|
1577
1586
|
onChange={(e) => {
|
|
1578
1587
|
const { value } = e.target;
|
|
1579
1588
|
// Only update if value contains only numbers
|
|
@@ -1643,6 +1652,7 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1643
1652
|
className="form-control"
|
|
1644
1653
|
aria-label="query for course name"
|
|
1645
1654
|
value={advancedFilterState.courseName}
|
|
1655
|
+
placeholder="e.g. GLC 200"
|
|
1646
1656
|
onChange={(e) => {
|
|
1647
1657
|
advancedFilterState.courseName = e.target.value;
|
|
1648
1658
|
dispatch({
|
|
@@ -1662,6 +1672,7 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1662
1672
|
className="form-control"
|
|
1663
1673
|
aria-label="query for course canvas id"
|
|
1664
1674
|
value={advancedFilterState.courseId}
|
|
1675
|
+
placeholder="e.g. 15948"
|
|
1665
1676
|
onChange={(e) => {
|
|
1666
1677
|
const { value } = e.target;
|
|
1667
1678
|
// Only update if value contains only numbers
|
|
@@ -1777,8 +1788,8 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1777
1788
|
type="text"
|
|
1778
1789
|
className="form-control"
|
|
1779
1790
|
aria-label="query for server route path"
|
|
1780
|
-
placeholder="e.g. /api/ttm/courses/12345"
|
|
1781
1791
|
value={advancedFilterState.routePath}
|
|
1792
|
+
placeholder="e.g. /api/ttm/courses/12345"
|
|
1782
1793
|
onChange={(e) => {
|
|
1783
1794
|
advancedFilterState.courseName = (
|
|
1784
1795
|
(e.target.value)
|