Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
07e2e78
Set up view for external api results
elenatanasoiu Feb 22, 2023
61d48af
Run query for getting unsupported external APIs
koesie10 Feb 22, 2023
d8fb95a
Decode BQRS results to JSON
koesie10 Feb 22, 2023
ef0d9ac
Add UI for showing/editing external API calls
koesie10 Feb 22, 2023
b192bf5
Fix incorrect extensible name
koesie10 Feb 22, 2023
73b20df
Add saving of the data extension YAML
koesie10 Feb 22, 2023
97901c6
Automatically re-run query after saving data extension file
koesie10 Feb 22, 2023
123f579
Remove unnecessary param for neutral model
charisk Feb 22, 2023
b553157
Change webview name
charisk Feb 22, 2023
59eef1b
Use query showing usages and supported APIs
koesie10 Feb 23, 2023
556dc6d
Remove filter on kind metric
koesie10 Feb 23, 2023
68476e2
Show already modelled external APIs
koesie10 Feb 23, 2023
2befbea
Add generation of data extension
koesie10 Feb 23, 2023
15019db
Reload external API after generation
koesie10 Feb 23, 2023
ac10be6
Retain selected database item
koesie10 Feb 23, 2023
6af2304
Add showing of progress in external API view
koesie10 Feb 23, 2023
c92d48b
Remove YAML string in bottom of view
koesie10 Feb 23, 2023
bf930fc
Add supported/unsupported percentages
charisk Feb 23, 2023
3578f55
Make things slightly less ugly
charisk Feb 23, 2023
375c3be
Read existing YAML file when viewing external APIs
koesie10 Feb 23, 2023
47d95e5
Fix neutral model not being read in correctly
koesie10 Feb 23, 2023
5fe26c0
Convert Python script to running in the extension natively
koesie10 Feb 24, 2023
cdee4a5
Remove database after generating flow model
koesie10 Feb 24, 2023
8b8ba27
Fix incorrect name for ReturnValue
koesie10 Feb 24, 2023
80b6c5d
Only make external API command available behind config flag
koesie10 Apr 3, 2023
5414d05
Rename external-api directory to data-extensions-editor
koesie10 Apr 3, 2023
e655b18
Rename ExternalApiModule to DataExtensionsEditorModule
koesie10 Apr 3, 2023
eca9825
Rename ExternalApiView to DataExtensionsEditorView
koesie10 Apr 3, 2023
bee36dd
Rename external API command
koesie10 Apr 3, 2023
e0ec58d
Rename external API view directory
koesie10 Apr 3, 2023
ccaebbb
Rename external API React components
koesie10 Apr 3, 2023
9c0806b
Set data-extensions-editor codeowner to secexp
koesie10 Apr 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
**/* @github/codeql-vscode-reviewers
**/variant-analysis/ @github/code-scanning-secexp-reviewers
**/databases/ @github/code-scanning-secexp-reviewers
**/data-extensions-editor/ @github/code-scanning-secexp-reviewers
8 changes: 8 additions & 0 deletions extensions/ql-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,10 @@
"title": "CodeQL: Go to QL Code",
"enablement": "codeql.hasQLSource"
},
{
"command": "codeQL.openDataExtensionsEditor",
"title": "CodeQL: Open Data Extensions Editor"
},
{
"command": "codeQL.mockGitHubApiServer.startRecording",
"title": "CodeQL: Mock GitHub API Server: Start Scenario Recording"
Expand Down Expand Up @@ -1086,6 +1090,10 @@
"command": "codeQL.viewCfgContextEditor",
"when": "false"
},
{
"command": "codeQL.openDataExtensionsEditor",
"when": "config.codeQL.canary && config.codeQL.dataExtensions.editor"
},
{
"command": "codeQLVariantAnalysisRepositories.openConfigFile",
"when": "false"
Expand Down
5 changes: 5 additions & 0 deletions extensions/ql-vscode/src/common/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ export type PackagingCommands = {
"codeQL.downloadPacks": () => Promise<void>;
};

export type DataExtensionsEditorCommands = {
"codeQL.openDataExtensionsEditor": () => Promise<void>;
};

export type EvalLogViewerCommands = {
"codeQLEvalLogViewer.clear": () => Promise<void>;
};
Expand Down Expand Up @@ -273,6 +277,7 @@ export type AllExtensionCommands = BaseCommands &
AstCfgCommands &
AstViewerCommands &
PackagingCommands &
DataExtensionsEditorCommands &
EvalLogViewerCommands &
SummaryLanguageSupportCommands &
Partial<TestUICommands> &
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { ExtensionContext } from "vscode";
import { DataExtensionsEditorView } from "./data-extensions-editor-view";
import { DataExtensionsEditorCommands } from "../common/commands";
import { DatabaseManager } from "../local-databases";
import { CodeQLCliServer } from "../cli";
import { QueryRunner } from "../queryRunner";
import { App } from "../common/app";
import { extLogger } from "../common";

export class DataExtensionsEditorModule {
public constructor(
private readonly ctx: ExtensionContext,
private readonly app: App,
private readonly databaseManager: DatabaseManager,
private readonly cliServer: CodeQLCliServer,
private readonly queryRunner: QueryRunner,
private readonly queryStorageDir: string,
) {}

public getCommands(): DataExtensionsEditorCommands {
return {
"codeQL.openDataExtensionsEditor": async () => {
const db = this.databaseManager.currentDatabaseItem;
if (!db) {
void extLogger.log("No database selected");
return;
}

const view = new DataExtensionsEditorView(
this.ctx,
this.app,
this.databaseManager,
this.cliServer,
this.queryRunner,
this.queryStorageDir,
db,
);
await view.openView();
},
};
}
}
Loading