mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-12-11 06:25:28 +00:00
Ui/http request fixes (#7128)
* ensure dropdown updates selected item * ensure no duplicate ticks * handle case where counters are Dates instead of strings so bar chart filters in Storybook
This commit is contained in:
@@ -120,7 +120,7 @@ export default Component.extend({
|
||||
// scale and render the axes
|
||||
const yAxis = d3Axis
|
||||
.axisRight(yScale)
|
||||
.ticks(3, '.0s')
|
||||
.ticks(3, '~s')
|
||||
.tickSizeOuter(0);
|
||||
const xAxis = d3Axis
|
||||
.axisBottom(xScale)
|
||||
|
||||
@@ -43,8 +43,8 @@ export default Component.extend({
|
||||
}
|
||||
|
||||
filteredCounters = counters.filter(counter => {
|
||||
const year = counter.start_time.substr(0, 4);
|
||||
return year === timeWindow;
|
||||
const year = new Date(counter.start_time).getUTCFullYear();
|
||||
return year.toString() === timeWindow;
|
||||
});
|
||||
return filteredCounters;
|
||||
}),
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<option value="All" selected={{eq timeWindow "All"}}>All</option>/>
|
||||
<option value="Last 12 Months" selected={{eq timeWindow "Last 12 Months"}}>Last 12 Months</option>
|
||||
{{#each options as |op|}}
|
||||
<option value={{op}} selected={{eq timeWindow op}}>{{op}}</option>
|
||||
<option value={{op}} selected={{eq timeWindow.value op}}>{{op}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user