mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Azure: add PostgresSQL support and refactor to use resource graph (#8046)
* Azure: add PostgresSQL support and refactor to use resource graph - Refactored to use @azure/arm-resourcegraph for all queries - Refactored database lookup to do just 2 queries (all servers, all DBS) instead of waiting serially on 1 query per RG - Added Azure Database for PostgresSQL Servers support in the tree - Removed use of older azure APIs in preference to ones compatible with resource graph - Note: Had to use v1.0 of new subscriptions package because resourcegraph is 2month out of date vs all other packages
This commit is contained in:
@@ -29,6 +29,8 @@ import { registerAzureResourceCommands } from './azureResource/commands';
|
||||
import { AzureResourceTreeProvider } from './azureResource/tree/treeProvider';
|
||||
import { SqlInstanceResourceService } from './azureResource/providers/sqlinstance/sqlInstanceService';
|
||||
import { SqlInstanceProvider } from './azureResource/providers/sqlinstance/sqlInstanceProvider';
|
||||
import { PostgresServerProvider } from './azureResource/providers/postgresServer/postgresServerProvider';
|
||||
import { PostgresServerService } from './azureResource/providers/postgresServer/postgresServerService';
|
||||
|
||||
let extensionContext: vscode.ExtensionContext;
|
||||
|
||||
@@ -65,7 +67,7 @@ export async function activate(context: vscode.ExtensionContext) {
|
||||
}
|
||||
|
||||
// Create the provider service and activate
|
||||
initAzureAccountProvider(extensionContext, storagePath);
|
||||
initAzureAccountProvider(extensionContext, storagePath).catch((err) => console.log(err));
|
||||
|
||||
registerAzureServices(appContext);
|
||||
const azureResourceTree = new AzureResourceTreeProvider(appContext);
|
||||
@@ -77,7 +79,8 @@ export async function activate(context: vscode.ExtensionContext) {
|
||||
return [
|
||||
new AzureResourceDatabaseServerProvider(new AzureResourceDatabaseServerService(), apiWrapper, extensionContext),
|
||||
new AzureResourceDatabaseProvider(new AzureResourceDatabaseService(), apiWrapper, extensionContext),
|
||||
new SqlInstanceProvider(new SqlInstanceResourceService(), apiWrapper, extensionContext)
|
||||
new SqlInstanceProvider(new SqlInstanceResourceService(), apiWrapper, extensionContext),
|
||||
new PostgresServerProvider(new PostgresServerService(), apiWrapper, extensionContext)
|
||||
];
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user