Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export class ModelAlertsView extends AbstractWebview<

await this.waitForPanelLoaded();
await this.setViewState();
await this.updateReposResults(reposResults);
await this.setReposResults(reposResults);
}

protected async getPanelConfig(): Promise<WebviewPanelConfig> {
Expand Down Expand Up @@ -121,7 +121,7 @@ export class ModelAlertsView extends AbstractWebview<
});
}

public async updateVariantAnalysis(
public async setVariantAnalysis(
variantAnalysis: VariantAnalysis,
): Promise<void> {
if (!this.isShowingPanel) {
Expand All @@ -134,20 +134,7 @@ export class ModelAlertsView extends AbstractWebview<
});
}

public async updateRepoResults(
repositoryResult: VariantAnalysisScannedRepositoryResult,
): Promise<void> {
if (!this.isShowingPanel) {
return;
}

await this.postMessage({
t: "setRepoResults",
repoResults: [repositoryResult],
});
}

public async updateReposResults(
public async setReposResults(
repoResults: VariantAnalysisScannedRepositoryResult[],
): Promise<void> {
if (!this.isShowingPanel) {
Expand Down
6 changes: 3 additions & 3 deletions extensions/ql-vscode/src/model-editor/model-evaluator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export class ModelEvaluator extends DisposableObject {
);
await this.modelAlertsView.showView(reposResults);

await this.modelAlertsView.updateVariantAnalysis(variantAnalysis);
await this.modelAlertsView.setVariantAnalysis(variantAnalysis);
}
}

Expand Down Expand Up @@ -271,7 +271,7 @@ export class ModelEvaluator extends DisposableObject {
});

// Update model alerts view
await this.modelAlertsView?.updateVariantAnalysis(variantAnalysis);
await this.modelAlertsView?.setVariantAnalysis(variantAnalysis);
}
},
),
Expand All @@ -295,7 +295,7 @@ export class ModelEvaluator extends DisposableObject {
this.push(
this.variantAnalysisManager.onRepoResultsLoaded(async (e) => {
if (e.variantAnalysisId === variantAnalysisId) {
await this.modelAlertsView?.updateRepoResults(e);
await this.modelAlertsView?.setReposResults([e]);
}
}),
);
Expand Down