mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
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:
@@ -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');
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -27,8 +27,9 @@ export default () => `
|
|||||||
</div>
|
</div>
|
||||||
<div class="section deploy">
|
<div class="section deploy">
|
||||||
<h2 class="caption">${escape(localize('welcomePage.deploy', "Deploy"))}</h2>
|
<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>
|
<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>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section recent">
|
<div class="section recent">
|
||||||
|
|||||||
@@ -466,4 +466,7 @@ import 'sql/workbench/contrib/restore/browser/restore.contribution';
|
|||||||
// Scripting
|
// Scripting
|
||||||
import 'sql/workbench/contrib/scripting/browser/scripting.contribution';
|
import 'sql/workbench/contrib/scripting/browser/scripting.contribution';
|
||||||
|
|
||||||
|
// Resource Deployment
|
||||||
|
import 'sql/workbench/contrib/resourceDeployment/browser/resourceDeployment.contribution';
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user