Skip to content

Commit

Permalink
fix: Fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
johan-bjareholt committed Jun 21, 2020
1 parent 4b08fbd commit ccddac7
Show file tree
Hide file tree
Showing 6 changed files with 172 additions and 164 deletions.
12 changes: 3 additions & 9 deletions src/visualizations/CategoryTree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,11 @@ svg {
const _ = require('lodash');
const classes = require('~/util/classes.ts');
function get_parent_cats(cat) {
const parents = [];
for (let i = 1; i <= cat.length; i++) {
parents.push(cat.slice(0, i));
}
return parents;
}
export default {
name: 'aw-categorytree',
props: ['events'],
props: {
events: { type: Object },
},
computed: {
category_hierarchy: function() {
const events = JSON.parse(JSON.stringify(this.events));
Expand Down
6 changes: 5 additions & 1 deletion src/visualizations/SunburstClock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,11 @@ import _ from 'lodash';
export default {
name: 'aw-sunburst-clock',
props: ['date', 'afkBucketId', 'windowBucketId'],
props: {
date: { type: Date },
afkBucketId: { type: String },
windowBucketId: { type: String },
},
data: () => {
return {
Expand Down
7 changes: 6 additions & 1 deletion src/visualizations/TimelineInspect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ import timeline from './timeline.js';
export default {
name: 'aw-timeline',
props: ['chunks', 'show_afk', 'chunkfunc', 'eventfunc'],
props: {
chunks: { type: Object },
show_afk: { type: boolean },
chunkfunc: { type: Function },
eventfunc: { type: Function },
},
watch: {
chunks: function() {
this.update();
Expand Down
7 changes: 6 additions & 1 deletion src/visualizations/VisTimeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ import { Timeline } from 'vis-timeline/esnext';
import 'vis-timeline/styles/vis-timeline-graph2d.css';
export default {
props: ['buckets', 'showRowLabels', 'queriedInterval', 'showQueriedInterval'],
props: {
buckets: { type: Object },
showRowLabels: { type: boolean },
queriedInterval: { type: Array },
showQueriedInterval: { type: boolean },
},
data() {
return {
timeline: null,
Expand Down
14 changes: 7 additions & 7 deletions src/visualizations/summary.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ function set_status(container, msg) {
.attr('fill', 'black');
}

function updateSummedEvents(container, summedEvents, titleKeyFunc, colorKeyFunc) {
const apps = _.map(summedEvents, e => {
return { name: titleKeyFunc(e), duration: e.duration, colorKey: colorKeyFunc(e) };
});
update(container, apps);
}

function update(container, apps) {
// No apps, sets status to "No data"
if (apps.length <= 0) {
Expand Down Expand Up @@ -125,6 +118,13 @@ function update(container, apps) {
return container;
}

function updateSummedEvents(container, summedEvents, titleKeyFunc, colorKeyFunc) {
const apps = _.map(summedEvents, e => {
return { name: titleKeyFunc(e), duration: e.duration, colorKey: colorKeyFunc(e) };
});
update(container, apps);
}

export default {
create: create,
update: update,
Expand Down
Loading

0 comments on commit ccddac7

Please sign in to comment.