Send telementry on other links and UI elements
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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'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>
|
||||
.
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user