Skip to content

Commit 6e1eedb

Browse files
committed
Merge branch 'dev/timeline-input-button' of https://github.com/billangli/aw-webui into dev/timeline-input-button
2 parents 444980a + d2ebb9c commit 6e1eedb

2 files changed

Lines changed: 6 additions & 14 deletions

File tree

src/views/Bucket.vue

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,7 @@ export default {
5252
return this.$store.getters['buckets/getBucket'](this.id) || {};
5353
},
5454
},
55-
watch: {
56-
daterange: async function () {
57-
await this.getEvents(this.id);
58-
},
59-
},
60-
mounted: async function () {
55+
mounted: async function() {
6156
await this.$store.dispatch('buckets/ensureBuckets');
6257
await this.getEvents(this.id);
6358
await this.getEventCount(this.id);

src/views/Timeline.vue

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,13 @@ export default {
3434
return _.sumBy(this.buckets, 'events.length');
3535
},
3636
},
37-
watch: {
38-
daterange() {
39-
this.getBuckets();
40-
},
41-
},
42-
mounted: function () {
43-
this.getBuckets();
37+
mounted: function() {
38+
this.daterange = [moment().subtract(this.timeintervalDefaultDuration, "seconds"), moment()],
39+
this.getBuckets(this.daterange);
4440
},
4541
methods: {
46-
getBuckets: async function () {
42+
getBuckets: async function(daterange) {
43+
this.daterange = daterange;
4744
this.buckets = await this.$store.dispatch('buckets/getBucketsWithEvents', {
4845
start: this.daterange[0].format(),
4946
end: this.daterange[1].format(),

0 commit comments

Comments
 (0)