Skip to content

Commit ceb68ec

Browse files
Naji SawasJack Zhao
authored andcommitted
instruments: update instruments dashboard
Summary: Phase 1 of instruments dashboard updates, this revision simply displays any instrument components that exist on the table, as well as display their status on the instrument details page. The dashboard requires more updates once the instruments service supports returning component operation histories. Fix T34282 Test Plan: update cypress tests {F1083115} {F1083116} {F1083117} {F1083118} Reviewers: ecarrel, jzhao, O10 LIMS Server, O12 LIMS UI, O13 UI Common Reviewed By: ecarrel, O10 LIMS Server, O12 LIMS UI, O13 UI Common Subscribers: rhuang, aravind, amich, #lab_testing Maniphest Tasks: T34282 Differential Revision: https://phabricator.grailbio.com/D43595 fbshipit-source-id: e58b288
1 parent f14da61 commit ceb68ec

File tree

2 files changed

+22
-21
lines changed

2 files changed

+22
-21
lines changed

src/timeline-graph/__snapshots__/timeline-graph.spec.tsx.snap

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ exports[`render simple timeline graph 1`] = `
2020
>
2121
2018
2222
</p>
23-
<p
23+
<div
2424
class="MuiTypography-root timelineDate MuiTypography-body1 MuiTypography-alignCenter"
2525
data-testid="timeline-date-0"
2626
>
2727
20 Apr
28-
</p>
28+
</div>
2929
</div>
3030
<div
3131
class="timeline timelineStart"
@@ -60,12 +60,12 @@ exports[`render simple timeline graph 1`] = `
6060
>
6161
2018
6262
</p>
63-
<p
63+
<div
6464
class="MuiTypography-root timelineDate MuiTypography-body1 MuiTypography-alignCenter"
6565
data-testid="timeline-date-1"
6666
>
6767
20 Apr
68-
</p>
68+
</div>
6969
</div>
7070
<div
7171
class="timeline timelineEnd"
@@ -148,12 +148,12 @@ exports[`render simple timeline graph with time 1`] = `
148148
>
149149
2018
150150
</p>
151-
<p
151+
<div
152152
class="MuiTypography-root timelineDate MuiTypography-body1 MuiTypography-alignCenter"
153153
data-testid="timeline-date-0"
154154
>
155155
20 Apr
156-
</p>
156+
</div>
157157
<p
158158
class="MuiTypography-root smallDate MuiTypography-body1 MuiTypography-alignCenter"
159159
data-testid="timeline-time-0"
@@ -194,12 +194,12 @@ exports[`render simple timeline graph with time 1`] = `
194194
>
195195
2018
196196
</p>
197-
<p
197+
<div
198198
class="MuiTypography-root timelineDate MuiTypography-body1 MuiTypography-alignCenter"
199199
data-testid="timeline-date-1"
200200
>
201201
20 Apr
202-
</p>
202+
</div>
203203
<p
204204
class="MuiTypography-root smallDate MuiTypography-body1 MuiTypography-alignCenter"
205205
data-testid="timeline-time-1"
@@ -305,12 +305,12 @@ exports[`test selecting an item on the timeline card 1`] = `
305305
>
306306
2018
307307
</p>
308-
<p
308+
<div
309309
class="MuiTypography-root timelineDate MuiTypography-body1 MuiTypography-alignCenter"
310310
data-testid="timeline-date-0"
311311
>
312312
20 Apr
313-
</p>
313+
</div>
314314
</div>
315315
<div
316316
class="timeline timelineStart"
@@ -345,12 +345,12 @@ exports[`test selecting an item on the timeline card 1`] = `
345345
>
346346
2018
347347
</p>
348-
<p
348+
<div
349349
class="MuiTypography-root timelineDate MuiTypography-body1 MuiTypography-alignCenter"
350350
data-testid="timeline-date-1"
351351
>
352352
20 Apr
353-
</p>
353+
</div>
354354
</div>
355355
<div
356356
class="timeline timelineEnd"
@@ -500,12 +500,12 @@ exports[`test tabbed timeline cartd 1`] = `
500500
>
501501
2018
502502
</p>
503-
<p
503+
<div
504504
class="MuiTypography-root timelineDate MuiTypography-body1 MuiTypography-alignCenter"
505505
data-testid="timeline-date-0"
506506
>
507507
20 Apr
508-
</p>
508+
</div>
509509
</div>
510510
<div
511511
class="timeline timelineStart"
@@ -540,12 +540,12 @@ exports[`test tabbed timeline cartd 1`] = `
540540
>
541541
2018
542542
</p>
543-
<p
543+
<div
544544
class="MuiTypography-root timelineDate MuiTypography-body1 MuiTypography-alignCenter"
545545
data-testid="timeline-date-1"
546546
>
547547
20 Apr
548-
</p>
548+
</div>
549549
</div>
550550
<div
551551
class="timeline timelineEnd"
@@ -647,7 +647,7 @@ exports[`test unselecting an item on the timeline card 1`] = `
647647
>
648648
2018
649649
</p>
650-
<p
650+
<div
651651
class="MuiTypography-root timelineDate MuiTypography-body1 MuiTypography-alignCenter"
652652
data-testid="timeline-date-0"
653653
>
@@ -657,7 +657,7 @@ exports[`test unselecting an item on the timeline card 1`] = `
657657
>
658658
Fri
659659
</div>
660-
</p>
660+
</div>
661661
</div>
662662
<div
663663
class="timeline timelineStart"
@@ -692,7 +692,7 @@ exports[`test unselecting an item on the timeline card 1`] = `
692692
>
693693
2018
694694
</p>
695-
<p
695+
<div
696696
class="MuiTypography-root timelineDate MuiTypography-body1 MuiTypography-alignCenter"
697697
data-testid="timeline-date-1"
698698
>
@@ -702,7 +702,7 @@ exports[`test unselecting an item on the timeline card 1`] = `
702702
>
703703
Fri
704704
</div>
705-
</p>
705+
</div>
706706
</div>
707707
<div
708708
class="timeline timelineEnd"

src/timeline-graph/components/timeline-graph-component.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const TimelineGraphComponent = (props: Props) => {
3333
classes = {},
3434
} = props;
3535
const entries = rows.map((item, index) => {
36-
const date = parseDate(item.date);
36+
const date = parseDate(item.date) || 0;
3737
const year = format(date, "yyyy");
3838
const paperClass = onSelect
3939
? styles.timelinePaperButton
@@ -91,6 +91,7 @@ export const TimelineGraphComponent = (props: Props) => {
9191
{year}
9292
</Typography>
9393
<Typography
94+
component="div"
9495
classes={{
9596
root: styles.timelineDate,
9697
}}

0 commit comments

Comments
 (0)