Skip to content

Commit

Permalink
Merge pull request #20 from gargath/truncate-old-data
Browse files Browse the repository at this point in the history
Truncate data for old, incomplete days
  • Loading branch information
wonderhoss authored Aug 17, 2020
2 parents 9b36166 + 7ad9175 commit edc6c61
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pkg/web/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ func (f *Frontend) getDays(ctx context.Context) ([]Day, error) {
uniqueDays := make(map[string]bool)
for _, v := range keys {
d := strings.Split(v, "_")[1]
uniqueDays[d] = true
dNum, _ := strconv.Atoi(d)
if dNum > 18488 {
uniqueDays[d] = true
}
}
d := []string{}
for k := range uniqueDays {
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/DaysDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<b-dropdown class="days-dropdown" :text="historic.id == 0 ? 'current' : historic.date" id="days">
<b-dropdown-item href="#" :id="0" @click="selectDay(0)">today</b-dropdown-item>
<template v-for="day in days">
<b-dropdown-item href="#" :id="day.id" v-bind:key="day.id" @click="selectDay(day.id)">{{day.date}} - {{day.id}}</b-dropdown-item>
<b-dropdown-item href="#" :id="day.id" v-bind:key="day.id" @click="selectDay(day.id)">{{day.date}}</b-dropdown-item>
</template>
</b-dropdown>
</div>
Expand Down

0 comments on commit edc6c61

Please sign in to comment.