You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The extension uses the Azure Resources extension to display database resources in a tree view. The API for providing data to the tree view has recently been upgraded to v2, introducing the BranchDataProvider interface. This interface enables more modular and extensible tree views by allowing specific "branches" of the tree to be controlled independently by registered data providers.
While the newly added MongoDB Clusters (Azure Cosmos DB for MongoDB (vCore)) already uses the v2 API, the implementations for MongoDB RU, NoSQL, and Postgres are still based on the v1 API. This task involves migrating these older implementations to v2 to align with modern standards.
The v2 API leverages the BranchDataProvider interface, which extends VS Code's native TreeDataProvider to create extensible, branch-specific resource trees. This provides:
Branch Control: Each branch in the tree view is managed by a BranchDataProvider.
Registration Mechanism: Resource types must register their respective BranchDataProvider in the extension manifest.
Improved Modularity: Enables granular control over tree items, making the architecture more flexible and maintainable.
Key methods in the BranchDataProvider interface:
getChildren(element: TModel): ProviderResult<TModel[]>
Retrieves child nodes for a given tree item, ensuring hierarchical navigation.
getResourceItem(element: TResource): TModel | Thenable<TModel>
Maps a specific resource to its corresponding tree model element, ensuring compatibility with the resource's starting branch item.
Special Considerations
Workspace Data Provider Independence
Special care is required for the workspace data provider, as creating resources in this provider must not depend on the presence of an existing Azure subscription. The implementation should ensure that workspace-level resource creation is independent of Azure-specific requirements, maintaining a consistent user experience for non-Azure scenarios.
Improved Security for User-Provided Secrets
A dedicated work item will focus on enhancing the security of user-provided secrets, such as connection strings or authentication keys, used in the workspace data provider. This will include:
Secure storage and retrieval mechanisms for secrets.
Clear guidelines and warnings for handling sensitive information.
Tracking Azure Cosmos DB for MongoDB (RU)
Tree Items
Account Level
Database Level
Collection Level
Commands
New Mongo Scrapbook
This is the only one that seems not to be wired to any tree item
Context-Menu: Account Level
Create Database
Delete Account
Ask Azure
Copy Connection String
Edit Tags
View Properties
Open in Portal
Refresh
Context-Menu: Database Level
Create Collection
Delete Database
Connect to Database
This one is tightly coupled to the "MongoDB Scrapbook" feature, a feature to be revisited.
Refresh
Context-Menu: Collection Level
Create Document
Open Collection
This opens the entire collection content as one big view, very risky for large collections.
Discuss deleting this feature and replacing with a Mongo Clusters collection viewer
Figure out why this feature was created
Import documents into container
Delete Collection
Refresh
Document Level
Removing this feature
Adding the new Collection View available for Mongo Clusters
The text was updated successfully, but these errors were encountered:
API Upgrade - Migrating Tree View to V2
The extension uses the Azure Resources extension to display database resources in a tree view. The API for providing data to the tree view has recently been upgraded to v2, introducing the
BranchDataProvider
interface. This interface enables more modular and extensible tree views by allowing specific "branches" of the tree to be controlled independently by registered data providers.While the newly added MongoDB Clusters (Azure Cosmos DB for MongoDB (vCore)) already uses the v2 API, the implementations for MongoDB RU, NoSQL, and Postgres are still based on the v1 API. This task involves migrating these older implementations to v2 to align with modern standards.
The v2 API leverages the
BranchDataProvider
interface, which extends VS Code's nativeTreeDataProvider
to create extensible, branch-specific resource trees. This provides:BranchDataProvider
.BranchDataProvider
in the extension manifest.Key methods in the
BranchDataProvider
interface:getChildren(element: TModel): ProviderResult<TModel[]>
Retrieves child nodes for a given tree item, ensuring hierarchical navigation.
getResourceItem(element: TResource): TModel | Thenable<TModel>
Maps a specific resource to its corresponding tree model element, ensuring compatibility with the resource's starting branch item.
Special Considerations
Workspace Data Provider Independence
Special care is required for the workspace data provider, as creating resources in this provider must not depend on the presence of an existing Azure subscription. The implementation should ensure that workspace-level resource creation is independent of Azure-specific requirements, maintaining a consistent user experience for non-Azure scenarios.
Improved Security for User-Provided Secrets
A dedicated work item will focus on enhancing the security of user-provided secrets, such as connection strings or authentication keys, used in the workspace data provider. This will include:
Tracking Azure Cosmos DB for MongoDB (RU)
Tree Items
Commands
Context-Menu: Account Level
Context-Menu: Database Level
Context-Menu: Collection Level
Document Level
The text was updated successfully, but these errors were encountered: