Send telementry on other links and UI elements

This commit is contained in:
Robert
2023-01-17 15:49:50 +00:00
parent f1dbc22a9a
commit 4009f03dd2
3 changed files with 13 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ import { vscode } from "../vscode-api";
import { RawResultsSortState, SortDirection } from "../../pure/interface-types";
import { nextSortDirection } from "./result-table-utils";
import { Column } from "../../pure/bqrs-cli-types";
import { sendTelemetry } from "../common/telemetry";
interface Props {
readonly columns: readonly Column[];
@@ -39,6 +40,7 @@ function toggleSortStateForColumn(
resultSetName: schemaName,
sortState: nextSortState,
});
sendTelemetry("local-results-column-sorting");
}
export default function RawTableHeader(props: Props) {

View File

@@ -10,6 +10,7 @@ import {
import { assertNever } from "../../pure/helpers-pure";
import { vscode } from "../vscode-api";
import { convertNonPrintableChars } from "../../text-utils";
import { sendTelemetry } from "../common/telemetry";
export interface ResultTableProps {
resultSet: ResultSet;
@@ -160,13 +161,20 @@ export function nextSortDirection(
}
}
function sendCodeQLLanguageGuidesTelemetry() {
sendTelemetry("codeql-language-guides-link");
}
export function emptyQueryResultsMessage(): JSX.Element {
return (
<div className="vscode-codeql__empty-query-message">
<span>
This query returned no results. If this isn&apos;t what you were
expecting, and for effective query-writing tips, check out the{" "}
<a href="https://codeql.github.com/docs/codeql-language-guides/">
<a
href="https://codeql.github.com/docs/codeql-language-guides/"
onClick={sendCodeQLLanguageGuidesTelemetry}
>
CodeQL language guides
</a>
.

View File

@@ -154,6 +154,7 @@ export class ResultTables extends React.Component<
pageNumber: 0,
selectedTable,
});
sendTelemetry("local-results-table-selection");
};
private alertTableExtras(): JSX.Element | undefined {
@@ -261,6 +262,7 @@ export class ResultTables extends React.Component<
const openQuery = () => {
openFile(this.props.queryPath);
sendTelemetry("local-results-open-query-file");
};
const fileName = FILE_PATH_REGEX.exec(this.props.queryPath)?.[1] || "query";