Skip to content

Commit 1c3a421

Browse files
authored
feat: add slight red background for fields added to the table from the response (#297)
1 parent e772076 commit 1c3a421

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

src/LogTable.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,11 +349,17 @@ function LogTable(props) {
349349
// Add dynamic columns
350350
_.map(props.extraColumns, (dotPath) => {
351351
const elems = dotPath.split(".");
352+
353+
let columnClass = "logtable-cell";
354+
if (dotPath.startsWith("response.")) {
355+
columnClass += " response-column";
356+
}
357+
352358
stdColumns.push({
353359
Header: elems[elems.length - 1],
354360
accessor: dotPath === ".error" ? "error" : dotPath,
355361
width: columnLargeWidth,
356-
className: "logtable-cell",
362+
className: columnClass,
357363
Cell: ({ cell }) => {
358364
const value = cell.value;
359365
if (value === undefined || value === null) return null;

src/global.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ html {
9494
text-overflow: clip;
9595
}
9696

97+
/* logtable for response fields */
98+
.response-column {
99+
background-color: rgba(255, 0, 0, 0.05);
100+
}
97101
/* Event indicator styles */
98102
.selected-event-indicator-container {
99103
position: relative;

0 commit comments

Comments
 (0)