Add Internal Command for New Resource Deployment (#9122)

* Prevent check in openerService for cmdregistry

* Revert "Prevent check in openerService for cmdregistry"

This reverts commit c40079e6f38dcd379941474accc1a1e3b42f6103.

* Add internal command that calls extension command

* Add comment
This commit is contained in:
Chris LaFreniere
2020-03-10 12:46:55 -07:00
committed by GitHub
parent 80ed6131ce
commit 3a1cd98856
3 changed files with 22 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { CommandsRegistry, ICommandService } from 'vs/platform/commands/common/commands';
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
// New Resource Deployment
const RESOURCE_DEPLOYMENT_COMMAND_ID = 'resourceDeployment.new';
CommandsRegistry.registerCommand({
id: RESOURCE_DEPLOYMENT_COMMAND_ID,
handler: (accessor: ServicesAccessor, actionContext: any) => {
const commandService = accessor.get(ICommandService);
return commandService.executeCommand('azdata.resource.deploy');
}
});

View File

@@ -27,8 +27,9 @@ export default () => `
</div>
<div class="section deploy">
<h2 class="caption">${escape(localize('welcomePage.deploy', "Deploy"))}</h2>
<!--The resourceDeployment.new command can be removed if this option is removed from the welcome page-->
<ul>
<li><a href="command:azdata.resource.deploy">${escape(localize('welcomePage.newDeployment', "New Deployment…"))}</a></li>
<li><a href="command:resourceDeployment.new">${escape(localize('welcomePage.newDeployment', "New Deployment…"))}</a></li>
</ul>
</div>
<div class="section recent">