Add refresh support to Arc Postgres pages (#10607)

This commit is contained in:
Brian Bergeron
2020-05-29 10:24:24 -07:00
committed by GitHub
parent 1305743479
commit e9e2a0b8b4
14 changed files with 348 additions and 181 deletions

View File

@@ -23,10 +23,19 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
const dbNamespace = '';
const dbName = '';
const controllerModel = new ControllerModel(controllerUrl, auth);
const databaseModel = new PostgresModel(controllerUrl, auth, dbNamespace, dbName);
const postgresDashboard = new PostgresDashboard(loc.postgresDashboard, controllerModel, databaseModel);
await postgresDashboard.showDashboard();
try {
const controllerModel = new ControllerModel(controllerUrl, auth);
const postgresModel = new PostgresModel(controllerUrl, auth, dbNamespace, dbName);
const postgresDashboard = new PostgresDashboard(loc.postgresDashboard, controllerModel, postgresModel);
await Promise.all([
postgresDashboard.showDashboard(),
controllerModel.refresh(),
postgresModel.refresh()
]);
} catch (error) {
vscode.window.showErrorMessage(loc.failedToManagePostgres(`${dbNamespace}.${dbName}`, error));
}
});
}