Skip to content

Commit

Permalink
fix: fixed bugs in QueryExplorer
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Oct 18, 2022
1 parent e9aa9e1 commit 27e5c59
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/views/QueryExplorer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ div
<script>
import moment from 'moment';
import _ from 'lodash';
import { loadClassesForQuery } from '~/util/classes';
import { useCategoryStore } from '~/stores/categories';
const today = moment().startOf('day');
const tomorrow = moment(today).add(24, 'hours');
Expand All @@ -54,9 +54,9 @@ afk_events = query_bucket(find_bucket("aw-watcher-afk_"));
window_events = query_bucket(find_bucket("aw-watcher-window_"));
window_events = filter_period_intersect(window_events, filter_keyvals(afk_events, "status", ["not-afk"]));
merged_events = merge_events_by_keys(window_events, ["app", "title"]);
merged_events = categorize(events, __CATEGORIES__);
merged_events = categorize(merged_events, __CATEGORIES__);
RETURN = sort_by_duration(merged_events);
`;
`.trim();
}
return {
Expand All @@ -82,7 +82,7 @@ RETURN = sort_by_duration(merged_events);
// replace magic string `__CATEGORIES__` in query text with latest category rule
if (_.includes(query, '__CATEGORIES__')) {
const categoryRules = loadClassesForQuery();
const categoryRules = useCategoryStore().classes_for_query;
// const classes_str = JSON.stringify(params.classes).replace(/\\\\/g, '\\');
query = query.replace('__CATEGORIES__', JSON.stringify(categoryRules));
}
Expand Down

1 comment on commit 27e5c59

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here are screenshots of this commit:

Screenshots using aw-server v0.12.0 (click to expand)

Screenshots using aw-server-rust v0.12.0 (click to expand)

CML watermark

Please sign in to comment.