See host even if only editor buckets exist#186
Conversation
|
|
||
| // getters | ||
| const getters = { | ||
| afkBuckets(state) { |
| return [start, end].join('/'); | ||
| } | ||
|
|
||
| function get_buckets_by_type(buckets, type) { |
There was a problem hiding this comment.
Nice, but duplicated code (also in modules/buckets.js).
Move all of it there?
There was a problem hiding this comment.
That's the plan, hence the comment below
// TODO: re-use modules/buckets.js instead of doing a second getBuckets call
There was a problem hiding this comment.
Ah, could still have done an import for this particular helper function in the meantime, but whatever if you're going to fix it before merging.
55c7482 to
31aec5f
Compare
|
This pull request introduces 2 alerts when merging 31aec5f into 3451196 - view on LGTM.com new alerts:
|
| icon(name="arrow-right") | ||
| div.p-1 | ||
| b-select(:value="periodLength", :options="['day', 'week', 'month']", | ||
| b-select(:value="periodLength", :options="['day', 'week', 'month', 'year']", |
There was a problem hiding this comment.
Oooof, going to get some HTTP timeouts until aw-server-rust becomes the default.
There was a problem hiding this comment.
Oops, commited by mistake.
|
|
||
| _.each(types_by_host, (types, hostname) => { | ||
| if (types.afk && types.window) { | ||
| if (hostname != 'unknown') { |
There was a problem hiding this comment.
Looks like this makes the _.each over types unnecessary?
There was a problem hiding this comment.
Not sure due to the android related code, don't want to break it by mistake.
There was a problem hiding this comment.
The Android view is getting merged with the normal view in #183 anyway, so feel free to remove that.
There was a problem hiding this comment.
I think it'll be easier if you fix it in that change instead.
31aec5f to
0402013
Compare
|
This pull request introduces 2 alerts when merging 0402013 into 3451196 - view on LGTM.com new alerts:
|
82c9817 to
1dfa250
Compare
|
@ErikBjare Seems to work fine now and fixed some minor oddities, do you have any more comments or should I merge? |
| commit('query_window_completed', data[0]); | ||
| async query_window({ state, commit }, { host, timeperiod, filterAFK, filterCategories }: QueryOptions) { | ||
| if (state.buckets.afk_buckets.length > 0 && | ||
| state.buckets.window_buckets.length > 0) { |
There was a problem hiding this comment.
Not really a fan of this check being here. Bucket-requirements should imo be checked in ensure_loaded and the start_loading thing should be called in the individual queries instead of one-fits-all.
Not a blocker for this PR, but would be nice if you could add that as a TODO comment in the code.
There was a problem hiding this comment.
Not really a fan of this check being here. Bucket-requirements should imo be checked in ensure_loaded
Done
the start_loading thing should be called in the individual queries instead of one-fits-all.
Not sure what you mean by this?
There was a problem hiding this comment.
Meant exactly what you changed it to, nice!
fd08f96 to
f167565
Compare
Fixes #184