Skip to content

Commit

Permalink
Merge branch 'dev/timeline-input-button' of https://github.com/billan…
Browse files Browse the repository at this point in the history
…gli/aw-webui into dev/timeline-input-button
  • Loading branch information
billangli committed Jul 25, 2020
2 parents 444980a + d2ebb9c commit 6e1eedb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
7 changes: 1 addition & 6 deletions src/views/Bucket.vue
Expand Up @@ -52,12 +52,7 @@ export default {
return this.$store.getters['buckets/getBucket'](this.id) || {};
},
},
watch: {
daterange: async function () {
await this.getEvents(this.id);
},
},
mounted: async function () {
mounted: async function() {
await this.$store.dispatch('buckets/ensureBuckets');
await this.getEvents(this.id);
await this.getEventCount(this.id);
Expand Down
13 changes: 5 additions & 8 deletions src/views/Timeline.vue
Expand Up @@ -34,16 +34,13 @@ export default {
return _.sumBy(this.buckets, 'events.length');
},
},
watch: {
daterange() {
this.getBuckets();
},
},
mounted: function () {
this.getBuckets();
mounted: function() {
this.daterange = [moment().subtract(this.timeintervalDefaultDuration, "seconds"), moment()],
this.getBuckets(this.daterange);
},
methods: {
getBuckets: async function () {
getBuckets: async function(daterange) {
this.daterange = daterange;
this.buckets = await this.$store.dispatch('buckets/getBucketsWithEvents', {
start: this.daterange[0].format(),
end: this.daterange[1].format(),
Expand Down

0 comments on commit 6e1eedb

Please sign in to comment.