Skip to content

Commit d25d083

Browse files
Theme changes; fix edit test data_location bug
1 parent 811719b commit d25d083

8 files changed

Lines changed: 498 additions & 397 deletions

File tree

apps/validation_framework_v2/src/ModelDetailHeader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class ModelDetailHeader extends React.Component {
181181
<Typography variant="h4" gutterBottom>
182182
<AccessibilityIcon private={this.props.private} />
183183
<span
184-
style={{ marginHorizontal: 125, cursor: "pointer" }}
184+
style={{ marginHorizontal: 125, fontWeight: "bold", color: Theme.darkGreenText, cursor: "pointer", }}
185185
onClick={() =>
186186
copyToClipboard(
187187
this.props.name,

apps/validation_framework_v2/src/ModelResultOverview.js

Lines changed: 44 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,21 @@ import LoadingIndicator from "./LoadingIndicator";
1515
import ResultDetail from "./ResultDetail";
1616
import Theme from "./theme";
1717
import { formatTimeStampToCompact, roundFloat } from "./utils";
18+
import styled from "styled-components";
19+
20+
const StyledTableRow = styled(TableRow)(({ theme }) => ({
21+
'&:nth-of-type(odd)': {
22+
backgroundColor: "white",
23+
borderBottom: "1px solid #DDDDDD"
24+
},
25+
'&:nth-of-type(even)': {
26+
backgroundColor: "#F3F3F3",
27+
},
28+
'&:last-of-type': {
29+
borderBottom: "2px solid",
30+
borderColor: Theme.darkBackground
31+
},
32+
}));
1833

1934
class ResultPerInstanceComboMT extends React.Component {
2035
constructor(props) {
@@ -180,7 +195,7 @@ class ResultEntryTest extends React.Component {
180195
<React.Fragment>
181196
{Object.keys(result_test.test_instances).map(
182197
(test_inst_id, index_tt) => (
183-
<TableRow key={test_inst_id}>
198+
<StyledTableRow key={test_inst_id}>
184199
{index_tt === 0 ? (
185200
<TableCell
186201
align="right"
@@ -218,8 +233,8 @@ class ResultEntryTest extends React.Component {
218233
result_test.test_instances[
219234
test_inst_id
220235
].results[
221-
model_version_entry
222-
.model_inst_id
236+
model_version_entry
237+
.model_inst_id
223238
]
224239
}
225240
handleResultEntryClick={
@@ -231,7 +246,7 @@ class ResultEntryTest extends React.Component {
231246
/>
232247
);
233248
})}
234-
</TableRow>
249+
</StyledTableRow>
235250
)
236251
)}
237252
</React.Fragment>
@@ -317,7 +332,7 @@ export default class ModelResultOverview extends React.Component {
317332
!(
318333
result.model_instance_id in
319334
dict_results[result.test_id]["test_instances"][
320-
result.test_instance_id
335+
result.test_instance_id
321336
]["results"]
322337
)
323338
) {
@@ -348,7 +363,7 @@ export default class ModelResultOverview extends React.Component {
348363
!(
349364
m_inst["model_inst_id"] in
350365
dict_results[result.test_id]["test_instances"][
351-
result.test_instance_id
366+
result.test_instance_id
352367
]["results"]
353368
)
354369
) {
@@ -412,7 +427,7 @@ export default class ModelResultOverview extends React.Component {
412427
function (test_inst_id) {
413428
Object.keys(
414429
dict_results[test_id]["test_instances"][test_inst_id][
415-
"results"
430+
"results"
416431
]
417432
).forEach(function (model_inst_id, index_m) {
418433
dict_results[test_id]["test_instances"][test_inst_id][
@@ -446,7 +461,7 @@ export default class ModelResultOverview extends React.Component {
446461
resultDetailOpen: false,
447462
currentResult: null,
448463
});
449-
updateHash(sourceHash || "" );
464+
updateHash(sourceHash || "");
450465
}
451466

452467
handleResultUpdate(updatedResult) {
@@ -459,65 +474,68 @@ export default class ModelResultOverview extends React.Component {
459474
return (
460475
<React.Fragment>
461476
<Grid container item direction="column">
462-
<Box px={2} pb={0}>
477+
<Box px={2} pb={0} my={2}>
463478
<Typography variant="subtitle1">
464479
<b>Summary of Validation Results</b>
465480
</Typography>
466481
</Box>
467-
<br />
468482
<TableContainer>
469483
<Table
470484
aria-label="spanning table"
471485
style={{
472486
width: "auto",
473487
tableLayout: "auto",
474-
border: 2,
475-
borderColor: "lightgrey",
476-
borderStyle: "solid",
488+
borderStyle: "none",
489+
borderRadius: "20px 20px 0 0",
490+
overflow: "hidden",
491+
marginTop: "10px"
477492
}}
478493
>
479494
<TableHead>
480-
<TableRow>
495+
<StyledTableRow>
481496
<TableCell
482497
align="center"
483498
colSpan={2}
484499
rowSpan={2}
485500
bgcolor={Theme.tableDarkHeader}
501+
style={{ color: Theme.lightText, fontSize: "18px" }}
486502
>
487503
Validation Test
488504
</TableCell>
489505
<TableCell
490506
align="center"
491507
colSpan={model_versions.length * 3}
492508
bgcolor={Theme.tableDarkHeader}
509+
style={{ color: Theme.lightText, fontSize: "18px" }}
493510
>
494511
Model Version(s)
495512
</TableCell>
496-
</TableRow>
497-
<TableRow>
513+
</StyledTableRow>
514+
<StyledTableRow>
498515
{model_versions.map((item, index) => (
499516
<TableCell
500517
align="center"
501518
colSpan={3}
502519
key={item["model_inst_id"]}
503520
bgcolor={Theme.tableHeader}
521+
style={{ color: Theme.darkText, fontSize: "16px" }}
504522
>
505523
{item["model_version"]}
506524
</TableCell>
507525
))}
508-
</TableRow>
509-
<TableRow>
526+
</StyledTableRow>
527+
<StyledTableRow>
510528
<TableCell
511529
align="center"
512530
bgcolor={Theme.tableHeader}
513-
style={{ width: 200, maxWidth: 200 }}
531+
style={{ width: 200, maxWidth: 200, color: Theme.darkText, fontSize: "16px" }}
514532
>
515533
Test Name
516534
</TableCell>
517535
<TableCell
518536
align="center"
519537
bgcolor={Theme.tableHeader}
520-
style={{ width: 200, maxWidth: 200 }}
538+
style={{ width: 200, maxWidth: 200, color: Theme.darkText, fontSize: "16px" }}
521539
>
522540
Test Version
523541
</TableCell>
@@ -553,9 +571,13 @@ export default class ModelResultOverview extends React.Component {
553571
</TableCell>
554572
</React.Fragment>
555573
))}
556-
</TableRow>
574+
</StyledTableRow>
557575
</TableHead>
558-
<TableBody>
576+
<TableBody
577+
style={{
578+
borderBottom: "2px solid",
579+
borderColor: Theme.darkBackground
580+
}}>
559581
{Object.keys(dict_results).map(
560582
(test_id, index_t) => (
561583
<ResultEntryTest

0 commit comments

Comments
 (0)