Skip to content

Commit

Permalink
Merge branch 'fix-timeline-grouping'
Browse files Browse the repository at this point in the history
  • Loading branch information
jonlamb-gh committed May 13, 2024
2 parents c9458fc + 7a60797 commit 0a0f8df
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
},
{
"command": "auxon.timelines.deleteMany",
"when": "view == auxon.timelines && ((viewItem == timeline && listMultiSelection) || viewItem == timelineGroup)",
"when": "view == auxon.timelines && ((viewItem == timeline && listMultiSelection) || viewItem == timelineGroup || viewItem == timelineGroupByName)",
"group": "2_context@2"
},
{
Expand Down
4 changes: 3 additions & 1 deletion vscode/src/terminalLinkProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ const EVENT_COORDS_TERMINAL_LINK_PROVIDER: vscode.TerminalLinkProvider<EventCoor
startIndex: match.index,
length: match[0].length,
tooltip: "View log around this event",
data: { around: coord, radius: "5" },
// NOTE: restore the around behavor
// data: { around: coord, radius: "5" },
data: { from: coord },
};
links.push(link);
}
Expand Down
5 changes: 2 additions & 3 deletions vscode/src/timelines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ abstract class TimelineTreeItemData {
}

export class TimelineGroupByNameTreeItemData extends TimelineTreeItemData {
contextValue = "timelineGroup";
contextValue = "timelineGroupByName";

constructor(public name: string) {
super();
Expand Down Expand Up @@ -478,7 +478,7 @@ export class TimelineGroupTreeItemData extends TimelineTreeItemData {
}

override canHaveChildren(): boolean {
return this.childItems.length !== 0;
return this.timeline_group.timelines.length !== 0;
}

override async children(_apiClient: api.Client): Promise<TimelineTreeItemData[]> {
Expand All @@ -491,7 +491,6 @@ export class TimelineGroupTreeItemData extends TimelineTreeItemData {
}
return a.name.localeCompare(b.name);
});

this.childItems = timelines.map((timeline_overview) => new TimelineLeafTreeItemData(timeline_overview));
return this.childItems;
}
Expand Down

0 comments on commit 0a0f8df

Please sign in to comment.