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",
|
Portal = "Portal",
|
||||||
Hosted = "Hosted",
|
Hosted = "Hosted",
|
||||||
Emulator = "Emulator",
|
Emulator = "Emulator",
|
||||||
|
Fabric = "Fabric",
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ConfigContext {
|
export interface ConfigContext {
|
||||||
@ -187,6 +188,7 @@ export async function initializeConfiguration(): Promise<ConfigContext> {
|
|||||||
console.error(`Invalid platform query parameter: ${platform}`);
|
console.error(`Invalid platform query parameter: ${platform}`);
|
||||||
break;
|
break;
|
||||||
case Platform.Portal:
|
case Platform.Portal:
|
||||||
|
case Platform.Fabric:
|
||||||
case Platform.Hosted:
|
case Platform.Hosted:
|
||||||
case Platform.Emulator:
|
case Platform.Emulator:
|
||||||
updateConfigContext({ platform });
|
updateConfigContext({ platform });
|
||||||
|
@ -5,6 +5,9 @@ export const getDataExplorerWindow = (currentWindow: Window): Window | undefined
|
|||||||
if (currentWindow.parent === currentWindow) {
|
if (currentWindow.parent === currentWindow) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
if (currentWindow.parent.parent === currentWindow.top) { // Fabric
|
||||||
|
return currentWindow;
|
||||||
|
}
|
||||||
if (currentWindow.parent === currentWindow.top) {
|
if (currentWindow.parent === currentWindow.top) {
|
||||||
return currentWindow;
|
return currentWindow;
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,10 @@ export function useKnockoutExplorer(platform: Platform): Explorer {
|
|||||||
} else if (platform === Platform.Portal) {
|
} else if (platform === Platform.Portal) {
|
||||||
const explorer = await configurePortal();
|
const explorer = await configurePortal();
|
||||||
setExplorer(explorer);
|
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