Skip to content

Commit

Permalink
feat: added proper timeline labeling for stopwatch events
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Aug 3, 2020
1 parent 02a37cc commit 5e1afd8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/util/color.js
Expand Up @@ -72,6 +72,8 @@ export function getTitleAttr(bucket, e) {
return e.data.status;
} else if (bucket.type.startsWith('app.editor')) {
return _.last(e.data.file.split('/'));
} else if (bucket.type.startsWith('general.stopwatch')) {
return e.data.label;
} else {
return e.data.title;
}
Expand Down
4 changes: 4 additions & 0 deletions src/util/tooltip.js
Expand Up @@ -25,6 +25,10 @@ export function buildTooltip(bucket, e) {
<tr><th>Path:</th><td>${sanitize(e.data.file)}</td></tr>
<tr><th>Language:</th><td>${sanitize(e.data.language)}</td></tr>
`;
} else if (bucket.type.startsWith('general.stopwatch')) {
inner = `
<tr><th>Label:</th><td>${sanitize(e.data.label)}</td></tr>
`;
} else {
inner = `
<tr><td>Data:</td><td>${sanitize(JSON.stringify(e.data))}</td></tr>
Expand Down

0 comments on commit 5e1afd8

Please sign in to comment.