File tree Expand file tree Collapse file tree
extensions/ql-vscode/src/view/results Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { vscode } from "../vscode-api";
44import { RawResultsSortState , SortDirection } from "../../pure/interface-types" ;
55import { nextSortDirection } from "./result-table-utils" ;
66import { Column } from "../../pure/bqrs-cli-types" ;
7+ import { sendTelemetry } from "../common/telemetry" ;
78
89interface Props {
910 readonly columns : readonly Column [ ] ;
@@ -39,6 +40,7 @@ function toggleSortStateForColumn(
3940 resultSetName : schemaName ,
4041 sortState : nextSortState ,
4142 } ) ;
43+ sendTelemetry ( "local-results-column-sorting" ) ;
4244}
4345
4446export default function RawTableHeader ( props : Props ) {
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import {
1010import { assertNever } from "../../pure/helpers-pure" ;
1111import { vscode } from "../vscode-api" ;
1212import { convertNonPrintableChars } from "../../text-utils" ;
13+ import { sendTelemetry } from "../common/telemetry" ;
1314
1415export interface ResultTableProps {
1516 resultSet : ResultSet ;
@@ -160,13 +161,20 @@ export function nextSortDirection(
160161 }
161162}
162163
164+ function sendCodeQLLanguageGuidesTelemetry ( ) {
165+ sendTelemetry ( "codeql-language-guides-link" ) ;
166+ }
167+
163168export function emptyQueryResultsMessage ( ) : JSX . Element {
164169 return (
165170 < div className = "vscode-codeql__empty-query-message" >
166171 < span >
167172 This query returned no results. If this isn't what you were
168173 expecting, and for effective query-writing tips, check out the{ " " }
169- < a href = "https://codeql.github.com/docs/codeql-language-guides/" >
174+ < a
175+ href = "https://codeql.github.com/docs/codeql-language-guides/"
176+ onClick = { sendCodeQLLanguageGuidesTelemetry }
177+ >
170178 CodeQL language guides
171179 </ a >
172180 .
Original file line number Diff line number Diff line change @@ -154,6 +154,7 @@ export class ResultTables extends React.Component<
154154 pageNumber : 0 ,
155155 selectedTable,
156156 } ) ;
157+ sendTelemetry ( "local-results-table-selection" ) ;
157158 } ;
158159
159160 private alertTableExtras ( ) : JSX . Element | undefined {
@@ -261,6 +262,7 @@ export class ResultTables extends React.Component<
261262
262263 const openQuery = ( ) => {
263264 openFile ( this . props . queryPath ) ;
265+ sendTelemetry ( "local-results-open-query-file" ) ;
264266 } ;
265267 const fileName = FILE_PATH_REGEX . exec ( this . props . queryPath ) ?. [ 1 ] || "query" ;
266268
You can’t perform that action at this time.
0 commit comments