in src/commands/logic-app/openVersionInDesigner.ts [14:52]
export async function openVersionInDesigner(tree: AzureTreeDataProvider, node?: IAzureNode): Promise<void> {
if (!node) {
node = await tree.showNodePicker([LogicAppCurrentVersionTreeItem.contextValue, LogicAppVersionTreeItem.contextValue]);
}
const readOnlySuffix = localize("azLogicApps.readOnlySuffix", "(read-only)");
const authorization = await getAuthorization(node.credentials);
const canvasMode = vscode.workspace.getConfiguration("azureLogicApps").get<boolean>("canvasMode")!;
const { subscriptionId, treeItem } = node as IAzureNode<LogicAppVersionTreeItem>;
const definition = await treeItem.getData();
const parameters = treeItem.getParameters();
const references = await treeItem.getReferences();
const { id: workflowId, integrationAccountId, label: workflowVersionName, location, resourceGroupName, sku } = treeItem;
const { domain: tenantId, userName: userId } = getCredentialsMetadata(node.credentials);
const title = `${workflowVersionName} ${readOnlySuffix}`;
const options: vscode.WebviewOptions & vscode.WebviewPanelOptions = {
enableScripts: true
};
const panel = vscode.window.createWebviewPanel("readonlyDesigner", title, vscode.ViewColumn.Beside, options);
panel.webview.html = getWebviewContentForDesigner({
authorization,
callbacks: {},
canvasMode,
definition,
integrationAccountId,
location,
parameters,
readOnly: true,
references,
resourceGroupName,
sku,
subscriptionId,
tenantId,
title,
userId,
workflowId
});
}