Skip to content

Commit ccddac7

Browse files
fix: Fix linting issues
1 parent 4b08fbd commit ccddac7

6 files changed

Lines changed: 172 additions & 164 deletions

File tree

src/visualizations/CategoryTree.vue

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,11 @@ svg {
1919
const _ = require('lodash');
2020
const classes = require('~/util/classes.ts');
2121
22-
function get_parent_cats(cat) {
23-
const parents = [];
24-
for (let i = 1; i <= cat.length; i++) {
25-
parents.push(cat.slice(0, i));
26-
}
27-
return parents;
28-
}
29-
3022
export default {
3123
name: 'aw-categorytree',
32-
props: ['events'],
24+
props: {
25+
events: { type: Object },
26+
},
3327
computed: {
3428
category_hierarchy: function() {
3529
const events = JSON.parse(JSON.stringify(this.events));

src/visualizations/SunburstClock.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,11 @@ import _ from 'lodash';
112112
113113
export default {
114114
name: 'aw-sunburst-clock',
115-
props: ['date', 'afkBucketId', 'windowBucketId'],
115+
props: {
116+
date: { type: Date },
117+
afkBucketId: { type: String },
118+
windowBucketId: { type: String },
119+
},
116120
117121
data: () => {
118122
return {

src/visualizations/TimelineInspect.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ import timeline from './timeline.js';
1717
1818
export default {
1919
name: 'aw-timeline',
20-
props: ['chunks', 'show_afk', 'chunkfunc', 'eventfunc'],
20+
props: {
21+
chunks: { type: Object },
22+
show_afk: { type: boolean },
23+
chunkfunc: { type: Function },
24+
eventfunc: { type: Function },
25+
},
2126
watch: {
2227
chunks: function() {
2328
this.update();

src/visualizations/VisTimeline.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ import { Timeline } from 'vis-timeline/esnext';
3333
import 'vis-timeline/styles/vis-timeline-graph2d.css';
3434
3535
export default {
36-
props: ['buckets', 'showRowLabels', 'queriedInterval', 'showQueriedInterval'],
36+
props: {
37+
buckets: { type: Object },
38+
showRowLabels: { type: boolean },
39+
queriedInterval: { type: Array },
40+
showQueriedInterval: { type: boolean },
41+
},
3742
data() {
3843
return {
3944
timeline: null,

src/visualizations/summary.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ function set_status(container, msg) {
3636
.attr('fill', 'black');
3737
}
3838

39-
function updateSummedEvents(container, summedEvents, titleKeyFunc, colorKeyFunc) {
40-
const apps = _.map(summedEvents, e => {
41-
return { name: titleKeyFunc(e), duration: e.duration, colorKey: colorKeyFunc(e) };
42-
});
43-
update(container, apps);
44-
}
45-
4639
function update(container, apps) {
4740
// No apps, sets status to "No data"
4841
if (apps.length <= 0) {
@@ -125,6 +118,13 @@ function update(container, apps) {
125118
return container;
126119
}
127120

121+
function updateSummedEvents(container, summedEvents, titleKeyFunc, colorKeyFunc) {
122+
const apps = _.map(summedEvents, e => {
123+
return { name: titleKeyFunc(e), duration: e.duration, colorKey: colorKeyFunc(e) };
124+
});
125+
update(container, apps);
126+
}
127+
128128
export default {
129129
create: create,
130130
update: update,

0 commit comments

Comments
 (0)