Skip to content

Commit

Permalink
fix: show notification after completing project health check
Browse files Browse the repository at this point in the history
  • Loading branch information
saravmajestic committed Dec 6, 2024
1 parent f45b9c4 commit f38dcd3
Showing 1 changed file with 26 additions and 20 deletions.
46 changes: 26 additions & 20 deletions src/webview_provider/insightsPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -561,27 +561,33 @@ export class InsightsPanel extends AltimateWebviewProvider {
args: JSON.stringify(args),
});
try {
await window.withProgress(
{
title: `Performing healthcheck...`,
location: ProgressLocation.Notification,
cancellable: false,
},
async () => {
const projectHealthcheck =
await this.dbtProjectContainer.executeAltimateDatapilotHealthcheck(
args,
);
this._panel!.webview.postMessage({
command: "response",
args: {
syncRequestId,
body: { projectHealthcheck },
status: true,
},
});
},
window.showInformationMessage(
"Started performing healthcheck. We will notify you once it's done.",
);

const projectHealthcheck =
await this.dbtProjectContainer.executeAltimateDatapilotHealthcheck(
args,
);
const result = await window.showInformationMessage(
"Healthcheck completed successfully.",
"View results",
);
if (result === "View results") {
this.dbtTerminal.debug(
"InsightsPanel",
"Sending healthcheck results to webview",
);
await commands.executeCommand("dbtPowerUser.Insights.focus");
}
this._panel!.webview.postMessage({
command: "response",
args: {
syncRequestId,
body: { projectHealthcheck },
status: true,
},
});
} catch (e) {
this.emitError(
syncRequestId,
Expand Down

0 comments on commit f38dcd3

Please sign in to comment.