Skip to content

Commit 6882cf3

Browse files
committed
refactor: rename vis to TopBucketData
1 parent 8d5af2e commit 6882cf3

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

src/components/SelectableVisualization.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ div
9090
:namefunc="e => e.data.label",
9191
:colorfunc="e => e.data.label",
9292
with_limit)
93-
div(v-if="type == 'watcher_columns'")
94-
aw-watcher-columns(
93+
div(v-if="type == 'top_bucket_data'")
94+
aw-top-bucket-data(
9595
:initialBucketId="props ? props.bucketId : ''",
9696
:initialField="props ? props.field : ''",
9797
:initialCustomField="props ? props.customField : ''",
@@ -167,7 +167,7 @@ export default {
167167
'vis_timeline',
168168
'score',
169169
'top_stopwatches',
170-
'watcher_columns',
170+
'top_bucket_data',
171171
],
172172
// TODO: Move this function somewhere else
173173
top_editor_files_namefunc: e => {
@@ -261,8 +261,8 @@ export default {
261261
title: 'Top Stopwatch Events',
262262
available: this.activityStore.stopwatch.available,
263263
},
264-
watcher_columns: {
265-
title: 'Watcher Columns',
264+
top_bucket_data: {
265+
title: 'Top Bucket Data',
266266
available: true,
267267
},
268268
};

src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Vue.component('aw-summary', () => import('./visualizations/Summary.vue'));
5252
Vue.component('aw-periodusage', () => import('./visualizations/PeriodUsage.vue'));
5353
Vue.component('aw-eventlist', () => import('./visualizations/EventList.vue'));
5454
Vue.component('aw-sunburst-categories', () => import('./visualizations/SunburstCategories.vue'));
55-
Vue.component('aw-watcher-columns', () => import('./visualizations/WatcherColumns.vue'));
55+
Vue.component('aw-top-bucket-data', () => import('./visualizations/TopBucketData.vue'));
5656
Vue.component('aw-sunburst-clock', () => import('./visualizations/SunburstClock.vue'));
5757
Vue.component('aw-timeline-inspect', () => import('./visualizations/TimelineInspect.vue'));
5858
Vue.component('aw-timeline', () => import('./visualizations/TimelineSimple.vue'));
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
div
33
b-row
44
b-col(cols="12", md="6").mb-2
5-
b-form-group(label="Watcher (bucket)")
5+
b-form-group(label="Bucket")
66
b-form-select(
77
v-model="selectedBucketId",
88
:options="bucketOptions",
@@ -65,7 +65,7 @@ function formatValue(value: unknown): string {
6565
return String(value);
6666
}
6767
export default {
68-
name: 'aw-watcher-columns',
68+
name: 'aw-top-bucket-data',
6969
props: {
7070
initialBucketId: { type: String, default: '' },
7171
initialField: { type: String, default: '' },
@@ -198,6 +198,8 @@ export default {
198198
this.aggregated = [];
199199
return;
200200
}
201+
// Even though the user should start the manual data fields with "data", we want
202+
// to gracefully let it pass. Chances are there are no nested data.data.title.
201203
const path = fieldValue.startsWith('data.') ? fieldValue : `data.${fieldValue}`;
202204
const grouped = new Map<string, AggregatedEvent>();
203205
this.events.forEach(e => {

0 commit comments

Comments
 (0)