mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-19 17:01:13 +00:00
Prepare for Fabric native (#2050)
* Implement fabric native path * Fix default values to work with current fabric clients * Fix Fabric native mode * Fix unit test * export Fabric context * Dynamically close Home tab for Mirrored databases in Fabric rather than conditional init (which doesn't work for Native) * For Fabric native, don't show "Delete Database" in context menu and reading databases should return the database from the context. * Update to V3 messaging * For data plane operations, skip ARM for Fabric native. Refine the tests for fabric to make the distinction between mirrored key, mirrored AAD and native. Fix FabricUtil to strict compile. * Add support for refreshing access tokens * Buf fix: don't wait for refresh is async * Fix format * Fix strict compile issue --------- Co-authored-by: Laurent Nguyen <languye@microsoft.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { FabricDatabaseConnectionInfo } from "Contracts/FabricMessagesContract";
|
||||
import { CosmosDbArtifactType, ResourceTokenInfo } from "Contracts/FabricMessagesContract";
|
||||
import { ParsedResourceTokenConnectionString } from "Platform/Hosted/Helpers/ResourceTokenUtils";
|
||||
import { Action } from "Shared/Telemetry/TelemetryConstants";
|
||||
import { traceOpen } from "Shared/Telemetry/TelemetryProcessor";
|
||||
@@ -47,11 +47,21 @@ export interface VCoreMongoConnectionParams {
|
||||
connectionString: string;
|
||||
}
|
||||
|
||||
interface FabricContext {
|
||||
connectionId: string;
|
||||
databaseConnectionInfo: FabricDatabaseConnectionInfo | undefined;
|
||||
export interface FabricArtifactInfo {
|
||||
[CosmosDbArtifactType.MIRRORED_KEY]: {
|
||||
connectionId: string;
|
||||
resourceTokenInfo: ResourceTokenInfo | undefined;
|
||||
};
|
||||
[CosmosDbArtifactType.MIRRORED_AAD]: undefined;
|
||||
[CosmosDbArtifactType.NATIVE]: undefined;
|
||||
}
|
||||
export interface FabricContext<T extends CosmosDbArtifactType> {
|
||||
fabricClientRpcVersion: string;
|
||||
isReadOnly: boolean;
|
||||
isVisible: boolean;
|
||||
databaseName: string;
|
||||
artifactType: CosmosDbArtifactType;
|
||||
artifactInfo: FabricArtifactInfo[T];
|
||||
}
|
||||
|
||||
export type AdminFeedbackControlPolicy =
|
||||
@@ -70,7 +80,7 @@ export type AdminFeedbackPolicySettings = {
|
||||
};
|
||||
|
||||
export interface UserContext {
|
||||
readonly fabricContext?: FabricContext;
|
||||
readonly fabricContext?: FabricContext<CosmosDbArtifactType>;
|
||||
readonly authType?: AuthType;
|
||||
readonly masterKey?: string;
|
||||
readonly subscriptionId?: string;
|
||||
|
||||
Reference in New Issue
Block a user