mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2024-12-01 18:07:00 +00:00
Add Platform.Fabric to run in context of Fabric
This commit is contained in:
parent
12ed591634
commit
14a8072551
@ -16,6 +16,7 @@ export enum Platform {
|
||||
Portal = "Portal",
|
||||
Hosted = "Hosted",
|
||||
Emulator = "Emulator",
|
||||
Fabric = "Fabric",
|
||||
}
|
||||
|
||||
export interface ConfigContext {
|
||||
@ -187,6 +188,7 @@ export async function initializeConfiguration(): Promise<ConfigContext> {
|
||||
console.error(`Invalid platform query parameter: ${platform}`);
|
||||
break;
|
||||
case Platform.Portal:
|
||||
case Platform.Fabric:
|
||||
case Platform.Hosted:
|
||||
case Platform.Emulator:
|
||||
updateConfigContext({ platform });
|
||||
|
@ -5,6 +5,9 @@ export const getDataExplorerWindow = (currentWindow: Window): Window | undefined
|
||||
if (currentWindow.parent === currentWindow) {
|
||||
return undefined;
|
||||
}
|
||||
if (currentWindow.parent.parent === currentWindow.top) { // Fabric
|
||||
return currentWindow;
|
||||
}
|
||||
if (currentWindow.parent === currentWindow.top) {
|
||||
return currentWindow;
|
||||
}
|
||||
|
@ -60,6 +60,10 @@ export function useKnockoutExplorer(platform: Platform): Explorer {
|
||||
} else if (platform === Platform.Portal) {
|
||||
const explorer = await configurePortal();
|
||||
setExplorer(explorer);
|
||||
} else if (platform === Platform.Fabric) {
|
||||
//TODO: need Fabric specific implementation similar to portal
|
||||
const explorer = await configureHosted();
|
||||
setExplorer(explorer);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user