Default to current controller when deploying from Arc dashboard (#14409)

This commit is contained in:
Charles Gagnon
2021-02-23 17:17:52 -08:00
committed by GitHub
parent 0108da2a24
commit d5385f66d3
6 changed files with 27 additions and 14 deletions

View File

@@ -147,7 +147,12 @@ export class ControllerDashboardOverviewPage extends DashboardPage {
this.disposables.push(
newInstance.onDidClick(async () => {
await vscode.commands.executeCommand('azdata.resource.deploy', 'azure-sql-mi', ['azure-sql-mi', 'arc.postgres'], { 'azure-sql-mi': { 'mi-type': ['arc-mi'] } });
const node = this._controllerModel.treeDataProvider.getControllerNode(this._controllerModel);
await vscode.commands.executeCommand('azdata.resource.deploy',
'azure-sql-mi', // Default option
['azure-sql-mi', 'arc.postgres'], // Type filter
{ 'azure-sql-mi': { 'mi-type': ['arc-mi'] } }, // Options filter
{ 'CONTROLLER_NAME': node?.label });
}));
// Refresh