Skip to content

Commit 870af30

Browse files
committed
adding some console log to test
2 parents 0e489f2 + f84d8ef commit 870af30

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

src/app/components/BarGraph.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ const BarGraph = props => {
121121
for (let i = 0; i < saveButtons.length; i++) {
122122
if (tabs[currentTab].seriesSavedStatus === 'saved') {
123123
saveButtons[i].classList.add('animate');
124+
console.log('checking saveButtons[i].classList', saveButtons[i].classList)
124125
saveButtons[i].innerHTML = 'Saved!';
125126
} else {
126127
saveButtons[i].innerHTML = 'Save Series';
@@ -142,6 +143,7 @@ const BarGraph = props => {
142143
dispatch(save(toStorage));
143144
};
144145

146+
// FTRI9 note - need to ensure text box is not empty before saving
145147
const textbox = tabs[currentTab].seriesSavedStatus === 'inputBoxOpen' ? <input type="text" id="seriesname" placeholder="Enter Series Name" onChange={e => setSeriesNameInput(e.target.value)} /> : null;
146148
return (
147149
<div className="bargraph-position">
@@ -171,6 +173,23 @@ const BarGraph = props => {
171173
))}
172174
</select>
173175
</form>
176+
<form className="routesForm" id="routes-formcontrol">
177+
<label id="routes-dropdown">Select Snapshot: </label>
178+
<select
179+
labelId="demo-simple-select-label"
180+
id="routes-select"
181+
onChange={e => setSnapshot(e.target.value)}
182+
>
183+
<option>
184+
All Snapshots
185+
</option>
186+
{filteredSnapshots.map(route => (
187+
<option className="routes">
188+
{route.snapshotId}
189+
</option>
190+
))}
191+
</select>
192+
</form>
174193
</div>
175194
<svg ref={containerRef} width={width} height={height}>
176195
<rect
@@ -202,6 +221,9 @@ const BarGraph = props => {
202221
color={colorScale}
203222
>
204223
{barStacks => barStacks.map(barStack => barStack.bars.map((bar, idx) => {
224+
console.log(width, '<-- width');
225+
console.log(height, '<-- height');
226+
console.log(bar, '<-- bar');
205227
// Hides new components if components don't exist in previous snapshots.
206228
if (Number.isNaN(bar.bar[1]) || bar.height < 0) {
207229
bar.height = 0;

src/app/components/PerformanceVisx.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ const PerformanceVisx = (props: BarStackProps) => {
179179
const [action, setAction] = useState(false);
180180

181181
const [route, setRoute] = useState('All Routes');
182+
const [snapshot, setSnapshot] = useState('Choose Snapshot ID');
182183

183184
useEffect(() => {
184185
dispatch(setCurrentTabInApp('performance'));
@@ -245,6 +246,8 @@ const PerformanceVisx = (props: BarStackProps) => {
245246
if (route !== 'All Routes') {
246247
data.barStack = filteredSnapshots;
247248
}
249+
250+
console.log(filteredSnapshots, '<-- filtered snap shots');
248251

249252
const renderBargraph = () => {
250253
if (hierarchy) {
@@ -258,6 +261,7 @@ const PerformanceVisx = (props: BarStackProps) => {
258261
setRoute={setRoute}
259262
allRoutes={allRoutes}
260263
filteredSnapshots={filteredSnapshots}
264+
setSnapshot={setSnapshot}
261265
/>
262266
</div>
263267
);

0 commit comments

Comments
 (0)