Skip to content

Commit 93732aa

Browse files
committed
minor UI improvements
1 parent 76b8143 commit 93732aa

5 files changed

Lines changed: 28 additions & 12 deletions

File tree

frontend/src/app.component.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
flex: 1;
99
}
1010

11+
.border-black { border: 2px solid black;}
12+
1113
body {
1214
margin: 0;
1315
font-family: var(--ont-font-primary);

frontend/src/modules/analysis/analysis-data/analysis-data.component.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.nano-analysis-container {
2-
max-width: 1200px;
2+
max-width: 1500px;
33
margin: 0 auto;
44
padding: 0 var(--ont-spacing-lg);
55
}

frontend/src/modules/analysis/analysis-data/analysis-data.component.tsx

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,29 @@ const AnalysisDataComponent: FunctionComponent<IAnalysisDataProps> = ({ data })
7272
const formatCoverageData = () => {
7373
const refs = [...new Set(coverageData.map(d => d.reference))];
7474
const times = [...new Set(coverageData.map(d => d.timestamp))].sort();
75-
const header = ["Time", ...refs];
75+
const startTime = new Date(times[0]).getTime(); // Earliest timestamp in milliseconds
76+
77+
// Define the header with column types and roles
78+
const header = [{ type: 'number', label: 'Elapsed Time (s)' }];
79+
refs.forEach(ref => {
80+
header.push({ type: 'number', label: ref });
81+
header.push({ type: 'string', role: 'tooltip' });
82+
});
83+
84+
// Create data rows with elapsed time and tooltips
7685
const rows = times.map(time => {
77-
const row = [time];
86+
const elapsedSeconds = (new Date(time).getTime() - startTime) / 1000; // Convert to seconds
87+
const row = [elapsedSeconds];
7888
refs.forEach(ref => {
7989
const entry = coverageData.find(d => d.timestamp === time && d.reference === ref);
80-
row.push(entry ? entry[metric] : 0);
90+
const y = entry ? entry[metric] : 0;
91+
const tooltip = `Time: ${time}\n${ref}: ${y.toFixed(2)}`;
92+
row.push(y);
93+
row.push(tooltip);
8194
});
8295
return row;
8396
});
97+
8498
return [header, ...rows];
8599
};
86100

@@ -137,7 +151,7 @@ const AnalysisDataComponent: FunctionComponent<IAnalysisDataProps> = ({ data })
137151
</div>
138152
<div className="nano-info-item">
139153
<span className="nano-info-label">MinION Path</span>
140-
<span className="nano-info-value">{analysisData.data.minion}</span>
154+
<span className="nano-info-value">{analysisData.data.minion.split("/").filter(component => component !== '').join(' ➩ ')}</span>
141155
</div>
142156
<div className="nano-info-item">
143157
<span className="nano-info-label">Device</span>
@@ -154,11 +168,11 @@ const AnalysisDataComponent: FunctionComponent<IAnalysisDataProps> = ({ data })
154168
<div className="nano-actions">
155169
{listenerRunning ? (
156170
<button className="btn btn-danger nano-btn" onClick={handleStopFileListener}>
157-
<i className="fas fa-stop"></i> Stop File Listener
171+
<i className="fas fa-stop"></i> Stop Analysis
158172
</button>
159173
) : (
160174
<button className="btn btn-primary nano-btn" onClick={handleStartFileListener}>
161-
<i className="fas fa-play"></i> Start File Listener
175+
<i className="fas fa-play"></i> Start Analysis
162176
</button>
163177
)}
164178
<button className="btn btn-outline-danger nano-btn" onClick={handleRemoveAnalysis}>
@@ -188,13 +202,13 @@ const AnalysisDataComponent: FunctionComponent<IAnalysisDataProps> = ({ data })
188202
data={formatCoverageData()}
189203
options={{
190204
title: metric === 'avg_depth' ? 'Average Coverage Depth Over Time' : 'Breadth of Coverage Over Time',
191-
hAxis: { title: "Time" },
205+
hAxis: { title: 'Elapsed Time (s)' },
192206
vAxis: {
193207
title: metric === 'avg_depth' ? 'Average Depth (reads/position)' : 'Breadth (%)',
194208
minValue: 0,
195209
maxValue: metric === 'breadth' ? 100 : undefined
196210
},
197-
legend: { position: "bottom" },
211+
legend: { position: 'bottom' },
198212
colors: ['#00B0BD', '#004E5A', '#FF6A45', '#27AE60'],
199213
chartArea: { width: '80%', height: '70%' },
200214
animation: { startup: true, duration: 1000, easing: 'out' }

frontend/src/modules/setup/setup.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const SetupComponent = () => {
5252
return (
5353
<div className="container-fluid d-flex flex-column">
5454
<div className="vspacer-50"/>
55-
<div className="container text-center">
55+
<div className="container-fluid text-center">
5656
<h3>nanocas Setup Wizard</h3>
5757
<p>Step {stepNumber + 1} of {steps.length}</p>
5858
</div>

frontend/src/styles/theme.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
--ont-font-size-md: 1rem;
3333
--ont-font-size-lg: 1.125rem;
3434
--ont-font-size-xl: 1.25rem;
35-
--ont-font-size-2xl: 1.5rem;
35+
--ont-font-size-2xl: 2.5rem;
3636
--ont-font-size-3xl: 1.875rem;
3737
--ont-font-size-4xl: 2.25rem;
3838

@@ -69,7 +69,7 @@ body {
6969

7070
h1, h2, h3, h4, h5, h6 {
7171
font-family: var(--ont-font-heading);
72-
font-weight: 600;
72+
font-weight: 900;
7373
color: var(--ont-primary);
7474
margin-top: 0;
7575
}

0 commit comments

Comments
 (0)