Add copying of repository list to view
This will allow a user to use the "Copy repository list" button in the view to copy a repository list.
This commit is contained in:
@@ -472,6 +472,10 @@ export interface OpenQueryTextMessage {
|
||||
t: 'openQueryText';
|
||||
}
|
||||
|
||||
export interface CopyRepositoryListMessage {
|
||||
t: 'copyRepositoryList';
|
||||
}
|
||||
|
||||
export interface OpenLogsMessage {
|
||||
t: 'openLogs';
|
||||
}
|
||||
@@ -490,5 +494,6 @@ export type FromVariantAnalysisMessage =
|
||||
| RequestRepositoryResultsMessage
|
||||
| OpenQueryFileMessage
|
||||
| OpenQueryTextMessage
|
||||
| CopyRepositoryListMessage
|
||||
| OpenLogsMessage
|
||||
| CancelVariantAnalysisMessage;
|
||||
|
||||
@@ -103,6 +103,9 @@ export class VariantAnalysisView extends AbstractWebview<ToVariantAnalysisMessag
|
||||
case 'openQueryText':
|
||||
await this.openQueryText();
|
||||
break;
|
||||
case 'copyRepositoryList':
|
||||
void commands.executeCommand('codeQL.copyVariantAnalysisRepoList', this.variantAnalysisId);
|
||||
break;
|
||||
case 'openLogs':
|
||||
await this.openLogs();
|
||||
break;
|
||||
|
||||
@@ -36,6 +36,12 @@ const stopQuery = () => {
|
||||
});
|
||||
};
|
||||
|
||||
const copyRepositoryList = () => {
|
||||
vscode.postMessage({
|
||||
t: 'copyRepositoryList',
|
||||
});
|
||||
};
|
||||
|
||||
const openLogs = () => {
|
||||
vscode.postMessage({
|
||||
t: 'openLogs',
|
||||
@@ -95,7 +101,7 @@ export function VariantAnalysis({
|
||||
onOpenQueryFileClick={openQueryFile}
|
||||
onViewQueryTextClick={openQueryText}
|
||||
onStopQueryClick={stopQuery}
|
||||
onCopyRepositoryListClick={() => console.log('Copy repository list')}
|
||||
onCopyRepositoryListClick={copyRepositoryList}
|
||||
onExportResultsClick={() => console.log('Export results')}
|
||||
onViewLogsClick={openLogs}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user